Commit 297a512b authored by Michel Lespinasse's avatar Michel Lespinasse

Move the alternate_scan bit to the coding_t structure - we prefer not to

have header.c poke into the mpeg2_decoder_t structure nowadays.
parent 64f5c855
......@@ -585,7 +585,7 @@ int mpeg2_header_picture (mpeg2dec_t * mpeg2dec)
coding->intra_dc_precision = 8;
coding->frame_pred_frame_dct = 1;
coding->concealment_motion_vectors = 0;
decoder->scan = mpeg2_scan_norm;
coding->alternate_scan = 0;
mpeg2dec->copy_matrix = 0;
return 0;
......@@ -627,7 +627,7 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
coding->concealment_motion_vectors = (buffer[3] >> 5) & 1;
decoder->q_scale_type = buffer[3] & 16;
coding->intra_vlc_format = (buffer[3] >> 3) & 1;
decoder->scan = (buffer[3] & 4) ? mpeg2_scan_alt : mpeg2_scan_norm;
coding->alternate_scan = (buffer[3] >> 2) & 1;
if (!(buffer[4] & 0x80))
flags &= ~PIC_FLAG_PROGRESSIVE_FRAME;
if (buffer[4] & 0x40)
......
......@@ -165,6 +165,7 @@ typedef struct {
int frame_pred_frame_dct;
int concealment_motion_vectors;
int intra_vlc_format;
int alternate_scan;
} coding_t;
struct mpeg2dec_s {
......
......@@ -1625,6 +1625,7 @@ void mpeg2_init_fbuf (mpeg2_decoder_t * decoder, mpeg2_sequence_t * sequence,
decoder->frame_pred_frame_dct = coding->frame_pred_frame_dct;
decoder->concealment_motion_vectors = coding->concealment_motion_vectors;
decoder->intra_vlc_format = coding->intra_vlc_format;
decoder->scan = coding->alternate_scan ? mpeg2_scan_alt : mpeg2_scan_norm;
stride = decoder->stride_frame;
bottom_field = (decoder->picture_structure == BOTTOM_FIELD);
......
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