Mercurial > libavcodec.hg
changeset 3035:d0f408fa01c7 libavcodec
bugs found by valgrind
author | michael |
---|---|
date | Thu, 12 Jan 2006 21:37:57 +0000 |
parents | d37065d8aeff |
children | 0b546eab515d |
files | snow.c |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/snow.c Thu Jan 12 17:52:41 2006 +0000 +++ b/snow.c Thu Jan 12 21:37:57 2006 +0000 @@ -3116,13 +3116,14 @@ BlockNode *top = y ? &s->block[index-b_stride] : &null_block; BlockNode *tl = y && x ? &s->block[index-b_stride-1] : left; BlockNode *tr = y && x+1<b_stride ? &s->block[index-b_stride+1] : tl; - int dmx= b->mx - mid_pred(left->mx, top->mx, tr->mx); - int dmy= b->my - mid_pred(left->my, top->my, tr->my); + int dmx, dmy; // int mx_context= av_log2(2*ABS(left->mx - top->mx)); // int my_context= av_log2(2*ABS(left->my - top->my)); if(x<0 || x>=b_stride || y>=b_height) continue; + dmx= b->mx - mid_pred(left->mx, top->mx, tr->mx); + dmy= b->my - mid_pred(left->my, top->my, tr->my); /* 1 0 0 01X 1-2 1 @@ -3206,14 +3207,14 @@ BlockNode backup; const int index= mb_x + mb_y * b_stride; BlockNode *block= &s->block[index]; - BlockNode *tb = mb_y ? &s->block[index-b_stride ] : &null_block; - BlockNode *lb = mb_x ? &s->block[index -1] : &null_block; - BlockNode *rb = mb_x<b_width ? &s->block[index +1] : &null_block; - BlockNode *bb = mb_y<b_height ? &s->block[index+b_stride ] : &null_block; - BlockNode *tlb= mb_x && mb_y ? &s->block[index-b_stride-1] : &null_block; - BlockNode *trb= mb_x<b_width && mb_y ? &s->block[index-b_stride+1] : &null_block; - BlockNode *blb= mb_x && mb_y<b_height ? &s->block[index+b_stride-1] : &null_block; - BlockNode *brb= mb_x<b_width && mb_y<b_height ? &s->block[index+b_stride+1] : &null_block; + BlockNode *tb = mb_y ? &s->block[index-b_stride ] : &null_block; + BlockNode *lb = mb_x ? &s->block[index -1] : &null_block; + BlockNode *rb = mb_x+1<b_width ? &s->block[index +1] : &null_block; + BlockNode *bb = mb_y+1<b_height ? &s->block[index+b_stride ] : &null_block; + BlockNode *tlb= mb_x && mb_y ? &s->block[index-b_stride-1] : &null_block; + BlockNode *trb= mb_x+1<b_width && mb_y ? &s->block[index-b_stride+1] : &null_block; + BlockNode *blb= mb_x && mb_y+1<b_height ? &s->block[index+b_stride-1] : &null_block; + BlockNode *brb= mb_x+1<b_width && mb_y+1<b_height ? &s->block[index+b_stride+1] : &null_block; const int b_w= (MB_SIZE >> s->block_max_depth); uint8_t obmc_edged[b_w*2][b_w*2];