Mercurial > libavcodec.hg
changeset 4408:c3be13eac2d6 libavcodec
Bring down the number of snow.c warnings from 27 to 17 by using the const
keyword.
author | takis |
---|---|
date | Thu, 25 Jan 2007 09:54:22 +0000 |
parents | 15688bdfe1b5 |
children | 1907b07173cf |
files | snow.c |
diffstat | 1 files changed, 20 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/snow.c Thu Jan 25 09:43:52 2007 +0000 +++ b/snow.c Thu Jan 25 09:54:22 2007 +0000 @@ -1959,7 +1959,7 @@ } static inline void pred_mv(SnowContext *s, int *mx, int *my, int ref, - BlockNode *left, BlockNode *top, BlockNode *tr){ + const BlockNode *left, const BlockNode *top, const BlockNode *tr){ if(s->ref_frames == 1){ *mx = mid_pred(left->mx, top->mx, tr->mx); *my = mid_pred(left->my, top->my, tr->my); @@ -1998,12 +1998,12 @@ const int block_w= 1<<(LOG2_MB_SIZE - level); int trx= (x+1)<<rem_depth; int try= (y+1)<<rem_depth; - BlockNode *left = x ? &s->block[index-1] : &null_block; - BlockNode *top = y ? &s->block[index-w] : &null_block; - BlockNode *right = trx<w ? &s->block[index+1] : &null_block; - BlockNode *bottom= try<h ? &s->block[index+w] : &null_block; - BlockNode *tl = y && x ? &s->block[index-w-1] : left; - BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt + const BlockNode *left = x ? &s->block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-w] : &null_block; + const BlockNode *right = trx<w ? &s->block[index+1] : &null_block; + const BlockNode *bottom= try<h ? &s->block[index+w] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-w-1] : left; + const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt int pl = left->color[0]; int pcb= left->color[1]; int pcr= left->color[2]; @@ -2225,10 +2225,10 @@ const int index= (x + y*w) << rem_depth; int trx= (x+1)<<rem_depth; BlockNode *b= &s->block[index]; - BlockNode *left = x ? &s->block[index-1] : &null_block; - BlockNode *top = y ? &s->block[index-w] : &null_block; - BlockNode *tl = y && x ? &s->block[index-w-1] : left; - BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt + const BlockNode *left = x ? &s->block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-w] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-w-1] : left; + const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt int pl = left->color[0]; int pcb= left->color[1]; int pcr= left->color[2]; @@ -2278,10 +2278,10 @@ const int rem_depth= s->block_max_depth - level; const int index= (x + y*w) << rem_depth; int trx= (x+1)<<rem_depth; - BlockNode *left = x ? &s->block[index-1] : &null_block; - BlockNode *top = y ? &s->block[index-w] : &null_block; - BlockNode *tl = y && x ? &s->block[index-w-1] : left; - BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt + const BlockNode *left = x ? &s->block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-w] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-w-1] : left; + const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->block[index-w+(1<<rem_depth)] : tl; //FIXME use lt int s_context= 2*left->level + 2*top->level + tl->level + tr->level; if(s->keyframe){ @@ -2905,11 +2905,11 @@ const int b_stride = s->b_width << s->block_max_depth; const int b_height = s->b_height<< s->block_max_depth; int index= x + y*b_stride; - BlockNode *b = &s->block[index]; - BlockNode *left = x ? &s->block[index-1] : &null_block; - 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+w<b_stride ? &s->block[index-b_stride+w] : tl; + const BlockNode *b = &s->block[index]; + const BlockNode *left = x ? &s->block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-b_stride] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-b_stride-1] : left; + const BlockNode *tr = y && x+w<b_stride ? &s->block[index-b_stride+w] : tl; int dmx, dmy; // int mx_context= av_log2(2*FFABS(left->mx - top->mx)); // int my_context= av_log2(2*FFABS(left->my - top->my));