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

Function decode_row

libavcodec/v210dec.c:55–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55static void decode_row(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, const int width,
56 void (*unpack_frame)(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width))
57{
58 uint32_t val;
59 int w = (FFMAX(0, width - 12) / 12) * 12;
60
61 unpack_frame(src, y, u, v, w);
62
63 y += w;
64 u += w >> 1;
65 v += w >> 1;
66 src += (w << 1) / 3;
67
68 while (w < width - 5) {
69 READ_PIXELS(u, y, v);
70 READ_PIXELS(y, u, y);
71 READ_PIXELS(v, y, u);
72 READ_PIXELS(y, v, y);
73 w += 6;
74 }
75
76 if (w++ < width) {
77 READ_PIXELS(u, y, v);
78
79 if (w++ < width) {
80 val = av_le2ne32(*src++);
81 *y++ = val & 0x3FF;
82
83 if (w++ < width) {
84 *u++ = (val >> 10) & 0x3FF;
85 *y++ = (val >> 20) & 0x3FF;
86 val = av_le2ne32(*src++);
87 *v++ = val & 0x3FF;
88
89 if (w++ < width) {
90 *y++ = (val >> 10) & 0x3FF;
91
92 if (w++ < width) {
93 *u++ = (val >> 20) & 0x3FF;
94 val = av_le2ne32(*src++);
95 *y++ = val & 0x3FF;
96 *v++ = (val >> 10) & 0x3FF;
97
98 if (w++ < width)
99 *y++ = (val >> 20) & 0x3FF;
100 }
101 }
102 }
103 }
104 }
105}
106
107static int v210_decode_slice(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
108{

Callers 2

v210_decode_sliceFunction · 0.85
decode_frameFunction · 0.85

Calls 1

unpack_frameFunction · 0.70

Tested by

no test coverage detected