diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-05 19:24:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-05 19:24:49 +0200 |
commit | 1e4e760f767b597f88442b75e90d726ae626b230 (patch) | |
tree | bbf016203da738a1f429becdc9e8568dd1b39aa1 | |
parent | 73aeb27cfe4ec51c2577097c980fe126dcd1908b (diff) | |
parent | 213e606752d16f51337e94431962fb5d7749c07e (diff) | |
download | ffmpeg-1e4e760f767b597f88442b75e90d726ae626b230.tar.gz |
Merge commit '213e606752d16f51337e94431962fb5d7749c07e'
* commit '213e606752d16f51337e94431962fb5d7749c07e':
Replace av_unused attributes by block structures
Conflicts:
libavcodec/h264_loopfilter.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/faandct.c | 20 | ||||
-rw-r--r-- | libavcodec/faanidct.c | 10 | ||||
-rw-r--r-- | libavcodec/h264_loopfilter.c | 11 | ||||
-rw-r--r-- | libavcodec/rangecoder.h | 12 |
4 files changed, 32 insertions, 21 deletions
diff --git a/libavcodec/faandct.c b/libavcodec/faandct.c index b1d7a145f4..4053d69db1 100644 --- a/libavcodec/faandct.c +++ b/libavcodec/faandct.c @@ -68,7 +68,6 @@ static av_always_inline void row_fdct(FLOAT temp[64], int16_t *data) FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; FLOAT tmp10, tmp11, tmp12, tmp13; FLOAT z2, z4, z11, z13; - FLOAT av_unused z5; int i; for (i=0; i<8*8; i+=8) { @@ -99,9 +98,12 @@ static av_always_inline void row_fdct(FLOAT temp[64], int16_t *data) tmp6 += tmp7; #if 0 - z5= (tmp4 - tmp6) * A5; - z2= tmp4*A2 + z5; - z4= tmp6*A4 + z5; + { + FLOAT z5; + z5 = (tmp4 - tmp6) * A5; + z2 = tmp4 * A2 + z5; + z4 = tmp6 * A4 + z5; + } #else z2= tmp4*(A2+A5) - tmp6*A5; z4= tmp6*(A4-A5) + tmp4*A5; @@ -123,7 +125,6 @@ void ff_faandct(int16_t *data) FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; FLOAT tmp10, tmp11, tmp12, tmp13; FLOAT z2, z4, z11, z13; - FLOAT av_unused z5; FLOAT temp[64]; int i; @@ -159,9 +160,12 @@ void ff_faandct(int16_t *data) tmp6 += tmp7; #if 0 - z5= (tmp4 - tmp6) * A5; - z2= tmp4*A2 + z5; - z4= tmp6*A4 + z5; + { + FLOAT z5; + z5 = (tmp4 - tmp6) * A5; + z2 = tmp4 * A2 + z5; + z4 = tmp6 * A4 + z5; + } #else z2= tmp4*(A2+A5) - tmp6*A5; z4= tmp6*(A4-A5) + tmp4*A5; diff --git a/libavcodec/faanidct.c b/libavcodec/faanidct.c index 5f34fa508f..ca82f778ba 100644 --- a/libavcodec/faanidct.c +++ b/libavcodec/faanidct.c @@ -49,7 +49,6 @@ B7*B0/8, B7*B1/8, B7*B2/8, B7*B3/8, B7*B4/8, B7*B5/8, B7*B6/8, B7*B7/8, static inline void p8idct(int16_t data[64], FLOAT temp[64], uint8_t *dest, int stride, int x, int y, int type){ int i; - FLOAT av_unused tmp0; FLOAT s04, d04, s17, d17, s26, d26, s53, d53; FLOAT os07, os16, os25, os34; FLOAT od07, od16, od25, od34; @@ -64,9 +63,12 @@ static inline void p8idct(int16_t data[64], FLOAT temp[64], uint8_t *dest, int s od25= (s17 - s53)*(2*A4); #if 0 //these 2 are equivalent - tmp0= (d17 + d53)*(2*A2); - od34= d17*( 2*B6) - tmp0; - od16= d53*(-2*B2) + tmp0; + { + FLOAT tmp0; + tmp0 = (d17 + d53) * (2 * A2); + od34 = d17 * (2 * B6) - tmp0; + od16 = d53 * (-2 * B2) + tmp0; + } #else od34= d17*(2*(B6-A2)) - d53*(2*A2); od16= d53*(2*(A2-B2)) + d17*(2*A2); diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index 8c052c3e21..a7b6878394 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -706,7 +706,6 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint const int mb_type = h->cur_pic.mb_type[mb_xy]; const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4; int first_vertical_edge_done = 0; - av_unused int dir; int chroma = CHROMA(h) && !(CONFIG_GRAY && (h->flags&CODEC_FLAG_GRAY)); int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); int a = 52 + h->slice_alpha_c0_offset - qp_bd_offset; @@ -817,8 +816,14 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint } #if CONFIG_SMALL - for( dir = 0; dir < 2; dir++ ) - filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, dir ? 0 : first_vertical_edge_done, a, b, chroma, dir); + { + int dir; + for (dir = 0; dir < 2; dir++) + filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, + uvlinesize, mb_xy, mb_type, mvy_limit, + dir ? 0 : first_vertical_edge_done, a, b, + chroma, dir); + } #else filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, first_vertical_edge_done, a, b, chroma, 0); filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, 0, a, b, chroma, 1); diff --git a/libavcodec/rangecoder.h b/libavcodec/rangecoder.h index 88e555f417..d36fbd7c54 100644 --- a/libavcodec/rangecoder.h +++ b/libavcodec/rangecoder.h @@ -115,7 +115,6 @@ static inline void refill(RangeCoder *c) static inline int get_rac(RangeCoder *c, uint8_t *const state) { int range1 = (c->range * (*state)) >> 8; - int av_unused one_mask; c->range -= range1; #if 1 @@ -131,13 +130,14 @@ static inline int get_rac(RangeCoder *c, uint8_t *const state) return 1; } #else - one_mask = (c->range - c->low - 1) >> 31; + { + int one_mask one_mask = (c->range - c->low - 1) >> 31; - c->low -= c->range & one_mask; - c->range += (range1 - c->range) & one_mask; - - *state = c->zero_state[(*state) + (256 & one_mask)]; + c->low -= c->range & one_mask; + c->range += (range1 - c->range) & one_mask; + *state = c->zero_state[(*state) + (256 & one_mask)]; + } refill(c); return one_mask & 1; |