[FFmpeg-devel] [PATCH v1] avcodec/evc_decoder: Fix pixel format handling in export_stream_params function

James Almer jamrial at gmail.com
Mon Mar 24 22:27:31 EET 2025


On 3/24/2025 2:22 PM, Dawid Kozinski wrote:
> Signed-off-by: Dawid Kozinski <d.kozinski at samsung.com>
> 
> 
> ---
> 
> 
>   libavcodec/libxevd.c | 12 ++++++++----
> 
> 
>   1 file changed, 8 insertions(+), 4 deletions(-)
> 
> 
> 
> 
> 
> diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c
> 
> 
> index 520fdab7d8..483700c81e 100644
> 
> 
> --- a/libavcodec/libxevd.c
> 
> 
> +++ b/libavcodec/libxevd.c
> 
> 
> @@ -152,16 +152,20 @@ static int export_stream_params(const XevdContext *xectx, AVCodecContext *avctx)
> 
> 
>       }
> 
> 
>       switch(color_space) {
> 
> 
>       case XEVD_CS_YCBCR400_10LE:
> 
> 
> -        avctx->pix_fmt = AV_PIX_FMT_GRAY10LE;
> 
> 
> +    case XEVD_CS_SET(XEVD_CF_YCBCR400, 10, 1): // XEVD_CS_YCBCR400_10BE
> 
> 
> +        avctx->pix_fmt = AV_PIX_FMT_GRAY10;
> 
> 
>           break;
> 
> 
>       case XEVD_CS_YCBCR420_10LE:
> 
> 
> -        avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
> 
> 
> +    case XEVD_CS_SET(XEVD_CF_YCBCR420, 10, 1): // XEVD_CS_YCBCR420_10BE
> 
> 
> +        avctx->pix_fmt = AV_PIX_FMT_YUV420P10;
> 
> 
>           break;
> 
> 
>       case XEVD_CS_YCBCR422_10LE:
> 
> 
> -        avctx->pix_fmt = AV_PIX_FMT_YUV422P10LE;
> 
> 
> +    case XEVD_CS_SET(XEVD_CF_YCBCR422, 10, 1): // XEVD_CS_YCBCR422_10BE
> 
> 
> +        avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
> 
> 
>           break;
> 
> 
>       case XEVD_CS_YCBCR444_10LE:
> 
> 
> -        avctx->pix_fmt = AV_PIX_FMT_YUV444P10LE;
> 
> 
> +    case XEVD_CS_SET(XEVD_CF_YCBCR444, 10, 1): // XEVD_CS_YCBCR444_10BE
> 
> 
> +        avctx->pix_fmt = AV_PIX_FMT_YUV444P10;
> 
> 
>           break;
> 
> 
>       default:
> 
> 
>           av_log(avctx, AV_LOG_ERROR, "Unknown color space\n");

You mailer mangled the patch. You could attach the output of git 
format-patch instead if you can't fix the above.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250324/cab881e7/attachment.sig>


More information about the ffmpeg-devel mailing list