Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-20 02:41:00 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-10-20 02:41:00 +0400
commit23d69b158af433fab118b6b261d3bafa059761f8 (patch)
tree19867a59c590bac63a51a3e24bb5ac11d678f6e0 /libavcodec/hevc_refs.c
parentf2eca8d06060b9ec265c21ae38b6dd3088c52cc6 (diff)
avcodec/hevc_refs: fix h/vshift calculation in ff_hevc_output_frame()
Fixes CID1108577 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_refs.c')
-rw-r--r--libavcodec/hevc_refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
index 9392a5a55e..2cf6860d1c 100644
--- a/libavcodec/hevc_refs.c
+++ b/libavcodec/hevc_refs.c
@@ -184,8 +184,8 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush)
return ret;
for (j = 0; j < 3; j++) {
- int hshift = (i > 0) ? desc->log2_chroma_w : 0;
- int vshift = (i > 0) ? desc->log2_chroma_h : 0;
+ int hshift = (j > 0) ? desc->log2_chroma_w : 0;
+ int vshift = (j > 0) ? desc->log2_chroma_h : 0;
int off = ((frame->window.left_offset >> hshift) << pixel_shift) +
(frame->window.top_offset >> vshift) * dst->linesize[j];
dst->data[j] += off;