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

Function encode_sample_fmt

libavcodec/vc2enc.c:292–305  ·  view source on GitHub ↗

VC-2 11.3.3 - color_diff_sampling_format() */

Source from the content-addressed store, hash-verified

290
291/* VC-2 11.3.3 - color_diff_sampling_format() */
292static void encode_sample_fmt(VC2EncContext *s)
293{
294 put_bits(&s->pb, 1, !s->strict_compliance);
295 if (!s->strict_compliance) {
296 int idx;
297 if (s->chroma_x_shift == 1 && s->chroma_y_shift == 0)
298 idx = 1; /* 422 */
299 else if (s->chroma_x_shift == 1 && s->chroma_y_shift == 1)
300 idx = 2; /* 420 */
301 else
302 idx = 0; /* 444 */
303 put_vc2_ue_uint(&s->pb, idx);
304 }
305}
306
307/* VC-2 11.3.4 - scan_format() */
308static void encode_scan_format(VC2EncContext *s)

Callers 1

encode_source_paramsFunction · 0.85

Calls 2

put_vc2_ue_uintFunction · 0.85
put_bitsFunction · 0.70

Tested by

no test coverage detected