summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2005-03-03 06:57:17 +0000
committerLoren Merritt <lorenm@u.washington.edu>2005-03-03 06:57:17 +0000
commite21f3983782a439060d9f200144c4e6fd7d62af0 (patch)
tree5accac4ea9542950bc8d08d61002fad128a73688 /libavcodec/mpegvideo.c
parentee89b2b9e77371d65d72ddd2b83f37cc0658c479 (diff)
vismb: display 4x4 partition boundaries in H.264
Originally committed as revision 3999 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 61ddf427b1..89103aed94 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1922,6 +1922,21 @@ v= (int)(128 + r*sin(theta*3.141592/180));
for(y=0; y<16; y++)
pict->data[0][16*mb_x + 8 + (16*mb_y + y)*pict->linesize[0]]^= 0x80;
}
+ if(IS_8X8(mb_type) && mv_sample_log2 >= 2){
+ int dm= 1 << (mv_sample_log2-2);
+ for(i=0; i<4; i++){
+ int sx= mb_x*16 + 8*(i&1);
+ int sy= mb_y*16 + 8*(i>>1);
+ int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << (mv_sample_log2-1);
+ //FIXME bidir
+ int32_t *mv = (int32_t*)&pict->motion_val[0][xy];
+ if(mv[0] != mv[dm] || mv[dm*mv_stride] != mv[dm*(mv_stride+1)])
+ for(y=0; y<8; y++)
+ pict->data[0][sx + 4 + (sy + y)*pict->linesize[0]]^= 0x80;
+ if(mv[0] != mv[dm*mv_stride] || mv[dm] != mv[dm*(mv_stride+1)])
+ *(uint64_t*)(pict->data[0] + sx + (sy + 4)*pict->linesize[0])^= 0x8080808080808080ULL;
+ }
+ }
if(IS_INTERLACED(mb_type) && s->codec_id == CODEC_ID_H264){
// hmm