{-# 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-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.XavcHdProfileSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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'
  { -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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
  }
  deriving (XavcHdProfileSettings -> XavcHdProfileSettings -> Bool
(XavcHdProfileSettings -> XavcHdProfileSettings -> Bool)
-> (XavcHdProfileSettings -> XavcHdProfileSettings -> Bool)
-> Eq XavcHdProfileSettings
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]
(Int -> ReadS XavcHdProfileSettings)
-> ReadS [XavcHdProfileSettings]
-> ReadPrec XavcHdProfileSettings
-> ReadPrec [XavcHdProfileSettings]
-> Read 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
(Int -> XavcHdProfileSettings -> ShowS)
-> (XavcHdProfileSettings -> String)
-> ([XavcHdProfileSettings] -> ShowS)
-> Show XavcHdProfileSettings
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. XavcHdProfileSettings -> Rep XavcHdProfileSettings x)
-> (forall x. Rep XavcHdProfileSettings x -> XavcHdProfileSettings)
-> Generic XavcHdProfileSettings
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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
newXavcHdProfileSettings ::
  XavcHdProfileSettings
newXavcHdProfileSettings :: XavcHdProfileSettings
newXavcHdProfileSettings =
  XavcHdProfileSettings' :: Maybe XavcHdProfileQualityTuningLevel
-> Maybe Natural
-> Maybe Natural
-> Maybe XavcHdProfileBitrateClass
-> Maybe XavcHdProfileTelecine
-> Maybe XavcInterlaceMode
-> Maybe XavcFlickerAdaptiveQuantization
-> Maybe XavcGopBReference
-> Maybe Natural
-> XavcHdProfileSettings
XavcHdProfileSettings'
    { $sel:qualityTuningLevel:XavcHdProfileSettings' :: Maybe XavcHdProfileQualityTuningLevel
qualityTuningLevel =
        Maybe XavcHdProfileQualityTuningLevel
forall a. Maybe a
Prelude.Nothing,
      $sel:hrdBufferSize:XavcHdProfileSettings' :: Maybe Natural
hrdBufferSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:slices:XavcHdProfileSettings' :: Maybe Natural
slices = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:bitrateClass:XavcHdProfileSettings' :: Maybe XavcHdProfileBitrateClass
bitrateClass = Maybe XavcHdProfileBitrateClass
forall a. Maybe a
Prelude.Nothing,
      $sel:telecine:XavcHdProfileSettings' :: Maybe XavcHdProfileTelecine
telecine = Maybe XavcHdProfileTelecine
forall a. Maybe a
Prelude.Nothing,
      $sel:interlaceMode:XavcHdProfileSettings' :: Maybe XavcInterlaceMode
interlaceMode = Maybe XavcInterlaceMode
forall a. Maybe a
Prelude.Nothing,
      $sel:flickerAdaptiveQuantization:XavcHdProfileSettings' :: Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization = Maybe XavcFlickerAdaptiveQuantization
forall a. Maybe a
Prelude.Nothing,
      $sel:gopBReference:XavcHdProfileSettings' :: Maybe XavcGopBReference
gopBReference = Maybe XavcGopBReference
forall a. Maybe a
Prelude.Nothing,
      $sel:gopClosedCadence:XavcHdProfileSettings' :: Maybe Natural
gopClosedCadence = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe XavcHdProfileQualityTuningLevel
 -> f (Maybe XavcHdProfileQualityTuningLevel))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_qualityTuningLevel = (XavcHdProfileSettings -> Maybe XavcHdProfileQualityTuningLevel)
-> (XavcHdProfileSettings
    -> Maybe XavcHdProfileQualityTuningLevel -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe XavcHdProfileQualityTuningLevel)
     (Maybe XavcHdProfileQualityTuningLevel)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_hrdBufferSize = (XavcHdProfileSettings -> Maybe Natural)
-> (XavcHdProfileSettings
    -> Maybe Natural -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe Natural)
     (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_slices = (XavcHdProfileSettings -> Maybe Natural)
-> (XavcHdProfileSettings
    -> Maybe Natural -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe Natural)
     (Maybe Natural)
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)

-- | 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 :: (Maybe XavcHdProfileBitrateClass
 -> f (Maybe XavcHdProfileBitrateClass))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_bitrateClass = (XavcHdProfileSettings -> Maybe XavcHdProfileBitrateClass)
-> (XavcHdProfileSettings
    -> Maybe XavcHdProfileBitrateClass -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe XavcHdProfileBitrateClass)
     (Maybe XavcHdProfileBitrateClass)
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)

-- | 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 :: (Maybe XavcHdProfileTelecine -> f (Maybe XavcHdProfileTelecine))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_telecine = (XavcHdProfileSettings -> Maybe XavcHdProfileTelecine)
-> (XavcHdProfileSettings
    -> Maybe XavcHdProfileTelecine -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe XavcHdProfileTelecine)
     (Maybe XavcHdProfileTelecine)
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)

-- | 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 :: (Maybe XavcInterlaceMode -> f (Maybe XavcInterlaceMode))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_interlaceMode = (XavcHdProfileSettings -> Maybe XavcInterlaceMode)
-> (XavcHdProfileSettings
    -> Maybe XavcInterlaceMode -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe XavcInterlaceMode)
     (Maybe XavcInterlaceMode)
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)

-- | 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 :: (Maybe XavcFlickerAdaptiveQuantization
 -> f (Maybe XavcFlickerAdaptiveQuantization))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_flickerAdaptiveQuantization = (XavcHdProfileSettings -> Maybe XavcFlickerAdaptiveQuantization)
-> (XavcHdProfileSettings
    -> Maybe XavcFlickerAdaptiveQuantization -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe XavcFlickerAdaptiveQuantization)
     (Maybe XavcFlickerAdaptiveQuantization)
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 :: (Maybe XavcGopBReference -> f (Maybe XavcGopBReference))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_gopBReference = (XavcHdProfileSettings -> Maybe XavcGopBReference)
-> (XavcHdProfileSettings
    -> Maybe XavcGopBReference -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe XavcGopBReference)
     (Maybe XavcGopBReference)
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 :: (Maybe Natural -> f (Maybe Natural))
-> XavcHdProfileSettings -> f XavcHdProfileSettings
xavcHdProfileSettings_gopClosedCadence = (XavcHdProfileSettings -> Maybe Natural)
-> (XavcHdProfileSettings
    -> Maybe Natural -> XavcHdProfileSettings)
-> Lens
     XavcHdProfileSettings
     XavcHdProfileSettings
     (Maybe Natural)
     (Maybe Natural)
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)

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

instance Prelude.Hashable XavcHdProfileSettings

instance Prelude.NFData XavcHdProfileSettings

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