aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMickaƫl Raulet <mraulet@insa-rennes.fr>2014-07-19 00:04:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-19 00:11:05 +0200
commite1e3ec9b02caf6dc22beb77db70dc4b39a5bc6e8 (patch)
tree7e3fde9abc9ad3111c0f811208473e321ec5b135 /libavcodec
parentfdb20db642596297c545289609431c9443db5303 (diff)
downloadffmpeg-e1e3ec9b02caf6dc22beb77db70dc4b39a5bc6e8.tar.gz
hevc: fix transquant_bypass
cherry picked from commit 4a16cb2c70728a55d2fd723aff01b13ea259c4df Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevc_filter.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index b0b197cc66..c17e1dd9ea 100644
--- a/libavcodec/hevc_filter.c
+++ b/libavcodec/hevc_filter.c
@@ -158,7 +158,8 @@ static void restore_tqb_pixels(HEVCContext *s, int x0, int y0, int width, int he
if ( s->pps->transquant_bypass_enable_flag ||
(s->sps->pcm.loop_filter_disable_flag && s->sps->pcm_enabled_flag)) {
int x, y;
- ptrdiff_t stride = s->frame->linesize[c_idx];
+ ptrdiff_t stride_dst = s->sao_frame->linesize[c_idx];
+ ptrdiff_t stride_src = s->frame->linesize[c_idx];
int min_pu_size = 1 << s->sps->log2_min_pu_size;
int hshift = s->sps->hshift[c_idx];
int vshift = s->sps->vshift[c_idx];
@@ -171,12 +172,12 @@ static void restore_tqb_pixels(HEVCContext *s, int x0, int y0, int width, int he
for (x = x_min; x < x_max; x++) {
if (s->is_pcm[y * s->sps->min_pu_width + x]) {
int n;
- uint8_t *src = &s->frame->data[c_idx][ ((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)];
- uint8_t *dst = &s->sao_frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)];
+ uint8_t *src = &s->frame->data[c_idx][ ((y << s->sps->log2_min_pu_size) >> vshift) * stride_src + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)];
+ uint8_t *dst = &s->sao_frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride_dst + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)];
for (n = 0; n < (min_pu_size >> vshift); n++) {
memcpy(src, dst, len);
- src += stride;
- dst += stride;
+ src += stride_src;
+ dst += stride_dst;
}
}
}