[FFmpeg-cvslog] hevc: fix transquant_bypass
Mickaël Raulet
git at videolan.org
Sat Jul 19 00:23:25 CEST 2014
ffmpeg | branch: master | Mickaël Raulet <mraulet at insa-rennes.fr> | Sat Jul 19 00:04:38 2014 +0200| [e1e3ec9b02caf6dc22beb77db70dc4b39a5bc6e8] | committer: Michael Niedermayer
hevc: fix transquant_bypass
cherry picked from commit 4a16cb2c70728a55d2fd723aff01b13ea259c4df
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1e3ec9b02caf6dc22beb77db70dc4b39a5bc6e8
---
libavcodec/hevc_filter.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index b0b197c..c17e1dd 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;
}
}
}
More information about the ffmpeg-cvslog
mailing list