{-# 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.XavcSpatialAdaptiveQuantization
-- 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.XavcSpatialAdaptiveQuantization
  ( XavcSpatialAdaptiveQuantization
      ( ..,
        XavcSpatialAdaptiveQuantization_DISABLED,
        XavcSpatialAdaptiveQuantization_ENABLED
      ),
  )
where

import qualified Amazonka.Core as Core
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 spatial variation of content complexity. When you
-- enable this feature, the encoder uses fewer bits on areas that can
-- sustain more distortion with no noticeable visual degradation and uses
-- more bits on areas where any small distortion will be noticeable. For
-- example, complex textured blocks are encoded with fewer bits and smooth
-- textured blocks are encoded with more bits. 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 with a lot of complex texture, you might choose to
-- disable this feature. Related setting: When you enable spatial adaptive
-- quantization, set the value for Adaptive quantization
-- (adaptiveQuantization) depending on your content. For homogeneous
-- content, such as cartoons and video games, set it to Low. For content
-- with a wider variety of textures, set it to High or Higher.
newtype XavcSpatialAdaptiveQuantization = XavcSpatialAdaptiveQuantization'
  { XavcSpatialAdaptiveQuantization -> Text
fromXavcSpatialAdaptiveQuantization ::
      Core.Text
  }
  deriving stock
    ( Int -> XavcSpatialAdaptiveQuantization -> ShowS
[XavcSpatialAdaptiveQuantization] -> ShowS
XavcSpatialAdaptiveQuantization -> String
(Int -> XavcSpatialAdaptiveQuantization -> ShowS)
-> (XavcSpatialAdaptiveQuantization -> String)
-> ([XavcSpatialAdaptiveQuantization] -> ShowS)
-> Show XavcSpatialAdaptiveQuantization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XavcSpatialAdaptiveQuantization] -> ShowS
$cshowList :: [XavcSpatialAdaptiveQuantization] -> ShowS
show :: XavcSpatialAdaptiveQuantization -> String
$cshow :: XavcSpatialAdaptiveQuantization -> String
showsPrec :: Int -> XavcSpatialAdaptiveQuantization -> ShowS
$cshowsPrec :: Int -> XavcSpatialAdaptiveQuantization -> ShowS
Prelude.Show,
      ReadPrec [XavcSpatialAdaptiveQuantization]
ReadPrec XavcSpatialAdaptiveQuantization
Int -> ReadS XavcSpatialAdaptiveQuantization
ReadS [XavcSpatialAdaptiveQuantization]
(Int -> ReadS XavcSpatialAdaptiveQuantization)
-> ReadS [XavcSpatialAdaptiveQuantization]
-> ReadPrec XavcSpatialAdaptiveQuantization
-> ReadPrec [XavcSpatialAdaptiveQuantization]
-> Read XavcSpatialAdaptiveQuantization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XavcSpatialAdaptiveQuantization]
$creadListPrec :: ReadPrec [XavcSpatialAdaptiveQuantization]
readPrec :: ReadPrec XavcSpatialAdaptiveQuantization
$creadPrec :: ReadPrec XavcSpatialAdaptiveQuantization
readList :: ReadS [XavcSpatialAdaptiveQuantization]
$creadList :: ReadS [XavcSpatialAdaptiveQuantization]
readsPrec :: Int -> ReadS XavcSpatialAdaptiveQuantization
$creadsPrec :: Int -> ReadS XavcSpatialAdaptiveQuantization
Prelude.Read,
      XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
(XavcSpatialAdaptiveQuantization
 -> XavcSpatialAdaptiveQuantization -> Bool)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization -> Bool)
-> Eq XavcSpatialAdaptiveQuantization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
$c/= :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
== :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
$c== :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
Prelude.Eq,
      Eq XavcSpatialAdaptiveQuantization
Eq XavcSpatialAdaptiveQuantization
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization -> Ordering)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization -> Bool)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization -> Bool)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization -> Bool)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization -> Bool)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization)
-> (XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization
    -> XavcSpatialAdaptiveQuantization)
-> Ord XavcSpatialAdaptiveQuantization
XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Ordering
XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
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 :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
$cmin :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
max :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
$cmax :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization
>= :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
$c>= :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
> :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
$c> :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
<= :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
$c<= :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
< :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
$c< :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Bool
compare :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Ordering
$ccompare :: XavcSpatialAdaptiveQuantization
-> XavcSpatialAdaptiveQuantization -> Ordering
$cp1Ord :: Eq XavcSpatialAdaptiveQuantization
Prelude.Ord,
      (forall x.
 XavcSpatialAdaptiveQuantization
 -> Rep XavcSpatialAdaptiveQuantization x)
-> (forall x.
    Rep XavcSpatialAdaptiveQuantization x
    -> XavcSpatialAdaptiveQuantization)
-> Generic XavcSpatialAdaptiveQuantization
forall x.
Rep XavcSpatialAdaptiveQuantization x
-> XavcSpatialAdaptiveQuantization
forall x.
XavcSpatialAdaptiveQuantization
-> Rep XavcSpatialAdaptiveQuantization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep XavcSpatialAdaptiveQuantization x
-> XavcSpatialAdaptiveQuantization
$cfrom :: forall x.
XavcSpatialAdaptiveQuantization
-> Rep XavcSpatialAdaptiveQuantization x
Prelude.Generic
    )
  deriving newtype
    ( Int -> XavcSpatialAdaptiveQuantization -> Int
XavcSpatialAdaptiveQuantization -> Int
(Int -> XavcSpatialAdaptiveQuantization -> Int)
-> (XavcSpatialAdaptiveQuantization -> Int)
-> Hashable XavcSpatialAdaptiveQuantization
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: XavcSpatialAdaptiveQuantization -> Int
$chash :: XavcSpatialAdaptiveQuantization -> Int
hashWithSalt :: Int -> XavcSpatialAdaptiveQuantization -> Int
$chashWithSalt :: Int -> XavcSpatialAdaptiveQuantization -> Int
Prelude.Hashable,
      XavcSpatialAdaptiveQuantization -> ()
(XavcSpatialAdaptiveQuantization -> ())
-> NFData XavcSpatialAdaptiveQuantization
forall a. (a -> ()) -> NFData a
rnf :: XavcSpatialAdaptiveQuantization -> ()
$crnf :: XavcSpatialAdaptiveQuantization -> ()
Prelude.NFData,
      Text -> Either String XavcSpatialAdaptiveQuantization
(Text -> Either String XavcSpatialAdaptiveQuantization)
-> FromText XavcSpatialAdaptiveQuantization
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String XavcSpatialAdaptiveQuantization
$cfromText :: Text -> Either String XavcSpatialAdaptiveQuantization
Core.FromText,
      XavcSpatialAdaptiveQuantization -> Text
(XavcSpatialAdaptiveQuantization -> Text)
-> ToText XavcSpatialAdaptiveQuantization
forall a. (a -> Text) -> ToText a
toText :: XavcSpatialAdaptiveQuantization -> Text
$ctoText :: XavcSpatialAdaptiveQuantization -> Text
Core.ToText,
      XavcSpatialAdaptiveQuantization -> ByteString
(XavcSpatialAdaptiveQuantization -> ByteString)
-> ToByteString XavcSpatialAdaptiveQuantization
forall a. (a -> ByteString) -> ToByteString a
toBS :: XavcSpatialAdaptiveQuantization -> ByteString
$ctoBS :: XavcSpatialAdaptiveQuantization -> ByteString
Core.ToByteString,
      XavcSpatialAdaptiveQuantization -> ByteStringBuilder
(XavcSpatialAdaptiveQuantization -> ByteStringBuilder)
-> ToLog XavcSpatialAdaptiveQuantization
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: XavcSpatialAdaptiveQuantization -> ByteStringBuilder
$cbuild :: XavcSpatialAdaptiveQuantization -> ByteStringBuilder
Core.ToLog,
      HeaderName -> XavcSpatialAdaptiveQuantization -> [Header]
(HeaderName -> XavcSpatialAdaptiveQuantization -> [Header])
-> ToHeader XavcSpatialAdaptiveQuantization
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> XavcSpatialAdaptiveQuantization -> [Header]
$ctoHeader :: HeaderName -> XavcSpatialAdaptiveQuantization -> [Header]
Core.ToHeader,
      XavcSpatialAdaptiveQuantization -> QueryString
(XavcSpatialAdaptiveQuantization -> QueryString)
-> ToQuery XavcSpatialAdaptiveQuantization
forall a. (a -> QueryString) -> ToQuery a
toQuery :: XavcSpatialAdaptiveQuantization -> QueryString
$ctoQuery :: XavcSpatialAdaptiveQuantization -> QueryString
Core.ToQuery,
      Value -> Parser [XavcSpatialAdaptiveQuantization]
Value -> Parser XavcSpatialAdaptiveQuantization
(Value -> Parser XavcSpatialAdaptiveQuantization)
-> (Value -> Parser [XavcSpatialAdaptiveQuantization])
-> FromJSON XavcSpatialAdaptiveQuantization
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [XavcSpatialAdaptiveQuantization]
$cparseJSONList :: Value -> Parser [XavcSpatialAdaptiveQuantization]
parseJSON :: Value -> Parser XavcSpatialAdaptiveQuantization
$cparseJSON :: Value -> Parser XavcSpatialAdaptiveQuantization
Core.FromJSON,
      FromJSONKeyFunction [XavcSpatialAdaptiveQuantization]
FromJSONKeyFunction XavcSpatialAdaptiveQuantization
FromJSONKeyFunction XavcSpatialAdaptiveQuantization
-> FromJSONKeyFunction [XavcSpatialAdaptiveQuantization]
-> FromJSONKey XavcSpatialAdaptiveQuantization
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [XavcSpatialAdaptiveQuantization]
$cfromJSONKeyList :: FromJSONKeyFunction [XavcSpatialAdaptiveQuantization]
fromJSONKey :: FromJSONKeyFunction XavcSpatialAdaptiveQuantization
$cfromJSONKey :: FromJSONKeyFunction XavcSpatialAdaptiveQuantization
Core.FromJSONKey,
      [XavcSpatialAdaptiveQuantization] -> Encoding
[XavcSpatialAdaptiveQuantization] -> Value
XavcSpatialAdaptiveQuantization -> Encoding
XavcSpatialAdaptiveQuantization -> Value
(XavcSpatialAdaptiveQuantization -> Value)
-> (XavcSpatialAdaptiveQuantization -> Encoding)
-> ([XavcSpatialAdaptiveQuantization] -> Value)
-> ([XavcSpatialAdaptiveQuantization] -> Encoding)
-> ToJSON XavcSpatialAdaptiveQuantization
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [XavcSpatialAdaptiveQuantization] -> Encoding
$ctoEncodingList :: [XavcSpatialAdaptiveQuantization] -> Encoding
toJSONList :: [XavcSpatialAdaptiveQuantization] -> Value
$ctoJSONList :: [XavcSpatialAdaptiveQuantization] -> Value
toEncoding :: XavcSpatialAdaptiveQuantization -> Encoding
$ctoEncoding :: XavcSpatialAdaptiveQuantization -> Encoding
toJSON :: XavcSpatialAdaptiveQuantization -> Value
$ctoJSON :: XavcSpatialAdaptiveQuantization -> Value
Core.ToJSON,
      ToJSONKeyFunction [XavcSpatialAdaptiveQuantization]
ToJSONKeyFunction XavcSpatialAdaptiveQuantization
ToJSONKeyFunction XavcSpatialAdaptiveQuantization
-> ToJSONKeyFunction [XavcSpatialAdaptiveQuantization]
-> ToJSONKey XavcSpatialAdaptiveQuantization
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [XavcSpatialAdaptiveQuantization]
$ctoJSONKeyList :: ToJSONKeyFunction [XavcSpatialAdaptiveQuantization]
toJSONKey :: ToJSONKeyFunction XavcSpatialAdaptiveQuantization
$ctoJSONKey :: ToJSONKeyFunction XavcSpatialAdaptiveQuantization
Core.ToJSONKey,
      [Node] -> Either String XavcSpatialAdaptiveQuantization
([Node] -> Either String XavcSpatialAdaptiveQuantization)
-> FromXML XavcSpatialAdaptiveQuantization
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String XavcSpatialAdaptiveQuantization
$cparseXML :: [Node] -> Either String XavcSpatialAdaptiveQuantization
Core.FromXML,
      XavcSpatialAdaptiveQuantization -> XML
(XavcSpatialAdaptiveQuantization -> XML)
-> ToXML XavcSpatialAdaptiveQuantization
forall a. (a -> XML) -> ToXML a
toXML :: XavcSpatialAdaptiveQuantization -> XML
$ctoXML :: XavcSpatialAdaptiveQuantization -> XML
Core.ToXML
    )

pattern XavcSpatialAdaptiveQuantization_DISABLED :: XavcSpatialAdaptiveQuantization
pattern $bXavcSpatialAdaptiveQuantization_DISABLED :: XavcSpatialAdaptiveQuantization
$mXavcSpatialAdaptiveQuantization_DISABLED :: forall r.
XavcSpatialAdaptiveQuantization
-> (Void# -> r) -> (Void# -> r) -> r
XavcSpatialAdaptiveQuantization_DISABLED = XavcSpatialAdaptiveQuantization' "DISABLED"

pattern XavcSpatialAdaptiveQuantization_ENABLED :: XavcSpatialAdaptiveQuantization
pattern $bXavcSpatialAdaptiveQuantization_ENABLED :: XavcSpatialAdaptiveQuantization
$mXavcSpatialAdaptiveQuantization_ENABLED :: forall r.
XavcSpatialAdaptiveQuantization
-> (Void# -> r) -> (Void# -> r) -> r
XavcSpatialAdaptiveQuantization_ENABLED = XavcSpatialAdaptiveQuantization' "ENABLED"

{-# COMPLETE
  XavcSpatialAdaptiveQuantization_DISABLED,
  XavcSpatialAdaptiveQuantization_ENABLED,
  XavcSpatialAdaptiveQuantization'
  #-}