Commit 1e4e760f authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '213e6067'

* commit '213e6067':
  Replace av_unused attributes by block structures

Conflicts:
	libavcodec/h264_loopfilter.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 73aeb27c 213e6067
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment