Fix inadvertent "TQ" changes.

pull/1/head
Darrell Anderson 13 years ago
parent 01a7e73916
commit 7ed1aeef02

@ -35,7 +35,7 @@
#define SETQ_EXT 2 #define SETQ_EXT 2
#define SETQ_DISPLAY_EXT 4 #define SETQ_DISPLAY_EXT 4
#define TQUANT_MATRIX_EXT 8 #define QUANT_MATRIX_EXT 8
#define COPYRIGHT_EXT 0x10 #define COPYRIGHT_EXT 0x10
#define PIC_DISPLAY_EXT 0x80 #define PIC_DISPLAY_EXT 0x80
#define PIC_CODING_EXT 0x100 #define PIC_CODING_EXT 0x100
@ -570,7 +570,7 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
PIC_MASK_COMPOSITE_DISPLAY) | PIC_FLAG_COMPOSITE_DISPLAY; PIC_MASK_COMPOSITE_DISPLAY) | PIC_FLAG_COMPOSITE_DISPLAY;
picture->flags = flags; picture->flags = flags;
mpeg2dec->ext_state = PIC_DISPLAY_EXT | COPYRIGHT_EXT | TQUANT_MATRIX_EXT; mpeg2dec->ext_state = PIC_DISPLAY_EXT | COPYRIGHT_EXT | QUANT_MATRIX_EXT;
return 0; return 0;
} }

@ -26,7 +26,7 @@
#define MACROBLOCK_PATTERN 2 #define MACROBLOCK_PATTERN 2
#define MACROBLOCK_MOTION_BACKWARD 4 #define MACROBLOCK_MOTION_BACKWARD 4
#define MACROBLOCK_MOTION_FORWARD 8 #define MACROBLOCK_MOTION_FORWARD 8
#define MACROBLOCK_TQUANT 16 #define MACROBLOCK_QUANT 16
#define DCT_TYPE_INTERLACED 32 #define DCT_TYPE_INTERLACED 32
/* motion_type */ /* motion_type */
#define MOTION_TYPE_SHIFT 6 #define MOTION_TYPE_SHIFT 6

@ -1797,8 +1797,8 @@ void mpeg2_slice (mpeg2_decoder_t * const decoder, const int code,
macroblock_modes = get_macroblock_modes (decoder); macroblock_modes = get_macroblock_modes (decoder);
/* maybe integrate MACROBLOCK_TQUANT test into get_macroblock_modes ? */ /* maybe integrate MACROBLOCK_QUANT test into get_macroblock_modes ? */
if (macroblock_modes & MACROBLOCK_TQUANT) if (macroblock_modes & MACROBLOCK_QUANT)
get_quantizer_scale (decoder); get_quantizer_scale (decoder);
if (macroblock_modes & MACROBLOCK_INTRA) { if (macroblock_modes & MACROBLOCK_INTRA) {

@ -96,17 +96,17 @@ typedef struct {
#define INTRA MACROBLOCK_INTRA #define INTRA MACROBLOCK_INTRA
#define TQUANT MACROBLOCK_TQUANT #define QUANT MACROBLOCK_QUANT
static const MBtab MB_I [] = { static const MBtab MB_I [] = {
{INTRA|TQUANT, 2}, {INTRA, 1} {INTRA|QUANT, 2}, {INTRA, 1}
}; };
#define MC MACROBLOCK_MOTION_FORWARD #define MC MACROBLOCK_MOTION_FORWARD
#define CODED MACROBLOCK_PATTERN #define CODED MACROBLOCK_PATTERN
static const MBtab MB_P [] = { static const MBtab MB_P [] = {
{INTRA|TQUANT, 6}, {CODED|TQUANT, 5}, {MC|CODED|TQUANT, 5}, {INTRA, 5}, {INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5},
{MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
@ -121,9 +121,9 @@ static const MBtab MB_P [] = {
#define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD #define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD
static const MBtab MB_B [] = { static const MBtab MB_B [] = {
{0, 0}, {INTRA|TQUANT, 6}, {0, 0}, {INTRA|QUANT, 6},
{BWD|CODED|TQUANT, 6}, {FWD|CODED|TQUANT, 6}, {BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
{INTER|CODED|TQUANT, 5}, {INTER|CODED|TQUANT, 5}, {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
{INTRA, 5}, {INTRA, 5}, {INTRA, 5}, {INTRA, 5},
{FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4},
{FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4},
@ -142,7 +142,7 @@ static const MBtab MB_B [] = {
}; };
#undef INTRA #undef INTRA
#undef TQUANT #undef QUANT
#undef MC #undef MC
#undef CODED #undef CODED
#undef FWD #undef FWD

@ -4,7 +4,7 @@
#define MACROBLOCK_PATTERN 2 #define MACROBLOCK_PATTERN 2
#define MACROBLOCK_MOTION_BACKWARD 4 #define MACROBLOCK_MOTION_BACKWARD 4
#define MACROBLOCK_MOTION_FORWARD 8 #define MACROBLOCK_MOTION_FORWARD 8
#define MACROBLOCK_TQUANT 16 #define MACROBLOCK_QUANT 16
#define DCT_TYPE_INTERLACED 32 #define DCT_TYPE_INTERLACED 32
/* motion_type */ /* motion_type */
@ -68,17 +68,17 @@ typedef struct {
#define INTRA MACROBLOCK_INTRA #define INTRA MACROBLOCK_INTRA
#define TQUANT MACROBLOCK_TQUANT #define QUANT MACROBLOCK_QUANT
static const MBtab MB_I [] = { static const MBtab MB_I [] = {
{INTRA|TQUANT, 2}, {INTRA, 1} {INTRA|QUANT, 2}, {INTRA, 1}
}; };
#define MC MACROBLOCK_MOTION_FORWARD #define MC MACROBLOCK_MOTION_FORWARD
#define CODED MACROBLOCK_PATTERN #define CODED MACROBLOCK_PATTERN
static const MBtab MB_P [] = { static const MBtab MB_P [] = {
{INTRA|TQUANT, 6}, {CODED|TQUANT, 5}, {MC|CODED|TQUANT, 5}, {INTRA, 5}, {INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5},
{MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
@ -93,9 +93,9 @@ static const MBtab MB_P [] = {
#define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD #define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD
static const MBtab MB_B [] = { static const MBtab MB_B [] = {
{0, 0}, {INTRA|TQUANT, 6}, {0, 0}, {INTRA|QUANT, 6},
{BWD|CODED|TQUANT, 6}, {FWD|CODED|TQUANT, 6}, {BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
{INTER|CODED|TQUANT, 5}, {INTER|CODED|TQUANT, 5}, {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
{INTRA, 5}, {INTRA, 5}, {INTRA, 5}, {INTRA, 5},
{FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4},
{FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4},
@ -114,7 +114,7 @@ static const MBtab MB_B [] = {
}; };
#undef INTRA #undef INTRA
#undef TQUANT #undef QUANT
#undef MC #undef MC
#undef CODED #undef CODED
#undef FWD #undef FWD

@ -1709,7 +1709,7 @@ void k9requant::mpeg2_slice ( const int code )
const MBAtab * mba; const MBAtab * mba;
macroblock_modes = get_macroblock_modes (); macroblock_modes = get_macroblock_modes ();
if (macroblock_modes & MACROBLOCK_TQUANT) quantizer_scale = get_quantizer_scale (); if (macroblock_modes & MACROBLOCK_QUANT) quantizer_scale = get_quantizer_scale ();
if (macroblock_modes & MACROBLOCK_INTRA) if (macroblock_modes & MACROBLOCK_INTRA)
{ {
@ -1719,12 +1719,12 @@ void k9requant::mpeg2_slice ( const int code )
#endif #endif
new_quantizer_scale = getNewQuant(quantizer_scale, 1); new_quantizer_scale = getNewQuant(quantizer_scale, 1);
if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_TQUANT if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_QUANT
else macroblock_modes |= MACROBLOCK_TQUANT; //add MACROBLOCK_TQUANT else macroblock_modes |= MACROBLOCK_QUANT; //add MACROBLOCK_QUANT
putaddrinc(mb_add + mb_skip); mb_skip = 0; putaddrinc(mb_add + mb_skip); mb_skip = 0;
putmbdata(macroblock_modes); putmbdata(macroblock_modes);
if (macroblock_modes & MACROBLOCK_TQUANT) put_quantiser(new_quantizer_scale); if (macroblock_modes & MACROBLOCK_QUANT) put_quantiser(new_quantizer_scale);
if (concealment_motion_vectors) if (concealment_motion_vectors)
{ {
@ -1825,7 +1825,7 @@ void k9requant::mpeg2_slice ( const int code )
#endif #endif
if (!new_coded_block_pattern) if (!new_coded_block_pattern)
{ {
macroblock_modes &= 0xFFFFFFED; // remove MACROBLOCK_PATTERN and MACROBLOCK_TQUANT flag macroblock_modes &= 0xFFFFFFED; // remove MACROBLOCK_PATTERN and MACROBLOCK_QUANT flag
if ( (picture_coding_type == P_TYPE) if ( (picture_coding_type == P_TYPE)
&& !(macroblock_modes & MACROBLOCK_MOTION_FORWARD)) && !(macroblock_modes & MACROBLOCK_MOTION_FORWARD))
{ {
@ -1855,13 +1855,13 @@ void k9requant::mpeg2_slice ( const int code )
} }
} }
if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_TQUANT if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_QUANT
else if (macroblock_modes & MACROBLOCK_PATTERN) macroblock_modes |= MACROBLOCK_TQUANT; //add MACROBLOCK_TQUANT else if (macroblock_modes & MACROBLOCK_PATTERN) macroblock_modes |= MACROBLOCK_QUANT; //add MACROBLOCK_QUANT
assert( (macroblock_modes & MACROBLOCK_PATTERN) || !(macroblock_modes & MACROBLOCK_TQUANT) ); assert( (macroblock_modes & MACROBLOCK_PATTERN) || !(macroblock_modes & MACROBLOCK_QUANT) );
putaddrinc(mb_add + mb_skip); mb_skip = 0; putaddrinc(mb_add + mb_skip); mb_skip = 0;
putmbdata(macroblock_modes); putmbdata(macroblock_modes);
if (macroblock_modes & MACROBLOCK_TQUANT) put_quantiser(new_quantizer_scale); if (macroblock_modes & MACROBLOCK_QUANT) put_quantiser(new_quantizer_scale);
// put saved motion data... // put saved motion data...
for (batb = 0; batb < (n_wbuf - n_owbuf); batb++) putbits(n_owbuf[batb], 8); for (batb = 0; batb < (n_wbuf - n_owbuf); batb++) putbits(n_owbuf[batb], 8);

@ -9,8 +9,8 @@
// Copyright: See COPYING file that comes with this distribution // Copyright: See COPYING file that comes with this distribution
// //
// //
#ifndef K9RETQUANT_H #ifndef K9REQUANT_H
#define K9RETQUANT_H #define K9REQUANT_H
#include "k9common.h" #include "k9common.h"

@ -1,8 +1,8 @@
#include <tqbuffer.h> #include <tqbuffer.h>
#include "k9fifo.h" #include "k9fifo.h"
#ifndef K9RETQUANT2_H #ifndef K9REQUANT2_H
#define K9RETQUANT2_H #define K9REQUANT2_H
class k9Requant2 class k9Requant2

Loading…
Cancel
Save