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

Function get_dc

libavcodec/msmpeg4.c:190–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190static int get_dc(uint8_t *src, int stride, int scale, int block_size)
191{
192 int y;
193 int sum=0;
194 for(y=0; y<block_size; y++){
195 int x;
196 for(x=0; x<block_size; x++){
197 sum+=src[x + y*stride];
198 }
199 }
200 return FASTDIV((sum + (scale>>1)), scale);
201}
202
203/* dir = 0: left, dir = 1: top prediction */
204int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,

Callers 1

ff_msmpeg4_pred_dcFunction · 0.70

Calls 1

FASTDIVFunction · 0.85

Tested by

no test coverage detected