diff options
author | Niklas Haas <git@haasn.dev> | 2021-08-17 21:25:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-08-24 09:58:52 -0300 |
commit | 6bc29a6b571c83058d04dc7b8b0f827dfee31b2c (patch) | |
tree | 1ef02885ae312ecb9097a30da956b6f5d996a228 /libavcodec/Makefile | |
parent | cf37c3fb6c84d8eb61079520b4c57e3c969bc25d (diff) | |
download | ffmpeg-6bc29a6b571c83058d04dc7b8b0f827dfee31b2c.tar.gz |
avcodec/h274: add film grain synthesis routine
This could arguably also be a vf, but I decided to put it here since
decoders are technically required to apply film grain during the output
step, and I would rather want to avoid requiring users insert the
correct film grain synthesis filter on their own.
The code, while in C, is written in a way that unrolls/vectorizes fairly
well under -O3, and is reasonably cache friendly. On my CPU, a single
thread pushes about 400 FPS at 1080p.
Apart from hand-written assembly, one possible avenue of improvement
would be to change the access order to compute the grain row-by-row
rather than in 8x8 blocks. This requires some redundant PRNG calls, but
would make the algorithm more cache-oblivious.
The implementation has been written to the wording of SMPTE RDD 5-2006
as faithfully as I can manage. However, apart from passing a visual
inspection, no guarantee of correctness can be made due to the lack of
any publicly available reference implementation against which to
compare it.
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/Makefile')
-rw-r--r-- | libavcodec/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 0dc564f5dc..68d808de42 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -367,7 +367,7 @@ OBJS-$(CONFIG_H264_DECODER) += h264dec.o h264_cabac.o h264_cavlc.o \ h264_direct.o h264_loopfilter.o \ h264_mb.o h264_picture.o \ h264_refs.o h264_sei.o \ - h264_slice.o h264data.o + h264_slice.o h264data.o h274.o OBJS-$(CONFIG_H264_AMF_ENCODER) += amfenc_h264.o OBJS-$(CONFIG_H264_CUVID_DECODER) += cuviddec.o OBJS-$(CONFIG_H264_MEDIACODEC_DECODER) += mediacodecdec.o |