{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConvert.Types.H264FramerateConversionAlgorithm
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.H264FramerateConversionAlgorithm
  ( H264FramerateConversionAlgorithm
      ( ..,
        H264FramerateConversionAlgorithm_DUPLICATE_DROP,
        H264FramerateConversionAlgorithm_FRAMEFORMER,
        H264FramerateConversionAlgorithm_INTERPOLATE
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

-- | Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
newtype H264FramerateConversionAlgorithm = H264FramerateConversionAlgorithm'
  { H264FramerateConversionAlgorithm -> Text
fromH264FramerateConversionAlgorithm ::
      Core.Text
  }
  deriving stock
    ( Int -> H264FramerateConversionAlgorithm -> ShowS
[H264FramerateConversionAlgorithm] -> ShowS
H264FramerateConversionAlgorithm -> String
(Int -> H264FramerateConversionAlgorithm -> ShowS)
-> (H264FramerateConversionAlgorithm -> String)
-> ([H264FramerateConversionAlgorithm] -> ShowS)
-> Show H264FramerateConversionAlgorithm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [H264FramerateConversionAlgorithm] -> ShowS
$cshowList :: [H264FramerateConversionAlgorithm] -> ShowS
show :: H264FramerateConversionAlgorithm -> String
$cshow :: H264FramerateConversionAlgorithm -> String
showsPrec :: Int -> H264FramerateConversionAlgorithm -> ShowS
$cshowsPrec :: Int -> H264FramerateConversionAlgorithm -> ShowS
Prelude.Show,
      ReadPrec [H264FramerateConversionAlgorithm]
ReadPrec H264FramerateConversionAlgorithm
Int -> ReadS H264FramerateConversionAlgorithm
ReadS [H264FramerateConversionAlgorithm]
(Int -> ReadS H264FramerateConversionAlgorithm)
-> ReadS [H264FramerateConversionAlgorithm]
-> ReadPrec H264FramerateConversionAlgorithm
-> ReadPrec [H264FramerateConversionAlgorithm]
-> Read H264FramerateConversionAlgorithm
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [H264FramerateConversionAlgorithm]
$creadListPrec :: ReadPrec [H264FramerateConversionAlgorithm]
readPrec :: ReadPrec H264FramerateConversionAlgorithm
$creadPrec :: ReadPrec H264FramerateConversionAlgorithm
readList :: ReadS [H264FramerateConversionAlgorithm]
$creadList :: ReadS [H264FramerateConversionAlgorithm]
readsPrec :: Int -> ReadS H264FramerateConversionAlgorithm
$creadsPrec :: Int -> ReadS H264FramerateConversionAlgorithm
Prelude.Read,
      H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
(H264FramerateConversionAlgorithm
 -> H264FramerateConversionAlgorithm -> Bool)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm -> Bool)
-> Eq H264FramerateConversionAlgorithm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
$c/= :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
== :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
$c== :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
Prelude.Eq,
      Eq H264FramerateConversionAlgorithm
Eq H264FramerateConversionAlgorithm
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm -> Ordering)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm -> Bool)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm -> Bool)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm -> Bool)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm -> Bool)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm)
-> (H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm
    -> H264FramerateConversionAlgorithm)
-> Ord H264FramerateConversionAlgorithm
H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Ordering
H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
$cmin :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
max :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
$cmax :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm
>= :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
$c>= :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
> :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
$c> :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
<= :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
$c<= :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
< :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
$c< :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Bool
compare :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Ordering
$ccompare :: H264FramerateConversionAlgorithm
-> H264FramerateConversionAlgorithm -> Ordering
$cp1Ord :: Eq H264FramerateConversionAlgorithm
Prelude.Ord,
      (forall x.
 H264FramerateConversionAlgorithm
 -> Rep H264FramerateConversionAlgorithm x)
-> (forall x.
    Rep H264FramerateConversionAlgorithm x
    -> H264FramerateConversionAlgorithm)
-> Generic H264FramerateConversionAlgorithm
forall x.
Rep H264FramerateConversionAlgorithm x
-> H264FramerateConversionAlgorithm
forall x.
H264FramerateConversionAlgorithm
-> Rep H264FramerateConversionAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep H264FramerateConversionAlgorithm x
-> H264FramerateConversionAlgorithm
$cfrom :: forall x.
H264FramerateConversionAlgorithm
-> Rep H264FramerateConversionAlgorithm x
Prelude.Generic
    )
  deriving newtype
    ( Int -> H264FramerateConversionAlgorithm -> Int
H264FramerateConversionAlgorithm -> Int
(Int -> H264FramerateConversionAlgorithm -> Int)
-> (H264FramerateConversionAlgorithm -> Int)
-> Hashable H264FramerateConversionAlgorithm
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: H264FramerateConversionAlgorithm -> Int
$chash :: H264FramerateConversionAlgorithm -> Int
hashWithSalt :: Int -> H264FramerateConversionAlgorithm -> Int
$chashWithSalt :: Int -> H264FramerateConversionAlgorithm -> Int
Prelude.Hashable,
      H264FramerateConversionAlgorithm -> ()
(H264FramerateConversionAlgorithm -> ())
-> NFData H264FramerateConversionAlgorithm
forall a. (a -> ()) -> NFData a
rnf :: H264FramerateConversionAlgorithm -> ()
$crnf :: H264FramerateConversionAlgorithm -> ()
Prelude.NFData,
      Text -> Either String H264FramerateConversionAlgorithm
(Text -> Either String H264FramerateConversionAlgorithm)
-> FromText H264FramerateConversionAlgorithm
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String H264FramerateConversionAlgorithm
$cfromText :: Text -> Either String H264FramerateConversionAlgorithm
Core.FromText,
      H264FramerateConversionAlgorithm -> Text
(H264FramerateConversionAlgorithm -> Text)
-> ToText H264FramerateConversionAlgorithm
forall a. (a -> Text) -> ToText a
toText :: H264FramerateConversionAlgorithm -> Text
$ctoText :: H264FramerateConversionAlgorithm -> Text
Core.ToText,
      H264FramerateConversionAlgorithm -> ByteString
(H264FramerateConversionAlgorithm -> ByteString)
-> ToByteString H264FramerateConversionAlgorithm
forall a. (a -> ByteString) -> ToByteString a
toBS :: H264FramerateConversionAlgorithm -> ByteString
$ctoBS :: H264FramerateConversionAlgorithm -> ByteString
Core.ToByteString,
      H264FramerateConversionAlgorithm -> ByteStringBuilder
(H264FramerateConversionAlgorithm -> ByteStringBuilder)
-> ToLog H264FramerateConversionAlgorithm
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: H264FramerateConversionAlgorithm -> ByteStringBuilder
$cbuild :: H264FramerateConversionAlgorithm -> ByteStringBuilder
Core.ToLog,
      HeaderName -> H264FramerateConversionAlgorithm -> [Header]
(HeaderName -> H264FramerateConversionAlgorithm -> [Header])
-> ToHeader H264FramerateConversionAlgorithm
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> H264FramerateConversionAlgorithm -> [Header]
$ctoHeader :: HeaderName -> H264FramerateConversionAlgorithm -> [Header]
Core.ToHeader,
      H264FramerateConversionAlgorithm -> QueryString
(H264FramerateConversionAlgorithm -> QueryString)
-> ToQuery H264FramerateConversionAlgorithm
forall a. (a -> QueryString) -> ToQuery a
toQuery :: H264FramerateConversionAlgorithm -> QueryString
$ctoQuery :: H264FramerateConversionAlgorithm -> QueryString
Core.ToQuery,
      Value -> Parser [H264FramerateConversionAlgorithm]
Value -> Parser H264FramerateConversionAlgorithm
(Value -> Parser H264FramerateConversionAlgorithm)
-> (Value -> Parser [H264FramerateConversionAlgorithm])
-> FromJSON H264FramerateConversionAlgorithm
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [H264FramerateConversionAlgorithm]
$cparseJSONList :: Value -> Parser [H264FramerateConversionAlgorithm]
parseJSON :: Value -> Parser H264FramerateConversionAlgorithm
$cparseJSON :: Value -> Parser H264FramerateConversionAlgorithm
Core.FromJSON,
      FromJSONKeyFunction [H264FramerateConversionAlgorithm]
FromJSONKeyFunction H264FramerateConversionAlgorithm
FromJSONKeyFunction H264FramerateConversionAlgorithm
-> FromJSONKeyFunction [H264FramerateConversionAlgorithm]
-> FromJSONKey H264FramerateConversionAlgorithm
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [H264FramerateConversionAlgorithm]
$cfromJSONKeyList :: FromJSONKeyFunction [H264FramerateConversionAlgorithm]
fromJSONKey :: FromJSONKeyFunction H264FramerateConversionAlgorithm
$cfromJSONKey :: FromJSONKeyFunction H264FramerateConversionAlgorithm
Core.FromJSONKey,
      [H264FramerateConversionAlgorithm] -> Encoding
[H264FramerateConversionAlgorithm] -> Value
H264FramerateConversionAlgorithm -> Encoding
H264FramerateConversionAlgorithm -> Value
(H264FramerateConversionAlgorithm -> Value)
-> (H264FramerateConversionAlgorithm -> Encoding)
-> ([H264FramerateConversionAlgorithm] -> Value)
-> ([H264FramerateConversionAlgorithm] -> Encoding)
-> ToJSON H264FramerateConversionAlgorithm
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [H264FramerateConversionAlgorithm] -> Encoding
$ctoEncodingList :: [H264FramerateConversionAlgorithm] -> Encoding
toJSONList :: [H264FramerateConversionAlgorithm] -> Value
$ctoJSONList :: [H264FramerateConversionAlgorithm] -> Value
toEncoding :: H264FramerateConversionAlgorithm -> Encoding
$ctoEncoding :: H264FramerateConversionAlgorithm -> Encoding
toJSON :: H264FramerateConversionAlgorithm -> Value
$ctoJSON :: H264FramerateConversionAlgorithm -> Value
Core.ToJSON,
      ToJSONKeyFunction [H264FramerateConversionAlgorithm]
ToJSONKeyFunction H264FramerateConversionAlgorithm
ToJSONKeyFunction H264FramerateConversionAlgorithm
-> ToJSONKeyFunction [H264FramerateConversionAlgorithm]
-> ToJSONKey H264FramerateConversionAlgorithm
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [H264FramerateConversionAlgorithm]
$ctoJSONKeyList :: ToJSONKeyFunction [H264FramerateConversionAlgorithm]
toJSONKey :: ToJSONKeyFunction H264FramerateConversionAlgorithm
$ctoJSONKey :: ToJSONKeyFunction H264FramerateConversionAlgorithm
Core.ToJSONKey,
      [Node] -> Either String H264FramerateConversionAlgorithm
([Node] -> Either String H264FramerateConversionAlgorithm)
-> FromXML H264FramerateConversionAlgorithm
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String H264FramerateConversionAlgorithm
$cparseXML :: [Node] -> Either String H264FramerateConversionAlgorithm
Core.FromXML,
      H264FramerateConversionAlgorithm -> XML
(H264FramerateConversionAlgorithm -> XML)
-> ToXML H264FramerateConversionAlgorithm
forall a. (a -> XML) -> ToXML a
toXML :: H264FramerateConversionAlgorithm -> XML
$ctoXML :: H264FramerateConversionAlgorithm -> XML
Core.ToXML
    )

pattern H264FramerateConversionAlgorithm_DUPLICATE_DROP :: H264FramerateConversionAlgorithm
pattern $bH264FramerateConversionAlgorithm_DUPLICATE_DROP :: H264FramerateConversionAlgorithm
$mH264FramerateConversionAlgorithm_DUPLICATE_DROP :: forall r.
H264FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
H264FramerateConversionAlgorithm_DUPLICATE_DROP = H264FramerateConversionAlgorithm' "DUPLICATE_DROP"

pattern H264FramerateConversionAlgorithm_FRAMEFORMER :: H264FramerateConversionAlgorithm
pattern $bH264FramerateConversionAlgorithm_FRAMEFORMER :: H264FramerateConversionAlgorithm
$mH264FramerateConversionAlgorithm_FRAMEFORMER :: forall r.
H264FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
H264FramerateConversionAlgorithm_FRAMEFORMER = H264FramerateConversionAlgorithm' "FRAMEFORMER"

pattern H264FramerateConversionAlgorithm_INTERPOLATE :: H264FramerateConversionAlgorithm
pattern $bH264FramerateConversionAlgorithm_INTERPOLATE :: H264FramerateConversionAlgorithm
$mH264FramerateConversionAlgorithm_INTERPOLATE :: forall r.
H264FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
H264FramerateConversionAlgorithm_INTERPOLATE = H264FramerateConversionAlgorithm' "INTERPOLATE"

{-# COMPLETE
  H264FramerateConversionAlgorithm_DUPLICATE_DROP,
  H264FramerateConversionAlgorithm_FRAMEFORMER,
  H264FramerateConversionAlgorithm_INTERPOLATE,
  H264FramerateConversionAlgorithm'
  #-}