comparison mpegvideo.c @ 1723:033d889d7c2c libavcodec

non YV12 vissualization fix by (Wolfgang Hesseler <qv at multimediaware dot com>)
author michael
date Sun, 04 Jan 2004 17:13:14 +0000
parents 7e040c2a86e4
children a4a5e7521339
comparison
equal deleted inserted replaced
1722:7e040c2a86e4 1723:033d889d7c2c
1489 if((s->avctx->debug&(FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) || (s->avctx->debug_mv)){ 1489 if((s->avctx->debug&(FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) || (s->avctx->debug_mv)){
1490 const int shift= 1 + s->quarter_sample; 1490 const int shift= 1 + s->quarter_sample;
1491 int mb_y; 1491 int mb_y;
1492 uint8_t *ptr; 1492 uint8_t *ptr;
1493 int i; 1493 int i;
1494 int h_chroma_shift, v_chroma_shift;
1494 s->low_delay=0; //needed to see the vectors without trashing the buffers 1495 s->low_delay=0; //needed to see the vectors without trashing the buffers
1495 1496
1497 avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift);
1496 for(i=0; i<3; i++){ 1498 for(i=0; i<3; i++){
1497 memcpy(s->visualization_buffer[i], pict->data[i], (i==0) ? pict->linesize[i]*s->height:pict->linesize[i]*s->height/2); 1499 memcpy(s->visualization_buffer[i], pict->data[i], (i==0) ? pict->linesize[i]*s->height:pict->linesize[i]*s->height >> v_chroma_shift);
1498 pict->data[i]= s->visualization_buffer[i]; 1500 pict->data[i]= s->visualization_buffer[i];
1499 } 1501 }
1500 pict->type= FF_BUFFER_TYPE_COPY; 1502 pict->type= FF_BUFFER_TYPE_COPY;
1501 ptr= pict->data[0]; 1503 ptr= pict->data[0];
1502 1504