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

pattern Av1FramerateConversionAlgorithm_DUPLICATE_DROP :: Av1FramerateConversionAlgorithm
pattern $bAv1FramerateConversionAlgorithm_DUPLICATE_DROP :: Av1FramerateConversionAlgorithm
$mAv1FramerateConversionAlgorithm_DUPLICATE_DROP :: forall r.
Av1FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
Av1FramerateConversionAlgorithm_DUPLICATE_DROP = Av1FramerateConversionAlgorithm' "DUPLICATE_DROP"

pattern Av1FramerateConversionAlgorithm_FRAMEFORMER :: Av1FramerateConversionAlgorithm
pattern $bAv1FramerateConversionAlgorithm_FRAMEFORMER :: Av1FramerateConversionAlgorithm
$mAv1FramerateConversionAlgorithm_FRAMEFORMER :: forall r.
Av1FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
Av1FramerateConversionAlgorithm_FRAMEFORMER = Av1FramerateConversionAlgorithm' "FRAMEFORMER"

pattern Av1FramerateConversionAlgorithm_INTERPOLATE :: Av1FramerateConversionAlgorithm
pattern $bAv1FramerateConversionAlgorithm_INTERPOLATE :: Av1FramerateConversionAlgorithm
$mAv1FramerateConversionAlgorithm_INTERPOLATE :: forall r.
Av1FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
Av1FramerateConversionAlgorithm_INTERPOLATE = Av1FramerateConversionAlgorithm' "INTERPOLATE"

{-# COMPLETE
  Av1FramerateConversionAlgorithm_DUPLICATE_DROP,
  Av1FramerateConversionAlgorithm_FRAMEFORMER,
  Av1FramerateConversionAlgorithm_INTERPOLATE,
  Av1FramerateConversionAlgorithm'
  #-}