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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.Xavc4kProfileBitrateClass
import Amazonka.MediaConvert.Types.Xavc4kProfileCodecProfile
import Amazonka.MediaConvert.Types.Xavc4kProfileQualityTuningLevel
import Amazonka.MediaConvert.Types.XavcFlickerAdaptiveQuantization
import Amazonka.MediaConvert.Types.XavcGopBReference
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Profile) under
-- (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K.
--
-- /See:/ 'newXavc4kProfileSettings' smart constructor.
data Xavc4kProfileSettings = Xavc4kProfileSettings'
  { -- | 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.
    Xavc4kProfileSettings -> Maybe Xavc4kProfileQualityTuningLevel
qualityTuningLevel :: Prelude.Maybe Xavc4kProfileQualityTuningLevel,
    -- | 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.
    Xavc4kProfileSettings -> 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.
    Xavc4kProfileSettings -> Maybe Natural
slices :: Prelude.Maybe Prelude.Natural,
    -- | Specify the XAVC 4k (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.
    Xavc4kProfileSettings -> Maybe Xavc4kProfileBitrateClass
bitrateClass :: Prelude.Maybe Xavc4kProfileBitrateClass,
    -- | 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.
    Xavc4kProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization :: Prelude.Maybe XavcFlickerAdaptiveQuantization,
    -- | Specify the codec profile for this output. Choose High, 8-bit, 4:2:0
    -- (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified
    -- in ITU-T H.264.
    Xavc4kProfileSettings -> Maybe Xavc4kProfileCodecProfile
codecProfile :: Prelude.Maybe Xavc4kProfileCodecProfile,
    -- | 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.
    Xavc4kProfileSettings -> 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.
    Xavc4kProfileSettings -> Maybe Natural
gopClosedCadence :: Prelude.Maybe Prelude.Natural
  }
  deriving (Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool
(Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool)
-> (Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool)
-> Eq Xavc4kProfileSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool
$c/= :: Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool
== :: Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool
$c== :: Xavc4kProfileSettings -> Xavc4kProfileSettings -> Bool
Prelude.Eq, ReadPrec [Xavc4kProfileSettings]
ReadPrec Xavc4kProfileSettings
Int -> ReadS Xavc4kProfileSettings
ReadS [Xavc4kProfileSettings]
(Int -> ReadS Xavc4kProfileSettings)
-> ReadS [Xavc4kProfileSettings]
-> ReadPrec Xavc4kProfileSettings
-> ReadPrec [Xavc4kProfileSettings]
-> Read Xavc4kProfileSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Xavc4kProfileSettings]
$creadListPrec :: ReadPrec [Xavc4kProfileSettings]
readPrec :: ReadPrec Xavc4kProfileSettings
$creadPrec :: ReadPrec Xavc4kProfileSettings
readList :: ReadS [Xavc4kProfileSettings]
$creadList :: ReadS [Xavc4kProfileSettings]
readsPrec :: Int -> ReadS Xavc4kProfileSettings
$creadsPrec :: Int -> ReadS Xavc4kProfileSettings
Prelude.Read, Int -> Xavc4kProfileSettings -> ShowS
[Xavc4kProfileSettings] -> ShowS
Xavc4kProfileSettings -> String
(Int -> Xavc4kProfileSettings -> ShowS)
-> (Xavc4kProfileSettings -> String)
-> ([Xavc4kProfileSettings] -> ShowS)
-> Show Xavc4kProfileSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Xavc4kProfileSettings] -> ShowS
$cshowList :: [Xavc4kProfileSettings] -> ShowS
show :: Xavc4kProfileSettings -> String
$cshow :: Xavc4kProfileSettings -> String
showsPrec :: Int -> Xavc4kProfileSettings -> ShowS
$cshowsPrec :: Int -> Xavc4kProfileSettings -> ShowS
Prelude.Show, (forall x. Xavc4kProfileSettings -> Rep Xavc4kProfileSettings x)
-> (forall x. Rep Xavc4kProfileSettings x -> Xavc4kProfileSettings)
-> Generic Xavc4kProfileSettings
forall x. Rep Xavc4kProfileSettings x -> Xavc4kProfileSettings
forall x. Xavc4kProfileSettings -> Rep Xavc4kProfileSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Xavc4kProfileSettings x -> Xavc4kProfileSettings
$cfrom :: forall x. Xavc4kProfileSettings -> Rep Xavc4kProfileSettings x
Prelude.Generic)

-- |
-- Create a value of 'Xavc4kProfileSettings' 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', 'xavc4kProfileSettings_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', 'xavc4kProfileSettings_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', 'xavc4kProfileSettings_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', 'xavc4kProfileSettings_bitrateClass' - Specify the XAVC 4k (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', 'xavc4kProfileSettings_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.
--
-- 'codecProfile', 'xavc4kProfileSettings_codecProfile' - Specify the codec profile for this output. Choose High, 8-bit, 4:2:0
-- (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified
-- in ITU-T H.264.
--
-- 'gopBReference', 'xavc4kProfileSettings_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', 'xavc4kProfileSettings_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.
newXavc4kProfileSettings ::
  Xavc4kProfileSettings
newXavc4kProfileSettings :: Xavc4kProfileSettings
newXavc4kProfileSettings =
  Xavc4kProfileSettings' :: Maybe Xavc4kProfileQualityTuningLevel
-> Maybe Natural
-> Maybe Natural
-> Maybe Xavc4kProfileBitrateClass
-> Maybe XavcFlickerAdaptiveQuantization
-> Maybe Xavc4kProfileCodecProfile
-> Maybe XavcGopBReference
-> Maybe Natural
-> Xavc4kProfileSettings
Xavc4kProfileSettings'
    { $sel:qualityTuningLevel:Xavc4kProfileSettings' :: Maybe Xavc4kProfileQualityTuningLevel
qualityTuningLevel =
        Maybe Xavc4kProfileQualityTuningLevel
forall a. Maybe a
Prelude.Nothing,
      $sel:hrdBufferSize:Xavc4kProfileSettings' :: Maybe Natural
hrdBufferSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:slices:Xavc4kProfileSettings' :: Maybe Natural
slices = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:bitrateClass:Xavc4kProfileSettings' :: Maybe Xavc4kProfileBitrateClass
bitrateClass = Maybe Xavc4kProfileBitrateClass
forall a. Maybe a
Prelude.Nothing,
      $sel:flickerAdaptiveQuantization:Xavc4kProfileSettings' :: Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization = Maybe XavcFlickerAdaptiveQuantization
forall a. Maybe a
Prelude.Nothing,
      $sel:codecProfile:Xavc4kProfileSettings' :: Maybe Xavc4kProfileCodecProfile
codecProfile = Maybe Xavc4kProfileCodecProfile
forall a. Maybe a
Prelude.Nothing,
      $sel:gopBReference:Xavc4kProfileSettings' :: Maybe XavcGopBReference
gopBReference = Maybe XavcGopBReference
forall a. Maybe a
Prelude.Nothing,
      $sel:gopClosedCadence:Xavc4kProfileSettings' :: 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.
xavc4kProfileSettings_qualityTuningLevel :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe Xavc4kProfileQualityTuningLevel)
xavc4kProfileSettings_qualityTuningLevel :: (Maybe Xavc4kProfileQualityTuningLevel
 -> f (Maybe Xavc4kProfileQualityTuningLevel))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_qualityTuningLevel = (Xavc4kProfileSettings -> Maybe Xavc4kProfileQualityTuningLevel)
-> (Xavc4kProfileSettings
    -> Maybe Xavc4kProfileQualityTuningLevel -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe Xavc4kProfileQualityTuningLevel)
     (Maybe Xavc4kProfileQualityTuningLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe Xavc4kProfileQualityTuningLevel
qualityTuningLevel :: Maybe Xavc4kProfileQualityTuningLevel
$sel:qualityTuningLevel:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Xavc4kProfileQualityTuningLevel
qualityTuningLevel} -> Maybe Xavc4kProfileQualityTuningLevel
qualityTuningLevel) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe Xavc4kProfileQualityTuningLevel
a -> Xavc4kProfileSettings
s {$sel:qualityTuningLevel:Xavc4kProfileSettings' :: Maybe Xavc4kProfileQualityTuningLevel
qualityTuningLevel = Maybe Xavc4kProfileQualityTuningLevel
a} :: Xavc4kProfileSettings)

-- | 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.
xavc4kProfileSettings_hrdBufferSize :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe Prelude.Natural)
xavc4kProfileSettings_hrdBufferSize :: (Maybe Natural -> f (Maybe Natural))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_hrdBufferSize = (Xavc4kProfileSettings -> Maybe Natural)
-> (Xavc4kProfileSettings
    -> Maybe Natural -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe Natural
hrdBufferSize :: Maybe Natural
$sel:hrdBufferSize:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Natural
hrdBufferSize} -> Maybe Natural
hrdBufferSize) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe Natural
a -> Xavc4kProfileSettings
s {$sel:hrdBufferSize:Xavc4kProfileSettings' :: Maybe Natural
hrdBufferSize = Maybe Natural
a} :: Xavc4kProfileSettings)

-- | 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.
xavc4kProfileSettings_slices :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe Prelude.Natural)
xavc4kProfileSettings_slices :: (Maybe Natural -> f (Maybe Natural))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_slices = (Xavc4kProfileSettings -> Maybe Natural)
-> (Xavc4kProfileSettings
    -> Maybe Natural -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe Natural
slices :: Maybe Natural
$sel:slices:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Natural
slices} -> Maybe Natural
slices) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe Natural
a -> Xavc4kProfileSettings
s {$sel:slices:Xavc4kProfileSettings' :: Maybe Natural
slices = Maybe Natural
a} :: Xavc4kProfileSettings)

-- | Specify the XAVC 4k (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.
xavc4kProfileSettings_bitrateClass :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe Xavc4kProfileBitrateClass)
xavc4kProfileSettings_bitrateClass :: (Maybe Xavc4kProfileBitrateClass
 -> f (Maybe Xavc4kProfileBitrateClass))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_bitrateClass = (Xavc4kProfileSettings -> Maybe Xavc4kProfileBitrateClass)
-> (Xavc4kProfileSettings
    -> Maybe Xavc4kProfileBitrateClass -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe Xavc4kProfileBitrateClass)
     (Maybe Xavc4kProfileBitrateClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe Xavc4kProfileBitrateClass
bitrateClass :: Maybe Xavc4kProfileBitrateClass
$sel:bitrateClass:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Xavc4kProfileBitrateClass
bitrateClass} -> Maybe Xavc4kProfileBitrateClass
bitrateClass) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe Xavc4kProfileBitrateClass
a -> Xavc4kProfileSettings
s {$sel:bitrateClass:Xavc4kProfileSettings' :: Maybe Xavc4kProfileBitrateClass
bitrateClass = Maybe Xavc4kProfileBitrateClass
a} :: Xavc4kProfileSettings)

-- | 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.
xavc4kProfileSettings_flickerAdaptiveQuantization :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe XavcFlickerAdaptiveQuantization)
xavc4kProfileSettings_flickerAdaptiveQuantization :: (Maybe XavcFlickerAdaptiveQuantization
 -> f (Maybe XavcFlickerAdaptiveQuantization))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_flickerAdaptiveQuantization = (Xavc4kProfileSettings -> Maybe XavcFlickerAdaptiveQuantization)
-> (Xavc4kProfileSettings
    -> Maybe XavcFlickerAdaptiveQuantization -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe XavcFlickerAdaptiveQuantization)
     (Maybe XavcFlickerAdaptiveQuantization)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization :: Maybe XavcFlickerAdaptiveQuantization
$sel:flickerAdaptiveQuantization:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization} -> Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe XavcFlickerAdaptiveQuantization
a -> Xavc4kProfileSettings
s {$sel:flickerAdaptiveQuantization:Xavc4kProfileSettings' :: Maybe XavcFlickerAdaptiveQuantization
flickerAdaptiveQuantization = Maybe XavcFlickerAdaptiveQuantization
a} :: Xavc4kProfileSettings)

-- | Specify the codec profile for this output. Choose High, 8-bit, 4:2:0
-- (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified
-- in ITU-T H.264.
xavc4kProfileSettings_codecProfile :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe Xavc4kProfileCodecProfile)
xavc4kProfileSettings_codecProfile :: (Maybe Xavc4kProfileCodecProfile
 -> f (Maybe Xavc4kProfileCodecProfile))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_codecProfile = (Xavc4kProfileSettings -> Maybe Xavc4kProfileCodecProfile)
-> (Xavc4kProfileSettings
    -> Maybe Xavc4kProfileCodecProfile -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe Xavc4kProfileCodecProfile)
     (Maybe Xavc4kProfileCodecProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe Xavc4kProfileCodecProfile
codecProfile :: Maybe Xavc4kProfileCodecProfile
$sel:codecProfile:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Xavc4kProfileCodecProfile
codecProfile} -> Maybe Xavc4kProfileCodecProfile
codecProfile) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe Xavc4kProfileCodecProfile
a -> Xavc4kProfileSettings
s {$sel:codecProfile:Xavc4kProfileSettings' :: Maybe Xavc4kProfileCodecProfile
codecProfile = Maybe Xavc4kProfileCodecProfile
a} :: Xavc4kProfileSettings)

-- | 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.
xavc4kProfileSettings_gopBReference :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe XavcGopBReference)
xavc4kProfileSettings_gopBReference :: (Maybe XavcGopBReference -> f (Maybe XavcGopBReference))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_gopBReference = (Xavc4kProfileSettings -> Maybe XavcGopBReference)
-> (Xavc4kProfileSettings
    -> Maybe XavcGopBReference -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe XavcGopBReference)
     (Maybe XavcGopBReference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe XavcGopBReference
gopBReference :: Maybe XavcGopBReference
$sel:gopBReference:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe XavcGopBReference
gopBReference} -> Maybe XavcGopBReference
gopBReference) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe XavcGopBReference
a -> Xavc4kProfileSettings
s {$sel:gopBReference:Xavc4kProfileSettings' :: Maybe XavcGopBReference
gopBReference = Maybe XavcGopBReference
a} :: Xavc4kProfileSettings)

-- | 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.
xavc4kProfileSettings_gopClosedCadence :: Lens.Lens' Xavc4kProfileSettings (Prelude.Maybe Prelude.Natural)
xavc4kProfileSettings_gopClosedCadence :: (Maybe Natural -> f (Maybe Natural))
-> Xavc4kProfileSettings -> f Xavc4kProfileSettings
xavc4kProfileSettings_gopClosedCadence = (Xavc4kProfileSettings -> Maybe Natural)
-> (Xavc4kProfileSettings
    -> Maybe Natural -> Xavc4kProfileSettings)
-> Lens
     Xavc4kProfileSettings
     Xavc4kProfileSettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kProfileSettings' {Maybe Natural
gopClosedCadence :: Maybe Natural
$sel:gopClosedCadence:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Natural
gopClosedCadence} -> Maybe Natural
gopClosedCadence) (\s :: Xavc4kProfileSettings
s@Xavc4kProfileSettings' {} Maybe Natural
a -> Xavc4kProfileSettings
s {$sel:gopClosedCadence:Xavc4kProfileSettings' :: Maybe Natural
gopClosedCadence = Maybe Natural
a} :: Xavc4kProfileSettings)

instance Core.FromJSON Xavc4kProfileSettings where
  parseJSON :: Value -> Parser Xavc4kProfileSettings
parseJSON =
    String
-> (Object -> Parser Xavc4kProfileSettings)
-> Value
-> Parser Xavc4kProfileSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Xavc4kProfileSettings"
      ( \Object
x ->
          Maybe Xavc4kProfileQualityTuningLevel
-> Maybe Natural
-> Maybe Natural
-> Maybe Xavc4kProfileBitrateClass
-> Maybe XavcFlickerAdaptiveQuantization
-> Maybe Xavc4kProfileCodecProfile
-> Maybe XavcGopBReference
-> Maybe Natural
-> Xavc4kProfileSettings
Xavc4kProfileSettings'
            (Maybe Xavc4kProfileQualityTuningLevel
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Xavc4kProfileBitrateClass
 -> Maybe XavcFlickerAdaptiveQuantization
 -> Maybe Xavc4kProfileCodecProfile
 -> Maybe XavcGopBReference
 -> Maybe Natural
 -> Xavc4kProfileSettings)
-> Parser (Maybe Xavc4kProfileQualityTuningLevel)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Xavc4kProfileBitrateClass
      -> Maybe XavcFlickerAdaptiveQuantization
      -> Maybe Xavc4kProfileCodecProfile
      -> Maybe XavcGopBReference
      -> Maybe Natural
      -> Xavc4kProfileSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Xavc4kProfileQualityTuningLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"qualityTuningLevel")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Xavc4kProfileBitrateClass
   -> Maybe XavcFlickerAdaptiveQuantization
   -> Maybe Xavc4kProfileCodecProfile
   -> Maybe XavcGopBReference
   -> Maybe Natural
   -> Xavc4kProfileSettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Xavc4kProfileBitrateClass
      -> Maybe XavcFlickerAdaptiveQuantization
      -> Maybe Xavc4kProfileCodecProfile
      -> Maybe XavcGopBReference
      -> Maybe Natural
      -> Xavc4kProfileSettings)
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 Xavc4kProfileBitrateClass
   -> Maybe XavcFlickerAdaptiveQuantization
   -> Maybe Xavc4kProfileCodecProfile
   -> Maybe XavcGopBReference
   -> Maybe Natural
   -> Xavc4kProfileSettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Xavc4kProfileBitrateClass
      -> Maybe XavcFlickerAdaptiveQuantization
      -> Maybe Xavc4kProfileCodecProfile
      -> Maybe XavcGopBReference
      -> Maybe Natural
      -> Xavc4kProfileSettings)
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 Xavc4kProfileBitrateClass
   -> Maybe XavcFlickerAdaptiveQuantization
   -> Maybe Xavc4kProfileCodecProfile
   -> Maybe XavcGopBReference
   -> Maybe Natural
   -> Xavc4kProfileSettings)
-> Parser (Maybe Xavc4kProfileBitrateClass)
-> Parser
     (Maybe XavcFlickerAdaptiveQuantization
      -> Maybe Xavc4kProfileCodecProfile
      -> Maybe XavcGopBReference
      -> Maybe Natural
      -> Xavc4kProfileSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Xavc4kProfileBitrateClass)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bitrateClass")
            Parser
  (Maybe XavcFlickerAdaptiveQuantization
   -> Maybe Xavc4kProfileCodecProfile
   -> Maybe XavcGopBReference
   -> Maybe Natural
   -> Xavc4kProfileSettings)
-> Parser (Maybe XavcFlickerAdaptiveQuantization)
-> Parser
     (Maybe Xavc4kProfileCodecProfile
      -> Maybe XavcGopBReference
      -> Maybe Natural
      -> Xavc4kProfileSettings)
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 Xavc4kProfileCodecProfile
   -> Maybe XavcGopBReference
   -> Maybe Natural
   -> Xavc4kProfileSettings)
-> Parser (Maybe Xavc4kProfileCodecProfile)
-> Parser
     (Maybe XavcGopBReference -> Maybe Natural -> Xavc4kProfileSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Xavc4kProfileCodecProfile)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"codecProfile")
            Parser
  (Maybe XavcGopBReference -> Maybe Natural -> Xavc4kProfileSettings)
-> Parser (Maybe XavcGopBReference)
-> Parser (Maybe Natural -> Xavc4kProfileSettings)
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 -> Xavc4kProfileSettings)
-> Parser (Maybe Natural) -> Parser Xavc4kProfileSettings
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 Xavc4kProfileSettings

instance Prelude.NFData Xavc4kProfileSettings

instance Core.ToJSON Xavc4kProfileSettings where
  toJSON :: Xavc4kProfileSettings -> Value
toJSON Xavc4kProfileSettings' {Maybe Natural
Maybe Xavc4kProfileBitrateClass
Maybe Xavc4kProfileCodecProfile
Maybe Xavc4kProfileQualityTuningLevel
Maybe XavcFlickerAdaptiveQuantization
Maybe XavcGopBReference
gopClosedCadence :: Maybe Natural
gopBReference :: Maybe XavcGopBReference
codecProfile :: Maybe Xavc4kProfileCodecProfile
flickerAdaptiveQuantization :: Maybe XavcFlickerAdaptiveQuantization
bitrateClass :: Maybe Xavc4kProfileBitrateClass
slices :: Maybe Natural
hrdBufferSize :: Maybe Natural
qualityTuningLevel :: Maybe Xavc4kProfileQualityTuningLevel
$sel:gopClosedCadence:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Natural
$sel:gopBReference:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe XavcGopBReference
$sel:codecProfile:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Xavc4kProfileCodecProfile
$sel:flickerAdaptiveQuantization:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe XavcFlickerAdaptiveQuantization
$sel:bitrateClass:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Xavc4kProfileBitrateClass
$sel:slices:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Natural
$sel:hrdBufferSize:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Natural
$sel:qualityTuningLevel:Xavc4kProfileSettings' :: Xavc4kProfileSettings -> Maybe Xavc4kProfileQualityTuningLevel
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"qualityTuningLevel" Text -> Xavc4kProfileQualityTuningLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Xavc4kProfileQualityTuningLevel -> Pair)
-> Maybe Xavc4kProfileQualityTuningLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Xavc4kProfileQualityTuningLevel
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 -> Xavc4kProfileBitrateClass -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Xavc4kProfileBitrateClass -> Pair)
-> Maybe Xavc4kProfileBitrateClass -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Xavc4kProfileBitrateClass
bitrateClass,
            (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
"codecProfile" Text -> Xavc4kProfileCodecProfile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Xavc4kProfileCodecProfile -> Pair)
-> Maybe Xavc4kProfileCodecProfile -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Xavc4kProfileCodecProfile
codecProfile,
            (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
          ]
      )