Fix inadvertent "TQ" changes.

(cherry picked from commit 7ed1aeef02)
v3.5.13-sru
Darrell Anderson 13 years ago committed by Slávek Banko
parent e04c34614c
commit 2d89a38c08

@ -35,7 +35,7 @@
#define SETQ_EXT 2
#define SETQ_DISPLAY_EXT 4
#define TQUANT_MATRIX_EXT 8
#define QUANT_MATRIX_EXT 8
#define COPYRIGHT_EXT 0x10
#define PIC_DISPLAY_EXT 0x80
#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;
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;
}

@ -26,7 +26,7 @@
#define MACROBLOCK_PATTERN 2
#define MACROBLOCK_MOTION_BACKWARD 4
#define MACROBLOCK_MOTION_FORWARD 8
#define MACROBLOCK_TQUANT 16
#define MACROBLOCK_QUANT 16
#define DCT_TYPE_INTERLACED 32
/* motion_type */
#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);
/* maybe integrate MACROBLOCK_TQUANT test into get_macroblock_modes ? */
if (macroblock_modes & MACROBLOCK_TQUANT)
/* maybe integrate MACROBLOCK_QUANT test into get_macroblock_modes ? */
if (macroblock_modes & MACROBLOCK_QUANT)
get_quantizer_scale (decoder);
if (macroblock_modes & MACROBLOCK_INTRA) {

@ -96,17 +96,17 @@ typedef struct {
#define INTRA MACROBLOCK_INTRA
#define TQUANT MACROBLOCK_TQUANT
#define QUANT MACROBLOCK_QUANT
static const MBtab MB_I [] = {
{INTRA|TQUANT, 2}, {INTRA, 1}
{INTRA|QUANT, 2}, {INTRA, 1}
};
#define MC MACROBLOCK_MOTION_FORWARD
#define CODED MACROBLOCK_PATTERN
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},
{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
static const MBtab MB_B [] = {
{0, 0}, {INTRA|TQUANT, 6},
{BWD|CODED|TQUANT, 6}, {FWD|CODED|TQUANT, 6},
{INTER|CODED|TQUANT, 5}, {INTER|CODED|TQUANT, 5},
{0, 0}, {INTRA|QUANT, 6},
{BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
{INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
{INTRA, 5}, {INTRA, 5},
{FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 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 TQUANT
#undef QUANT
#undef MC
#undef CODED
#undef FWD

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

@ -1709,7 +1709,7 @@ void k9requant::mpeg2_slice ( const int code )
const MBAtab * mba;
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)
{
@ -1719,12 +1719,12 @@ void k9requant::mpeg2_slice ( const int code )
#endif
new_quantizer_scale = getNewQuant(quantizer_scale, 1);
if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_TQUANT
else macroblock_modes |= MACROBLOCK_TQUANT; //add MACROBLOCK_TQUANT
if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_QUANT
else macroblock_modes |= MACROBLOCK_QUANT; //add MACROBLOCK_QUANT
putaddrinc(mb_add + mb_skip); mb_skip = 0;
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)
{
@ -1825,7 +1825,7 @@ void k9requant::mpeg2_slice ( const int code )
#endif
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)
&& !(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
else if (macroblock_modes & MACROBLOCK_PATTERN) macroblock_modes |= MACROBLOCK_TQUANT; //add MACROBLOCK_TQUANT
assert( (macroblock_modes & MACROBLOCK_PATTERN) || !(macroblock_modes & MACROBLOCK_TQUANT) );
if (last_coded_scale == new_quantizer_scale) macroblock_modes &= 0xFFFFFFEF; // remove MACROBLOCK_QUANT
else if (macroblock_modes & MACROBLOCK_PATTERN) macroblock_modes |= MACROBLOCK_QUANT; //add MACROBLOCK_QUANT
assert( (macroblock_modes & MACROBLOCK_PATTERN) || !(macroblock_modes & MACROBLOCK_QUANT) );
putaddrinc(mb_add + mb_skip); mb_skip = 0;
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...
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
//
//
#ifndef K9RETQUANT_H
#define K9RETQUANT_H
#ifndef K9REQUANT_H
#define K9REQUANT_H
#include "k9common.h"

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

Loading…
Cancel
Save