dwt: Code make up, removed gotos
(cherry picked from commit 14880406e1277cef91d9b22a4d9b3bf91f8ea4ca) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
db3463e9c3
commit
8b1032c923
@ -47,7 +47,6 @@ IDWTELEM * ff_slice_buffer_load_line(slice_buffer * buf, int line)
|
|||||||
IDWTELEM * buffer;
|
IDWTELEM * buffer;
|
||||||
|
|
||||||
assert(buf->data_stack_top >= 0);
|
assert(buf->data_stack_top >= 0);
|
||||||
// assert(!buf->line[line]);
|
|
||||||
if (buf->line[line])
|
if (buf->line[line])
|
||||||
return buf->line[line];
|
return buf->line[line];
|
||||||
|
|
||||||
@ -144,7 +143,10 @@ inv_lift(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
|
|||||||
|
|
||||||
#define LIFT(src, ref, inv) ((src) + ((inv) ? - (ref) : + (ref)))
|
#define LIFT(src, ref, inv) ((src) + ((inv) ? - (ref) : + (ref)))
|
||||||
if(mirror_left){
|
if(mirror_left){
|
||||||
dst[0] = LIFT(src[0], ((mul*2*ref[0]+add)>>shift), inverse);
|
dst[0] =
|
||||||
|
LIFT(src[0],
|
||||||
|
((mul * 2 * ref[0] + add) >> shift),
|
||||||
|
inverse);
|
||||||
dst += dst_step;
|
dst += dst_step;
|
||||||
src += src_step;
|
src += src_step;
|
||||||
}
|
}
|
||||||
@ -236,8 +238,8 @@ inv_liftS(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
|
|||||||
static void horizontal_decompose53i(DWTELEM *b, int width){
|
static void horizontal_decompose53i(DWTELEM *b, int width){
|
||||||
DWTELEM temp[width];
|
DWTELEM temp[width];
|
||||||
const int width2 = width>>1;
|
const int width2 = width>>1;
|
||||||
int x;
|
|
||||||
const int w2 = (width+1)>>1;
|
const int w2 = (width+1)>>1;
|
||||||
|
int x;
|
||||||
|
|
||||||
for(x = 0; x < width2; x++){
|
for(x = 0; x < width2; x++){
|
||||||
temp[x ] = b[2 * x ];
|
temp[x ] = b[2 * x ];
|
||||||
@ -457,7 +459,6 @@ static void spatial_compose53i_init(DWTCompose *cs, IDWTELEM *buffer, int height
|
|||||||
|
|
||||||
static void spatial_compose53i_dy_buffered(DWTCompose *cs, slice_buffer * sb, int width, int height, int stride_line){
|
static void spatial_compose53i_dy_buffered(DWTCompose *cs, slice_buffer * sb, int width, int height, int stride_line){
|
||||||
int y = cs->y;
|
int y = cs->y;
|
||||||
|
|
||||||
IDWTELEM *b0 = cs->b0;
|
IDWTELEM *b0 = cs->b0;
|
||||||
IDWTELEM *b1 = cs->b1;
|
IDWTELEM *b1 = cs->b1;
|
||||||
IDWTELEM *b2 = slice_buffer_get_line(sb, mirror(y + 1, height-1) * stride_line);
|
IDWTELEM *b2 = slice_buffer_get_line(sb, mirror(y + 1, height-1) * stride_line);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user