{-# 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.ProresChromaSampling
-- 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.ProresChromaSampling
  ( ProresChromaSampling
      ( ..,
        ProresChromaSampling_PRESERVE_444_SAMPLING,
        ProresChromaSampling_SUBSAMPLE_TO_422
      ),
  )
where

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

-- | This setting applies only to ProRes 4444 and ProRes 4444 XQ outputs that
-- you create from inputs that use 4:4:4 chroma sampling. Set Preserve
-- 4:4:4 sampling (PRESERVE_444_SAMPLING) to allow outputs to also use
-- 4:4:4 chroma sampling. You must specify a value for this setting when
-- your output codec profile supports 4:4:4 chroma sampling. Related
-- Settings: When you set Chroma sampling to Preserve 4:4:4 sampling
-- (PRESERVE_444_SAMPLING), you must choose an output codec profile that
-- supports 4:4:4 chroma sampling. These values for Profile (CodecProfile)
-- support 4:4:4 chroma sampling: Apple ProRes 4444 (APPLE_PRORES_4444) or
-- Apple ProRes 4444 XQ (APPLE_PRORES_4444_XQ). When you set Chroma
-- sampling to Preserve 4:4:4 sampling, you must disable all video
-- preprocessors except for Nexguard file marker (PartnerWatermarking).
-- When you set Chroma sampling to Preserve 4:4:4 sampling and use
-- framerate conversion, you must set Frame rate conversion algorithm
-- (FramerateConversionAlgorithm) to Drop duplicate (DUPLICATE_DROP).
newtype ProresChromaSampling = ProresChromaSampling'
  { ProresChromaSampling -> Text
fromProresChromaSampling ::
      Core.Text
  }
  deriving stock
    ( Int -> ProresChromaSampling -> ShowS
[ProresChromaSampling] -> ShowS
ProresChromaSampling -> String
(Int -> ProresChromaSampling -> ShowS)
-> (ProresChromaSampling -> String)
-> ([ProresChromaSampling] -> ShowS)
-> Show ProresChromaSampling
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProresChromaSampling] -> ShowS
$cshowList :: [ProresChromaSampling] -> ShowS
show :: ProresChromaSampling -> String
$cshow :: ProresChromaSampling -> String
showsPrec :: Int -> ProresChromaSampling -> ShowS
$cshowsPrec :: Int -> ProresChromaSampling -> ShowS
Prelude.Show,
      ReadPrec [ProresChromaSampling]
ReadPrec ProresChromaSampling
Int -> ReadS ProresChromaSampling
ReadS [ProresChromaSampling]
(Int -> ReadS ProresChromaSampling)
-> ReadS [ProresChromaSampling]
-> ReadPrec ProresChromaSampling
-> ReadPrec [ProresChromaSampling]
-> Read ProresChromaSampling
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProresChromaSampling]
$creadListPrec :: ReadPrec [ProresChromaSampling]
readPrec :: ReadPrec ProresChromaSampling
$creadPrec :: ReadPrec ProresChromaSampling
readList :: ReadS [ProresChromaSampling]
$creadList :: ReadS [ProresChromaSampling]
readsPrec :: Int -> ReadS ProresChromaSampling
$creadsPrec :: Int -> ReadS ProresChromaSampling
Prelude.Read,
      ProresChromaSampling -> ProresChromaSampling -> Bool
(ProresChromaSampling -> ProresChromaSampling -> Bool)
-> (ProresChromaSampling -> ProresChromaSampling -> Bool)
-> Eq ProresChromaSampling
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProresChromaSampling -> ProresChromaSampling -> Bool
$c/= :: ProresChromaSampling -> ProresChromaSampling -> Bool
== :: ProresChromaSampling -> ProresChromaSampling -> Bool
$c== :: ProresChromaSampling -> ProresChromaSampling -> Bool
Prelude.Eq,
      Eq ProresChromaSampling
Eq ProresChromaSampling
-> (ProresChromaSampling -> ProresChromaSampling -> Ordering)
-> (ProresChromaSampling -> ProresChromaSampling -> Bool)
-> (ProresChromaSampling -> ProresChromaSampling -> Bool)
-> (ProresChromaSampling -> ProresChromaSampling -> Bool)
-> (ProresChromaSampling -> ProresChromaSampling -> Bool)
-> (ProresChromaSampling
    -> ProresChromaSampling -> ProresChromaSampling)
-> (ProresChromaSampling
    -> ProresChromaSampling -> ProresChromaSampling)
-> Ord ProresChromaSampling
ProresChromaSampling -> ProresChromaSampling -> Bool
ProresChromaSampling -> ProresChromaSampling -> Ordering
ProresChromaSampling
-> ProresChromaSampling -> ProresChromaSampling
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 :: ProresChromaSampling
-> ProresChromaSampling -> ProresChromaSampling
$cmin :: ProresChromaSampling
-> ProresChromaSampling -> ProresChromaSampling
max :: ProresChromaSampling
-> ProresChromaSampling -> ProresChromaSampling
$cmax :: ProresChromaSampling
-> ProresChromaSampling -> ProresChromaSampling
>= :: ProresChromaSampling -> ProresChromaSampling -> Bool
$c>= :: ProresChromaSampling -> ProresChromaSampling -> Bool
> :: ProresChromaSampling -> ProresChromaSampling -> Bool
$c> :: ProresChromaSampling -> ProresChromaSampling -> Bool
<= :: ProresChromaSampling -> ProresChromaSampling -> Bool
$c<= :: ProresChromaSampling -> ProresChromaSampling -> Bool
< :: ProresChromaSampling -> ProresChromaSampling -> Bool
$c< :: ProresChromaSampling -> ProresChromaSampling -> Bool
compare :: ProresChromaSampling -> ProresChromaSampling -> Ordering
$ccompare :: ProresChromaSampling -> ProresChromaSampling -> Ordering
$cp1Ord :: Eq ProresChromaSampling
Prelude.Ord,
      (forall x. ProresChromaSampling -> Rep ProresChromaSampling x)
-> (forall x. Rep ProresChromaSampling x -> ProresChromaSampling)
-> Generic ProresChromaSampling
forall x. Rep ProresChromaSampling x -> ProresChromaSampling
forall x. ProresChromaSampling -> Rep ProresChromaSampling x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProresChromaSampling x -> ProresChromaSampling
$cfrom :: forall x. ProresChromaSampling -> Rep ProresChromaSampling x
Prelude.Generic
    )
  deriving newtype
    ( Int -> ProresChromaSampling -> Int
ProresChromaSampling -> Int
(Int -> ProresChromaSampling -> Int)
-> (ProresChromaSampling -> Int) -> Hashable ProresChromaSampling
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ProresChromaSampling -> Int
$chash :: ProresChromaSampling -> Int
hashWithSalt :: Int -> ProresChromaSampling -> Int
$chashWithSalt :: Int -> ProresChromaSampling -> Int
Prelude.Hashable,
      ProresChromaSampling -> ()
(ProresChromaSampling -> ()) -> NFData ProresChromaSampling
forall a. (a -> ()) -> NFData a
rnf :: ProresChromaSampling -> ()
$crnf :: ProresChromaSampling -> ()
Prelude.NFData,
      Text -> Either String ProresChromaSampling
(Text -> Either String ProresChromaSampling)
-> FromText ProresChromaSampling
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ProresChromaSampling
$cfromText :: Text -> Either String ProresChromaSampling
Core.FromText,
      ProresChromaSampling -> Text
(ProresChromaSampling -> Text) -> ToText ProresChromaSampling
forall a. (a -> Text) -> ToText a
toText :: ProresChromaSampling -> Text
$ctoText :: ProresChromaSampling -> Text
Core.ToText,
      ProresChromaSampling -> ByteString
(ProresChromaSampling -> ByteString)
-> ToByteString ProresChromaSampling
forall a. (a -> ByteString) -> ToByteString a
toBS :: ProresChromaSampling -> ByteString
$ctoBS :: ProresChromaSampling -> ByteString
Core.ToByteString,
      ProresChromaSampling -> ByteStringBuilder
(ProresChromaSampling -> ByteStringBuilder)
-> ToLog ProresChromaSampling
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ProresChromaSampling -> ByteStringBuilder
$cbuild :: ProresChromaSampling -> ByteStringBuilder
Core.ToLog,
      HeaderName -> ProresChromaSampling -> [Header]
(HeaderName -> ProresChromaSampling -> [Header])
-> ToHeader ProresChromaSampling
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ProresChromaSampling -> [Header]
$ctoHeader :: HeaderName -> ProresChromaSampling -> [Header]
Core.ToHeader,
      ProresChromaSampling -> QueryString
(ProresChromaSampling -> QueryString)
-> ToQuery ProresChromaSampling
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ProresChromaSampling -> QueryString
$ctoQuery :: ProresChromaSampling -> QueryString
Core.ToQuery,
      Value -> Parser [ProresChromaSampling]
Value -> Parser ProresChromaSampling
(Value -> Parser ProresChromaSampling)
-> (Value -> Parser [ProresChromaSampling])
-> FromJSON ProresChromaSampling
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ProresChromaSampling]
$cparseJSONList :: Value -> Parser [ProresChromaSampling]
parseJSON :: Value -> Parser ProresChromaSampling
$cparseJSON :: Value -> Parser ProresChromaSampling
Core.FromJSON,
      FromJSONKeyFunction [ProresChromaSampling]
FromJSONKeyFunction ProresChromaSampling
FromJSONKeyFunction ProresChromaSampling
-> FromJSONKeyFunction [ProresChromaSampling]
-> FromJSONKey ProresChromaSampling
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ProresChromaSampling]
$cfromJSONKeyList :: FromJSONKeyFunction [ProresChromaSampling]
fromJSONKey :: FromJSONKeyFunction ProresChromaSampling
$cfromJSONKey :: FromJSONKeyFunction ProresChromaSampling
Core.FromJSONKey,
      [ProresChromaSampling] -> Encoding
[ProresChromaSampling] -> Value
ProresChromaSampling -> Encoding
ProresChromaSampling -> Value
(ProresChromaSampling -> Value)
-> (ProresChromaSampling -> Encoding)
-> ([ProresChromaSampling] -> Value)
-> ([ProresChromaSampling] -> Encoding)
-> ToJSON ProresChromaSampling
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ProresChromaSampling] -> Encoding
$ctoEncodingList :: [ProresChromaSampling] -> Encoding
toJSONList :: [ProresChromaSampling] -> Value
$ctoJSONList :: [ProresChromaSampling] -> Value
toEncoding :: ProresChromaSampling -> Encoding
$ctoEncoding :: ProresChromaSampling -> Encoding
toJSON :: ProresChromaSampling -> Value
$ctoJSON :: ProresChromaSampling -> Value
Core.ToJSON,
      ToJSONKeyFunction [ProresChromaSampling]
ToJSONKeyFunction ProresChromaSampling
ToJSONKeyFunction ProresChromaSampling
-> ToJSONKeyFunction [ProresChromaSampling]
-> ToJSONKey ProresChromaSampling
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ProresChromaSampling]
$ctoJSONKeyList :: ToJSONKeyFunction [ProresChromaSampling]
toJSONKey :: ToJSONKeyFunction ProresChromaSampling
$ctoJSONKey :: ToJSONKeyFunction ProresChromaSampling
Core.ToJSONKey,
      [Node] -> Either String ProresChromaSampling
([Node] -> Either String ProresChromaSampling)
-> FromXML ProresChromaSampling
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ProresChromaSampling
$cparseXML :: [Node] -> Either String ProresChromaSampling
Core.FromXML,
      ProresChromaSampling -> XML
(ProresChromaSampling -> XML) -> ToXML ProresChromaSampling
forall a. (a -> XML) -> ToXML a
toXML :: ProresChromaSampling -> XML
$ctoXML :: ProresChromaSampling -> XML
Core.ToXML
    )

pattern ProresChromaSampling_PRESERVE_444_SAMPLING :: ProresChromaSampling
pattern $bProresChromaSampling_PRESERVE_444_SAMPLING :: ProresChromaSampling
$mProresChromaSampling_PRESERVE_444_SAMPLING :: forall r. ProresChromaSampling -> (Void# -> r) -> (Void# -> r) -> r
ProresChromaSampling_PRESERVE_444_SAMPLING = ProresChromaSampling' "PRESERVE_444_SAMPLING"

pattern ProresChromaSampling_SUBSAMPLE_TO_422 :: ProresChromaSampling
pattern $bProresChromaSampling_SUBSAMPLE_TO_422 :: ProresChromaSampling
$mProresChromaSampling_SUBSAMPLE_TO_422 :: forall r. ProresChromaSampling -> (Void# -> r) -> (Void# -> r) -> r
ProresChromaSampling_SUBSAMPLE_TO_422 = ProresChromaSampling' "SUBSAMPLE_TO_422"

{-# COMPLETE
  ProresChromaSampling_PRESERVE_444_SAMPLING,
  ProresChromaSampling_SUBSAMPLE_TO_422,
  ProresChromaSampling'
  #-}