Re: [PATCH v3 2/2] media: meson: vdec: add HEVC decode codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 21 Mar 2023, at 6:25 pm, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> 
> On 14/03/2023 12:43, Christian Hewitt wrote:
>> From: Maxime Jourdan <mjourdan@xxxxxxxxxxxx>
>> 
>> Add initial HEVC codec for the Amlogic GXBB/GXL/GXM SoCs using
>> the common "HEVC" decoder driver.
>> 
>> Signed-off-by: Maxime Jourdan <mjourdan@xxxxxxxxxxxx>
>> [codec alignment to upstream changes and frame handling improvements]
>> Signed-off-by: Benjamin Roszak <benjamin545@xxxxxxxxx>
>> ---
>> drivers/staging/media/meson/vdec/Makefile     |    2 +-
>> drivers/staging/media/meson/vdec/codec_hevc.c | 1463 +++++++++++++++++
>> drivers/staging/media/meson/vdec/codec_hevc.h |   13 +
>> drivers/staging/media/meson/vdec/esparser.c   |    3 +-
>> drivers/staging/media/meson/vdec/hevc_regs.h  |    1 +
>> .../staging/media/meson/vdec/vdec_platform.c  |   37 +
>> 6 files changed, 1517 insertions(+), 2 deletions(-)
>> create mode 100644 drivers/staging/media/meson/vdec/codec_hevc.c
>> create mode 100644 drivers/staging/media/meson/vdec/codec_hevc.h
>> 
> 
> <snip>
> 
>> diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
>> index 88c9d72e1c83..ea2aa0e8cf0b 100644
>> --- a/drivers/staging/media/meson/vdec/vdec_platform.c
>> +++ b/drivers/staging/media/meson/vdec/vdec_platform.c
>> @@ -11,10 +11,23 @@
>> #include "vdec_hevc.h"
>> #include "codec_mpeg12.h"
>> #include "codec_h264.h"
>> +#include "codec_hevc.h"
>> #include "codec_vp9.h"
>> 
>> static const struct amvdec_format vdec_formats_gxbb[] = {
>> 	{
>> +		.pixfmt = V4L2_PIX_FMT_HEVC,
>> +		.min_buffers = 4,
>> +		.max_buffers = 24,
>> +		.max_width = 3840,
>> +		.max_height = 2160,
>> +		.vdec_ops = &vdec_hevc_ops,
>> +		.codec_ops = &codec_hevc_ops,
>> +		.firmware_path = "meson/vdec/gxl_hevc.bin",
>> +		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> +		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> +			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> +	}, {
>> 		.pixfmt = V4L2_PIX_FMT_H264,
>> 		.min_buffers = 2,
>> 		.max_buffers = 24,
>> @@ -64,6 +77,18 @@ static const struct amvdec_format vdec_formats_gxl[] = {
>> 		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> 		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> 			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> +	}, {
>> +		.pixfmt = V4L2_PIX_FMT_HEVC,
>> +		.min_buffers = 4,
>> +		.max_buffers = 24,
>> +		.max_width = 3840,
>> +		.max_height = 2160,
>> +		.vdec_ops = &vdec_hevc_ops,
>> +		.codec_ops = &codec_hevc_ops,
>> +		.firmware_path = "meson/vdec/gxl_hevc.bin",
>> +		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> +		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> +			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> 	}, {
>> 		.pixfmt = V4L2_PIX_FMT_H264,
>> 		.min_buffers = 2,
>> @@ -114,6 +139,18 @@ static const struct amvdec_format vdec_formats_gxm[] = {
>> 		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> 		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> 			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> +	}, {
>> +		.pixfmt = V4L2_PIX_FMT_HEVC,
>> +		.min_buffers = 4,
>> +		.max_buffers = 24,
>> +		.max_width = 3840,
>> +		.max_height = 2160,
>> +		.vdec_ops = &vdec_hevc_ops,
>> +		.codec_ops = &codec_hevc_ops,
>> +		.firmware_path = "meson/vdec/gxl_hevc.bin",
> 
> Hmm, I don't see this firmware in any debian package. Is it made available to
> linux-firmware? This actually applies to *all* meson/vdec/ firmwares.

Yes, was upstreamed by Maxime in 2019 and updated 2020:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/meson/vdec

Christian

>> +		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
>> +		.flags = V4L2_FMT_FLAG_COMPRESSED |
>> +			 V4L2_FMT_FLAG_DYN_RESOLUTION,
>> 	}, {
>> 		.pixfmt = V4L2_PIX_FMT_H264,
>> 		.min_buffers = 2,






[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux