diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-01-25 09:54:22 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-01-25 09:54:22 +0000 |
commit | aadcc5cecde7311871858d18c75fad9b463aca2d (patch) | |
tree | ee94aa28112e6904f2c2161d5db67da989d3f34e /libavcodec/snow.c | |
parent | e3e3be53463c154d108d7832b8a013b96ae8f0b9 (diff) | |
download | ffmpeg-aadcc5cecde7311871858d18c75fad9b463aca2d.tar.gz |
Bring down the number of snow.c warnings from 27 to 17 by using the const
keyword.
Originally committed as revision 7706 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r-- | libavcodec/snow.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index a9f70f67ec..ed21c865d7 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -1959,7 +1959,7 @@ static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3 } 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 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){ 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 @@ static void encode_q_branch2(SnowContext *s, int level, int x, int y){ 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 @@ static void decode_q_branch(SnowContext *s, int level, int x, int y){ 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 @@ static inline int get_block_bits(SnowContext *s, int x, int y, int w){ 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)); |