Fix unintended renaming

pull/1/head
Darrell Anderson 11 years ago
parent 6cf97c105a
commit e2b4c26fb4

@ -33,8 +33,8 @@
#include "attributes.h"
#include "mpeg2_internal.h"
#define SETQ_EXT 2
#define SETQ_DISPLAY_EXT 4
#define SEQ_EXT 2
#define SEQ_DISPLAY_EXT 4
#define QUANT_MATRIX_EXT 8
#define COPYRIGHT_EXT 0x10
#define PIC_DISPLAY_EXT 0x80
@ -156,8 +156,8 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
sequence->chroma_width = sequence->width >> 1;
sequence->chroma_height = sequence->height >> 1;
sequence->flags = (SETQ_FLAG_PROGRESSIVE_SEQUENCE |
SETQ_VIDEO_FORMAT_UNSPECIFIED);
sequence->flags = (SEQ_FLAG_PROGRESSIVE_SEQUENCE |
SEQ_VIDEO_FORMAT_UNSPECIFIED);
sequence->pixel_width = buffer[3] >> 4; /* aspect ratio */
sequence->frame_period = frame_period[buffer[3] & 15];
@ -167,7 +167,7 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
sequence->vbv_buffer_size = ((buffer[6]<<16)|(buffer[7]<<8))&0x1ff800;
if (buffer[7] & 4)
sequence->flags |= SETQ_FLAG_CONSTRAINED_PARAMETERS;
sequence->flags |= SEQ_FLAG_CONSTRAINED_PARAMETERS;
mpeg2dec->copy_matrix = 3;
if (buffer[7] & 2) {
@ -192,7 +192,7 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
sequence->transfer_characteristics = 0;
sequence->matrix_coefficients = 0;
mpeg2dec->ext_state = SETQ_EXT;
mpeg2dec->ext_state = SEQ_EXT;
mpeg2dec->state = STATE_SEQUENCE;
mpeg2dec->display_offset_x = mpeg2dec->display_offset_y = 0;
@ -216,13 +216,13 @@ static int sequence_ext (mpeg2dec_t * mpeg2dec)
(buffer[2] << 7) & 0x3000;
sequence->width = (sequence->picture_width + 15) & ~15;
sequence->height = (sequence->picture_height + 15) & ~15;
flags = sequence->flags | SETQ_FLAG_MPEG2;
flags = sequence->flags | SEQ_FLAG_MPEG2;
if (!(buffer[1] & 8)) {
flags &= ~SETQ_FLAG_PROGRESSIVE_SEQUENCE;
flags &= ~SEQ_FLAG_PROGRESSIVE_SEQUENCE;
sequence->height = (sequence->height + 31) & ~31;
}
if (buffer[5] & 0x80)
flags |= SETQ_FLAG_LOW_DELAY;
flags |= SEQ_FLAG_LOW_DELAY;
sequence->flags = flags;
sequence->chroma_width = sequence->width;
sequence->chroma_height = sequence->height;
@ -242,7 +242,7 @@ static int sequence_ext (mpeg2dec_t * mpeg2dec)
sequence->frame_period =
sequence->frame_period * ((buffer[5]&31)+1) / (((buffer[5]>>2)&3)+1);
mpeg2dec->ext_state = SETQ_DISPLAY_EXT;
mpeg2dec->ext_state = SEQ_DISPLAY_EXT;
return 0;
}
@ -253,10 +253,10 @@ static int sequence_display_ext (mpeg2dec_t * mpeg2dec)
mpeg2_sequence_t * sequence = &(mpeg2dec->new_sequence);
uint32_t flags;
flags = ((sequence->flags & ~SETQ_MASK_VIDEO_FORMAT) |
((buffer[0]<<4) & SETQ_MASK_VIDEO_FORMAT));
flags = ((sequence->flags & ~SEQ_MASK_VIDEO_FORMAT) |
((buffer[0]<<4) & SEQ_MASK_VIDEO_FORMAT));
if (buffer[0] & 1) {
flags |= SETQ_FLAG_COLOUR_DESCRIPTION;
flags |= SEQ_FLAG_COLOUR_DESCRIPTION;
sequence->colour_primaries = buffer[1];
sequence->transfer_characteristics = buffer[2];
sequence->matrix_coefficients = buffer[3];
@ -280,7 +280,7 @@ static inline void finalize_sequence (mpeg2_sequence_t * sequence)
sequence->byte_rate *= 50;
if (sequence->flags & SETQ_FLAG_MPEG2) {
if (sequence->flags & SEQ_FLAG_MPEG2) {
switch (sequence->pixel_width) {
case 1: /* square pixels */
sequence->pixel_width = sequence->pixel_height = 1; return;
@ -376,7 +376,7 @@ void mpeg2_header_sequence_finalize (mpeg2dec_t * mpeg2dec)
finalize_sequence (sequence);
finalize_matrix (mpeg2dec);
decoder->mpeg1 = !(sequence->flags & SETQ_FLAG_MPEG2);
decoder->mpeg1 = !(sequence->flags & SEQ_FLAG_MPEG2);
decoder->width = sequence->width;
decoder->height = sequence->height;
decoder->vertical_position_extension = (sequence->picture_height > 2800);
@ -451,7 +451,7 @@ void mpeg2_set_fbuf (mpeg2dec_t * mpeg2dec, int b_type)
mpeg2dec->fbuf[2] != &mpeg2dec->fbuf_alloc[i].fbuf) {
mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[i].fbuf;
mpeg2dec->info.current_fbuf = mpeg2dec->fbuf[0];
if (b_type || (mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY)) {
if (b_type || (mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY)) {
if (b_type || mpeg2dec->convert)
mpeg2dec->info.discard_fbuf = mpeg2dec->fbuf[0];
mpeg2dec->info.display_fbuf = mpeg2dec->fbuf[0];
@ -549,7 +549,7 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
picture->nb_fields = 1;
break;
case FRAME_PICTURE:
if (!(mpeg2dec->sequence.flags & SETQ_FLAG_PROGRESSIVE_SEQUENCE)) {
if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
} else
@ -582,7 +582,7 @@ static int picture_display_ext (mpeg2dec_t * mpeg2dec)
int i, nb_pos;
nb_pos = picture->nb_fields;
if (mpeg2dec->sequence.flags & SETQ_FLAG_PROGRESSIVE_SEQUENCE)
if (mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)
nb_pos >>= 1;
for (i = 0; i < nb_pos; i++) {
@ -608,7 +608,7 @@ void mpeg2_header_picture_finalize (mpeg2dec_t * mpeg2dec, uint32_t accels)
{
mpeg2_decoder_t * decoder = &(mpeg2dec->decoder);
int old_type_b = (decoder->coding_type == B_TYPE);
int low_delay = mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY;
int low_delay = mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY;
finalize_matrix (mpeg2dec);
decoder->coding_type = mpeg2dec->new_picture.flags & PIC_MASK_CODING_TYPE;
@ -878,7 +878,7 @@ mpeg2_state_t mpeg2_header_end (mpeg2dec_t * mpeg2dec)
picture = mpeg2dec->pictures + 2;
mpeg2_reset_info (&(mpeg2dec->info));
if (!(mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY)) {
if (!(mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY)) {
mpeg2dec->info.display_picture = picture;
if (picture->nb_fields == 1)
mpeg2dec->info.display_picture_2nd = picture + 1;

@ -27,19 +27,19 @@
#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 0) /* 0.4.0 */
#define SETQ_FLAG_MPEG2 1
#define SETQ_FLAG_CONSTRAINED_PARAMETERS 2
#define SETQ_FLAG_PROGRESSIVE_SEQUENCE 4
#define SETQ_FLAG_LOW_DELAY 8
#define SETQ_FLAG_COLOUR_DESCRIPTION 16
#define SETQ_MASK_VIDEO_FORMAT 0xe0
#define SETQ_VIDEO_FORMAT_COMPONENT 0
#define SETQ_VIDEO_FORMAT_PAL 0x20
#define SETQ_VIDEO_FORMAT_NTSC 0x40
#define SETQ_VIDEO_FORMAT_SECAM 0x60
#define SETQ_VIDEO_FORMAT_MAC 0x80
#define SETQ_VIDEO_FORMAT_UNSPECIFIED 0xa0
#define SEQ_FLAG_MPEG2 1
#define SEQ_FLAG_CONSTRAINED_PARAMETERS 2
#define SEQ_FLAG_PROGRESSIVE_SEQUENCE 4
#define SEQ_FLAG_LOW_DELAY 8
#define SEQ_FLAG_COLOUR_DESCRIPTION 16
#define SEQ_MASK_VIDEO_FORMAT 0xe0
#define SEQ_VIDEO_FORMAT_COMPONENT 0
#define SEQ_VIDEO_FORMAT_PAL 0x20
#define SEQ_VIDEO_FORMAT_NTSC 0x40
#define SEQ_VIDEO_FORMAT_SECAM 0x60
#define SEQ_VIDEO_FORMAT_MAC 0x80
#define SEQ_VIDEO_FORMAT_UNSPECIFIED 0xa0
typedef struct mpeg2_sequence_s {
unsigned int width, height;

Loading…
Cancel
Save