{-# 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.AvcIntraFramerateConversionAlgorithm
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.AvcIntraFramerateConversionAlgorithm
  ( AvcIntraFramerateConversionAlgorithm
      ( ..,
        AvcIntraFramerateConversionAlgorithm_DUPLICATE_DROP,
        AvcIntraFramerateConversionAlgorithm_FRAMEFORMER,
        AvcIntraFramerateConversionAlgorithm_INTERPOLATE
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
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 AvcIntraFramerateConversionAlgorithm = AvcIntraFramerateConversionAlgorithm'
  { AvcIntraFramerateConversionAlgorithm -> Text
fromAvcIntraFramerateConversionAlgorithm ::
      Data.Text
  }
  deriving stock
    ( Int -> AvcIntraFramerateConversionAlgorithm -> ShowS
[AvcIntraFramerateConversionAlgorithm] -> ShowS
AvcIntraFramerateConversionAlgorithm -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AvcIntraFramerateConversionAlgorithm] -> ShowS
$cshowList :: [AvcIntraFramerateConversionAlgorithm] -> ShowS
show :: AvcIntraFramerateConversionAlgorithm -> String
$cshow :: AvcIntraFramerateConversionAlgorithm -> String
showsPrec :: Int -> AvcIntraFramerateConversionAlgorithm -> ShowS
$cshowsPrec :: Int -> AvcIntraFramerateConversionAlgorithm -> ShowS
Prelude.Show,
      ReadPrec [AvcIntraFramerateConversionAlgorithm]
ReadPrec AvcIntraFramerateConversionAlgorithm
Int -> ReadS AvcIntraFramerateConversionAlgorithm
ReadS [AvcIntraFramerateConversionAlgorithm]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AvcIntraFramerateConversionAlgorithm]
$creadListPrec :: ReadPrec [AvcIntraFramerateConversionAlgorithm]
readPrec :: ReadPrec AvcIntraFramerateConversionAlgorithm
$creadPrec :: ReadPrec AvcIntraFramerateConversionAlgorithm
readList :: ReadS [AvcIntraFramerateConversionAlgorithm]
$creadList :: ReadS [AvcIntraFramerateConversionAlgorithm]
readsPrec :: Int -> ReadS AvcIntraFramerateConversionAlgorithm
$creadsPrec :: Int -> ReadS AvcIntraFramerateConversionAlgorithm
Prelude.Read,
      AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
$c/= :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
== :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
$c== :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
Prelude.Eq,
      Eq AvcIntraFramerateConversionAlgorithm
AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Ordering
AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
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 :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
$cmin :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
max :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
$cmax :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm
>= :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
$c>= :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
> :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
$c> :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
<= :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
$c<= :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
< :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
$c< :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Bool
compare :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Ordering
$ccompare :: AvcIntraFramerateConversionAlgorithm
-> AvcIntraFramerateConversionAlgorithm -> Ordering
Prelude.Ord,
      forall x.
Rep AvcIntraFramerateConversionAlgorithm x
-> AvcIntraFramerateConversionAlgorithm
forall x.
AvcIntraFramerateConversionAlgorithm
-> Rep AvcIntraFramerateConversionAlgorithm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AvcIntraFramerateConversionAlgorithm x
-> AvcIntraFramerateConversionAlgorithm
$cfrom :: forall x.
AvcIntraFramerateConversionAlgorithm
-> Rep AvcIntraFramerateConversionAlgorithm x
Prelude.Generic
    )
  deriving newtype
    ( Eq AvcIntraFramerateConversionAlgorithm
Int -> AvcIntraFramerateConversionAlgorithm -> Int
AvcIntraFramerateConversionAlgorithm -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: AvcIntraFramerateConversionAlgorithm -> Int
$chash :: AvcIntraFramerateConversionAlgorithm -> Int
hashWithSalt :: Int -> AvcIntraFramerateConversionAlgorithm -> Int
$chashWithSalt :: Int -> AvcIntraFramerateConversionAlgorithm -> Int
Prelude.Hashable,
      AvcIntraFramerateConversionAlgorithm -> ()
forall a. (a -> ()) -> NFData a
rnf :: AvcIntraFramerateConversionAlgorithm -> ()
$crnf :: AvcIntraFramerateConversionAlgorithm -> ()
Prelude.NFData,
      Text -> Either String AvcIntraFramerateConversionAlgorithm
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AvcIntraFramerateConversionAlgorithm
$cfromText :: Text -> Either String AvcIntraFramerateConversionAlgorithm
Data.FromText,
      AvcIntraFramerateConversionAlgorithm -> Text
forall a. (a -> Text) -> ToText a
toText :: AvcIntraFramerateConversionAlgorithm -> Text
$ctoText :: AvcIntraFramerateConversionAlgorithm -> Text
Data.ToText,
      AvcIntraFramerateConversionAlgorithm -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: AvcIntraFramerateConversionAlgorithm -> ByteString
$ctoBS :: AvcIntraFramerateConversionAlgorithm -> ByteString
Data.ToByteString,
      AvcIntraFramerateConversionAlgorithm -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AvcIntraFramerateConversionAlgorithm -> ByteStringBuilder
$cbuild :: AvcIntraFramerateConversionAlgorithm -> ByteStringBuilder
Data.ToLog,
      HeaderName -> AvcIntraFramerateConversionAlgorithm -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AvcIntraFramerateConversionAlgorithm -> [Header]
$ctoHeader :: HeaderName -> AvcIntraFramerateConversionAlgorithm -> [Header]
Data.ToHeader,
      AvcIntraFramerateConversionAlgorithm -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AvcIntraFramerateConversionAlgorithm -> QueryString
$ctoQuery :: AvcIntraFramerateConversionAlgorithm -> QueryString
Data.ToQuery,
      Value -> Parser [AvcIntraFramerateConversionAlgorithm]
Value -> Parser AvcIntraFramerateConversionAlgorithm
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [AvcIntraFramerateConversionAlgorithm]
$cparseJSONList :: Value -> Parser [AvcIntraFramerateConversionAlgorithm]
parseJSON :: Value -> Parser AvcIntraFramerateConversionAlgorithm
$cparseJSON :: Value -> Parser AvcIntraFramerateConversionAlgorithm
Data.FromJSON,
      FromJSONKeyFunction [AvcIntraFramerateConversionAlgorithm]
FromJSONKeyFunction AvcIntraFramerateConversionAlgorithm
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AvcIntraFramerateConversionAlgorithm]
$cfromJSONKeyList :: FromJSONKeyFunction [AvcIntraFramerateConversionAlgorithm]
fromJSONKey :: FromJSONKeyFunction AvcIntraFramerateConversionAlgorithm
$cfromJSONKey :: FromJSONKeyFunction AvcIntraFramerateConversionAlgorithm
Data.FromJSONKey,
      [AvcIntraFramerateConversionAlgorithm] -> Encoding
[AvcIntraFramerateConversionAlgorithm] -> Value
AvcIntraFramerateConversionAlgorithm -> Encoding
AvcIntraFramerateConversionAlgorithm -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AvcIntraFramerateConversionAlgorithm] -> Encoding
$ctoEncodingList :: [AvcIntraFramerateConversionAlgorithm] -> Encoding
toJSONList :: [AvcIntraFramerateConversionAlgorithm] -> Value
$ctoJSONList :: [AvcIntraFramerateConversionAlgorithm] -> Value
toEncoding :: AvcIntraFramerateConversionAlgorithm -> Encoding
$ctoEncoding :: AvcIntraFramerateConversionAlgorithm -> Encoding
toJSON :: AvcIntraFramerateConversionAlgorithm -> Value
$ctoJSON :: AvcIntraFramerateConversionAlgorithm -> Value
Data.ToJSON,
      ToJSONKeyFunction [AvcIntraFramerateConversionAlgorithm]
ToJSONKeyFunction AvcIntraFramerateConversionAlgorithm
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AvcIntraFramerateConversionAlgorithm]
$ctoJSONKeyList :: ToJSONKeyFunction [AvcIntraFramerateConversionAlgorithm]
toJSONKey :: ToJSONKeyFunction AvcIntraFramerateConversionAlgorithm
$ctoJSONKey :: ToJSONKeyFunction AvcIntraFramerateConversionAlgorithm
Data.ToJSONKey,
      [Node] -> Either String AvcIntraFramerateConversionAlgorithm
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AvcIntraFramerateConversionAlgorithm
$cparseXML :: [Node] -> Either String AvcIntraFramerateConversionAlgorithm
Data.FromXML,
      AvcIntraFramerateConversionAlgorithm -> XML
forall a. (a -> XML) -> ToXML a
toXML :: AvcIntraFramerateConversionAlgorithm -> XML
$ctoXML :: AvcIntraFramerateConversionAlgorithm -> XML
Data.ToXML
    )

pattern AvcIntraFramerateConversionAlgorithm_DUPLICATE_DROP :: AvcIntraFramerateConversionAlgorithm
pattern $bAvcIntraFramerateConversionAlgorithm_DUPLICATE_DROP :: AvcIntraFramerateConversionAlgorithm
$mAvcIntraFramerateConversionAlgorithm_DUPLICATE_DROP :: forall {r}.
AvcIntraFramerateConversionAlgorithm
-> ((# #) -> r) -> ((# #) -> r) -> r
AvcIntraFramerateConversionAlgorithm_DUPLICATE_DROP = AvcIntraFramerateConversionAlgorithm' "DUPLICATE_DROP"

pattern AvcIntraFramerateConversionAlgorithm_FRAMEFORMER :: AvcIntraFramerateConversionAlgorithm
pattern $bAvcIntraFramerateConversionAlgorithm_FRAMEFORMER :: AvcIntraFramerateConversionAlgorithm
$mAvcIntraFramerateConversionAlgorithm_FRAMEFORMER :: forall {r}.
AvcIntraFramerateConversionAlgorithm
-> ((# #) -> r) -> ((# #) -> r) -> r
AvcIntraFramerateConversionAlgorithm_FRAMEFORMER = AvcIntraFramerateConversionAlgorithm' "FRAMEFORMER"

pattern AvcIntraFramerateConversionAlgorithm_INTERPOLATE :: AvcIntraFramerateConversionAlgorithm
pattern $bAvcIntraFramerateConversionAlgorithm_INTERPOLATE :: AvcIntraFramerateConversionAlgorithm
$mAvcIntraFramerateConversionAlgorithm_INTERPOLATE :: forall {r}.
AvcIntraFramerateConversionAlgorithm
-> ((# #) -> r) -> ((# #) -> r) -> r
AvcIntraFramerateConversionAlgorithm_INTERPOLATE = AvcIntraFramerateConversionAlgorithm' "INTERPOLATE"

{-# COMPLETE
  AvcIntraFramerateConversionAlgorithm_DUPLICATE_DROP,
  AvcIntraFramerateConversionAlgorithm_FRAMEFORMER,
  AvcIntraFramerateConversionAlgorithm_INTERPOLATE,
  AvcIntraFramerateConversionAlgorithm'
  #-}