Re: [PATCH 1/2] media: iris: Add support for QC08C format for decoder

Nicolas Dufresne
2025-09-24T15:50:31Z

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

Hi,

Le mercredi 24 septembre 2025 à 14:32 +0200, Markus Elfring a écrit :
> …
> > +++ b/drivers/media/platform/qcom/iris/iris_buffer.c
> > @@ -261,7 +261,10 @@ int iris_get_buffer_size(struct iris_inst *inst,
> >   case BUF_INPUT:
> >   return iris_dec_bitstream_buffer_size(inst);
> >   case BUF_OUTPUT:
> > - return iris_yuv_buffer_size_nv12(inst);
> > + if (inst->fmt_dst->fmt.pix_mp.pixelformat ==
> > V4L2_PIX_FMT_QC08C)
> > + return iris_yuv_buffer_size_qc08c(inst);
> > + else
> > + return iris_yuv_buffer_size_nv12(inst);
> …
>
> How do you think about to use a source code variant like the following?
>
> return (inst->fmt_dst->fmt.pix_mp.pixelformat ==
> V4L2_PIX_FMT_QC08C)
> ? iris_yuv_buffer_size_qc08c(inst)
> : iris_yuv_buffer_size_nv12(inst);

Please don't, this is less readable and have no explained technical advantages.

Nicolas

>
>
> Regards,
> Markus

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]