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

Function mpeg_decode_sequence_display_extension

libavcodec/mpeg12.c:1428–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1426}
1427
1428static void mpeg_decode_sequence_display_extension(Mpeg1Context *s1)
1429{
1430 MpegEncContext *s= &s1->mpeg_enc_ctx;
1431 int color_description, w, h;
1432
1433 skip_bits(&s->gb, 3); /* video format */
1434 color_description= get_bits1(&s->gb);
1435 if(color_description){
1436 s->avctx->color_primaries= get_bits(&s->gb, 8);
1437 s->avctx->color_trc = get_bits(&s->gb, 8);
1438 s->avctx->colorspace = get_bits(&s->gb, 8);
1439 }
1440 w= get_bits(&s->gb, 14);
1441 skip_bits(&s->gb, 1); //marker
1442 h= get_bits(&s->gb, 14);
1443 skip_bits(&s->gb, 1); //marker
1444
1445 s1->pan_scan.width= 16*w;
1446 s1->pan_scan.height=16*h;
1447
1448 if(s->avctx->debug & FF_DEBUG_PICT_INFO)
1449 av_log(s->avctx, AV_LOG_DEBUG, "sde w:%d, h:%d\n", w, h);
1450}
1451
1452static void mpeg_decode_picture_display_extension(Mpeg1Context *s1)
1453{

Callers 1

decode_chunksFunction · 0.85

Calls 4

skip_bitsFunction · 0.85
get_bits1Function · 0.85
get_bitsFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected