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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AvcIntraClass
import Amazonka.MediaConvert.Types.AvcIntraFramerateControl
import Amazonka.MediaConvert.Types.AvcIntraFramerateConversionAlgorithm
import Amazonka.MediaConvert.Types.AvcIntraInterlaceMode
import Amazonka.MediaConvert.Types.AvcIntraScanTypeConversionMode
import Amazonka.MediaConvert.Types.AvcIntraSlowPal
import Amazonka.MediaConvert.Types.AvcIntraTelecine
import Amazonka.MediaConvert.Types.AvcIntraUhdSettings
import qualified Amazonka.Prelude as Prelude

-- | Required when you choose AVC-Intra for your output video codec. For more
-- information about the AVC-Intra settings, see the relevant
-- specification. For detailed information about SD and HD in AVC-Intra,
-- see https:\/\/ieeexplore.ieee.org\/document\/7290936. For information
-- about 4K\/2K in AVC-Intra, see
-- https:\/\/pro-av.panasonic.net\/en\/avc-ultra\/AVC-ULTRAoverview.pdf.
--
-- /See:/ 'newAvcIntraSettings' smart constructor.
data AvcIntraSettings = AvcIntraSettings'
  { -- | Ignore this setting unless your input frame rate is 23.976 or 24 frames
    -- per second (fps). Enable slow PAL to create a 25 fps output. When you
    -- enable slow PAL, MediaConvert relabels the video frames to 25 fps and
    -- resamples your audio to keep it synchronized with the video. Note that
    -- enabling this setting will slightly reduce the duration of your video.
    -- Required settings: You must also set Framerate to 25. In your JSON job
    -- specification, set (framerateControl) to (SPECIFIED),
    -- (framerateNumerator) to 25 and (framerateDenominator) to 1.
    AvcIntraSettings -> Maybe AvcIntraSlowPal
slowPal :: Prelude.Maybe AvcIntraSlowPal,
    -- | Optional when you set AVC-Intra class (avcIntraClass) to Class 4K\/2K
    -- (CLASS_4K_2K). When you set AVC-Intra class to a different value, this
    -- object isn\'t allowed.
    AvcIntraSettings -> Maybe AvcIntraUhdSettings
avcIntraUhdSettings :: Prelude.Maybe AvcIntraUhdSettings,
    -- | When you do frame rate conversion from 23.976 frames per second (fps) to
    -- 29.97 fps, and your output scan type is interlaced, you can optionally
    -- enable hard telecine (HARD) to create a smoother picture. When you keep
    -- the default value, None (NONE), MediaConvert does a standard frame rate
    -- conversion to 29.97 without doing anything with the field polarity to
    -- create a smoother picture.
    AvcIntraSettings -> Maybe AvcIntraTelecine
telecine :: Prelude.Maybe AvcIntraTelecine,
    -- | 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.
    AvcIntraSettings -> Maybe AvcIntraInterlaceMode
interlaceMode :: Prelude.Maybe AvcIntraInterlaceMode,
    -- | Use this setting for interlaced outputs, when your output frame rate is
    -- half of your input frame rate. In this situation, choose Optimized
    -- interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced
    -- output. In this case, each progressive frame from the input corresponds
    -- to an interlaced field in the output. Keep the default value, Basic
    -- interlacing (INTERLACED), for all other output frame rates. With basic
    -- interlacing, MediaConvert performs any frame rate conversion first and
    -- then interlaces the frames. When you choose Optimized interlacing and
    -- you set your output frame rate to a value that isn\'t suitable for
    -- optimized interlacing, MediaConvert automatically falls back to basic
    -- interlacing. Required settings: To use optimized interlacing, you must
    -- set Telecine (telecine) to None (NONE) or Soft (SOFT). You can\'t use
    -- optimized interlacing for hard telecine outputs. You must also set
    -- Interlace mode (interlaceMode) to a value other than Progressive
    -- (PROGRESSIVE).
    AvcIntraSettings -> Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode :: Prelude.Maybe AvcIntraScanTypeConversionMode,
    -- | Specify the AVC-Intra class of your output. The AVC-Intra class
    -- selection determines the output video bit rate depending on the frame
    -- rate of the output. Outputs with higher class values have higher
    -- bitrates and improved image quality. Note that for Class 4K\/2K,
    -- MediaConvert supports only 4:2:2 chroma subsampling.
    AvcIntraSettings -> Maybe AvcIntraClass
avcIntraClass :: Prelude.Maybe AvcIntraClass,
    -- | When you use the API for transcode jobs that use frame rate conversion,
    -- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
    -- 23.976 fps. Use FramerateDenominator to specify the denominator of this
    -- fraction. In this example, use 1001 for the value of
    -- FramerateDenominator. When you use the console for transcode jobs that
    -- use frame rate conversion, provide the value as a decimal number for
    -- Framerate. In this example, specify 23.976.
    AvcIntraSettings -> Maybe Natural
framerateDenominator :: Prelude.Maybe Prelude.Natural,
    -- | Choose the method that you want MediaConvert to use when increasing or
    -- decreasing the frame rate. We recommend using drop duplicate
    -- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
    -- 30 fps. For numerically complex conversions, you can use interpolate
    -- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
    -- might introduce undesirable video artifacts. For complex frame rate
    -- conversions, especially if your source video has already been converted
    -- from its original cadence, use FrameFormer (FRAMEFORMER) to do
    -- motion-compensated interpolation. FrameFormer chooses the best
    -- conversion method frame by frame. Note that using FrameFormer increases
    -- the transcoding time and incurs a significant add-on cost.
    AvcIntraSettings -> Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm :: Prelude.Maybe AvcIntraFramerateConversionAlgorithm,
    -- | If you are using the console, use the Framerate setting to specify the
    -- frame rate for this output. If you want to keep the same frame rate as
    -- the input video, choose Follow source. If you want to do frame rate
    -- conversion, choose a frame rate from the dropdown list or choose Custom.
    -- The framerates shown in the dropdown list are decimal approximations of
    -- fractions. If you choose Custom, specify your frame rate as a fraction.
    -- If you are creating your transcoding job specification as a JSON file
    -- without the console, use FramerateControl to specify which value the
    -- service uses for the frame rate for this output. Choose
    -- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
    -- from the input. Choose SPECIFIED if you want the service to use the
    -- frame rate you specify in the settings FramerateNumerator and
    -- FramerateDenominator.
    AvcIntraSettings -> Maybe AvcIntraFramerateControl
framerateControl :: Prelude.Maybe AvcIntraFramerateControl,
    -- | When you use the API for transcode jobs that use frame rate conversion,
    -- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
    -- 23.976 fps. Use FramerateNumerator to specify the numerator of this
    -- fraction. In this example, use 24000 for the value of
    -- FramerateNumerator. When you use the console for transcode jobs that use
    -- frame rate conversion, provide the value as a decimal number for
    -- Framerate. In this example, specify 23.976.
    AvcIntraSettings -> Maybe Natural
framerateNumerator :: Prelude.Maybe Prelude.Natural
  }
  deriving (AvcIntraSettings -> AvcIntraSettings -> Bool
(AvcIntraSettings -> AvcIntraSettings -> Bool)
-> (AvcIntraSettings -> AvcIntraSettings -> Bool)
-> Eq AvcIntraSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AvcIntraSettings -> AvcIntraSettings -> Bool
$c/= :: AvcIntraSettings -> AvcIntraSettings -> Bool
== :: AvcIntraSettings -> AvcIntraSettings -> Bool
$c== :: AvcIntraSettings -> AvcIntraSettings -> Bool
Prelude.Eq, ReadPrec [AvcIntraSettings]
ReadPrec AvcIntraSettings
Int -> ReadS AvcIntraSettings
ReadS [AvcIntraSettings]
(Int -> ReadS AvcIntraSettings)
-> ReadS [AvcIntraSettings]
-> ReadPrec AvcIntraSettings
-> ReadPrec [AvcIntraSettings]
-> Read AvcIntraSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AvcIntraSettings]
$creadListPrec :: ReadPrec [AvcIntraSettings]
readPrec :: ReadPrec AvcIntraSettings
$creadPrec :: ReadPrec AvcIntraSettings
readList :: ReadS [AvcIntraSettings]
$creadList :: ReadS [AvcIntraSettings]
readsPrec :: Int -> ReadS AvcIntraSettings
$creadsPrec :: Int -> ReadS AvcIntraSettings
Prelude.Read, Int -> AvcIntraSettings -> ShowS
[AvcIntraSettings] -> ShowS
AvcIntraSettings -> String
(Int -> AvcIntraSettings -> ShowS)
-> (AvcIntraSettings -> String)
-> ([AvcIntraSettings] -> ShowS)
-> Show AvcIntraSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AvcIntraSettings] -> ShowS
$cshowList :: [AvcIntraSettings] -> ShowS
show :: AvcIntraSettings -> String
$cshow :: AvcIntraSettings -> String
showsPrec :: Int -> AvcIntraSettings -> ShowS
$cshowsPrec :: Int -> AvcIntraSettings -> ShowS
Prelude.Show, (forall x. AvcIntraSettings -> Rep AvcIntraSettings x)
-> (forall x. Rep AvcIntraSettings x -> AvcIntraSettings)
-> Generic AvcIntraSettings
forall x. Rep AvcIntraSettings x -> AvcIntraSettings
forall x. AvcIntraSettings -> Rep AvcIntraSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AvcIntraSettings x -> AvcIntraSettings
$cfrom :: forall x. AvcIntraSettings -> Rep AvcIntraSettings x
Prelude.Generic)

-- |
-- Create a value of 'AvcIntraSettings' 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:
--
-- 'slowPal', 'avcIntraSettings_slowPal' - Ignore this setting unless your input frame rate is 23.976 or 24 frames
-- per second (fps). Enable slow PAL to create a 25 fps output. When you
-- enable slow PAL, MediaConvert relabels the video frames to 25 fps and
-- resamples your audio to keep it synchronized with the video. Note that
-- enabling this setting will slightly reduce the duration of your video.
-- Required settings: You must also set Framerate to 25. In your JSON job
-- specification, set (framerateControl) to (SPECIFIED),
-- (framerateNumerator) to 25 and (framerateDenominator) to 1.
--
-- 'avcIntraUhdSettings', 'avcIntraSettings_avcIntraUhdSettings' - Optional when you set AVC-Intra class (avcIntraClass) to Class 4K\/2K
-- (CLASS_4K_2K). When you set AVC-Intra class to a different value, this
-- object isn\'t allowed.
--
-- 'telecine', 'avcIntraSettings_telecine' - When you do frame rate conversion from 23.976 frames per second (fps) to
-- 29.97 fps, and your output scan type is interlaced, you can optionally
-- enable hard telecine (HARD) to create a smoother picture. When you keep
-- the default value, None (NONE), MediaConvert does a standard frame rate
-- conversion to 29.97 without doing anything with the field polarity to
-- create a smoother picture.
--
-- 'interlaceMode', 'avcIntraSettings_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.
--
-- 'scanTypeConversionMode', 'avcIntraSettings_scanTypeConversionMode' - Use this setting for interlaced outputs, when your output frame rate is
-- half of your input frame rate. In this situation, choose Optimized
-- interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced
-- output. In this case, each progressive frame from the input corresponds
-- to an interlaced field in the output. Keep the default value, Basic
-- interlacing (INTERLACED), for all other output frame rates. With basic
-- interlacing, MediaConvert performs any frame rate conversion first and
-- then interlaces the frames. When you choose Optimized interlacing and
-- you set your output frame rate to a value that isn\'t suitable for
-- optimized interlacing, MediaConvert automatically falls back to basic
-- interlacing. Required settings: To use optimized interlacing, you must
-- set Telecine (telecine) to None (NONE) or Soft (SOFT). You can\'t use
-- optimized interlacing for hard telecine outputs. You must also set
-- Interlace mode (interlaceMode) to a value other than Progressive
-- (PROGRESSIVE).
--
-- 'avcIntraClass', 'avcIntraSettings_avcIntraClass' - Specify the AVC-Intra class of your output. The AVC-Intra class
-- selection determines the output video bit rate depending on the frame
-- rate of the output. Outputs with higher class values have higher
-- bitrates and improved image quality. Note that for Class 4K\/2K,
-- MediaConvert supports only 4:2:2 chroma subsampling.
--
-- 'framerateDenominator', 'avcIntraSettings_framerateDenominator' - When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateDenominator to specify the denominator of this
-- fraction. In this example, use 1001 for the value of
-- FramerateDenominator. When you use the console for transcode jobs that
-- use frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
--
-- 'framerateConversionAlgorithm', 'avcIntraSettings_framerateConversionAlgorithm' - Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
--
-- 'framerateControl', 'avcIntraSettings_framerateControl' - If you are using the console, use the Framerate setting to specify the
-- frame rate for this output. If you want to keep the same frame rate as
-- the input video, choose Follow source. If you want to do frame rate
-- conversion, choose a frame rate from the dropdown list or choose Custom.
-- The framerates shown in the dropdown list are decimal approximations of
-- fractions. If you choose Custom, specify your frame rate as a fraction.
-- If you are creating your transcoding job specification as a JSON file
-- without the console, use FramerateControl to specify which value the
-- service uses for the frame rate for this output. Choose
-- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
-- from the input. Choose SPECIFIED if you want the service to use the
-- frame rate you specify in the settings FramerateNumerator and
-- FramerateDenominator.
--
-- 'framerateNumerator', 'avcIntraSettings_framerateNumerator' - When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateNumerator to specify the numerator of this
-- fraction. In this example, use 24000 for the value of
-- FramerateNumerator. When you use the console for transcode jobs that use
-- frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
newAvcIntraSettings ::
  AvcIntraSettings
newAvcIntraSettings :: AvcIntraSettings
newAvcIntraSettings =
  AvcIntraSettings' :: Maybe AvcIntraSlowPal
-> Maybe AvcIntraUhdSettings
-> Maybe AvcIntraTelecine
-> Maybe AvcIntraInterlaceMode
-> Maybe AvcIntraScanTypeConversionMode
-> Maybe AvcIntraClass
-> Maybe Natural
-> Maybe AvcIntraFramerateConversionAlgorithm
-> Maybe AvcIntraFramerateControl
-> Maybe Natural
-> AvcIntraSettings
AvcIntraSettings'
    { $sel:slowPal:AvcIntraSettings' :: Maybe AvcIntraSlowPal
slowPal = Maybe AvcIntraSlowPal
forall a. Maybe a
Prelude.Nothing,
      $sel:avcIntraUhdSettings:AvcIntraSettings' :: Maybe AvcIntraUhdSettings
avcIntraUhdSettings = Maybe AvcIntraUhdSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:telecine:AvcIntraSettings' :: Maybe AvcIntraTelecine
telecine = Maybe AvcIntraTelecine
forall a. Maybe a
Prelude.Nothing,
      $sel:interlaceMode:AvcIntraSettings' :: Maybe AvcIntraInterlaceMode
interlaceMode = Maybe AvcIntraInterlaceMode
forall a. Maybe a
Prelude.Nothing,
      $sel:scanTypeConversionMode:AvcIntraSettings' :: Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode = Maybe AvcIntraScanTypeConversionMode
forall a. Maybe a
Prelude.Nothing,
      $sel:avcIntraClass:AvcIntraSettings' :: Maybe AvcIntraClass
avcIntraClass = Maybe AvcIntraClass
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateDenominator:AvcIntraSettings' :: Maybe Natural
framerateDenominator = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateConversionAlgorithm:AvcIntraSettings' :: Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm = Maybe AvcIntraFramerateConversionAlgorithm
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateControl:AvcIntraSettings' :: Maybe AvcIntraFramerateControl
framerateControl = Maybe AvcIntraFramerateControl
forall a. Maybe a
Prelude.Nothing,
      $sel:framerateNumerator:AvcIntraSettings' :: Maybe Natural
framerateNumerator = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Ignore this setting unless your input frame rate is 23.976 or 24 frames
-- per second (fps). Enable slow PAL to create a 25 fps output. When you
-- enable slow PAL, MediaConvert relabels the video frames to 25 fps and
-- resamples your audio to keep it synchronized with the video. Note that
-- enabling this setting will slightly reduce the duration of your video.
-- Required settings: You must also set Framerate to 25. In your JSON job
-- specification, set (framerateControl) to (SPECIFIED),
-- (framerateNumerator) to 25 and (framerateDenominator) to 1.
avcIntraSettings_slowPal :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraSlowPal)
avcIntraSettings_slowPal :: (Maybe AvcIntraSlowPal -> f (Maybe AvcIntraSlowPal))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_slowPal = (AvcIntraSettings -> Maybe AvcIntraSlowPal)
-> (AvcIntraSettings -> Maybe AvcIntraSlowPal -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraSlowPal)
     (Maybe AvcIntraSlowPal)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraSlowPal
slowPal :: Maybe AvcIntraSlowPal
$sel:slowPal:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraSlowPal
slowPal} -> Maybe AvcIntraSlowPal
slowPal) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraSlowPal
a -> AvcIntraSettings
s {$sel:slowPal:AvcIntraSettings' :: Maybe AvcIntraSlowPal
slowPal = Maybe AvcIntraSlowPal
a} :: AvcIntraSettings)

-- | Optional when you set AVC-Intra class (avcIntraClass) to Class 4K\/2K
-- (CLASS_4K_2K). When you set AVC-Intra class to a different value, this
-- object isn\'t allowed.
avcIntraSettings_avcIntraUhdSettings :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraUhdSettings)
avcIntraSettings_avcIntraUhdSettings :: (Maybe AvcIntraUhdSettings -> f (Maybe AvcIntraUhdSettings))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_avcIntraUhdSettings = (AvcIntraSettings -> Maybe AvcIntraUhdSettings)
-> (AvcIntraSettings
    -> Maybe AvcIntraUhdSettings -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraUhdSettings)
     (Maybe AvcIntraUhdSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraUhdSettings
avcIntraUhdSettings :: Maybe AvcIntraUhdSettings
$sel:avcIntraUhdSettings:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraUhdSettings
avcIntraUhdSettings} -> Maybe AvcIntraUhdSettings
avcIntraUhdSettings) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraUhdSettings
a -> AvcIntraSettings
s {$sel:avcIntraUhdSettings:AvcIntraSettings' :: Maybe AvcIntraUhdSettings
avcIntraUhdSettings = Maybe AvcIntraUhdSettings
a} :: AvcIntraSettings)

-- | When you do frame rate conversion from 23.976 frames per second (fps) to
-- 29.97 fps, and your output scan type is interlaced, you can optionally
-- enable hard telecine (HARD) to create a smoother picture. When you keep
-- the default value, None (NONE), MediaConvert does a standard frame rate
-- conversion to 29.97 without doing anything with the field polarity to
-- create a smoother picture.
avcIntraSettings_telecine :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraTelecine)
avcIntraSettings_telecine :: (Maybe AvcIntraTelecine -> f (Maybe AvcIntraTelecine))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_telecine = (AvcIntraSettings -> Maybe AvcIntraTelecine)
-> (AvcIntraSettings -> Maybe AvcIntraTelecine -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraTelecine)
     (Maybe AvcIntraTelecine)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraTelecine
telecine :: Maybe AvcIntraTelecine
$sel:telecine:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraTelecine
telecine} -> Maybe AvcIntraTelecine
telecine) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraTelecine
a -> AvcIntraSettings
s {$sel:telecine:AvcIntraSettings' :: Maybe AvcIntraTelecine
telecine = Maybe AvcIntraTelecine
a} :: AvcIntraSettings)

-- | 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.
avcIntraSettings_interlaceMode :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraInterlaceMode)
avcIntraSettings_interlaceMode :: (Maybe AvcIntraInterlaceMode -> f (Maybe AvcIntraInterlaceMode))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_interlaceMode = (AvcIntraSettings -> Maybe AvcIntraInterlaceMode)
-> (AvcIntraSettings
    -> Maybe AvcIntraInterlaceMode -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraInterlaceMode)
     (Maybe AvcIntraInterlaceMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraInterlaceMode
interlaceMode :: Maybe AvcIntraInterlaceMode
$sel:interlaceMode:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraInterlaceMode
interlaceMode} -> Maybe AvcIntraInterlaceMode
interlaceMode) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraInterlaceMode
a -> AvcIntraSettings
s {$sel:interlaceMode:AvcIntraSettings' :: Maybe AvcIntraInterlaceMode
interlaceMode = Maybe AvcIntraInterlaceMode
a} :: AvcIntraSettings)

-- | Use this setting for interlaced outputs, when your output frame rate is
-- half of your input frame rate. In this situation, choose Optimized
-- interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced
-- output. In this case, each progressive frame from the input corresponds
-- to an interlaced field in the output. Keep the default value, Basic
-- interlacing (INTERLACED), for all other output frame rates. With basic
-- interlacing, MediaConvert performs any frame rate conversion first and
-- then interlaces the frames. When you choose Optimized interlacing and
-- you set your output frame rate to a value that isn\'t suitable for
-- optimized interlacing, MediaConvert automatically falls back to basic
-- interlacing. Required settings: To use optimized interlacing, you must
-- set Telecine (telecine) to None (NONE) or Soft (SOFT). You can\'t use
-- optimized interlacing for hard telecine outputs. You must also set
-- Interlace mode (interlaceMode) to a value other than Progressive
-- (PROGRESSIVE).
avcIntraSettings_scanTypeConversionMode :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraScanTypeConversionMode)
avcIntraSettings_scanTypeConversionMode :: (Maybe AvcIntraScanTypeConversionMode
 -> f (Maybe AvcIntraScanTypeConversionMode))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_scanTypeConversionMode = (AvcIntraSettings -> Maybe AvcIntraScanTypeConversionMode)
-> (AvcIntraSettings
    -> Maybe AvcIntraScanTypeConversionMode -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraScanTypeConversionMode)
     (Maybe AvcIntraScanTypeConversionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode :: Maybe AvcIntraScanTypeConversionMode
$sel:scanTypeConversionMode:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode} -> Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraScanTypeConversionMode
a -> AvcIntraSettings
s {$sel:scanTypeConversionMode:AvcIntraSettings' :: Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode = Maybe AvcIntraScanTypeConversionMode
a} :: AvcIntraSettings)

-- | Specify the AVC-Intra class of your output. The AVC-Intra class
-- selection determines the output video bit rate depending on the frame
-- rate of the output. Outputs with higher class values have higher
-- bitrates and improved image quality. Note that for Class 4K\/2K,
-- MediaConvert supports only 4:2:2 chroma subsampling.
avcIntraSettings_avcIntraClass :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraClass)
avcIntraSettings_avcIntraClass :: (Maybe AvcIntraClass -> f (Maybe AvcIntraClass))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_avcIntraClass = (AvcIntraSettings -> Maybe AvcIntraClass)
-> (AvcIntraSettings -> Maybe AvcIntraClass -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraClass)
     (Maybe AvcIntraClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraClass
avcIntraClass :: Maybe AvcIntraClass
$sel:avcIntraClass:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraClass
avcIntraClass} -> Maybe AvcIntraClass
avcIntraClass) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraClass
a -> AvcIntraSettings
s {$sel:avcIntraClass:AvcIntraSettings' :: Maybe AvcIntraClass
avcIntraClass = Maybe AvcIntraClass
a} :: AvcIntraSettings)

-- | When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateDenominator to specify the denominator of this
-- fraction. In this example, use 1001 for the value of
-- FramerateDenominator. When you use the console for transcode jobs that
-- use frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
avcIntraSettings_framerateDenominator :: Lens.Lens' AvcIntraSettings (Prelude.Maybe Prelude.Natural)
avcIntraSettings_framerateDenominator :: (Maybe Natural -> f (Maybe Natural))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_framerateDenominator = (AvcIntraSettings -> Maybe Natural)
-> (AvcIntraSettings -> Maybe Natural -> AvcIntraSettings)
-> Lens
     AvcIntraSettings AvcIntraSettings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe Natural
framerateDenominator :: Maybe Natural
$sel:framerateDenominator:AvcIntraSettings' :: AvcIntraSettings -> Maybe Natural
framerateDenominator} -> Maybe Natural
framerateDenominator) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe Natural
a -> AvcIntraSettings
s {$sel:framerateDenominator:AvcIntraSettings' :: Maybe Natural
framerateDenominator = Maybe Natural
a} :: AvcIntraSettings)

-- | Choose the method that you want MediaConvert to use when increasing or
-- decreasing the frame rate. We recommend using drop duplicate
-- (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to
-- 30 fps. For numerically complex conversions, you can use interpolate
-- (INTERPOLATE) to avoid stutter. This results in a smooth picture, but
-- might introduce undesirable video artifacts. For complex frame rate
-- conversions, especially if your source video has already been converted
-- from its original cadence, use FrameFormer (FRAMEFORMER) to do
-- motion-compensated interpolation. FrameFormer chooses the best
-- conversion method frame by frame. Note that using FrameFormer increases
-- the transcoding time and incurs a significant add-on cost.
avcIntraSettings_framerateConversionAlgorithm :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraFramerateConversionAlgorithm)
avcIntraSettings_framerateConversionAlgorithm :: (Maybe AvcIntraFramerateConversionAlgorithm
 -> f (Maybe AvcIntraFramerateConversionAlgorithm))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_framerateConversionAlgorithm = (AvcIntraSettings -> Maybe AvcIntraFramerateConversionAlgorithm)
-> (AvcIntraSettings
    -> Maybe AvcIntraFramerateConversionAlgorithm -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraFramerateConversionAlgorithm)
     (Maybe AvcIntraFramerateConversionAlgorithm)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm :: Maybe AvcIntraFramerateConversionAlgorithm
$sel:framerateConversionAlgorithm:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm} -> Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraFramerateConversionAlgorithm
a -> AvcIntraSettings
s {$sel:framerateConversionAlgorithm:AvcIntraSettings' :: Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm = Maybe AvcIntraFramerateConversionAlgorithm
a} :: AvcIntraSettings)

-- | If you are using the console, use the Framerate setting to specify the
-- frame rate for this output. If you want to keep the same frame rate as
-- the input video, choose Follow source. If you want to do frame rate
-- conversion, choose a frame rate from the dropdown list or choose Custom.
-- The framerates shown in the dropdown list are decimal approximations of
-- fractions. If you choose Custom, specify your frame rate as a fraction.
-- If you are creating your transcoding job specification as a JSON file
-- without the console, use FramerateControl to specify which value the
-- service uses for the frame rate for this output. Choose
-- INITIALIZE_FROM_SOURCE if you want the service to use the frame rate
-- from the input. Choose SPECIFIED if you want the service to use the
-- frame rate you specify in the settings FramerateNumerator and
-- FramerateDenominator.
avcIntraSettings_framerateControl :: Lens.Lens' AvcIntraSettings (Prelude.Maybe AvcIntraFramerateControl)
avcIntraSettings_framerateControl :: (Maybe AvcIntraFramerateControl
 -> f (Maybe AvcIntraFramerateControl))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_framerateControl = (AvcIntraSettings -> Maybe AvcIntraFramerateControl)
-> (AvcIntraSettings
    -> Maybe AvcIntraFramerateControl -> AvcIntraSettings)
-> Lens
     AvcIntraSettings
     AvcIntraSettings
     (Maybe AvcIntraFramerateControl)
     (Maybe AvcIntraFramerateControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe AvcIntraFramerateControl
framerateControl :: Maybe AvcIntraFramerateControl
$sel:framerateControl:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraFramerateControl
framerateControl} -> Maybe AvcIntraFramerateControl
framerateControl) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe AvcIntraFramerateControl
a -> AvcIntraSettings
s {$sel:framerateControl:AvcIntraSettings' :: Maybe AvcIntraFramerateControl
framerateControl = Maybe AvcIntraFramerateControl
a} :: AvcIntraSettings)

-- | When you use the API for transcode jobs that use frame rate conversion,
-- specify the frame rate as a fraction. For example, 24000 \/ 1001 =
-- 23.976 fps. Use FramerateNumerator to specify the numerator of this
-- fraction. In this example, use 24000 for the value of
-- FramerateNumerator. When you use the console for transcode jobs that use
-- frame rate conversion, provide the value as a decimal number for
-- Framerate. In this example, specify 23.976.
avcIntraSettings_framerateNumerator :: Lens.Lens' AvcIntraSettings (Prelude.Maybe Prelude.Natural)
avcIntraSettings_framerateNumerator :: (Maybe Natural -> f (Maybe Natural))
-> AvcIntraSettings -> f AvcIntraSettings
avcIntraSettings_framerateNumerator = (AvcIntraSettings -> Maybe Natural)
-> (AvcIntraSettings -> Maybe Natural -> AvcIntraSettings)
-> Lens
     AvcIntraSettings AvcIntraSettings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AvcIntraSettings' {Maybe Natural
framerateNumerator :: Maybe Natural
$sel:framerateNumerator:AvcIntraSettings' :: AvcIntraSettings -> Maybe Natural
framerateNumerator} -> Maybe Natural
framerateNumerator) (\s :: AvcIntraSettings
s@AvcIntraSettings' {} Maybe Natural
a -> AvcIntraSettings
s {$sel:framerateNumerator:AvcIntraSettings' :: Maybe Natural
framerateNumerator = Maybe Natural
a} :: AvcIntraSettings)

instance Core.FromJSON AvcIntraSettings where
  parseJSON :: Value -> Parser AvcIntraSettings
parseJSON =
    String
-> (Object -> Parser AvcIntraSettings)
-> Value
-> Parser AvcIntraSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AvcIntraSettings"
      ( \Object
x ->
          Maybe AvcIntraSlowPal
-> Maybe AvcIntraUhdSettings
-> Maybe AvcIntraTelecine
-> Maybe AvcIntraInterlaceMode
-> Maybe AvcIntraScanTypeConversionMode
-> Maybe AvcIntraClass
-> Maybe Natural
-> Maybe AvcIntraFramerateConversionAlgorithm
-> Maybe AvcIntraFramerateControl
-> Maybe Natural
-> AvcIntraSettings
AvcIntraSettings'
            (Maybe AvcIntraSlowPal
 -> Maybe AvcIntraUhdSettings
 -> Maybe AvcIntraTelecine
 -> Maybe AvcIntraInterlaceMode
 -> Maybe AvcIntraScanTypeConversionMode
 -> Maybe AvcIntraClass
 -> Maybe Natural
 -> Maybe AvcIntraFramerateConversionAlgorithm
 -> Maybe AvcIntraFramerateControl
 -> Maybe Natural
 -> AvcIntraSettings)
-> Parser (Maybe AvcIntraSlowPal)
-> Parser
     (Maybe AvcIntraUhdSettings
      -> Maybe AvcIntraTelecine
      -> Maybe AvcIntraInterlaceMode
      -> Maybe AvcIntraScanTypeConversionMode
      -> Maybe AvcIntraClass
      -> Maybe Natural
      -> Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AvcIntraSlowPal)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"slowPal")
            Parser
  (Maybe AvcIntraUhdSettings
   -> Maybe AvcIntraTelecine
   -> Maybe AvcIntraInterlaceMode
   -> Maybe AvcIntraScanTypeConversionMode
   -> Maybe AvcIntraClass
   -> Maybe Natural
   -> Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe AvcIntraUhdSettings)
-> Parser
     (Maybe AvcIntraTelecine
      -> Maybe AvcIntraInterlaceMode
      -> Maybe AvcIntraScanTypeConversionMode
      -> Maybe AvcIntraClass
      -> Maybe Natural
      -> Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvcIntraUhdSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"avcIntraUhdSettings")
            Parser
  (Maybe AvcIntraTelecine
   -> Maybe AvcIntraInterlaceMode
   -> Maybe AvcIntraScanTypeConversionMode
   -> Maybe AvcIntraClass
   -> Maybe Natural
   -> Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe AvcIntraTelecine)
-> Parser
     (Maybe AvcIntraInterlaceMode
      -> Maybe AvcIntraScanTypeConversionMode
      -> Maybe AvcIntraClass
      -> Maybe Natural
      -> Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvcIntraTelecine)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"telecine")
            Parser
  (Maybe AvcIntraInterlaceMode
   -> Maybe AvcIntraScanTypeConversionMode
   -> Maybe AvcIntraClass
   -> Maybe Natural
   -> Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe AvcIntraInterlaceMode)
-> Parser
     (Maybe AvcIntraScanTypeConversionMode
      -> Maybe AvcIntraClass
      -> Maybe Natural
      -> Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvcIntraInterlaceMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"interlaceMode")
            Parser
  (Maybe AvcIntraScanTypeConversionMode
   -> Maybe AvcIntraClass
   -> Maybe Natural
   -> Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe AvcIntraScanTypeConversionMode)
-> Parser
     (Maybe AvcIntraClass
      -> Maybe Natural
      -> Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvcIntraScanTypeConversionMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scanTypeConversionMode")
            Parser
  (Maybe AvcIntraClass
   -> Maybe Natural
   -> Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe AvcIntraClass)
-> Parser
     (Maybe Natural
      -> Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvcIntraClass)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"avcIntraClass")
            Parser
  (Maybe Natural
   -> Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe AvcIntraFramerateConversionAlgorithm
      -> Maybe AvcIntraFramerateControl
      -> Maybe Natural
      -> AvcIntraSettings)
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
"framerateDenominator")
            Parser
  (Maybe AvcIntraFramerateConversionAlgorithm
   -> Maybe AvcIntraFramerateControl
   -> Maybe Natural
   -> AvcIntraSettings)
-> Parser (Maybe AvcIntraFramerateConversionAlgorithm)
-> Parser
     (Maybe AvcIntraFramerateControl
      -> Maybe Natural -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AvcIntraFramerateConversionAlgorithm)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateConversionAlgorithm")
            Parser
  (Maybe AvcIntraFramerateControl
   -> Maybe Natural -> AvcIntraSettings)
-> Parser (Maybe AvcIntraFramerateControl)
-> Parser (Maybe Natural -> AvcIntraSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AvcIntraFramerateControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"framerateControl")
            Parser (Maybe Natural -> AvcIntraSettings)
-> Parser (Maybe Natural) -> Parser AvcIntraSettings
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
"framerateNumerator")
      )

instance Prelude.Hashable AvcIntraSettings

instance Prelude.NFData AvcIntraSettings

instance Core.ToJSON AvcIntraSettings where
  toJSON :: AvcIntraSettings -> Value
toJSON AvcIntraSettings' {Maybe Natural
Maybe AvcIntraClass
Maybe AvcIntraFramerateControl
Maybe AvcIntraFramerateConversionAlgorithm
Maybe AvcIntraInterlaceMode
Maybe AvcIntraScanTypeConversionMode
Maybe AvcIntraSlowPal
Maybe AvcIntraTelecine
Maybe AvcIntraUhdSettings
framerateNumerator :: Maybe Natural
framerateControl :: Maybe AvcIntraFramerateControl
framerateConversionAlgorithm :: Maybe AvcIntraFramerateConversionAlgorithm
framerateDenominator :: Maybe Natural
avcIntraClass :: Maybe AvcIntraClass
scanTypeConversionMode :: Maybe AvcIntraScanTypeConversionMode
interlaceMode :: Maybe AvcIntraInterlaceMode
telecine :: Maybe AvcIntraTelecine
avcIntraUhdSettings :: Maybe AvcIntraUhdSettings
slowPal :: Maybe AvcIntraSlowPal
$sel:framerateNumerator:AvcIntraSettings' :: AvcIntraSettings -> Maybe Natural
$sel:framerateControl:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraFramerateControl
$sel:framerateConversionAlgorithm:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraFramerateConversionAlgorithm
$sel:framerateDenominator:AvcIntraSettings' :: AvcIntraSettings -> Maybe Natural
$sel:avcIntraClass:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraClass
$sel:scanTypeConversionMode:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraScanTypeConversionMode
$sel:interlaceMode:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraInterlaceMode
$sel:telecine:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraTelecine
$sel:avcIntraUhdSettings:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraUhdSettings
$sel:slowPal:AvcIntraSettings' :: AvcIntraSettings -> Maybe AvcIntraSlowPal
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"slowPal" Text -> AvcIntraSlowPal -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AvcIntraSlowPal -> Pair) -> Maybe AvcIntraSlowPal -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraSlowPal
slowPal,
            (Text
"avcIntraUhdSettings" Text -> AvcIntraUhdSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AvcIntraUhdSettings -> Pair)
-> Maybe AvcIntraUhdSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraUhdSettings
avcIntraUhdSettings,
            (Text
"telecine" Text -> AvcIntraTelecine -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AvcIntraTelecine -> Pair) -> Maybe AvcIntraTelecine -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraTelecine
telecine,
            (Text
"interlaceMode" Text -> AvcIntraInterlaceMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AvcIntraInterlaceMode -> Pair)
-> Maybe AvcIntraInterlaceMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraInterlaceMode
interlaceMode,
            (Text
"scanTypeConversionMode" Text -> AvcIntraScanTypeConversionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AvcIntraScanTypeConversionMode -> Pair)
-> Maybe AvcIntraScanTypeConversionMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraScanTypeConversionMode
scanTypeConversionMode,
            (Text
"avcIntraClass" Text -> AvcIntraClass -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AvcIntraClass -> Pair) -> Maybe AvcIntraClass -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraClass
avcIntraClass,
            (Text
"framerateDenominator" 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
framerateDenominator,
            (Text
"framerateConversionAlgorithm" Text -> AvcIntraFramerateConversionAlgorithm -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AvcIntraFramerateConversionAlgorithm -> Pair)
-> Maybe AvcIntraFramerateConversionAlgorithm -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraFramerateConversionAlgorithm
framerateConversionAlgorithm,
            (Text
"framerateControl" Text -> AvcIntraFramerateControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AvcIntraFramerateControl -> Pair)
-> Maybe AvcIntraFramerateControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AvcIntraFramerateControl
framerateControl,
            (Text
"framerateNumerator" 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
framerateNumerator
          ]
      )