# HG changeset patch # User michael # Date 1073236394 0 # Node ID 033d889d7c2c6ac905dc7ef72a1ea134b17c4470 # Parent 7e040c2a86e4ae68d7b5b50e239389c1c831247e non YV12 vissualization fix by (Wolfgang Hesseler ) diff -r 7e040c2a86e4 -r 033d889d7c2c mpegvideo.c --- a/mpegvideo.c Sun Jan 04 14:43:52 2004 +0000 +++ b/mpegvideo.c Sun Jan 04 17:13:14 2004 +0000 @@ -1491,10 +1491,12 @@ int mb_y; uint8_t *ptr; int i; + int h_chroma_shift, v_chroma_shift; s->low_delay=0; //needed to see the vectors without trashing the buffers + avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift); for(i=0; i<3; i++){ - memcpy(s->visualization_buffer[i], pict->data[i], (i==0) ? pict->linesize[i]*s->height:pict->linesize[i]*s->height/2); + memcpy(s->visualization_buffer[i], pict->data[i], (i==0) ? pict->linesize[i]*s->height:pict->linesize[i]*s->height >> v_chroma_shift); pict->data[i]= s->visualization_buffer[i]; } pict->type= FF_BUFFER_TYPE_COPY;