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

Function mp_decode_frame_helper

libavcodec/motionpixels.c:207–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static void mp_decode_frame_helper(MotionPixelsContext *mp, GetBitContext *gb)
208{
209 YuvPixel p;
210 int y, y0;
211
212 for (y = 0; y < mp->avctx->height; ++y) {
213 if (mp->changes_map[y * mp->avctx->width] != 0) {
214 memset(mp->gradient_scale, 1, sizeof(mp->gradient_scale));
215 p = mp_get_yuv_from_rgb(mp, 0, y);
216 } else {
217 p.y += mp_gradient(mp, 0, mp_get_vlc(mp, gb));
218 if ((y & 3) == 0) {
219 p.v += mp_gradient(mp, 1, mp_get_vlc(mp, gb));
220 p.u += mp_gradient(mp, 2, mp_get_vlc(mp, gb));
221 }
222 mp->vpt[y] = p;
223 mp_set_rgb_from_yuv(mp, 0, y, &p);
224 }
225 }
226 for (y0 = 0; y0 < 2; ++y0)
227 for (y = y0; y < mp->avctx->height; y += 2)
228 mp_decode_line(mp, gb, y);
229}
230
231static int mp_decode_frame(AVCodecContext *avctx,
232 void *data, int *data_size,

Callers 1

mp_decode_frameFunction · 0.85

Calls 5

mp_get_yuv_from_rgbFunction · 0.85
mp_gradientFunction · 0.85
mp_get_vlcFunction · 0.85
mp_set_rgb_from_yuvFunction · 0.85
mp_decode_lineFunction · 0.85

Tested by

no test coverage detected