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

Function liftS

libavcodec/dwt.c:166–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165#ifndef liftS
166static av_always_inline void
167liftS(DWTELEM *dst, DWTELEM *src, DWTELEM *ref,
168 int dst_step, int src_step, int ref_step,
169 int width, int mul, int add, int shift,
170 int highpass, int inverse){
171 const int mirror_left= !highpass;
172 const int mirror_right= (width&1) ^ highpass;
173 const int w= (width>>1) - 1 + (highpass & width);
174 int i;
175
176 assert(shift == 4);
177#define LIFTS(src, ref, inv) \
178 ((inv) ? \
179 (src) + (((ref) + 4*(src))>>shift): \
180 -((-16*(src) + (ref) + add/4 + 1 + (5<<25))/(5*4) - (1<<23)))
181 if(mirror_left){
182 dst[0] = LIFTS(src[0], mul*2*ref[0]+add, inverse);
183 dst += dst_step;
184 src += src_step;
185 }
186
187 for(i=0; i<w; i++){
188 dst[i*dst_step] =
189 LIFTS(src[i*src_step],
190 mul*(ref[i*ref_step] + ref[(i+1)*ref_step])+add,
191 inverse);
192 }
193
194 if(mirror_right){
195 dst[w*dst_step] =
196 LIFTS(src[w*src_step], mul*2*ref[w*ref_step]+add, inverse);
197 }
198}
199static av_always_inline void
200inv_liftS(IDWTELEM *dst, IDWTELEM *src, IDWTELEM *ref,
201 int dst_step, int src_step, int ref_step,

Callers 1

horizontal_decompose97iFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected