{-# 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.Mpeg2TemporalAdaptiveQuantization
-- 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.Mpeg2TemporalAdaptiveQuantization
  ( Mpeg2TemporalAdaptiveQuantization
      ( ..,
        Mpeg2TemporalAdaptiveQuantization_DISABLED,
        Mpeg2TemporalAdaptiveQuantization_ENABLED
      ),
  )
where

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

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

pattern Mpeg2TemporalAdaptiveQuantization_DISABLED :: Mpeg2TemporalAdaptiveQuantization
pattern $bMpeg2TemporalAdaptiveQuantization_DISABLED :: Mpeg2TemporalAdaptiveQuantization
$mMpeg2TemporalAdaptiveQuantization_DISABLED :: forall r.
Mpeg2TemporalAdaptiveQuantization
-> (Void# -> r) -> (Void# -> r) -> r
Mpeg2TemporalAdaptiveQuantization_DISABLED = Mpeg2TemporalAdaptiveQuantization' "DISABLED"

pattern Mpeg2TemporalAdaptiveQuantization_ENABLED :: Mpeg2TemporalAdaptiveQuantization
pattern $bMpeg2TemporalAdaptiveQuantization_ENABLED :: Mpeg2TemporalAdaptiveQuantization
$mMpeg2TemporalAdaptiveQuantization_ENABLED :: forall r.
Mpeg2TemporalAdaptiveQuantization
-> (Void# -> r) -> (Void# -> r) -> r
Mpeg2TemporalAdaptiveQuantization_ENABLED = Mpeg2TemporalAdaptiveQuantization' "ENABLED"

{-# COMPLETE
  Mpeg2TemporalAdaptiveQuantization_DISABLED,
  Mpeg2TemporalAdaptiveQuantization_ENABLED,
  Mpeg2TemporalAdaptiveQuantization'
  #-}