{-# 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.XavcTemporalAdaptiveQuantization
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.XavcTemporalAdaptiveQuantization
  ( XavcTemporalAdaptiveQuantization
      ( ..,
        XavcTemporalAdaptiveQuantization_DISABLED,
        XavcTemporalAdaptiveQuantization_ENABLED
      ),
  )
where

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

-- | The best way to set up adaptive quantization is to keep the default
-- value, Auto (AUTO), for the setting Adaptive quantization
-- (adaptiveQuantization). When you do so, MediaConvert automatically
-- applies the best types of quantization for your video content. Include
-- this setting in your JSON job specification only when you choose to
-- change the default value for Adaptive quantization. For this setting,
-- 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 adaptive quantization, adjust the strength of the filter with
-- the setting Adaptive quantization (adaptiveQuantization).
newtype XavcTemporalAdaptiveQuantization = XavcTemporalAdaptiveQuantization'
  { XavcTemporalAdaptiveQuantization -> Text
fromXavcTemporalAdaptiveQuantization ::
      Data.Text
  }
  deriving stock
    ( Int -> XavcTemporalAdaptiveQuantization -> ShowS
[XavcTemporalAdaptiveQuantization] -> ShowS
XavcTemporalAdaptiveQuantization -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XavcTemporalAdaptiveQuantization] -> ShowS
$cshowList :: [XavcTemporalAdaptiveQuantization] -> ShowS
show :: XavcTemporalAdaptiveQuantization -> String
$cshow :: XavcTemporalAdaptiveQuantization -> String
showsPrec :: Int -> XavcTemporalAdaptiveQuantization -> ShowS
$cshowsPrec :: Int -> XavcTemporalAdaptiveQuantization -> ShowS
Prelude.Show,
      ReadPrec [XavcTemporalAdaptiveQuantization]
ReadPrec XavcTemporalAdaptiveQuantization
Int -> ReadS XavcTemporalAdaptiveQuantization
ReadS [XavcTemporalAdaptiveQuantization]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XavcTemporalAdaptiveQuantization]
$creadListPrec :: ReadPrec [XavcTemporalAdaptiveQuantization]
readPrec :: ReadPrec XavcTemporalAdaptiveQuantization
$creadPrec :: ReadPrec XavcTemporalAdaptiveQuantization
readList :: ReadS [XavcTemporalAdaptiveQuantization]
$creadList :: ReadS [XavcTemporalAdaptiveQuantization]
readsPrec :: Int -> ReadS XavcTemporalAdaptiveQuantization
$creadsPrec :: Int -> ReadS XavcTemporalAdaptiveQuantization
Prelude.Read,
      XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
$c/= :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
== :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
$c== :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
Prelude.Eq,
      Eq XavcTemporalAdaptiveQuantization
XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Ordering
XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
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 :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
$cmin :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
max :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
$cmax :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization
>= :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
$c>= :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
> :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
$c> :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
<= :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
$c<= :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
< :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
$c< :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Bool
compare :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Ordering
$ccompare :: XavcTemporalAdaptiveQuantization
-> XavcTemporalAdaptiveQuantization -> Ordering
Prelude.Ord,
      forall x.
Rep XavcTemporalAdaptiveQuantization x
-> XavcTemporalAdaptiveQuantization
forall x.
XavcTemporalAdaptiveQuantization
-> Rep XavcTemporalAdaptiveQuantization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep XavcTemporalAdaptiveQuantization x
-> XavcTemporalAdaptiveQuantization
$cfrom :: forall x.
XavcTemporalAdaptiveQuantization
-> Rep XavcTemporalAdaptiveQuantization x
Prelude.Generic
    )
  deriving newtype
    ( Eq XavcTemporalAdaptiveQuantization
Int -> XavcTemporalAdaptiveQuantization -> Int
XavcTemporalAdaptiveQuantization -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: XavcTemporalAdaptiveQuantization -> Int
$chash :: XavcTemporalAdaptiveQuantization -> Int
hashWithSalt :: Int -> XavcTemporalAdaptiveQuantization -> Int
$chashWithSalt :: Int -> XavcTemporalAdaptiveQuantization -> Int
Prelude.Hashable,
      XavcTemporalAdaptiveQuantization -> ()
forall a. (a -> ()) -> NFData a
rnf :: XavcTemporalAdaptiveQuantization -> ()
$crnf :: XavcTemporalAdaptiveQuantization -> ()
Prelude.NFData,
      Text -> Either String XavcTemporalAdaptiveQuantization
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String XavcTemporalAdaptiveQuantization
$cfromText :: Text -> Either String XavcTemporalAdaptiveQuantization
Data.FromText,
      XavcTemporalAdaptiveQuantization -> Text
forall a. (a -> Text) -> ToText a
toText :: XavcTemporalAdaptiveQuantization -> Text
$ctoText :: XavcTemporalAdaptiveQuantization -> Text
Data.ToText,
      XavcTemporalAdaptiveQuantization -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: XavcTemporalAdaptiveQuantization -> ByteString
$ctoBS :: XavcTemporalAdaptiveQuantization -> ByteString
Data.ToByteString,
      XavcTemporalAdaptiveQuantization -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: XavcTemporalAdaptiveQuantization -> ByteStringBuilder
$cbuild :: XavcTemporalAdaptiveQuantization -> ByteStringBuilder
Data.ToLog,
      HeaderName -> XavcTemporalAdaptiveQuantization -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> XavcTemporalAdaptiveQuantization -> [Header]
$ctoHeader :: HeaderName -> XavcTemporalAdaptiveQuantization -> [Header]
Data.ToHeader,
      XavcTemporalAdaptiveQuantization -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: XavcTemporalAdaptiveQuantization -> QueryString
$ctoQuery :: XavcTemporalAdaptiveQuantization -> QueryString
Data.ToQuery,
      Value -> Parser [XavcTemporalAdaptiveQuantization]
Value -> Parser XavcTemporalAdaptiveQuantization
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [XavcTemporalAdaptiveQuantization]
$cparseJSONList :: Value -> Parser [XavcTemporalAdaptiveQuantization]
parseJSON :: Value -> Parser XavcTemporalAdaptiveQuantization
$cparseJSON :: Value -> Parser XavcTemporalAdaptiveQuantization
Data.FromJSON,
      FromJSONKeyFunction [XavcTemporalAdaptiveQuantization]
FromJSONKeyFunction XavcTemporalAdaptiveQuantization
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [XavcTemporalAdaptiveQuantization]
$cfromJSONKeyList :: FromJSONKeyFunction [XavcTemporalAdaptiveQuantization]
fromJSONKey :: FromJSONKeyFunction XavcTemporalAdaptiveQuantization
$cfromJSONKey :: FromJSONKeyFunction XavcTemporalAdaptiveQuantization
Data.FromJSONKey,
      [XavcTemporalAdaptiveQuantization] -> Encoding
[XavcTemporalAdaptiveQuantization] -> Value
XavcTemporalAdaptiveQuantization -> Encoding
XavcTemporalAdaptiveQuantization -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [XavcTemporalAdaptiveQuantization] -> Encoding
$ctoEncodingList :: [XavcTemporalAdaptiveQuantization] -> Encoding
toJSONList :: [XavcTemporalAdaptiveQuantization] -> Value
$ctoJSONList :: [XavcTemporalAdaptiveQuantization] -> Value
toEncoding :: XavcTemporalAdaptiveQuantization -> Encoding
$ctoEncoding :: XavcTemporalAdaptiveQuantization -> Encoding
toJSON :: XavcTemporalAdaptiveQuantization -> Value
$ctoJSON :: XavcTemporalAdaptiveQuantization -> Value
Data.ToJSON,
      ToJSONKeyFunction [XavcTemporalAdaptiveQuantization]
ToJSONKeyFunction XavcTemporalAdaptiveQuantization
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [XavcTemporalAdaptiveQuantization]
$ctoJSONKeyList :: ToJSONKeyFunction [XavcTemporalAdaptiveQuantization]
toJSONKey :: ToJSONKeyFunction XavcTemporalAdaptiveQuantization
$ctoJSONKey :: ToJSONKeyFunction XavcTemporalAdaptiveQuantization
Data.ToJSONKey,
      [Node] -> Either String XavcTemporalAdaptiveQuantization
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String XavcTemporalAdaptiveQuantization
$cparseXML :: [Node] -> Either String XavcTemporalAdaptiveQuantization
Data.FromXML,
      XavcTemporalAdaptiveQuantization -> XML
forall a. (a -> XML) -> ToXML a
toXML :: XavcTemporalAdaptiveQuantization -> XML
$ctoXML :: XavcTemporalAdaptiveQuantization -> XML
Data.ToXML
    )

pattern XavcTemporalAdaptiveQuantization_DISABLED :: XavcTemporalAdaptiveQuantization
pattern $bXavcTemporalAdaptiveQuantization_DISABLED :: XavcTemporalAdaptiveQuantization
$mXavcTemporalAdaptiveQuantization_DISABLED :: forall {r}.
XavcTemporalAdaptiveQuantization
-> ((# #) -> r) -> ((# #) -> r) -> r
XavcTemporalAdaptiveQuantization_DISABLED = XavcTemporalAdaptiveQuantization' "DISABLED"

pattern XavcTemporalAdaptiveQuantization_ENABLED :: XavcTemporalAdaptiveQuantization
pattern $bXavcTemporalAdaptiveQuantization_ENABLED :: XavcTemporalAdaptiveQuantization
$mXavcTemporalAdaptiveQuantization_ENABLED :: forall {r}.
XavcTemporalAdaptiveQuantization
-> ((# #) -> r) -> ((# #) -> r) -> r
XavcTemporalAdaptiveQuantization_ENABLED = XavcTemporalAdaptiveQuantization' "ENABLED"

{-# COMPLETE
  XavcTemporalAdaptiveQuantization_DISABLED,
  XavcTemporalAdaptiveQuantization_ENABLED,
  XavcTemporalAdaptiveQuantization'
  #-}