From: Valerii Zapodovnikov via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Valerii Zapodovnikov <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] avcodec/hevc/hevcdec: take into account YUV400 in block length (PR #21632)
Date: Mon, 02 Feb 2026 23:11:08 -0000
Message-ID: <177007386898.25.13714882916309469783@4457048688e7> (raw)
PR #21632 opened by Valerii Zapodovnikov (Balling)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21632
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21632.patch
Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
See issue #11551.
>From 3e99e52faef8f75bc90d345a1e805ff82e91c622 Mon Sep 17 00:00:00 2001
From: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
Date: Tue, 3 Feb 2026 02:07:15 +0300
Subject: [PATCH] avcodec/hevc/hevcdec: take into account YUV400 in block
length
Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
---
libavcodec/hevc/hevcdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 531d1c26f3..eb5b0af130 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -1668,10 +1668,10 @@ static int hls_pcm_sample(HEVCLocalContext *lc, const HEVCLayerContext *l,
uint8_t *dst1 = &s->cur_frame->f->data[1][(y0 >> sps->vshift[1]) * stride1 + ((x0 >> sps->hshift[1]) << sps->pixel_shift)];
uint8_t *dst2 = &s->cur_frame->f->data[2][(y0 >> sps->vshift[2]) * stride2 + ((x0 >> sps->hshift[2]) << sps->pixel_shift)];
- int length = cb_size * cb_size * sps->pcm.bit_depth +
+ int length = cb_size * cb_size * sps->pcm.bit_depth + (sps->chroma_format_idc != 0 ?
(((cb_size >> sps->hshift[1]) * (cb_size >> sps->vshift[1])) +
((cb_size >> sps->hshift[2]) * (cb_size >> sps->vshift[2]))) *
- sps->pcm.bit_depth_chroma;
+ sps->pcm.bit_depth_chroma : 0);
const uint8_t *pcm = skip_bytes(&lc->cc, (length + 7) >> 3);
int ret;
--
2.52.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2026-02-02 23:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=177007386898.25.13714882916309469783@4457048688e7 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git