summaryrefslogtreecommitdiffstats
path: root/k9decmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'k9decmpeg')
-rwxr-xr-xk9decmpeg/cpu_accel.cpp2
-rwxr-xr-xk9decmpeg/header.cpp44
-rwxr-xr-xk9decmpeg/idct_alpha.cpp30
-rw-r--r--k9decmpeg/k9decodethread.h12
-rw-r--r--k9decmpeg/k9plaympeg2.cpp24
-rw-r--r--k9decmpeg/k9plaympeg2.h19
-rwxr-xr-xk9decmpeg/kdecmpeg2.cpp14
-rwxr-xr-xk9decmpeg/kdecmpeg2.h33
-rwxr-xr-xk9decmpeg/mmx.h2
-rwxr-xr-xk9decmpeg/motion_comp_mmx.cpp24
-rwxr-xr-xk9decmpeg/motion_comp_vis.cpp6
-rwxr-xr-xk9decmpeg/mpeg2.h26
-rwxr-xr-xk9decmpeg/mpeg2_internal.h2
-rwxr-xr-xk9decmpeg/rgb_mmx.cpp12
-rwxr-xr-xk9decmpeg/slice.cpp4
-rwxr-xr-xk9decmpeg/vlc.h14
16 files changed, 135 insertions, 133 deletions
diff --git a/k9decmpeg/cpu_accel.cpp b/k9decmpeg/cpu_accel.cpp
index 9589868..6af9558 100755
--- a/k9decmpeg/cpu_accel.cpp
+++ b/k9decmpeg/cpu_accel.cpp
@@ -197,7 +197,7 @@ static inline uint32_t arch_accel (void)
{
uint64_t no_mvi;
- asm volatile ("amask %1, %0"
+ asm volatile ("atqmask %1, %0"
: "=r" (no_mvi)
: "rI" (256)); /* AMASK_MVI */
return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA |
diff --git a/k9decmpeg/header.cpp b/k9decmpeg/header.cpp
index 21c347d..e3757c1 100755
--- a/k9decmpeg/header.cpp
+++ b/k9decmpeg/header.cpp
@@ -33,9 +33,9 @@
#include "attributes.h"
#include "mpeg2_internal.h"
-#define SEQ_EXT 2
-#define SEQ_DISPLAY_EXT 4
-#define QUANT_MATRIX_EXT 8
+#define SETQ_EXT 2
+#define SETQ_DISPLAY_EXT 4
+#define TQUANT_MATRIX_EXT 8
#define COPYRIGHT_EXT 0x10
#define PIC_DISPLAY_EXT 0x80
#define PIC_CODING_EXT 0x100
@@ -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 = (SEQ_FLAG_PROGRESSIVE_SEQUENCE |
- SEQ_VIDEO_FORMAT_UNSPECIFIED);
+ sequence->flags = (SETQ_FLAG_PROGRESSIVE_SEQUENCE |
+ SETQ_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 |= SEQ_FLAG_CONSTRAINED_PARAMETERS;
+ sequence->flags |= SETQ_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 = SEQ_EXT;
+ mpeg2dec->ext_state = SETQ_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 | SEQ_FLAG_MPEG2;
+ flags = sequence->flags | SETQ_FLAG_MPEG2;
if (!(buffer[1] & 8)) {
- flags &= ~SEQ_FLAG_PROGRESSIVE_SEQUENCE;
+ flags &= ~SETQ_FLAG_PROGRESSIVE_SEQUENCE;
sequence->height = (sequence->height + 31) & ~31;
}
if (buffer[5] & 0x80)
- flags |= SEQ_FLAG_LOW_DELAY;
+ flags |= SETQ_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 = SEQ_DISPLAY_EXT;
+ mpeg2dec->ext_state = SETQ_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 & ~SEQ_MASK_VIDEO_FORMAT) |
- ((buffer[0]<<4) & SEQ_MASK_VIDEO_FORMAT));
+ flags = ((sequence->flags & ~SETQ_MASK_VIDEO_FORMAT) |
+ ((buffer[0]<<4) & SETQ_MASK_VIDEO_FORMAT));
if (buffer[0] & 1) {
- flags |= SEQ_FLAG_COLOUR_DESCRIPTION;
+ flags |= SETQ_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 & SEQ_FLAG_MPEG2) {
+ if (sequence->flags & SETQ_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 & SEQ_FLAG_MPEG2);
+ decoder->mpeg1 = !(sequence->flags & SETQ_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 & SEQ_FLAG_LOW_DELAY)) {
+ if (b_type || (mpeg2dec->sequence.flags & SETQ_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 & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
+ if (!(mpeg2dec->sequence.flags & SETQ_FLAG_PROGRESSIVE_SEQUENCE)) {
picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
} else
@@ -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 | QUANT_MATRIX_EXT;
+ mpeg2dec->ext_state = PIC_DISPLAY_EXT | COPYRIGHT_EXT | TQUANT_MATRIX_EXT;
return 0;
}
@@ -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 & SEQ_FLAG_PROGRESSIVE_SEQUENCE)
+ if (mpeg2dec->sequence.flags & SETQ_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 & SEQ_FLAG_LOW_DELAY;
+ int low_delay = mpeg2dec->sequence.flags & SETQ_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 & SEQ_FLAG_LOW_DELAY)) {
+ if (!(mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY)) {
mpeg2dec->info.display_picture = picture;
if (picture->nb_fields == 1)
mpeg2dec->info.display_picture_2nd = picture + 1;
diff --git a/k9decmpeg/idct_alpha.cpp b/k9decmpeg/idct_alpha.cpp
index 4f1e88f..7105089 100755
--- a/k9decmpeg/idct_alpha.cpp
+++ b/k9decmpeg/idct_alpha.cpp
@@ -158,7 +158,7 @@ static void inline idct_col (int16_t * const block)
void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
{
- uint64_t clampmask;
+ uint64_t clamptqmask;
int i;
for (i = 0; i < 8; i++)
@@ -167,18 +167,18 @@ void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
for (i = 0; i < 8; i++)
idct_col (block + i);
- clampmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
+ clamptqmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
do {
uint64_t shorts0, shorts1;
shorts0 = ldq (block);
shorts0 = maxsw4 (shorts0, 0);
- shorts0 = minsw4 (shorts0, clampmask);
+ shorts0 = minsw4 (shorts0, clamptqmask);
stl (pkwb (shorts0), dest);
shorts1 = ldq (block + 4);
shorts1 = maxsw4 (shorts1, 0);
- shorts1 = minsw4 (shorts1, clampmask);
+ shorts1 = minsw4 (shorts1, clamptqmask);
stl (pkwb (shorts1), dest + 4);
stq (0, block);
@@ -192,8 +192,8 @@ void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
void mpeg2_idct_add_mvi (const int last, int16_t * block,
uint8_t * dest, const int stride)
{
- uint64_t clampmask;
- uint64_t signmask;
+ uint64_t clamptqmask;
+ uint64_t signtqmask;
int i;
if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) {
@@ -201,9 +201,9 @@ void mpeg2_idct_add_mvi (const int last, int16_t * block,
idct_row (block + 8 * i);
for (i = 0; i < 8; i++)
idct_col (block + i);
- clampmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
- signmask = zap (-1, 0x33);
- signmask ^= signmask >> 1; /* 0x8000800080008000 */
+ clamptqmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
+ signtqmask = zap (-1, 0x33);
+ signtqmask ^= signtqmask >> 1; /* 0x8000800080008000 */
do {
uint64_t shorts0, pix0, signs0;
@@ -214,22 +214,22 @@ void mpeg2_idct_add_mvi (const int last, int16_t * block,
pix0 = unpkbw (ldl (dest));
/* signed subword add (MMX paddw). */
- signs0 = shorts0 & signmask;
- shorts0 &= ~signmask;
+ signs0 = shorts0 & signtqmask;
+ shorts0 &= ~signtqmask;
shorts0 += pix0;
shorts0 ^= signs0;
/* clamp. */
shorts0 = maxsw4 (shorts0, 0);
- shorts0 = minsw4 (shorts0, clampmask);
+ shorts0 = minsw4 (shorts0, clamptqmask);
/* next 4. */
pix1 = unpkbw (ldl (dest + 4));
- signs1 = shorts1 & signmask;
- shorts1 &= ~signmask;
+ signs1 = shorts1 & signtqmask;
+ shorts1 &= ~signtqmask;
shorts1 += pix1;
shorts1 ^= signs1;
shorts1 = maxsw4 (shorts1, 0);
- shorts1 = minsw4 (shorts1, clampmask);
+ shorts1 = minsw4 (shorts1, clamptqmask);
stl (pkwb (shorts0), dest);
stl (pkwb (shorts1), dest + 4);
diff --git a/k9decmpeg/k9decodethread.h b/k9decmpeg/k9decodethread.h
index b98abb5..1ce1ceb 100644
--- a/k9decmpeg/k9decodethread.h
+++ b/k9decmpeg/k9decodethread.h
@@ -14,22 +14,22 @@
#include "k9common.h"
#include "k9vamps.h"
-#include <qthread.h>
-#include <qobject.h>
-#include <qwaitcondition.h>
+#include <tqthread.h>
+#include <tqobject.h>
+#include <tqwaitcondition.h>
#include "kdecmpeg2.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
-class k9DecodeThread : public QThread
+class k9DecodeThread : public TQThread
{
private:
kDecMPEG2 *m_decoder;
k9fifo m_fifo;
- QWaitCondition wDataRead;
- QWaitCondition wDataReady;
+ TQWaitCondition wDataRead;
+ TQWaitCondition wDataReady;
bool noData;
public:
diff --git a/k9decmpeg/k9plaympeg2.cpp b/k9decmpeg/k9plaympeg2.cpp
index cc304a6..f5ff3d7 100644
--- a/k9decmpeg/k9plaympeg2.cpp
+++ b/k9decmpeg/k9plaympeg2.cpp
@@ -14,7 +14,7 @@
#include "dvdnav.h"
#include <klocale.h>
-#include <qapplication.h>
+#include <tqapplication.h>
k9PlayMPEG2::k9PlayMPEG2()
{
@@ -55,7 +55,7 @@ void k9PlayMPEG2::playTitle() {
/* set read ahead cache usage */
if (dvdnav_set_readahead_flag(dvdnav, DVD_READ_CACHE) != DVDNAV_STATUS_OK) {
- setError(QString("ERR:Error on dvdnav_set_readahead_flag: %1\n").arg(dvdnav_err_to_string(dvdnav)));
+ setError(TQString("ERR:Error on dvdnav_set_readahead_flag: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return;
}
@@ -63,14 +63,14 @@ void k9PlayMPEG2::playTitle() {
if (dvdnav_menu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK ||
dvdnav_audio_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK ||
dvdnav_spu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK) {
- setError(QString("ERR:Error on setting languages: %1\n").arg(dvdnav_err_to_string(dvdnav)));
+ setError(TQString("ERR:Error on setting languages: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return ;
}
/* set the PGC positioning flag to have position information relatively to the
* whole feature instead of just relatively to the current chapter */
if (dvdnav_set_PGC_positioning_flag(dvdnav, 1) != DVDNAV_STATUS_OK) {
- setError(QString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").arg(dvdnav_err_to_string(dvdnav)));
+ setError(TQString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return ;
}
@@ -84,7 +84,7 @@ void k9PlayMPEG2::playTitle() {
/* the read loop which regularly calls dvdnav_get_next_block
* and handles the returned events */
- while (!finished && !m_stopped && qApp!=NULL) {
+ while (!finished && !m_stopped && tqApp!=NULL) {
int result, event, len;
uint8_t *buf = mem;
@@ -105,7 +105,7 @@ void k9PlayMPEG2::playTitle() {
if (result == DVDNAV_STATUS_ERR) {
- setError(QString("ERR:Error getting next block: %1\n").arg(dvdnav_err_to_string(dvdnav)));
+ setError(TQString("ERR:Error getting next block: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return;
}
@@ -121,9 +121,9 @@ void k9PlayMPEG2::playTitle() {
if (finished==0 && buf[17]==0xE0) {
m_decoder.addData( buf,len);
}
- if (qApp->tryLock()) {
+ if (tqApp->tryLock()) {
emit setPosition( pos);
- qApp->unlock();
+ tqApp->unlock();
}
@@ -237,12 +237,12 @@ kDecMPEG2 *k9PlayMPEG2::getDecoder() {
return m_decoder.getDecoder() ;
}
-void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter=0) {
+void k9PlayMPEG2::open (dvd_reader_t *dvd,const TQString & device,k9DVDTitle * title,int chapter=0) {
m_dvd=dvd;
m_chapter=chapter;
int ret = 0;
struct stat dvd_stat;
- QString c;
+ TQString c;
m_idxLect=0xFFFFFFFF;
stop();
@@ -254,7 +254,7 @@ void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * ti
m_lastSector=0;
ret = stat(device.utf8(), &dvd_stat);
/* if ( ret < 0 ) {
- c=i18n("Can't find device %1\n").arg(device.latin1());
+ c=i18n("Can't find device %1\n").tqarg(device.latin1());
setError(c);
return;
}
@@ -268,7 +268,7 @@ void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * ti
emit setMax( m_lastSector);
emit setMin( m_startSector);
- m_decoder.start(QThread::LowPriority);
+ m_decoder.start(TQThread::LowPriority);
start();
}
diff --git a/k9decmpeg/k9plaympeg2.h b/k9decmpeg/k9plaympeg2.h
index 2b431e8..28a2f19 100644
--- a/k9decmpeg/k9plaympeg2.h
+++ b/k9decmpeg/k9plaympeg2.h
@@ -16,32 +16,33 @@
#include "k9dvdtitle.h"
-#include <qthread.h>
-#include <qobject.h>
-#include <qmutex.h>
-#include <qwidget.h>
+#include <tqthread.h>
+#include <tqobject.h>
+#include <tqmutex.h>
+#include <tqwidget.h>
#include "k9decodethread.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
-class k9PlayMPEG2 : public QObject,public QThread
+class k9PlayMPEG2 : public TQObject,public TQThread
{
Q_OBJECT
+ TQ_OBJECT
private:
k9DVDTitle *m_title;
- QString m_device;
+ TQString m_device;
k9DecodeThread m_decoder;
uint32_t m_idxLect;
uint32_t m_startSector;
uint32_t m_lastSector;
bool m_stopped;
dvd_file_t *dvdfile;
- QMutex mutex;
+ TQMutex mutex;
dvd_reader_t *m_dvd;
int m_chapter;
public:
k9PlayMPEG2();
- void open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter);
+ void open (dvd_reader_t *dvd,const TQString & device,k9DVDTitle * title,int chapter);
kDecMPEG2 *getDecoder();
void setDvd(dvd_reader_t* _value) { m_dvd = _value;}
dvd_reader_t* getDvd() const {return m_dvd;}
@@ -59,7 +60,7 @@ signals:
void setMin(uint32_t _sector);
void setMax(uint32_t _sector);
- void setError(const QString & err);
+ void setError(const TQString & err);
};
diff --git a/k9decmpeg/kdecmpeg2.cpp b/k9decmpeg/kdecmpeg2.cpp
index 80c1774..15b487e 100755
--- a/k9decmpeg/kdecmpeg2.cpp
+++ b/k9decmpeg/kdecmpeg2.cpp
@@ -21,14 +21,14 @@
#include "kdecmpeg2.h"
#include "mpeg2.h"
#include "mpeg2convert.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qapplication.h>
-#include <qcstring.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
+#include <tqcstring.h>
#include "k9decodethread.h"
-void k9DisplayThread::setImage( QImage _image) {
+void k9DisplayThread::setImage( TQImage _image) {
if (m_mutex.tryLock()) {
m_image=_image;
m_raw=FALSE;
@@ -50,7 +50,7 @@ void k9DisplayThread::setRawImage(uchar *_buffer,int _width,int _height,int size
}
void k9DisplayThread::run() {
- if (qApp==NULL)
+ if (tqApp==NULL)
return;
if (m_raw) {
m_dec->drawRaw( m_buffer,m_width,m_height,m_size);
diff --git a/k9decmpeg/kdecmpeg2.h b/k9decmpeg/kdecmpeg2.h
index 525aa27..4476231 100755
--- a/k9decmpeg/kdecmpeg2.h
+++ b/k9decmpeg/kdecmpeg2.h
@@ -24,31 +24,31 @@
#include "mpeg2.h"
#include <stdio.h>
#include <stdlib.h>
-#include <qimage.h>
+#include <tqimage.h>
#include "ac.h"
-#include <qmutex.h>
-#include <qwidget.h>
-#include <qobject.h>
-#include <qthread.h>
-#include <qdatetime.h>
+#include <tqmutex.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqdatetime.h>
/**
*@author
*/
class kDecMPEG2;
-class k9DisplayThread:public QThread {
+class k9DisplayThread:public TQThread {
public:
k9DisplayThread(kDecMPEG2 *_dec) {m_dec=_dec;}
- void setImage(QImage _image);
+ void setImage(TQImage _image);
void setRawImage(uchar *_buffer,int _width,int _height,int size);
protected:
kDecMPEG2 *m_dec;
uchar *m_buffer;
int m_size,m_width,m_height;
- QImage m_image;
- QMutex m_mutex;
+ TQImage m_image;
+ TQMutex m_mutex;
bool m_raw;
void run();
@@ -57,8 +57,9 @@ protected:
class k9DecodeThread;
-class kDecMPEG2 : public QObject {
+class kDecMPEG2 : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
kDecMPEG2(k9DecodeThread *_thread);
kDecMPEG2();
@@ -68,7 +69,7 @@ public:
void start();
void stop();
void pause();
- void draw(QImage *image) {emit pixmapReady(image);}
+ void draw(TQImage *image) {emit pixmapReady(image);}
void drawRaw(uchar *_buffer,int width,int height,int size) {emit ppmReady (_buffer,width,height,size);}
void setUseGL(bool _value) {m_useGL = _value;}
@@ -77,12 +78,12 @@ private:
bool m_useGL;
bool m_pause;
k9DecodeThread *m_thread;
- QImage pix;
- QTime m_timer;
+ TQImage pix;
+ TQTime m_timer;
bool m_opened;
int demux_pid;
int demux_track;
- QMutex mutex;
+ TQMutex mutex;
mpeg2dec_t * decoder;
k9DisplayThread *m_display;
int demux (uint8_t * buf, uint8_t * end, int flags);
@@ -92,7 +93,7 @@ private:
void sync();
signals: // Signals
/** No descriptions */
- void pixmapReady(QImage *image);
+ void pixmapReady(TQImage *image);
void ppmReady(uchar *buffer,int width,int height,int size);
};
diff --git a/k9decmpeg/mmx.h b/k9decmpeg/mmx.h
index a410caa..bbbca78 100755
--- a/k9decmpeg/mmx.h
+++ b/k9decmpeg/mmx.h
@@ -218,7 +218,7 @@ typedef union {
: "m" (mem))
-#define maskmovq(regs,maskreg) mmx_r2ri (maskmovq, regs, maskreg)
+#define tqmaskmovq(regs,tqmaskreg) mmx_r2ri (tqmaskmovq, regs, tqmaskreg)
#define movntq_r2m(mmreg,var) mmx_r2m (movntq, mmreg, var)
diff --git a/k9decmpeg/motion_comp_mmx.cpp b/k9decmpeg/motion_comp_mmx.cpp
index 97828c4..f3c30ef 100755
--- a/k9decmpeg/motion_comp_mmx.cpp
+++ b/k9decmpeg/motion_comp_mmx.cpp
@@ -52,7 +52,7 @@
*/
/* some rounding constants */
-static mmx_t mask1 = {0xfefefefefefefefeLL};
+static mmx_t tqmask1 = {0xfefefefefefefefeLL};
static mmx_t round4 = {0x0002000200020002LL};
/*
@@ -81,7 +81,7 @@ static inline void mmx_average_2_U8 (uint8_t * dest, const uint8_t * src1,
movq_r2r (mm3, mm4); /* copy 8 src2 bytes */
pxor_r2r (mm1, mm3); /* xor src1 and src2 */
- pand_m2r (mask1, mm3); /* mask lower bits */
+ pand_m2r (tqmask1, mm3); /* tqmask lower bits */
psrlq_i2r (1, mm3); /* /2 */
por_r2r (mm2, mm4); /* or src1 and src2 */
psubb_r2r (mm3, mm4); /* subtract subresults */
@@ -104,14 +104,14 @@ static inline void mmx_interp_average_2_U8 (uint8_t * dest,
movq_r2r (mm5, mm6); /* copy 8 src2 bytes */
pxor_r2r (mm3, mm5); /* xor src1 and src2 */
- pand_m2r (mask1, mm5); /* mask lower bits */
+ pand_m2r (tqmask1, mm5); /* tqmask lower bits */
psrlq_i2r (1, mm5); /* /2 */
por_r2r (mm4, mm6); /* or src1 and src2 */
psubb_r2r (mm5, mm6); /* subtract subresults */
movq_r2r (mm6, mm5); /* copy subresult */
pxor_r2r (mm1, mm5); /* xor srcavg and dest */
- pand_m2r (mask1, mm5); /* mask lower bits */
+ pand_m2r (tqmask1, mm5); /* tqmask lower bits */
psrlq_i2r (1, mm5); /* /2 */
por_r2r (mm2, mm6); /* or srcavg and dest */
psubb_r2r (mm5, mm6); /* subtract subresults */
@@ -228,7 +228,7 @@ static inline void mmx_interp_average_4_U8 (uint8_t * dest,
movq_r2r (mm1,mm2); /* copy subresult */
pxor_r2r (mm1, mm3); /* xor srcavg and dest */
- pand_m2r (mask1, mm3); /* mask lower bits */
+ pand_m2r (tqmask1, mm3); /* tqmask lower bits */
psrlq_i2r (1, mm3); /* /2 */
por_r2r (mm2, mm4); /* or srcavg and dest */
psubb_r2r (mm3, mm4); /* subtract subresults */
@@ -636,7 +636,7 @@ static inline void MC_avg2_16 (int height, uint8_t * dest, const uint8_t * ref,
} while (--height);
}
-static mmx_t mask_one = {0x0101010101010101LL};
+static mmx_t tqmask_one = {0x0101010101010101LL};
static inline void MC_put4_8 (int height, uint8_t * dest, const uint8_t * ref,
const int stride, const int cpu)
@@ -664,7 +664,7 @@ static inline void MC_put4_8 (int height, uint8_t * dest, const uint8_t * ref,
pand_r2r (mm5, mm7);
pavg_r2r (mm2, mm0);
- pand_m2r (mask_one, mm7);
+ pand_m2r (tqmask_one, mm7);
psubusb_r2r (mm7, mm0);
@@ -695,7 +695,7 @@ static inline void MC_put4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
- pand_m2r (mask_one, mm7);
+ pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_r2m (mm0, *dest);
@@ -714,7 +714,7 @@ static inline void MC_put4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
- pand_m2r (mask_one, mm7);
+ pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
ref += stride;
@@ -741,7 +741,7 @@ static inline void MC_avg4_8 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
- pand_m2r (mask_one, mm7);
+ pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_m2r (*dest, mm1);
@@ -770,7 +770,7 @@ static inline void MC_avg4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
- pand_m2r (mask_one, mm7);
+ pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_m2r (*dest, mm1);
@@ -791,7 +791,7 @@ static inline void MC_avg4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
- pand_m2r (mask_one, mm7);
+ pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_m2r (*(dest+8), mm1);
diff --git a/k9decmpeg/motion_comp_vis.cpp b/k9decmpeg/motion_comp_vis.cpp
index 218af8a..49e1b69 100755
--- a/k9decmpeg/motion_comp_vis.cpp
+++ b/k9decmpeg/motion_comp_vis.cpp
@@ -37,10 +37,10 @@
* (x+y+1)>>1 == (x|y)-((x^y)>>1)
*
* This allows us to average 8 bytes at a time in a 64-bit FPU reg.
- * We avoid overflows by masking before we do the shift, and we
+ * We avoid overflows by tqmasking before we do the shift, and we
* implement the shift by multiplying by 1/2 using mul8x16. So in
- * VIS this is (assume 'x' is in f0, 'y' is in f2, a repeating mask
- * of '0xfe' is in f4, a repeating mask of '0x7f' is in f6, and
+ * VIS this is (assume 'x' is in f0, 'y' is in f2, a repeating tqmask
+ * of '0xfe' is in f4, a repeating tqmask of '0x7f' is in f6, and
* the value 0x80808080 is in f8):
*
* fxor f0, f2, f10
diff --git a/k9decmpeg/mpeg2.h b/k9decmpeg/mpeg2.h
index e8c7d2d..83c9138 100755
--- a/k9decmpeg/mpeg2.h
+++ b/k9decmpeg/mpeg2.h
@@ -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 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
+#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
typedef struct mpeg2_sequence_s {
unsigned int width, height;
diff --git a/k9decmpeg/mpeg2_internal.h b/k9decmpeg/mpeg2_internal.h
index 7e6c1df..8eecf37 100755
--- a/k9decmpeg/mpeg2_internal.h
+++ b/k9decmpeg/mpeg2_internal.h
@@ -26,7 +26,7 @@
#define MACROBLOCK_PATTERN 2
#define MACROBLOCK_MOTION_BACKWARD 4
#define MACROBLOCK_MOTION_FORWARD 8
-#define MACROBLOCK_QUANT 16
+#define MACROBLOCK_TQUANT 16
#define DCT_TYPE_INTERLACED 32
/* motion_type */
#define MOTION_TYPE_SHIFT 6
diff --git a/k9decmpeg/rgb_mmx.cpp b/k9decmpeg/rgb_mmx.cpp
index 957708c..59b7c6e 100755
--- a/k9decmpeg/rgb_mmx.cpp
+++ b/k9decmpeg/rgb_mmx.cpp
@@ -127,9 +127,9 @@ static inline void mmx_yuv2rgb (uint8_t * py, uint8_t * pu, uint8_t * pv)
static inline void mmx_unpack_16rgb (uint8_t * image, const int cpu)
{
- static mmx_t mmx_bluemask = {0xf8f8f8f8f8f8f8f8LL};
- static mmx_t mmx_greenmask = {0xfcfcfcfcfcfcfcfcLL};
- static mmx_t mmx_redmask = {0xf8f8f8f8f8f8f8f8LL};
+ static mmx_t mmx_bluetqmask = {0xf8f8f8f8f8f8f8f8LL};
+ static mmx_t mmx_greentqmask = {0xfcfcfcfcfcfcfcfcLL};
+ static mmx_t mmx_redtqmask = {0xf8f8f8f8f8f8f8f8LL};
/*
* convert RGB plane to RGB 16 bits
@@ -138,9 +138,9 @@ static inline void mmx_unpack_16rgb (uint8_t * image, const int cpu)
* mm6 -> GB, mm7 -> AR pixel 0-3
*/
- pand_m2r (mmx_bluemask, mm0); /* mm0 = b7b6b5b4b3______ */
- pand_m2r (mmx_greenmask, mm2); /* mm2 = g7g6g5g4g3g2____ */
- pand_m2r (mmx_redmask, mm1); /* mm1 = r7r6r5r4r3______ */
+ pand_m2r (mmx_bluetqmask, mm0); /* mm0 = b7b6b5b4b3______ */
+ pand_m2r (mmx_greentqmask, mm2); /* mm2 = g7g6g5g4g3g2____ */
+ pand_m2r (mmx_redtqmask, mm1); /* mm1 = r7r6r5r4r3______ */
psrlq_i2r (3, mm0); /* mm0 = ______b7b6b5b4b3 */
pxor_r2r (mm4, mm4); /* mm4 = 0 */
movq_r2r (mm0, mm5); /* mm5 = ______b7b6b5b4b3 */
diff --git a/k9decmpeg/slice.cpp b/k9decmpeg/slice.cpp
index 2c25bb1..55c3d03 100755
--- a/k9decmpeg/slice.cpp
+++ b/k9decmpeg/slice.cpp
@@ -1797,8 +1797,8 @@ void mpeg2_slice (mpeg2_decoder_t * const decoder, const int code,
macroblock_modes = get_macroblock_modes (decoder);
- /* maybe integrate MACROBLOCK_QUANT test into get_macroblock_modes ? */
- if (macroblock_modes & MACROBLOCK_QUANT)
+ /* maybe integrate MACROBLOCK_TQUANT test into get_macroblock_modes ? */
+ if (macroblock_modes & MACROBLOCK_TQUANT)
get_quantizer_scale (decoder);
if (macroblock_modes & MACROBLOCK_INTRA) {
diff --git a/k9decmpeg/vlc.h b/k9decmpeg/vlc.h
index f82e595..61b2a50 100755
--- a/k9decmpeg/vlc.h
+++ b/k9decmpeg/vlc.h
@@ -96,17 +96,17 @@ typedef struct {
#define INTRA MACROBLOCK_INTRA
-#define QUANT MACROBLOCK_QUANT
+#define TQUANT MACROBLOCK_TQUANT
static const MBtab MB_I [] = {
- {INTRA|QUANT, 2}, {INTRA, 1}
+ {INTRA|TQUANT, 2}, {INTRA, 1}
};
#define MC MACROBLOCK_MOTION_FORWARD
#define CODED MACROBLOCK_PATTERN
static const MBtab MB_P [] = {
- {INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5},
+ {INTRA|TQUANT, 6}, {CODED|TQUANT, 5}, {MC|CODED|TQUANT, 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|QUANT, 6},
- {BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
- {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
+ {0, 0}, {INTRA|TQUANT, 6},
+ {BWD|CODED|TQUANT, 6}, {FWD|CODED|TQUANT, 6},
+ {INTER|CODED|TQUANT, 5}, {INTER|CODED|TQUANT, 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 QUANT
+#undef TQUANT
#undef MC
#undef CODED
#undef FWD