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

pattern XavcFramerateConversionAlgorithm_DUPLICATE_DROP :: XavcFramerateConversionAlgorithm
pattern $bXavcFramerateConversionAlgorithm_DUPLICATE_DROP :: XavcFramerateConversionAlgorithm
$mXavcFramerateConversionAlgorithm_DUPLICATE_DROP :: forall r.
XavcFramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
XavcFramerateConversionAlgorithm_DUPLICATE_DROP = XavcFramerateConversionAlgorithm' "DUPLICATE_DROP"

pattern XavcFramerateConversionAlgorithm_FRAMEFORMER :: XavcFramerateConversionAlgorithm
pattern $bXavcFramerateConversionAlgorithm_FRAMEFORMER :: XavcFramerateConversionAlgorithm
$mXavcFramerateConversionAlgorithm_FRAMEFORMER :: forall r.
XavcFramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
XavcFramerateConversionAlgorithm_FRAMEFORMER = XavcFramerateConversionAlgorithm' "FRAMEFORMER"

pattern XavcFramerateConversionAlgorithm_INTERPOLATE :: XavcFramerateConversionAlgorithm
pattern $bXavcFramerateConversionAlgorithm_INTERPOLATE :: XavcFramerateConversionAlgorithm
$mXavcFramerateConversionAlgorithm_INTERPOLATE :: forall r.
XavcFramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
XavcFramerateConversionAlgorithm_INTERPOLATE = XavcFramerateConversionAlgorithm' "INTERPOLATE"

{-# COMPLETE
  XavcFramerateConversionAlgorithm_DUPLICATE_DROP,
  XavcFramerateConversionAlgorithm_FRAMEFORMER,
  XavcFramerateConversionAlgorithm_INTERPOLATE,
  XavcFramerateConversionAlgorithm'
  #-}