MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / lift

Function lift

libavcodec/dwt.c:101–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101static av_always_inline void
102lift(DWTELEM *dst, DWTELEM *src, DWTELEM *ref,
103 int dst_step, int src_step, int ref_step,
104 int width, int mul, int add, int shift,
105 int highpass, int inverse){
106 const int mirror_left= !highpass;
107 const int mirror_right= (width&1) ^ highpass;
108 const int w= (width>>1) - 1 + (highpass & width);
109 int i;
110
111#define LIFT(src, ref, inv) ((src) + ((inv) ? - (ref) : + (ref)))
112 if(mirror_left){
113 dst[0] = LIFT(src[0], ((mul*2*ref[0]+add)>>shift), inverse);
114 dst += dst_step;
115 src += src_step;
116 }
117
118 for(i=0; i<w; i++){
119 dst[i*dst_step] =
120 LIFT(src[i*src_step],
121 ((mul*(ref[i*ref_step] + ref[(i+1)*ref_step])+add)>>shift),
122 inverse);
123 }
124
125 if(mirror_right){
126 dst[w*dst_step] =
127 LIFT(src[w*src_step],
128 ((mul*2*ref[w*ref_step]+add)>>shift),
129 inverse);
130 }
131}
132
133static av_always_inline void
134inv_lift(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,

Callers 2

horizontal_decompose53iFunction · 0.85
horizontal_decompose97iFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected