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

pattern Vp8FramerateConversionAlgorithm_DUPLICATE_DROP :: Vp8FramerateConversionAlgorithm
pattern $bVp8FramerateConversionAlgorithm_DUPLICATE_DROP :: Vp8FramerateConversionAlgorithm
$mVp8FramerateConversionAlgorithm_DUPLICATE_DROP :: forall r.
Vp8FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
Vp8FramerateConversionAlgorithm_DUPLICATE_DROP = Vp8FramerateConversionAlgorithm' "DUPLICATE_DROP"

pattern Vp8FramerateConversionAlgorithm_FRAMEFORMER :: Vp8FramerateConversionAlgorithm
pattern $bVp8FramerateConversionAlgorithm_FRAMEFORMER :: Vp8FramerateConversionAlgorithm
$mVp8FramerateConversionAlgorithm_FRAMEFORMER :: forall r.
Vp8FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
Vp8FramerateConversionAlgorithm_FRAMEFORMER = Vp8FramerateConversionAlgorithm' "FRAMEFORMER"

pattern Vp8FramerateConversionAlgorithm_INTERPOLATE :: Vp8FramerateConversionAlgorithm
pattern $bVp8FramerateConversionAlgorithm_INTERPOLATE :: Vp8FramerateConversionAlgorithm
$mVp8FramerateConversionAlgorithm_INTERPOLATE :: forall r.
Vp8FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
Vp8FramerateConversionAlgorithm_INTERPOLATE = Vp8FramerateConversionAlgorithm' "INTERPOLATE"

{-# COMPLETE
  Vp8FramerateConversionAlgorithm_DUPLICATE_DROP,
  Vp8FramerateConversionAlgorithm_FRAMEFORMER,
  Vp8FramerateConversionAlgorithm_INTERPOLATE,
  Vp8FramerateConversionAlgorithm'
  #-}