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

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-15 07:03:37 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-08-15 07:03:37 +0400
commitfafd8443118565f4e06da2a8832e8d3fa3ffe41e (patch)
tree3aec73aa83e4a58bc3eef819ee8ad72ff98b9eb4
parent6093960ae35c8d69c559b5604f683c2ea3f279ca (diff)
mpegvideo: fix MB/MV vissualization on videos that are not mod 16 == 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 924ddd6263..22a9ec830e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1595,8 +1595,8 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,
&h_chroma_shift, &v_chroma_shift);
for (i = 0; i < 3; i++) {
- size_t size= (i == 0) ? pict->linesize[i] * height:
- pict->linesize[i] * height >> v_chroma_shift;
+ size_t size= (i == 0) ? pict->linesize[i] * FFALIGN(height, 16):
+ pict->linesize[i] * FFALIGN(height, 16) >> v_chroma_shift;
s->visualization_buffer[i]= av_realloc(s->visualization_buffer[i], size);
memcpy(s->visualization_buffer[i], pict->data[i], size);
pict->data[i] = s->visualization_buffer[i];