Commit 7de8c44f authored by michael's avatar michael

Extract colorspace fields from MPEG1/2.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18747 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 43cf8a3f
...@@ -1188,6 +1188,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) ...@@ -1188,6 +1188,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
s->mpeg_enc_ctx.picture_number = 0; s->mpeg_enc_ctx.picture_number = 0;
s->repeat_field = 0; s->repeat_field = 0;
s->mpeg_enc_ctx.codec_id= avctx->codec->id; s->mpeg_enc_ctx.codec_id= avctx->codec->id;
avctx->color_range= AVCOL_RANGE_MPEG;
return 0; return 0;
} }
...@@ -1420,9 +1421,9 @@ static void mpeg_decode_sequence_display_extension(Mpeg1Context *s1) ...@@ -1420,9 +1421,9 @@ static void mpeg_decode_sequence_display_extension(Mpeg1Context *s1)
skip_bits(&s->gb, 3); /* video format */ skip_bits(&s->gb, 3); /* video format */
color_description= get_bits1(&s->gb); color_description= get_bits1(&s->gb);
if(color_description){ if(color_description){
skip_bits(&s->gb, 8); /* color primaries */ s->avctx->color_primaries= get_bits(&s->gb, 8);
skip_bits(&s->gb, 8); /* transfer_characteristics */ s->avctx->color_trc = get_bits(&s->gb, 8);
skip_bits(&s->gb, 8); /* matrix_coefficients */ s->avctx->colorspace = get_bits(&s->gb, 8);
} }
w= get_bits(&s->gb, 14); w= get_bits(&s->gb, 14);
skip_bits(&s->gb, 1); //marker skip_bits(&s->gb, 1); //marker
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment