34 for (i = 0; i <
width; i++)
35 b1[i] -= (b0[i] + b2[i] + 2) >> 2;
43 for (i = 0; i < w2; i++) {
44 dst[2*i ] = (src0[i] + add) >> shift;
45 dst[2*i+1] = (src1[i] + add) >> shift;
51 const int w2 = w >> 1;
55 for (x = 1; x < w2; x++) {
66 const int w2 = w >> 1;
70 for (x = 1; x < w2; x++)
75 tmp[w2+1] = tmp[w2] = tmp[w2-1];
77 for (x = 0; x < w2; x++) {
78 b[2*x ] = (tmp[x] + 1)>>1;
79 b[2*x+1] = (
COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1)>>1;
85 const int w2 = w >> 1;
90 for (x = 2; x < w2-1; x++)
96 tmp[w2+1] = tmp[w2] = tmp[w2-1];
98 for (x = 0; x < w2; x++) {
99 b[2*x ] = (tmp[x] + 1)>>1;
100 b[2*x+1] = (
COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1)>>1;
107 const int w2 = w >> 1;
110 for (x = 0; x < w2; x++) {
115 interleave(b, temp, temp+w2, w2, shift, shift);
130 const int w2 = w >> 1;
134 for (x = 0; x < w2; x++) {
135 for (i = 0; i < 8; i++)
136 v[i] = b[av_clip(x-3+i, 0, w2-1)];
140 for (x = 0; x < w2; x++) {
141 for (i = 0; i < 8; i++)
142 v[i] = tmp[av_clip(x-4+i, 0, w2-1)];
151 const int w2 = w >> 1;
155 for (x = 1; x < w2; x++) {
163 b[0] = (b0 + 1) >> 1;
164 for (x = 1; x < w2; x++) {
167 b[2*x-1] = (b1 + 1) >> 1;
168 b[2*x ] = (b2 + 1) >> 1;
178 for(i=0; i<
width; i++){
188 for(i=0; i<
width; i++){
198 for(i=0; i<
width; i++){
207 for (i = 0; i <
width; i++) {
217 for(i=0; i<
width; i++){
218 dst[i] =
COMPOSE_FIDELITYiH0(b[0][i], b[1][i], b[2][i], b[3][i], dst[i], b[4][i], b[5][i], b[6][i], b[7][i]);
226 for(i=0; i<
width; i++){
227 dst[i] =
COMPOSE_FIDELITYiL0(b[0][i], b[1][i], b[2][i], b[3][i], dst[i], b[4][i], b[5][i], b[6][i], b[7][i]);
235 for(i=0; i<
width; i++){
244 for(i=0; i<
width; i++){
253 for(i=0; i<
width; i++){
262 for(i=0; i<
width; i++){
276 for (i = 0; i < 6; i++)
281 if(y+5<(
unsigned)height) vertical_compose_l0( b[5], b[6], b[7], width);
282 if(y+1<(
unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width);
287 for (i = 0; i < 6; i++)
303 if(y+1<(
unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width);
304 if(y+0<(
unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width);
323 for (i = 0; i < 8; i++)
328 if(y+5<(
unsigned)height) vertical_compose_l0(b[3], b[5], b[6], b[7], b[9], width);
329 if(y+1<(
unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width);
334 for (i = 0; i < 8; i++)
343 int y = d->
cs[level].
y;
347 vertical_compose(b0, b1, width);
363 for (y = 1; y <
height; y += 2) {
364 for (i = 0; i < 8; i++)
365 b[i] = d->
buffer + av_clip((y-7 + 2*i), 0, height-2)*stride;
366 vertical_compose_h0(d->
buffer + y*stride, b, width);
369 for (y = 0; y <
height; y += 2) {
370 for (i = 0; i < 8; i++)
371 b[i] = d->
buffer + av_clip((y-7 + 2*i), 1, height-1)*
stride;
372 vertical_compose_l0(d->
buffer + y*stride, b, width);
375 for (y = 0; y <
height; y++)
391 for (i = 0; i < 4; i++)
396 if(y+3<(
unsigned)height) vertical_compose_l1(b[3], b[4], b[5], width);
397 if(y+2<(
unsigned)height) vertical_compose_h1(b[2], b[3], b[4], width);
398 if(y+1<(
unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width);
399 if(y+0<(
unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width);
404 for (i = 0; i < 4; i++)
428 cs->
b[0] = buffer + av_clip(-5-1, 0, height-2)*
stride;
429 cs->
b[1] = buffer + av_clip(-5 , 1, height-1)*
stride;
430 cs->
b[2] = buffer + av_clip(-5+1, 0, height-2)*
stride;
431 cs->
b[3] = buffer + av_clip(-5+2, 1, height-1)*
stride;
432 cs->
b[4] = buffer + av_clip(-5+3, 0, height-2)*
stride;
433 cs->
b[5] = buffer + av_clip(-5+4, 1, height-1)*
stride;
439 cs->
b[0] = buffer + av_clip(-5-1, 0, height-2)*
stride;
440 cs->
b[1] = buffer + av_clip(-5 , 1, height-1)*
stride;
441 cs->
b[2] = buffer + av_clip(-5+1, 0, height-2)*
stride;
442 cs->
b[3] = buffer + av_clip(-5+2, 1, height-1)*
stride;
443 cs->
b[4] = buffer + av_clip(-5+3, 0, height-2)*
stride;
444 cs->
b[5] = buffer + av_clip(-5+4, 1, height-1)*
stride;
445 cs->
b[6] = buffer + av_clip(-5+5, 0, height-2)*
stride;
446 cs->
b[7] = buffer + av_clip(-5+6, 1, height-1)*
stride;
463 for(level=decomposition_count-1; level>=0; level--){
464 int hl = height >>
level;
465 int stride_l = stride <<
level;
557 while (d->
cs[level].
y <=
FFMIN((y>>level)+support, hl))
#define COMPOSE_HAARiH0(b0, b1)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int shift(int a, int b)
static void horizontal_compose_dd97i(IDWTELEM *b, IDWTELEM *tmp, int w)
static void spatial_compose_dd137i_init(DWTCompose *cs, IDWTELEM *buffer, int height, int stride)
static void horizontal_compose_dd137i(IDWTELEM *b, IDWTELEM *tmp, int w)
static void vertical_compose_daub97iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
#define COMPOSE_DAUB97iL0(b0, b1, b2)
static void vertical_compose_dd97iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, int width)
static void spatial_compose_daub97i_dy(DWTContext *d, int level, int width, int height, int stride)
static av_always_inline void interleave(IDWTELEM *dst, IDWTELEM *src0, IDWTELEM *src1, int w2, int add, int shift)
#define COMPOSE_FIDELITYiH0(b0, b1, b2, b3, b4, b5, b6, b7, b8)
static void vertical_compose_dd137iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, int width)
static void vertical_compose_daub97iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
Macro definitions for various function/variable attributes.
void(* spatial_compose)(struct DWTContext *cs, int level, int width, int height, int stride)
#define COMPOSE_DAUB97iL1(b0, b1, b2)
static void spatial_compose_dd97i_init(DWTCompose *cs, IDWTELEM *buffer, int height, int stride)
static void vertical_compose_fidelityiH0(IDWTELEM *dst, IDWTELEM *b[8], int width)
void(* vertical_compose_h1)(void)
#define COMPOSE_DD97iH0(b0, b1, b2, b3, b4)
#define COMPOSE_53iL0(b0, b1, b2)
static void vertical_compose_haar(IDWTELEM *b0, IDWTELEM *b1, int width)
static void spatial_compose97i_init2(DWTCompose *cs, IDWTELEM *buffer, int height, int stride)
#define COMPOSE_DIRAC53iH0(b0, b1, b2)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void(* vertical_compose_9tap)(IDWTELEM *dst, IDWTELEM *b[8], int width)
simple assert() macros that are a bit more flexible than ISO C assert().
static void spatial_compose_dd97i_dy(DWTContext *d, int level, int width, int height, int stride)
static void vertical_compose_dirac53iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
static void vertical_compose53iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
#define COMPOSE_DAUB97iH1(b0, b1, b2)
static void spatial_compose_dd137i_dy(DWTContext *d, int level, int width, int height, int stride)
static void horizontal_compose_haar0i(IDWTELEM *b, IDWTELEM *temp, int w)
static void vertical_compose_daub97iL1(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
void(* vertical_compose_2tap)(IDWTELEM *b0, IDWTELEM *b1, int width)
void ff_spatial_idwt_slice2(DWTContext *d, int y)
static void spatial_compose53i_init2(DWTCompose *cs, IDWTELEM *buffer, int height, int stride)
static av_always_inline av_const int avpriv_mirror(int x, int w)
static void vertical_compose_fidelityiL0(IDWTELEM *dst, IDWTELEM *b[8], int width)
void(* vertical_compose_h0)(void)
void ff_spatial_idwt_init_mmx(DWTContext *d, enum dwt_type type)
static void spatial_compose_dirac53i_dy(DWTContext *d, int level, int width, int height, int stride)
static void horizontal_compose_daub97i(IDWTELEM *b, IDWTELEM *temp, int w)
void(* vertical_compose_3tap)(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
static void horizontal_compose_haar1i(IDWTELEM *b, IDWTELEM *temp, int w)
BYTE int const BYTE int int int height
void(* horizontal_compose)(IDWTELEM *b, IDWTELEM *tmp, int width)
int ff_spatial_idwt_init2(DWTContext *d, IDWTELEM *buffer, int width, int height, int stride, enum dwt_type type, int decomposition_count, IDWTELEM *temp)
#define COMPOSE_FIDELITYiL0(b0, b1, b2, b3, b4, b5, b6, b7, b8)
static void vertical_compose_daub97iH1(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width)
DWTCompose cs[MAX_DECOMPOSITIONS]
static av_always_inline void horizontal_compose_haari(IDWTELEM *b, IDWTELEM *temp, int w, int shift)
static void spatial_compose_fidelity(DWTContext *d, int level, int width, int height, int stride)
static void spatial_compose_haari_dy(DWTContext *d, int level, int width, int height, int stride)
GLint GLenum GLboolean GLsizei stride
#define COMPOSE_DD137iL0(b0, b1, b2, b3, b4)
common internal and external API header
IDWTELEM * b[MAX_DWT_SUPPORT]
void(* vertical_compose)(void)
one set of lowpass and highpass combined
#define COMPOSE_HAARiL0(b0, b1)
static void horizontal_compose_fidelityi(IDWTELEM *b, IDWTELEM *tmp, int w)
static void horizontal_compose_dirac53i(IDWTELEM *b, IDWTELEM *temp, int w)
void(* vertical_compose_5tap)(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, int width)
void(* vertical_compose_l0)(void)
#define COMPOSE_DAUB97iH0(b0, b1, b2)
void(* vertical_compose_l1)(void)