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

pattern H265FramerateConversionAlgorithm_DUPLICATE_DROP :: H265FramerateConversionAlgorithm
pattern $bH265FramerateConversionAlgorithm_DUPLICATE_DROP :: H265FramerateConversionAlgorithm
$mH265FramerateConversionAlgorithm_DUPLICATE_DROP :: forall r.
H265FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
H265FramerateConversionAlgorithm_DUPLICATE_DROP = H265FramerateConversionAlgorithm' "DUPLICATE_DROP"

pattern H265FramerateConversionAlgorithm_FRAMEFORMER :: H265FramerateConversionAlgorithm
pattern $bH265FramerateConversionAlgorithm_FRAMEFORMER :: H265FramerateConversionAlgorithm
$mH265FramerateConversionAlgorithm_FRAMEFORMER :: forall r.
H265FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
H265FramerateConversionAlgorithm_FRAMEFORMER = H265FramerateConversionAlgorithm' "FRAMEFORMER"

pattern H265FramerateConversionAlgorithm_INTERPOLATE :: H265FramerateConversionAlgorithm
pattern $bH265FramerateConversionAlgorithm_INTERPOLATE :: H265FramerateConversionAlgorithm
$mH265FramerateConversionAlgorithm_INTERPOLATE :: forall r.
H265FramerateConversionAlgorithm
-> (Void# -> r) -> (Void# -> r) -> r
H265FramerateConversionAlgorithm_INTERPOLATE = H265FramerateConversionAlgorithm' "INTERPOLATE"

{-# COMPLETE
  H265FramerateConversionAlgorithm_DUPLICATE_DROP,
  H265FramerateConversionAlgorithm_FRAMEFORMER,
  H265FramerateConversionAlgorithm_INTERPOLATE,
  H265FramerateConversionAlgorithm'
  #-}