aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-03-08 20:27:16 +0000
committerDiego Biurrun <diego@biurrun.de>2008-03-08 20:27:16 +0000
commite73e4e75f9f8e73af85717c2b2e081119af00f28 (patch)
treeb88eb5c4045b19652b59c1d8da2c5b9134e54a42 /libavcodec/snow.c
parentef3dfbd4278bff9c4e1c142625cece3dd955b613 (diff)
downloadffmpeg-e73e4e75f9f8e73af85717c2b2e081119af00f28.tar.gz
cosmetics: Fix indentation in a few more places.
Originally committed as revision 12381 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c69
1 files changed, 35 insertions, 34 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index d657c41979..aceb6cf44e 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -2539,30 +2539,31 @@ static av_always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer
#else
if(sliced){
s->dsp.inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8);
- }else
- for(y=0; y<b_h; y++){
- //FIXME ugly misuse of obmc_stride
- const uint8_t *obmc1= obmc + y*obmc_stride;
- const uint8_t *obmc2= obmc1+ (obmc_stride>>1);
- const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1);
- const uint8_t *obmc4= obmc3+ (obmc_stride>>1);
- for(x=0; x<b_w; x++){
- int v= obmc1[x] * block[3][x + y*src_stride]
- +obmc2[x] * block[2][x + y*src_stride]
- +obmc3[x] * block[1][x + y*src_stride]
- +obmc4[x] * block[0][x + y*src_stride];
-
- v <<= 8 - LOG2_OBMC_MAX;
- if(FRAC_BITS != 8){
- v >>= 8 - FRAC_BITS;
- }
- if(add){
- v += dst[x + y*dst_stride];
- v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS;
- if(v&(~255)) v= ~(v>>31);
- dst8[x + y*src_stride] = v;
- }else{
- dst[x + y*dst_stride] -= v;
+ }else{
+ for(y=0; y<b_h; y++){
+ //FIXME ugly misuse of obmc_stride
+ const uint8_t *obmc1= obmc + y*obmc_stride;
+ const uint8_t *obmc2= obmc1+ (obmc_stride>>1);
+ const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1);
+ const uint8_t *obmc4= obmc3+ (obmc_stride>>1);
+ for(x=0; x<b_w; x++){
+ int v= obmc1[x] * block[3][x + y*src_stride]
+ +obmc2[x] * block[2][x + y*src_stride]
+ +obmc3[x] * block[1][x + y*src_stride]
+ +obmc4[x] * block[0][x + y*src_stride];
+
+ v <<= 8 - LOG2_OBMC_MAX;
+ if(FRAC_BITS != 8){
+ v >>= 8 - FRAC_BITS;
+ }
+ if(add){
+ v += dst[x + y*dst_stride];
+ v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS;
+ if(v&(~255)) v= ~(v>>31);
+ dst8[x + y*src_stride] = v;
+ }else{
+ dst[x + y*dst_stride] -= v;
+ }
}
}
}
@@ -2613,16 +2614,16 @@ static av_always_inline void predict_slice_buffered(SnowContext *s, slice_buffer
return;
}
- for(mb_x=0; mb_x<=mb_w; mb_x++){
- add_yblock(s, 1, sb, old_buffer, dst8, obmc,
- block_w*mb_x - block_w/2,
- block_w*mb_y - block_w/2,
- block_w, block_w,
- w, h,
- w, ref_stride, obmc_stride,
- mb_x - 1, mb_y - 1,
- add, 0, plane_index);
- }
+ for(mb_x=0; mb_x<=mb_w; mb_x++){
+ add_yblock(s, 1, sb, old_buffer, dst8, obmc,
+ block_w*mb_x - block_w/2,
+ block_w*mb_y - block_w/2,
+ block_w, block_w,
+ w, h,
+ w, ref_stride, obmc_stride,
+ mb_x - 1, mb_y - 1,
+ add, 0, plane_index);
+ }
}
static av_always_inline void predict_slice(SnowContext *s, IDWTELEM *buf, int plane_index, int add, int mb_y){