[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <444673d2-f1f0-bfe8-1aa2-b37cbdec6231@xs4all.nl>
Date: Fri, 14 Feb 2020 16:04:49 +0100
From: Hans Verkuil <hverkuil@...all.nl>
To: Neil Armstrong <narmstrong@...libre.com>, mchehab@...nel.org,
hans.verkuil@...co.com
Cc: Maxime Jourdan <mjourdan@...libre.com>,
linux-media@...r.kernel.org, linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 5/5] media: meson: vdec: add VP9 decoder support
On 2/6/20 9:41 AM, Neil Armstrong wrote:
> From: Maxime Jourdan <mjourdan@...libre.com>
>
> 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 <mjourdan@...libre.com>
> Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
> ---
> 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
Powered by blists - more mailing lists