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

pattern Av1SpatialAdaptiveQuantization_DISABLED :: Av1SpatialAdaptiveQuantization
pattern $bAv1SpatialAdaptiveQuantization_DISABLED :: Av1SpatialAdaptiveQuantization
$mAv1SpatialAdaptiveQuantization_DISABLED :: forall r.
Av1SpatialAdaptiveQuantization -> (Void# -> r) -> (Void# -> r) -> r
Av1SpatialAdaptiveQuantization_DISABLED = Av1SpatialAdaptiveQuantization' "DISABLED"

pattern Av1SpatialAdaptiveQuantization_ENABLED :: Av1SpatialAdaptiveQuantization
pattern $bAv1SpatialAdaptiveQuantization_ENABLED :: Av1SpatialAdaptiveQuantization
$mAv1SpatialAdaptiveQuantization_ENABLED :: forall r.
Av1SpatialAdaptiveQuantization -> (Void# -> r) -> (Void# -> r) -> r
Av1SpatialAdaptiveQuantization_ENABLED = Av1SpatialAdaptiveQuantization' "ENABLED"

{-# COMPLETE
  Av1SpatialAdaptiveQuantization_DISABLED,
  Av1SpatialAdaptiveQuantization_ENABLED,
  Av1SpatialAdaptiveQuantization'
  #-}