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++)
278 b[6] = d->
buffer + av_clip(y+5, 0, height-2)*stride;
279 b[7] = d->
buffer + av_clip(y+6, 1, height-1)*stride;
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++)
325 b[8] = d->
buffer + av_clip(y+7, 0, height-2)*stride;
326 b[9] = d->
buffer + av_clip(y+8, 1, height-1)*stride;
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))