{-# 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.H264TemporalAdaptiveQuantization
-- 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.H264TemporalAdaptiveQuantization
  ( H264TemporalAdaptiveQuantization
      ( ..,
        H264TemporalAdaptiveQuantization_DISABLED,
        H264TemporalAdaptiveQuantization_ENABLED
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

-- | Only use this setting when you change the default value, AUTO, for the
-- setting H264AdaptiveQuantization. When you keep all defaults, excluding
-- H264AdaptiveQuantization and all other adaptive quantization from your
-- JSON job specification, MediaConvert automatically applies the best
-- types of quantization for your video content. When you set
-- H264AdaptiveQuantization to a value other than AUTO, the default value
-- for H264TemporalAdaptiveQuantization is Enabled (ENABLED). Keep this
-- default value to adjust quantization within each frame based on temporal
-- variation of content complexity. When you enable this feature, the
-- encoder uses fewer bits on areas of the frame that aren\'t moving and
-- uses more bits on complex objects with sharp edges that move a lot. For
-- example, this feature improves the readability of text tickers on
-- newscasts and scoreboards on sports matches. Enabling this feature will
-- almost always improve your video quality. Note, though, that this
-- feature doesn\'t take into account where the viewer\'s attention is
-- likely to be. If viewers are likely to be focusing their attention on a
-- part of the screen that doesn\'t have moving objects with sharp edges,
-- such as sports athletes\' faces, you might choose to set
-- H264TemporalAdaptiveQuantization to Disabled (DISABLED). Related
-- setting: When you enable temporal quantization, adjust the strength of
-- the filter with the setting Adaptive quantization
-- (adaptiveQuantization). To manually enable or disable
-- H264TemporalAdaptiveQuantization, you must set Adaptive quantization
-- (H264AdaptiveQuantization) to a value other than AUTO.
newtype H264TemporalAdaptiveQuantization = H264TemporalAdaptiveQuantization'
  { H264TemporalAdaptiveQuantization -> Text
fromH264TemporalAdaptiveQuantization ::
      Core.Text
  }
  deriving stock
    ( Int -> H264TemporalAdaptiveQuantization -> ShowS
[H264TemporalAdaptiveQuantization] -> ShowS
H264TemporalAdaptiveQuantization -> String
(Int -> H264TemporalAdaptiveQuantization -> ShowS)
-> (H264TemporalAdaptiveQuantization -> String)
-> ([H264TemporalAdaptiveQuantization] -> ShowS)
-> Show H264TemporalAdaptiveQuantization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [H264TemporalAdaptiveQuantization] -> ShowS
$cshowList :: [H264TemporalAdaptiveQuantization] -> ShowS
show :: H264TemporalAdaptiveQuantization -> String
$cshow :: H264TemporalAdaptiveQuantization -> String
showsPrec :: Int -> H264TemporalAdaptiveQuantization -> ShowS
$cshowsPrec :: Int -> H264TemporalAdaptiveQuantization -> ShowS
Prelude.Show,
      ReadPrec [H264TemporalAdaptiveQuantization]
ReadPrec H264TemporalAdaptiveQuantization
Int -> ReadS H264TemporalAdaptiveQuantization
ReadS [H264TemporalAdaptiveQuantization]
(Int -> ReadS H264TemporalAdaptiveQuantization)
-> ReadS [H264TemporalAdaptiveQuantization]
-> ReadPrec H264TemporalAdaptiveQuantization
-> ReadPrec [H264TemporalAdaptiveQuantization]
-> Read H264TemporalAdaptiveQuantization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [H264TemporalAdaptiveQuantization]
$creadListPrec :: ReadPrec [H264TemporalAdaptiveQuantization]
readPrec :: ReadPrec H264TemporalAdaptiveQuantization
$creadPrec :: ReadPrec H264TemporalAdaptiveQuantization
readList :: ReadS [H264TemporalAdaptiveQuantization]
$creadList :: ReadS [H264TemporalAdaptiveQuantization]
readsPrec :: Int -> ReadS H264TemporalAdaptiveQuantization
$creadsPrec :: Int -> ReadS H264TemporalAdaptiveQuantization
Prelude.Read,
      H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
(H264TemporalAdaptiveQuantization
 -> H264TemporalAdaptiveQuantization -> Bool)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization -> Bool)
-> Eq H264TemporalAdaptiveQuantization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
$c/= :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
== :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
$c== :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
Prelude.Eq,
      Eq H264TemporalAdaptiveQuantization
Eq H264TemporalAdaptiveQuantization
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization -> Ordering)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization -> Bool)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization -> Bool)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization -> Bool)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization -> Bool)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization)
-> (H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization
    -> H264TemporalAdaptiveQuantization)
-> Ord H264TemporalAdaptiveQuantization
H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Ordering
H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
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 :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
$cmin :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
max :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
$cmax :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization
>= :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
$c>= :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
> :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
$c> :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
<= :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
$c<= :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
< :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
$c< :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Bool
compare :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Ordering
$ccompare :: H264TemporalAdaptiveQuantization
-> H264TemporalAdaptiveQuantization -> Ordering
$cp1Ord :: Eq H264TemporalAdaptiveQuantization
Prelude.Ord,
      (forall x.
 H264TemporalAdaptiveQuantization
 -> Rep H264TemporalAdaptiveQuantization x)
-> (forall x.
    Rep H264TemporalAdaptiveQuantization x
    -> H264TemporalAdaptiveQuantization)
-> Generic H264TemporalAdaptiveQuantization
forall x.
Rep H264TemporalAdaptiveQuantization x
-> H264TemporalAdaptiveQuantization
forall x.
H264TemporalAdaptiveQuantization
-> Rep H264TemporalAdaptiveQuantization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep H264TemporalAdaptiveQuantization x
-> H264TemporalAdaptiveQuantization
$cfrom :: forall x.
H264TemporalAdaptiveQuantization
-> Rep H264TemporalAdaptiveQuantization x
Prelude.Generic
    )
  deriving newtype
    ( Int -> H264TemporalAdaptiveQuantization -> Int
H264TemporalAdaptiveQuantization -> Int
(Int -> H264TemporalAdaptiveQuantization -> Int)
-> (H264TemporalAdaptiveQuantization -> Int)
-> Hashable H264TemporalAdaptiveQuantization
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: H264TemporalAdaptiveQuantization -> Int
$chash :: H264TemporalAdaptiveQuantization -> Int
hashWithSalt :: Int -> H264TemporalAdaptiveQuantization -> Int
$chashWithSalt :: Int -> H264TemporalAdaptiveQuantization -> Int
Prelude.Hashable,
      H264TemporalAdaptiveQuantization -> ()
(H264TemporalAdaptiveQuantization -> ())
-> NFData H264TemporalAdaptiveQuantization
forall a. (a -> ()) -> NFData a
rnf :: H264TemporalAdaptiveQuantization -> ()
$crnf :: H264TemporalAdaptiveQuantization -> ()
Prelude.NFData,
      Text -> Either String H264TemporalAdaptiveQuantization
(Text -> Either String H264TemporalAdaptiveQuantization)
-> FromText H264TemporalAdaptiveQuantization
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String H264TemporalAdaptiveQuantization
$cfromText :: Text -> Either String H264TemporalAdaptiveQuantization
Core.FromText,
      H264TemporalAdaptiveQuantization -> Text
(H264TemporalAdaptiveQuantization -> Text)
-> ToText H264TemporalAdaptiveQuantization
forall a. (a -> Text) -> ToText a
toText :: H264TemporalAdaptiveQuantization -> Text
$ctoText :: H264TemporalAdaptiveQuantization -> Text
Core.ToText,
      H264TemporalAdaptiveQuantization -> ByteString
(H264TemporalAdaptiveQuantization -> ByteString)
-> ToByteString H264TemporalAdaptiveQuantization
forall a. (a -> ByteString) -> ToByteString a
toBS :: H264TemporalAdaptiveQuantization -> ByteString
$ctoBS :: H264TemporalAdaptiveQuantization -> ByteString
Core.ToByteString,
      H264TemporalAdaptiveQuantization -> ByteStringBuilder
(H264TemporalAdaptiveQuantization -> ByteStringBuilder)
-> ToLog H264TemporalAdaptiveQuantization
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: H264TemporalAdaptiveQuantization -> ByteStringBuilder
$cbuild :: H264TemporalAdaptiveQuantization -> ByteStringBuilder
Core.ToLog,
      HeaderName -> H264TemporalAdaptiveQuantization -> [Header]
(HeaderName -> H264TemporalAdaptiveQuantization -> [Header])
-> ToHeader H264TemporalAdaptiveQuantization
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> H264TemporalAdaptiveQuantization -> [Header]
$ctoHeader :: HeaderName -> H264TemporalAdaptiveQuantization -> [Header]
Core.ToHeader,
      H264TemporalAdaptiveQuantization -> QueryString
(H264TemporalAdaptiveQuantization -> QueryString)
-> ToQuery H264TemporalAdaptiveQuantization
forall a. (a -> QueryString) -> ToQuery a
toQuery :: H264TemporalAdaptiveQuantization -> QueryString
$ctoQuery :: H264TemporalAdaptiveQuantization -> QueryString
Core.ToQuery,
      Value -> Parser [H264TemporalAdaptiveQuantization]
Value -> Parser H264TemporalAdaptiveQuantization
(Value -> Parser H264TemporalAdaptiveQuantization)
-> (Value -> Parser [H264TemporalAdaptiveQuantization])
-> FromJSON H264TemporalAdaptiveQuantization
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [H264TemporalAdaptiveQuantization]
$cparseJSONList :: Value -> Parser [H264TemporalAdaptiveQuantization]
parseJSON :: Value -> Parser H264TemporalAdaptiveQuantization
$cparseJSON :: Value -> Parser H264TemporalAdaptiveQuantization
Core.FromJSON,
      FromJSONKeyFunction [H264TemporalAdaptiveQuantization]
FromJSONKeyFunction H264TemporalAdaptiveQuantization
FromJSONKeyFunction H264TemporalAdaptiveQuantization
-> FromJSONKeyFunction [H264TemporalAdaptiveQuantization]
-> FromJSONKey H264TemporalAdaptiveQuantization
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [H264TemporalAdaptiveQuantization]
$cfromJSONKeyList :: FromJSONKeyFunction [H264TemporalAdaptiveQuantization]
fromJSONKey :: FromJSONKeyFunction H264TemporalAdaptiveQuantization
$cfromJSONKey :: FromJSONKeyFunction H264TemporalAdaptiveQuantization
Core.FromJSONKey,
      [H264TemporalAdaptiveQuantization] -> Encoding
[H264TemporalAdaptiveQuantization] -> Value
H264TemporalAdaptiveQuantization -> Encoding
H264TemporalAdaptiveQuantization -> Value
(H264TemporalAdaptiveQuantization -> Value)
-> (H264TemporalAdaptiveQuantization -> Encoding)
-> ([H264TemporalAdaptiveQuantization] -> Value)
-> ([H264TemporalAdaptiveQuantization] -> Encoding)
-> ToJSON H264TemporalAdaptiveQuantization
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [H264TemporalAdaptiveQuantization] -> Encoding
$ctoEncodingList :: [H264TemporalAdaptiveQuantization] -> Encoding
toJSONList :: [H264TemporalAdaptiveQuantization] -> Value
$ctoJSONList :: [H264TemporalAdaptiveQuantization] -> Value
toEncoding :: H264TemporalAdaptiveQuantization -> Encoding
$ctoEncoding :: H264TemporalAdaptiveQuantization -> Encoding
toJSON :: H264TemporalAdaptiveQuantization -> Value
$ctoJSON :: H264TemporalAdaptiveQuantization -> Value
Core.ToJSON,
      ToJSONKeyFunction [H264TemporalAdaptiveQuantization]
ToJSONKeyFunction H264TemporalAdaptiveQuantization
ToJSONKeyFunction H264TemporalAdaptiveQuantization
-> ToJSONKeyFunction [H264TemporalAdaptiveQuantization]
-> ToJSONKey H264TemporalAdaptiveQuantization
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [H264TemporalAdaptiveQuantization]
$ctoJSONKeyList :: ToJSONKeyFunction [H264TemporalAdaptiveQuantization]
toJSONKey :: ToJSONKeyFunction H264TemporalAdaptiveQuantization
$ctoJSONKey :: ToJSONKeyFunction H264TemporalAdaptiveQuantization
Core.ToJSONKey,
      [Node] -> Either String H264TemporalAdaptiveQuantization
([Node] -> Either String H264TemporalAdaptiveQuantization)
-> FromXML H264TemporalAdaptiveQuantization
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String H264TemporalAdaptiveQuantization
$cparseXML :: [Node] -> Either String H264TemporalAdaptiveQuantization
Core.FromXML,
      H264TemporalAdaptiveQuantization -> XML
(H264TemporalAdaptiveQuantization -> XML)
-> ToXML H264TemporalAdaptiveQuantization
forall a. (a -> XML) -> ToXML a
toXML :: H264TemporalAdaptiveQuantization -> XML
$ctoXML :: H264TemporalAdaptiveQuantization -> XML
Core.ToXML
    )

pattern H264TemporalAdaptiveQuantization_DISABLED :: H264TemporalAdaptiveQuantization
pattern $bH264TemporalAdaptiveQuantization_DISABLED :: H264TemporalAdaptiveQuantization
$mH264TemporalAdaptiveQuantization_DISABLED :: forall r.
H264TemporalAdaptiveQuantization
-> (Void# -> r) -> (Void# -> r) -> r
H264TemporalAdaptiveQuantization_DISABLED = H264TemporalAdaptiveQuantization' "DISABLED"

pattern H264TemporalAdaptiveQuantization_ENABLED :: H264TemporalAdaptiveQuantization
pattern $bH264TemporalAdaptiveQuantization_ENABLED :: H264TemporalAdaptiveQuantization
$mH264TemporalAdaptiveQuantization_ENABLED :: forall r.
H264TemporalAdaptiveQuantization
-> (Void# -> r) -> (Void# -> r) -> r
H264TemporalAdaptiveQuantization_ENABLED = H264TemporalAdaptiveQuantization' "ENABLED"

{-# COMPLETE
  H264TemporalAdaptiveQuantization_DISABLED,
  H264TemporalAdaptiveQuantization_ENABLED,
  H264TemporalAdaptiveQuantization'
  #-}