{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConvert.Types.XavcHdProfileSettings
-- 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.XavcHdProfileSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.XavcFlickerAdaptiveQuantization
import Amazonka.MediaConvert.Types.XavcGopBReference
import Amazonka.MediaConvert.Types.XavcHdProfileBitrateClass
import Amazonka.MediaConvert.Types.XavcHdProfileQualityTuningLevel
import Amazonka.MediaConvert.Types.XavcHdProfileTelecine
import Amazonka.MediaConvert.Types.XavcInterlaceMode
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Profile) under
-- (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD.
--
-- /See:/ 'newXavcHdProfileSettings' smart constructor.
data XavcHdProfileSettings = XavcHdProfileSettings'
  { -- | Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your
    -- output. Outputs of the same class have similar image quality over the
    -- operating points that are valid for that class.
    XavcHdProfileSettings -> Maybe XavcHdProfileBitrateClass
bitrateClass :: Prelude.Maybe XavcHdProfileBitrateClass,
    -- | The best way to set up adaptive quantization is to keep the default
    -- value, Auto (AUTO), for the setting Adaptive quantization
    -- (XavcAdaptiveQuantization). 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. Enable this setting
    -- to have the encoder reduce I-frame pop. I-frame pop appears as a visual
    -- flicker that can arise when the encoder saves bits by copying some
    -- macroblocks many times from frame to frame, and then refreshes them at
    -- the I-frame. When you enable this setting, the encoder updates these
    -- macroblocks slightly more often to smooth out the flicker. This setting
    -- is disabled by default. Related setting: In addition to enabling this
    -- setting, you must also set Adaptive quantization (adaptiveQuantization)
    -- to a value other than Off (OFF) or Auto (AUTO). Use Adaptive
    -- quantization to adjust the degree of smoothing that Flicker adaptive
    -- quantization provides.
    XavcHdProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization :: Prelude.Maybe XavcFlickerAdaptiveQuantization,
    -- | Specify whether the encoder uses B-frames as reference frames for other
    -- pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to
    -- use B-frames as reference frames. Choose Don\'t allow (DISABLED) to
    -- prevent the encoder from using B-frames as reference frames.
    XavcHdProfileSettings -> Maybe XavcGopBReference
gopBReference :: Prelude.Maybe XavcGopBReference,
    -- | Frequency of closed GOPs. In streaming applications, it is recommended
    -- that this be set to 1 so a decoder joining mid-stream will receive an
    -- IDR frame as quickly as possible. Setting this value to 0 will break
    -- output segmenting.
    XavcHdProfileSettings -> Maybe Natural
gopClosedCadence :: Prelude.Maybe Prelude.Natural,
    -- | Specify the size of the buffer that MediaConvert uses in the HRD buffer
    -- model for this output. Specify this value in bits; for example, enter
    -- five megabits as 5000000. When you don\'t set this value, or you set it
    -- to zero, MediaConvert calculates the default by doubling the bitrate of
    -- this output point.
    XavcHdProfileSettings -> Maybe Natural
hrdBufferSize :: Prelude.Maybe Prelude.Natural,
    -- | Choose the scan line type for the output. Keep the default value,
    -- Progressive (PROGRESSIVE) to create a progressive output, regardless of
    -- the scan type of your input. Use Top field first (TOP_FIELD) or Bottom
    -- field first (BOTTOM_FIELD) to create an output that\'s interlaced with
    -- the same field polarity throughout. Use Follow, default top
    -- (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to
    -- produce outputs with the same field polarity as the source. For jobs
    -- that have multiple inputs, the output field polarity might change over
    -- the course of the output. Follow behavior depends on the input scan
    -- type. If the source is interlaced, the output will be interlaced with
    -- the same polarity as the source. If the source is progressive, the
    -- output will be interlaced with top field bottom field first, depending
    -- on which of the Follow options you choose.
    XavcHdProfileSettings -> Maybe XavcInterlaceMode
interlaceMode :: Prelude.Maybe XavcInterlaceMode,
    -- | Optional. Use Quality tuning level (qualityTuningLevel) to choose how
    -- you want to trade off encoding speed for output video quality. The
    -- default behavior is faster, lower quality, single-pass encoding.
    XavcHdProfileSettings -> Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel :: Prelude.Maybe XavcHdProfileQualityTuningLevel,
    -- | Number of slices per picture. Must be less than or equal to the number
    -- of macroblock rows for progressive pictures, and less than or equal to
    -- half the number of macroblock rows for interlaced pictures.
    XavcHdProfileSettings -> Maybe Natural
slices :: Prelude.Maybe Prelude.Natural,
    -- | Ignore this setting unless you set Frame rate (framerateNumerator
    -- divided by framerateDenominator) to 29.970. If your input framerate is
    -- 23.976, choose Hard (HARD). Otherwise, keep the default value None
    -- (NONE). For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-telecine-and-inverse-telecine.html.
    XavcHdProfileSettings -> Maybe XavcHdProfileTelecine
telecine :: Prelude.Maybe XavcHdProfileTelecine
  }
  deriving (XavcHdProfileSettings -> XavcHdProfileSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XavcHdProfileSettings -> XavcHdProfileSettings -> Bool
$c/= :: XavcHdProfileSettings -> XavcHdProfileSettings -> Bool
== :: XavcHdProfileSettings -> XavcHdProfileSettings -> Bool
$c== :: XavcHdProfileSettings -> XavcHdProfileSettings -> Bool
Prelude.Eq, ReadPrec [XavcHdProfileSettings]
ReadPrec XavcHdProfileSettings
Int -> ReadS XavcHdProfileSettings
ReadS [XavcHdProfileSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XavcHdProfileSettings]
$creadListPrec :: ReadPrec [XavcHdProfileSettings]
readPrec :: ReadPrec XavcHdProfileSettings
$creadPrec :: ReadPrec XavcHdProfileSettings
readList :: ReadS [XavcHdProfileSettings]
$creadList :: ReadS [XavcHdProfileSettings]
readsPrec :: Int -> ReadS XavcHdProfileSettings
$creadsPrec :: Int -> ReadS XavcHdProfileSettings
Prelude.Read, Int -> XavcHdProfileSettings -> ShowS
[XavcHdProfileSettings] -> ShowS
XavcHdProfileSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XavcHdProfileSettings] -> ShowS
$cshowList :: [XavcHdProfileSettings] -> ShowS
show :: XavcHdProfileSettings -> String
$cshow :: XavcHdProfileSettings -> String
showsPrec :: Int -> XavcHdProfileSettings -> ShowS
$cshowsPrec :: Int -> XavcHdProfileSettings -> ShowS
Prelude.Show, forall x. Rep XavcHdProfileSettings x -> XavcHdProfileSettings
forall x. XavcHdProfileSettings -> Rep XavcHdProfileSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep XavcHdProfileSettings x -> XavcHdProfileSettings
$cfrom :: forall x. XavcHdProfileSettings -> Rep XavcHdProfileSettings x
Prelude.Generic)

-- |
-- Create a value of 'XavcHdProfileSettings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'bitrateClass', 'xavcHdProfileSettings_bitrateClass' - Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your
-- output. Outputs of the same class have similar image quality over the
-- operating points that are valid for that class.
--
-- 'flickerAdaptiveQuantization', 'xavcHdProfileSettings_flickerAdaptiveQuantization' - The best way to set up adaptive quantization is to keep the default
-- value, Auto (AUTO), for the setting Adaptive quantization
-- (XavcAdaptiveQuantization). 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. Enable this setting
-- to have the encoder reduce I-frame pop. I-frame pop appears as a visual
-- flicker that can arise when the encoder saves bits by copying some
-- macroblocks many times from frame to frame, and then refreshes them at
-- the I-frame. When you enable this setting, the encoder updates these
-- macroblocks slightly more often to smooth out the flicker. This setting
-- is disabled by default. Related setting: In addition to enabling this
-- setting, you must also set Adaptive quantization (adaptiveQuantization)
-- to a value other than Off (OFF) or Auto (AUTO). Use Adaptive
-- quantization to adjust the degree of smoothing that Flicker adaptive
-- quantization provides.
--
-- 'gopBReference', 'xavcHdProfileSettings_gopBReference' - Specify whether the encoder uses B-frames as reference frames for other
-- pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to
-- use B-frames as reference frames. Choose Don\'t allow (DISABLED) to
-- prevent the encoder from using B-frames as reference frames.
--
-- 'gopClosedCadence', 'xavcHdProfileSettings_gopClosedCadence' - Frequency of closed GOPs. In streaming applications, it is recommended
-- that this be set to 1 so a decoder joining mid-stream will receive an
-- IDR frame as quickly as possible. Setting this value to 0 will break
-- output segmenting.
--
-- 'hrdBufferSize', 'xavcHdProfileSettings_hrdBufferSize' - Specify the size of the buffer that MediaConvert uses in the HRD buffer
-- model for this output. Specify this value in bits; for example, enter
-- five megabits as 5000000. When you don\'t set this value, or you set it
-- to zero, MediaConvert calculates the default by doubling the bitrate of
-- this output point.
--
-- 'interlaceMode', 'xavcHdProfileSettings_interlaceMode' - Choose the scan line type for the output. Keep the default value,
-- Progressive (PROGRESSIVE) to create a progressive output, regardless of
-- the scan type of your input. Use Top field first (TOP_FIELD) or Bottom
-- field first (BOTTOM_FIELD) to create an output that\'s interlaced with
-- the same field polarity throughout. Use Follow, default top
-- (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to
-- produce outputs with the same field polarity as the source. For jobs
-- that have multiple inputs, the output field polarity might change over
-- the course of the output. Follow behavior depends on the input scan
-- type. If the source is interlaced, the output will be interlaced with
-- the same polarity as the source. If the source is progressive, the
-- output will be interlaced with top field bottom field first, depending
-- on which of the Follow options you choose.
--
-- 'qualityTuningLevel', 'xavcHdProfileSettings_qualityTuningLevel' - Optional. Use Quality tuning level (qualityTuningLevel) to choose how
-- you want to trade off encoding speed for output video quality. The
-- default behavior is faster, lower quality, single-pass encoding.
--
-- 'slices', 'xavcHdProfileSettings_slices' - Number of slices per picture. Must be less than or equal to the number
-- of macroblock rows for progressive pictures, and less than or equal to
-- half the number of macroblock rows for interlaced pictures.
--
-- 'telecine', 'xavcHdProfileSettings_telecine' - Ignore this setting unless you set Frame rate (framerateNumerator
-- divided by framerateDenominator) to 29.970. If your input framerate is
-- 23.976, choose Hard (HARD). Otherwise, keep the default value None
-- (NONE). For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-telecine-and-inverse-telecine.html.
newXavcHdProfileSettings ::
  XavcHdProfileSettings
newXavcHdProfileSettings :: XavcHdProfileSettings
newXavcHdProfileSettings =
  XavcHdProfileSettings'
    { $sel:bitrateClass:XavcHdProfileSettings' :: Maybe XavcHdProfileBitrateClass
bitrateClass =
        forall a. Maybe a
Prelude.Nothing,
      $sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization = forall a. Maybe a
Prelude.Nothing,
      $sel:gopBReference:XavcHdProfileSettings' :: Maybe XavcGopBReference
gopBReference = forall a. Maybe a
Prelude.Nothing,
      $sel:gopClosedCadence:XavcHdProfileSettings' :: Maybe Natural
gopClosedCadence = forall a. Maybe a
Prelude.Nothing,
      $sel:hrdBufferSize:XavcHdProfileSettings' :: Maybe Natural
hrdBufferSize = forall a. Maybe a
Prelude.Nothing,
      $sel:interlaceMode:XavcHdProfileSettings' :: Maybe XavcInterlaceMode
interlaceMode = forall a. Maybe a
Prelude.Nothing,
      $sel:qualityTuningLevel:XavcHdProfileSettings' :: Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel = forall a. Maybe a
Prelude.Nothing,
      $sel:slices:XavcHdProfileSettings' :: Maybe Natural
slices = forall a. Maybe a
Prelude.Nothing,
      $sel:telecine:XavcHdProfileSettings' :: Maybe XavcHdProfileTelecine
telecine = forall a. Maybe a
Prelude.Nothing
    }

-- | Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your
-- output. Outputs of the same class have similar image quality over the
-- operating points that are valid for that class.
xavcHdProfileSettings_bitrateClass :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe XavcHdProfileBitrateClass)
xavcHdProfileSettings_bitrateClass :: Lens' XavcHdProfileSettings (Maybe XavcHdProfileBitrateClass)
xavcHdProfileSettings_bitrateClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe XavcHdProfileBitrateClass
bitrateClass :: Maybe XavcHdProfileBitrateClass
$sel:bitrateClass:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileBitrateClass
bitrateClass} -> Maybe XavcHdProfileBitrateClass
bitrateClass) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe XavcHdProfileBitrateClass
a -> XavcHdProfileSettings
s {$sel:bitrateClass:XavcHdProfileSettings' :: Maybe XavcHdProfileBitrateClass
bitrateClass = Maybe XavcHdProfileBitrateClass
a} :: XavcHdProfileSettings)

-- | The best way to set up adaptive quantization is to keep the default
-- value, Auto (AUTO), for the setting Adaptive quantization
-- (XavcAdaptiveQuantization). 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. Enable this setting
-- to have the encoder reduce I-frame pop. I-frame pop appears as a visual
-- flicker that can arise when the encoder saves bits by copying some
-- macroblocks many times from frame to frame, and then refreshes them at
-- the I-frame. When you enable this setting, the encoder updates these
-- macroblocks slightly more often to smooth out the flicker. This setting
-- is disabled by default. Related setting: In addition to enabling this
-- setting, you must also set Adaptive quantization (adaptiveQuantization)
-- to a value other than Off (OFF) or Auto (AUTO). Use Adaptive
-- quantization to adjust the degree of smoothing that Flicker adaptive
-- quantization provides.
xavcHdProfileSettings_flickerAdaptiveQuantization :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe XavcFlickerAdaptiveQuantization)
xavcHdProfileSettings_flickerAdaptiveQuantization :: Lens' XavcHdProfileSettings (Maybe XavcFlickerAdaptiveQuantization)
xavcHdProfileSettings_flickerAdaptiveQuantization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization :: Maybe XavcFlickerAdaptiveQuantization
$sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization} -> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe XavcFlickerAdaptiveQuantization
a -> XavcHdProfileSettings
s {$sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization = Maybe XavcFlickerAdaptiveQuantization
a} :: XavcHdProfileSettings)

-- | Specify whether the encoder uses B-frames as reference frames for other
-- pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to
-- use B-frames as reference frames. Choose Don\'t allow (DISABLED) to
-- prevent the encoder from using B-frames as reference frames.
xavcHdProfileSettings_gopBReference :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe XavcGopBReference)
xavcHdProfileSettings_gopBReference :: Lens' XavcHdProfileSettings (Maybe XavcGopBReference)
xavcHdProfileSettings_gopBReference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe XavcGopBReference
gopBReference :: Maybe XavcGopBReference
$sel:gopBReference:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcGopBReference
gopBReference} -> Maybe XavcGopBReference
gopBReference) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe XavcGopBReference
a -> XavcHdProfileSettings
s {$sel:gopBReference:XavcHdProfileSettings' :: Maybe XavcGopBReference
gopBReference = Maybe XavcGopBReference
a} :: XavcHdProfileSettings)

-- | Frequency of closed GOPs. In streaming applications, it is recommended
-- that this be set to 1 so a decoder joining mid-stream will receive an
-- IDR frame as quickly as possible. Setting this value to 0 will break
-- output segmenting.
xavcHdProfileSettings_gopClosedCadence :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe Prelude.Natural)
xavcHdProfileSettings_gopClosedCadence :: Lens' XavcHdProfileSettings (Maybe Natural)
xavcHdProfileSettings_gopClosedCadence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe Natural
gopClosedCadence :: Maybe Natural
$sel:gopClosedCadence:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
gopClosedCadence} -> Maybe Natural
gopClosedCadence) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe Natural
a -> XavcHdProfileSettings
s {$sel:gopClosedCadence:XavcHdProfileSettings' :: Maybe Natural
gopClosedCadence = Maybe Natural
a} :: XavcHdProfileSettings)

-- | Specify the size of the buffer that MediaConvert uses in the HRD buffer
-- model for this output. Specify this value in bits; for example, enter
-- five megabits as 5000000. When you don\'t set this value, or you set it
-- to zero, MediaConvert calculates the default by doubling the bitrate of
-- this output point.
xavcHdProfileSettings_hrdBufferSize :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe Prelude.Natural)
xavcHdProfileSettings_hrdBufferSize :: Lens' XavcHdProfileSettings (Maybe Natural)
xavcHdProfileSettings_hrdBufferSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe Natural
hrdBufferSize :: Maybe Natural
$sel:hrdBufferSize:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
hrdBufferSize} -> Maybe Natural
hrdBufferSize) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe Natural
a -> XavcHdProfileSettings
s {$sel:hrdBufferSize:XavcHdProfileSettings' :: Maybe Natural
hrdBufferSize = Maybe Natural
a} :: XavcHdProfileSettings)

-- | Choose the scan line type for the output. Keep the default value,
-- Progressive (PROGRESSIVE) to create a progressive output, regardless of
-- the scan type of your input. Use Top field first (TOP_FIELD) or Bottom
-- field first (BOTTOM_FIELD) to create an output that\'s interlaced with
-- the same field polarity throughout. Use Follow, default top
-- (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to
-- produce outputs with the same field polarity as the source. For jobs
-- that have multiple inputs, the output field polarity might change over
-- the course of the output. Follow behavior depends on the input scan
-- type. If the source is interlaced, the output will be interlaced with
-- the same polarity as the source. If the source is progressive, the
-- output will be interlaced with top field bottom field first, depending
-- on which of the Follow options you choose.
xavcHdProfileSettings_interlaceMode :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe XavcInterlaceMode)
xavcHdProfileSettings_interlaceMode :: Lens' XavcHdProfileSettings (Maybe XavcInterlaceMode)
xavcHdProfileSettings_interlaceMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe XavcInterlaceMode
interlaceMode :: Maybe XavcInterlaceMode
$sel:interlaceMode:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcInterlaceMode
interlaceMode} -> Maybe XavcInterlaceMode
interlaceMode) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe XavcInterlaceMode
a -> XavcHdProfileSettings
s {$sel:interlaceMode:XavcHdProfileSettings' :: Maybe XavcInterlaceMode
interlaceMode = Maybe XavcInterlaceMode
a} :: XavcHdProfileSettings)

-- | Optional. Use Quality tuning level (qualityTuningLevel) to choose how
-- you want to trade off encoding speed for output video quality. The
-- default behavior is faster, lower quality, single-pass encoding.
xavcHdProfileSettings_qualityTuningLevel :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe XavcHdProfileQualityTuningLevel)
xavcHdProfileSettings_qualityTuningLevel :: Lens' XavcHdProfileSettings (Maybe XavcHdProfileQualityTuningLevel)
xavcHdProfileSettings_qualityTuningLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel :: Maybe XavcHdProfileQualityTuningLevel
$sel:qualityTuningLevel:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel} -> Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe XavcHdProfileQualityTuningLevel
a -> XavcHdProfileSettings
s {$sel:qualityTuningLevel:XavcHdProfileSettings' :: Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel = Maybe XavcHdProfileQualityTuningLevel
a} :: XavcHdProfileSettings)

-- | Number of slices per picture. Must be less than or equal to the number
-- of macroblock rows for progressive pictures, and less than or equal to
-- half the number of macroblock rows for interlaced pictures.
xavcHdProfileSettings_slices :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe Prelude.Natural)
xavcHdProfileSettings_slices :: Lens' XavcHdProfileSettings (Maybe Natural)
xavcHdProfileSettings_slices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe Natural
slices :: Maybe Natural
$sel:slices:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
slices} -> Maybe Natural
slices) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe Natural
a -> XavcHdProfileSettings
s {$sel:slices:XavcHdProfileSettings' :: Maybe Natural
slices = Maybe Natural
a} :: XavcHdProfileSettings)

-- | Ignore this setting unless you set Frame rate (framerateNumerator
-- divided by framerateDenominator) to 29.970. If your input framerate is
-- 23.976, choose Hard (HARD). Otherwise, keep the default value None
-- (NONE). For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/working-with-telecine-and-inverse-telecine.html.
xavcHdProfileSettings_telecine :: Lens.Lens' XavcHdProfileSettings (Prelude.Maybe XavcHdProfileTelecine)
xavcHdProfileSettings_telecine :: Lens' XavcHdProfileSettings (Maybe XavcHdProfileTelecine)
xavcHdProfileSettings_telecine = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdProfileSettings' {Maybe XavcHdProfileTelecine
telecine :: Maybe XavcHdProfileTelecine
$sel:telecine:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileTelecine
telecine} -> Maybe XavcHdProfileTelecine
telecine) (\s :: XavcHdProfileSettings
s@XavcHdProfileSettings' {} Maybe XavcHdProfileTelecine
a -> XavcHdProfileSettings
s {$sel:telecine:XavcHdProfileSettings' :: Maybe XavcHdProfileTelecine
telecine = Maybe XavcHdProfileTelecine
a} :: XavcHdProfileSettings)

instance Data.FromJSON XavcHdProfileSettings where
  parseJSON :: Value -> Parser XavcHdProfileSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"XavcHdProfileSettings"
      ( \Object
x ->
          Maybe XavcHdProfileBitrateClass
-> Maybe XavcFlickerAdaptiveQuantization
-> Maybe XavcGopBReference
-> Maybe Natural
-> Maybe Natural
-> Maybe XavcInterlaceMode
-> Maybe XavcHdProfileQualityTuningLevel
-> Maybe Natural
-> Maybe XavcHdProfileTelecine
-> XavcHdProfileSettings
XavcHdProfileSettings'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"bitrateClass")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"flickerAdaptiveQuantization")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"gopBReference")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"gopClosedCadence")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hrdBufferSize")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"interlaceMode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"qualityTuningLevel")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"slices")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"telecine")
      )

instance Prelude.Hashable XavcHdProfileSettings where
  hashWithSalt :: Int -> XavcHdProfileSettings -> Int
hashWithSalt Int
_salt XavcHdProfileSettings' {Maybe Natural
Maybe XavcFlickerAdaptiveQuantization
Maybe XavcGopBReference
Maybe XavcHdProfileBitrateClass
Maybe XavcHdProfileQualityTuningLevel
Maybe XavcHdProfileTelecine
Maybe XavcInterlaceMode
telecine :: Maybe XavcHdProfileTelecine
slices :: Maybe Natural
qualityTuningLevel :: Maybe XavcHdProfileQualityTuningLevel
interlaceMode :: Maybe XavcInterlaceMode
hrdBufferSize :: Maybe Natural
gopClosedCadence :: Maybe Natural
gopBReference :: Maybe XavcGopBReference
flickerAdaptiveQuantization :: Maybe XavcFlickerAdaptiveQuantization
bitrateClass :: Maybe XavcHdProfileBitrateClass
$sel:telecine:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileTelecine
$sel:slices:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:qualityTuningLevel:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileQualityTuningLevel
$sel:interlaceMode:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcInterlaceMode
$sel:hrdBufferSize:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:gopClosedCadence:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:gopBReference:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcGopBReference
$sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
$sel:bitrateClass:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileBitrateClass
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcHdProfileBitrateClass
bitrateClass
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcGopBReference
gopBReference
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
gopClosedCadence
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
hrdBufferSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcInterlaceMode
interlaceMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
slices
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcHdProfileTelecine
telecine

instance Prelude.NFData XavcHdProfileSettings where
  rnf :: XavcHdProfileSettings -> ()
rnf XavcHdProfileSettings' {Maybe Natural
Maybe XavcFlickerAdaptiveQuantization
Maybe XavcGopBReference
Maybe XavcHdProfileBitrateClass
Maybe XavcHdProfileQualityTuningLevel
Maybe XavcHdProfileTelecine
Maybe XavcInterlaceMode
telecine :: Maybe XavcHdProfileTelecine
slices :: Maybe Natural
qualityTuningLevel :: Maybe XavcHdProfileQualityTuningLevel
interlaceMode :: Maybe XavcInterlaceMode
hrdBufferSize :: Maybe Natural
gopClosedCadence :: Maybe Natural
gopBReference :: Maybe XavcGopBReference
flickerAdaptiveQuantization :: Maybe XavcFlickerAdaptiveQuantization
bitrateClass :: Maybe XavcHdProfileBitrateClass
$sel:telecine:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileTelecine
$sel:slices:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:qualityTuningLevel:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileQualityTuningLevel
$sel:interlaceMode:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcInterlaceMode
$sel:hrdBufferSize:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:gopClosedCadence:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:gopBReference:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcGopBReference
$sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
$sel:bitrateClass:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileBitrateClass
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcHdProfileBitrateClass
bitrateClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcGopBReference
gopBReference
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
gopClosedCadence
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
hrdBufferSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcInterlaceMode
interlaceMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
slices
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcHdProfileTelecine
telecine

instance Data.ToJSON XavcHdProfileSettings where
  toJSON :: XavcHdProfileSettings -> Value
toJSON XavcHdProfileSettings' {Maybe Natural
Maybe XavcFlickerAdaptiveQuantization
Maybe XavcGopBReference
Maybe XavcHdProfileBitrateClass
Maybe XavcHdProfileQualityTuningLevel
Maybe XavcHdProfileTelecine
Maybe XavcInterlaceMode
telecine :: Maybe XavcHdProfileTelecine
slices :: Maybe Natural
qualityTuningLevel :: Maybe XavcHdProfileQualityTuningLevel
interlaceMode :: Maybe XavcInterlaceMode
hrdBufferSize :: Maybe Natural
gopClosedCadence :: Maybe Natural
gopBReference :: Maybe XavcGopBReference
flickerAdaptiveQuantization :: Maybe XavcFlickerAdaptiveQuantization
bitrateClass :: Maybe XavcHdProfileBitrateClass
$sel:telecine:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileTelecine
$sel:slices:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:qualityTuningLevel:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileQualityTuningLevel
$sel:interlaceMode:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcInterlaceMode
$sel:hrdBufferSize:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:gopClosedCadence:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe Natural
$sel:gopBReference:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcGopBReference
$sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
$sel:bitrateClass:XavcHdProfileSettings' :: XavcHdProfileSettings -> Maybe XavcHdProfileBitrateClass
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"bitrateClass" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcHdProfileBitrateClass
bitrateClass,
            (Key
"flickerAdaptiveQuantization" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization,
            (Key
"gopBReference" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcGopBReference
gopBReference,
            (Key
"gopClosedCadence" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
gopClosedCadence,
            (Key
"hrdBufferSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
hrdBufferSize,
            (Key
"interlaceMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcInterlaceMode
interlaceMode,
            (Key
"qualityTuningLevel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel,
            (Key
"slices" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
slices,
            (Key
"telecine" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe XavcHdProfileTelecine
telecine
          ]
      )