summaryrefslogtreecommitdiff
path: root/libavutil/film_grain_params.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/h264_slice: compute and export film grain seedNiklas Haas2021-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | From SMPTE RDD 5-2006, the grain seed is to be computed from the following definition of `pic_offset`: > When decoding H.264 | MPEG-4 AVC bitstreams, pic_offset is defined as > follows: > - pic_offset = PicOrderCnt(CurrPic) + (PicOrderCnt_offset << 5) > where: > - PicOrderCnt(CurrPic) is the picture order count of the current frame, > which shall be derived from [the video stream]. > > - PicOrderCnt_offset is set to idr_pic_id on IDR frames. idr_pic_id > shall be read from the slice header of [the video stream]. On non-IDR I > frames, PicOrderCnt_offset is set to 0. A frame shall be classified as I > frame when all its slices are I slices, which may be optionally > designated by setting primary_pic_type to 0 in the access delimiter NAL > unit. Otherwise, PicOrderCnt_offset it not changed. PicOrderCnt_offset is > updated in decoding order. Co-authored-by: James Almer <jamrial@gmail.com> Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/film_grain_params: add support for H.274 Film Grain CharacteristicsJames Almer2021-07-231-0/+89
| | | | | | Used by codecs like H.264, HEVC, and VVC. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/film_grain_params: fix doxy for ar_coeff_* fieldsJames Almer2020-12-031-4/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/film_grain_params: add more details to some AVFilmGrainAOMParams fieldsJames Almer2020-11-261-6/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/film_grain_params: fix typo in type enumLynne2020-11-271-2/+2
| | | | Ref: xkcd #1015
* libavutil: introduce AVFilmGrainParams side dataLynne2020-11-251-0/+167
This patch introduces a new frame side data type AVFilmGrainParams for use with video codecs which support it. It can save a lot of memory used for duplicate processed reference frames and reduce copies when applying film grain during presentation.