Thread (10 messages) 10 messages, 2 authors, 2020-02-14

Re: [PATCH v4 5/5] media: meson: vdec: add VP9 decoder support

From: Hans Verkuil <hidden>
Date: 2020-02-14 15:04:53
Also in: linux-amlogic, linux-media, lkml

On 2/6/20 9:41 AM, Neil Armstrong wrote:
quoted hunk ↗ jump to hunk
From: Maxime Jourdan <redacted>

This adds VP9 decoding for the Amlogic GXL, G12A & SM1 SoCs, using
the commong "HEVC" HW decoder.

For G12A & SM1, it uses the IOMMU support from the firmware.

For 10bit decoding, the firmware can only decode in the proprietary
Amlogic Framebuffer Compression format, but can output in 8bit NV12
buffer while writing the decoded frame.

Signed-off-by: Maxime Jourdan <redacted>
Signed-off-by: Neil Armstrong <redacted>
---
 drivers/staging/media/meson/vdec/Makefile     |    2 +-
 drivers/staging/media/meson/vdec/codec_vp9.c  | 2138 +++++++++++++++++
 drivers/staging/media/meson/vdec/codec_vp9.h  |   13 +
 drivers/staging/media/meson/vdec/hevc_regs.h  |    7 +
 drivers/staging/media/meson/vdec/vdec.c       |    5 +
 .../staging/media/meson/vdec/vdec_helpers.c   |    4 +
 .../staging/media/meson/vdec/vdec_platform.c  |   38 +
 7 files changed, 2206 insertions(+), 1 deletion(-)
 create mode 100644 drivers/staging/media/meson/vdec/codec_vp9.c
 create mode 100644 drivers/staging/media/meson/vdec/codec_vp9.h
diff --git a/drivers/staging/media/meson/vdec/Makefile b/drivers/staging/media/meson/vdec/Makefile
index f55b6e625034..6e726af84ac9 100644
--- a/drivers/staging/media/meson/vdec/Makefile
+++ b/drivers/staging/media/meson/vdec/Makefile
@@ -3,6 +3,6 @@
 
 meson-vdec-objs = esparser.o vdec.o vdec_helpers.o vdec_platform.o
 meson-vdec-objs += vdec_1.o vdec_hevc.o
-meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_hevc_common.o
+meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_hevc_common.o codec_vp9.o
 
 obj-$(CONFIG_VIDEO_MESON_VDEC) += meson-vdec.o
diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c
new file mode 100644
index 000000000000..e7ffbc6dd892
--- /dev/null
+++ b/drivers/staging/media/meson/vdec/codec_vp9.c
@@ -0,0 +1,2138 @@
...
+#define ROUND_POWER_OF_TWO(value, num) (((value) + (1 << ((num) - 1))) >> (num))
Checkpatch says:

CHECK: Macro argument reuse 'num' - possible side-effects?
#377: FILE: drivers/staging/media/meson/vdec/codec_vp9.c:330:
+#define ROUND_POWER_OF_TWO(value, num) (((value) + (1 << ((num) - 1))) >> (num))

While num is const in this source, I do prefer if this is turned into a static inline.

It's just safer.

Regards,

	Hans

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help