Skip to content

Commit d8ebe59

Browse files
Benjamin Gaignardmchehab
authored andcommitted
media: verisilicon: Add film grain feature to AV1 driver
Film grain feature add "old style" grain noise on decoded streams. Grain noise is applied after decoding by the postprocessor. The level of grain is based on gaussian sequence. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
1 parent 727a400 commit d8ebe59

5 files changed

Lines changed: 651 additions & 0 deletions

File tree

drivers/media/platform/verisilicon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ hantro-vpu-y += \
1919
rockchip_vpu2_hw_mpeg2_dec.o \
2020
rockchip_vpu2_hw_vp8_dec.o \
2121
rockchip_vpu981_hw_av1_dec.o \
22+
rockchip_av1_filmgrain.o \
2223
rockchip_av1_entropymode.o \
2324
hantro_jpeg.o \
2425
hantro_h264.o \

drivers/media/platform/verisilicon/hantro_hw.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <media/videobuf2-core.h>
1717

1818
#include "rockchip_av1_entropymode.h"
19+
#include "rockchip_av1_filmgrain.h"
1920

2021
#define DEC_8190_ALIGN_MASK 0x07U
2122

@@ -288,6 +289,7 @@ struct hantro_av1_frame_ref {
288289
* @global_model: global model buffer
289290
* @tile_info: tile info buffer
290291
* @segment: segmentation info buffer
292+
* @film_grain: film grain buffer
291293
* @prob_tbl: probability table
292294
* @prob_tbl_out: probability table output
293295
* @tile_buf: tile buffer
@@ -312,6 +314,7 @@ struct hantro_av1_dec_hw_ctx {
312314
struct hantro_aux_buf global_model;
313315
struct hantro_aux_buf tile_info;
314316
struct hantro_aux_buf segment;
317+
struct hantro_aux_buf film_grain;
315318
struct hantro_aux_buf prob_tbl;
316319
struct hantro_aux_buf prob_tbl_out;
317320
struct hantro_aux_buf tile_buf;

0 commit comments

Comments
 (0)