=========================
Netint FFmpeg Change List
=========================

This document describes the changes to FFmpeg that Netint has made in its SW release patches.
This document was last updated for Netint SW release v3.3.0
Please refer to Netint FFmpeg patch files for the raw differences described here.

--------------------------------------------------
build_ffmpeg.sh
--------------------------------------------------
Affecting: all versions of FFmpeg
  Build script for compiling FFmpeg with Netint codec
  Also supports arguments for configuring FFmpeg to be compiled

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Build options for windows compilation

Affecting: n4.2.1, g94cdf82, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Build options for android-NDK compilation

--------------------------------------------------
configure
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add libxcoder_logan as an FFmpeg configure option
  Add libxcoder_logan as a dependency for h264_ni_logan_dec, h265_ni_logan_dec, h264_ni_logan_enc, h265_ni_logan_enc

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add libxcoder_logan as a dependency for hwupload_ni_logan
  Add 'ni_logan' as an FFmpeg configure option for Netint hardware frames

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add swscale and sdl2 as dependencies for SDL filter

--------------------------------------------------
ffmpeg.c            fftools/ffmpeg.c
ffmpeg.h            fftools/ffmpeg.h
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add ffmpeg option ni_interval_fps to display window averaged processing FPS
  Add support mkv, asf and hls for Netint encoder
  Automatically enable xoder-params "GenHdrs=1" for MKV, HLS, and ASF output formats for video codecs
  In seek_to_start() function (used by -streamloop), do not send NULL packet to Netint decoders when looping
  Add xcoder_logan_decode_flush_buffers function for Netint decoders to flush buffers
  Add AV_FRAME_DATA_NETINT_VUI_INFO to support save vui info from NETINT decoders

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Fix DTS discontinuities during decoder unavailablity periods by not incrementing FFmpeg's estimated DTS on repeated decoding attempts for same frame
  Add support for Netint hardware frames

Affecting: n3.1.1
  Add ffmpeg option for ni_force_frame_type to support forcing input frame type on output

Affecting: n3.1.1, n3.4.2
  Write output format extradata at end of stream if not already written

Affecting: n3.1.1, n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2
  Backport FFmpeg cmdline arg 'autoscale' from n4.4, n5.0

Affecting: n4.3.1
  Add support for SCTE-35 packet parsing and IDR forcing at SCTE-35 cue-out/in

--------------------------------------------------
fftools/ffmpeg_dec.c
--------------------------------------------------
Affecting: n6.1
  Send hw decoded frames one by one at eof stage (QDFWSH-1207)

--------------------------------------------------
fftools/ffmpeg_demux.c
--------------------------------------------------
Affecting: n6.1
  Change `ist->dec_ctx->framerate` to use r_frame_rate if avg_frame_rate unavailable

--------------------------------------------------
fftools/ffmpeg_enc.c
--------------------------------------------------
Affecting: n6.1
  Automatically enable xoder-params "GenHdrs=1" for MKV, HLS, and ASF output formats for video codecs

--------------------------------------------------
fftools/ffmpeg_mux_init.c
--------------------------------------------------
Affecting: n6.1
  Add ffmpeg option ni_interval_fps to display window averaged processing FPS
  Increase `ms->max_muxing_queue_size` from 128 to 512

--------------------------------------------------
fftools/ffmpeg_hw.c
--------------------------------------------------
Affecting: n3.4.2
  Backport removal of an unecessary log message from n4.1.3

--------------------------------------------------
ffmpeg_filter.c     fftools/ffmpeg_filter.c
--------------------------------------------------
Affecting: n3.1.1, n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2
  Backport FFmpeg cmdline arg 'autoscale' from n4.4, n5.0

Affecting: n6.1
  Send hw filtered frames one by one (QDFWSH-1207)
  Fix timing info of the first src frame of filter (QDFWSH-1208)

--------------------------------------------------
fftools/ffmpeg_ni.c
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Top-level functions for Netint hardware frames

--------------------------------------------------
ffmpeg_opt.c        fftools/ffmpeg_opt.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add ffmpeg option ni_interval_fps to display window averaged processing FPS

Affecting: n3.1.1
  Add ffmpeg option for ni_force_frame_type to support forcing input frame type on output

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2
  Change `ist->dec_ctx->framerate` to use r_frame_rate if avg_frame_rate unavailable
  Increase `ost->max_muxing_queue_size` from 128 to 512

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add 'ni' as an FFmpeg cmdline option for Netint hardware frames

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2
  Backport FFmpeg cmdline arg 'autoscale' from n4.4, n5.0

--------------------------------------------------
fftools/Makefile
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add ffmpeg_ni_logan.o to obj dependencies

Affecting: n4.3.1
  Add scte_35.o to obj dependencies

--------------------------------------------------
libavcodec/allcodecs.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Register netint decoders and encoders

--------------------------------------------------
libavcodec/avcodec.h
--------------------------------------------------
Affecting: n4.1.3, n4.2.1
  Add AV_PKT_DATA_SLICE_ADDR to AVPacketSideDataType

--------------------------------------------------
libavcodec/bitstream_filters.c
--------------------------------------------------
Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for HEVC tile parallelism codec

--------------------------------------------------
libavcodec/decode.c
--------------------------------------------------
Affecting: n6.1
  Do not drop decoded frame with AV_FRAME_FLAG_DISCARD (QDFWSH-1217)

--------------------------------------------------
libavcodec/h264_mp4toannexb_bsf.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Pass AV_PKT_DATA_NEW_EXTRADATA to AVCodecParameters->extradata

--------------------------------------------------
libavcodec/h264_parser.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Initialize custom_sei_passthru variable in parser

--------------------------------------------------
libavcodec/hevc_mp4toannexb_bsf.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Pass AV_PKT_DATA_NEW_EXTRADATA to AVCodecParameters->extradata

Affecting: n3.1.1
  Update HEVC side data when sequence change occurs to properly decode it

--------------------------------------------------
libavcodec/hevc_parser.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Initialize custom_sei_passthru variable in parser

--------------------------------------------------
libavcodec/h264.c       libavcodec/h264dec.c
libavcodec/h264.h       libavcodec/h264dec.h
libavcodec/h264_sei.c
libavcodec/h264_sei.h
libavcodec/h264_slice.c
libavcodec/hevc.c       libavcodec/hevcdec.c
libavcodec/hevc.h       libavcodec/hevcdec.h
libavcodec/hevc_sei.c
libavcodec/hevc_sei.h
--------------------------------------------------
Affecting: all versions of FFmpeg
	Allow for Netint custom SEI passthrough with H264 and H265 software decoders with command line option 'custom_sei_passthru'

Affecting: n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Duplicate enumeration named HEVC_NAL_RSV_IRAP_VCL23 as HEVC_NAL_IRAP_VCL23 for legacy support

--------------------------------------------------
libavcodec/Makefile
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add compile switches for netint decoders and encoders

Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add source files for HEVC tile parallelism to be compiled

--------------------------------------------------
libavcodec/nicodec_logan.c
libavcodec/nicodec_logan.h
--------------------------------------------------
Affecting: all versions of FFmpeg
  Wrapper for interfacing libavcodec to libxcoder_logan. Currently only handling decoding functions

--------------------------------------------------
libavcodec/nidec_logan.c
libavcodec/nidec_logan.h
--------------------------------------------------
Affecting: all versions of FFmpeg
  Common code for Netint decoders

--------------------------------------------------
libavcodec/nidec_h264_logan.c
libavcodec/nidec_hevc_logan.c
libavcodec/nienc_h264_logan.c
libavcodec/nienc_h265_logan.c   libavcodec/nienc_hevc_logan.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Codec description and configurations for individual Netint codecs

--------------------------------------------------
libavcodec/nienc_logan.c
libavcodec/nienc_logan.h
--------------------------------------------------
Affecting: all versions of FFmpeg
  Common code for Netint encoders

--------------------------------------------------
libavcodec/ni_hevc_extradata.c
libavcodec/ni_hevc_extradata.h
--------------------------------------------------
Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Get the tile rows and columns from extradata of HEVC coded bitstream

--------------------------------------------------
libavcodec/ni_hevc_frame_split_bsf.c
--------------------------------------------------
Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  HEVC bitstream filter to re-encode slice headers to remove tile flags

--------------------------------------------------
libavcodec/ni_hevc_rawtotile_bsf.c
--------------------------------------------------
Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  HEVC bitstream filter to re-encode slice headers with tile flags

--------------------------------------------------
libavcodec/ni_hevc_rbsp.c
libavcodec/ni_hevc_rbsp.h
--------------------------------------------------
Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  HEVC RBSP according to syntax template

--------------------------------------------------
libavcodec/ni_hevc_tile_repack_bsf.c
--------------------------------------------------
Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  HEVC bitstream filter to pack HEVC tiles into one packet containing one frame

--------------------------------------------------
libavcodec/packet.h
--------------------------------------------------
Affecting: n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add AV_PKT_DATA_SLICE_ADDR to AVPacketSideDataType

Affecting: n4.3.1
  Add packet sidedata for SCTE-35 cue-out/in event

--------------------------------------------------
libavcodec/x86/mathops.h
--------------------------------------------------
Affecting: n3.1.1, n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2
  Update assembler to compile with the new GNU binutils as it forbids negative operands in shift instructions from official FFmpeg

--------------------------------------------------
libavfilter/allfilters.c
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add 'hwupload_ni_logan' as a filter for upload/download of Netint hardware frames

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add SDL filter

--------------------------------------------------
libavfilter/Makefile
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add vf_hwupload_ni_logan.o to obj dependencies

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add vf_sdl.o to obj dependencies

Affecting: n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add vf_yuv444to420_ni.o and vf_yuv420to444_ni.o to obj dependencies

--------------------------------------------------
libavfilter/vf_hwupload_ni_logan.c
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Filter for upload/download of Netint HW frames

--------------------------------------------------
libavfilter/vf_sdl_ni_logan.c
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Filter for connecting to SDL output

--------------------------------------------------
libavformat/Makefile
--------------------------------------------------
Affecting: n4.3.1
  Add source file for SCTE-35 parser

--------------------------------------------------
libavformat/avformat.h
--------------------------------------------------
Affecting: n3.1.1
  Write video stream FLV header ASAP to ensure no empty tags. This is not needed for n3.1.1+

Affecting: n4.3.1
  Add SCTE-35 parser and info in AVStream for IDR forcing

--------------------------------------------------
libavformat/demux.c
--------------------------------------------------
Affecting: n6.1
  Temp. fix input stream frame rate adjustment

--------------------------------------------------
libavformat/flvdec.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add code for handling HEVC during FLV demuxing

--------------------------------------------------
libavformat/flvenc.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add code for handling HEVC during FLV muxing
  Attempt to write FLV headers only when they are available
  Write FrameType and CodecID of FLV EOS with respect to whether video codec is AVC or HEVC

Affecting: n3.1.1
  Write video stream FLV header ASAP to ensure no empty tags. This is not needed for n3.1.1+

--------------------------------------------------
libavformat/flv.h
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add codec ID for HEVC in FLV

--------------------------------------------------
libavformat/dashenc.c
--------------------------------------------------
Affecting: n4.3.1
  Update due to ff_hls_write_file_entry API change

--------------------------------------------------
libavformat/hlsenc.c
--------------------------------------------------
Affecting: n4.3.1
  Add support for SCTE-35 cue-out/in tag insertion in HLS playlist

--------------------------------------------------
libavformat/hlsplaylist.c
libavformat/hlsplaylist.h
--------------------------------------------------
Affecting: n4.3.1
  Add support for SCTE-35 cue-out/in tag insertion in HLS playlist

--------------------------------------------------
libavformat/movenc.c
--------------------------------------------------
Affecting: n3.1.1, n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Write format context extradata before h264 or hevc video packets
  Set hvc1 as default instead of hev1 for hevc mp4 (LGXCOD-14.4, n5.0, n5.1.2)

--------------------------------------------------
libavformat/mpegenc.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Double size of estimated VBV buffer for mpeg format to avoid overflow at 1080p encoding

--------------------------------------------------
libavformat/mpegtsenc.c
--------------------------------------------------
Affecting: n3.1.1
  Backport HEVC AUD NAL insertion from n3.4.2

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for muxing SCTE35 into mpegts

Affecting: n3.1.1, n3.4.2, n4.1.3, n4.2.1, n4.3, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for muxing MPEG Max Bitrate Descriptors into mpegts using params '-mpegts_max_bitrate', '-mpegts_max_video_bitrate', and '-mpegts_max_audio_bitrate'

Affecting: all versions of FFmpeg
  Port fix for use of '-muxrate' with '-copyts' and '-mpegts_copyts' from official FFmpeg commits a085418303 and 6f36eb0da7

--------------------------------------------------
libavformat/mpegts.h
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for muxing SCTE35 into mpegts

--------------------------------------------------
libavformat/mux.c
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for muxing SCTE35 into mpegts

--------------------------------------------------
libavformat/rawdec.c
--------------------------------------------------
Affecting: n6.1
  Temp. fix to retrieve input stream frame rate correctly
  
--------------------------------------------------
libavformat/utils.c
--------------------------------------------------
Affecting: all versions of FFmpeg
  Change PTS from 33bit integer to 62bit integer to delay PTS discontinuity at rollover except on mpeg and mpegts format

Affecting: n3.1.1
  Backport find_probe_decoder() from n3.4.2

Affecting: n4.3.1
  AVStream SCTE-35 parser init and release

--------------------------------------------------
libavformat/scte_35.c
libavformat/scte_35.h
--------------------------------------------------
Affecting: n4.3.1
  Netint SCTE-35 parser source files

--------------------------------------------------
libavutil/frame.h
--------------------------------------------------
Affecting: all versions of FFmpeg
  Add av_frame side data for user_data_unregistered
  Add av_frame side data for live bitrate reconfiguration
  Add av_frame side data for long term reference frame support
  Add av_frame side data for custom_sei
  Add av_frame side data for qp value reconfiguration

--------------------------------------------------
libavutil/hwcontext.c
libavutil/hwcontext.h
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for Netint HW frame context

--------------------------------------------------
libavutil/hwcontext_internal.h
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add support for Netint HW frame context

--------------------------------------------------
libavutil/hwcontext_ni_logan.c
libavutil/hwcontext_ni_logan.h
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Netint HW frame context source files

--------------------------------------------------
libavutil/Makefile
--------------------------------------------------
Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add source files for Netint HW frame context to be compiled

--------------------------------------------------
libavutil/pixdesc.c
--------------------------------------------------
Affecting: n3.1.1
  Backport color space support for HLG from n3.4.2

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add AV_PIX_FMT_NI_LOGAN for Netint HW frame

--------------------------------------------------
libavutil/pixfmt.h
--------------------------------------------------
Affecting: n3.1.1
  Backport color space support for HLG from n3.4.2

Affecting: n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Add AV_PIX_FMT_NI_LOGAN for Netint HW frame

--------------------------------------------------
doc/t2h.pm
--------------------------------------------------
Affecting: n3.1.1, n3.4.2, n4.1.3, n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2
  Add Texinfo backwards-compatible for windows compile from official FFmpeg

--------------------------------------------------
mingw_package_ffmpeg.sh
--------------------------------------------------
Affecting: n4.2.1, n4.3, g94cdf82, n4.3.1, n4.3.2, n4.4, n4.4.2, n5.0, n5.1.2, n6.1
  Script to generate an offline installation package from MSYS2 compiled FFmpeg

--------------------------------------------------
run_ffmpeg.sh
--------------------------------------------------
Affecting: all versions of FFmpeg
  Basic test/demonstration script for using Netint transcoder through FFmpeg

--------------------------------------------------
VERSION
--------------------------------------------------
Affecting: all versions of FFmpeg
  Define FFmpeg version tag so that it reliably shows up in the FFmpeg banner instead of info from 'git describe'
