diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2013-12-14 15:50:32 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-12-20 19:39:53 +0100 |
commit | 5c3fa74b94fdedfd63b606f36920d7fbbc069b72 (patch) | |
tree | fd7a73c313f4cab2b59bb6939a793ff6acb11033 /libavcodec/hevc.c | |
parent | 78d0b7f36e39bb4745613e312024ddd508e2f0fb (diff) | |
download | ffmpeg-5c3fa74b94fdedfd63b606f36920d7fbbc069b72.tar.gz |
hevc: support luma bit depth != chroma bit depth for PCM coding units
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 784e58bec7..7481023cc3 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -1420,7 +1420,7 @@ static int hls_pcm_sample(HEVCContext *s, int x0, int y0, int log2_cb_size) int stride2 = s->frame->linesize[2]; uint8_t *dst2 = &s->frame->data[2][(y0 >> s->sps->vshift[2]) * stride2 + ((x0 >> s->sps->hshift[2]) << s->sps->pixel_shift)]; - int length = cb_size * cb_size * s->sps->pcm.bit_depth + ((cb_size * cb_size) >> 1) * s->sps->pcm.bit_depth; + int length = cb_size * cb_size * s->sps->pcm.bit_depth + ((cb_size * cb_size) >> 1) * s->sps->pcm.bit_depth_chroma; const uint8_t *pcm = skip_bytes(&s->HEVClc.cc, (length + 7) >> 3); int ret; @@ -1433,8 +1433,8 @@ static int hls_pcm_sample(HEVCContext *s, int x0, int y0, int log2_cb_size) return ret; s->hevcdsp.put_pcm(dst0, stride0, cb_size, &gb, s->sps->pcm.bit_depth); - s->hevcdsp.put_pcm(dst1, stride1, cb_size / 2, &gb, s->sps->pcm.bit_depth); - s->hevcdsp.put_pcm(dst2, stride2, cb_size / 2, &gb, s->sps->pcm.bit_depth); + s->hevcdsp.put_pcm(dst1, stride1, cb_size / 2, &gb, s->sps->pcm.bit_depth_chroma); + s->hevcdsp.put_pcm(dst2, stride2, cb_size / 2, &gb, s->sps->pcm.bit_depth_chroma); return 0; } |