mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 10:35:46 -04:00
Initial community commit
This commit is contained in:
108
Src/f263/BitReader.cpp
Normal file
108
Src/f263/BitReader.cpp
Normal file
@ -0,0 +1,108 @@
|
||||
#include "BitReader.h"
|
||||
|
||||
static uint32_t mask[8]=
|
||||
{
|
||||
0x1,
|
||||
0x3,
|
||||
0x7,
|
||||
0xF,
|
||||
0x1F,
|
||||
0x3F,
|
||||
0x7F,
|
||||
0xFF
|
||||
};
|
||||
|
||||
static uint32_t msk[33] =
|
||||
{
|
||||
0x00000000,0x00000001,0x00000003,0x00000007,
|
||||
0x0000000f,0x0000001f,0x0000003f,0x0000007f,
|
||||
0x000000ff,0x000001ff,0x000003ff,0x000007ff,
|
||||
0x00000fff,0x00001fff,0x00003fff,0x00007fff,
|
||||
0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff,
|
||||
0x000fffff,0x001fffff,0x003fffff,0x007fffff,
|
||||
0x00ffffff,0x01ffffff,0x03ffffff,0x07ffffff,
|
||||
0x0fffffff,0x1fffffff,0x3fffffff,0x7fffffff,
|
||||
0xffffffff
|
||||
};
|
||||
|
||||
void BitReader::alignbyte()
|
||||
{
|
||||
flushbits(numBits&7);
|
||||
}
|
||||
|
||||
void BitReader::getbytes(void *data, uint32_t n)
|
||||
{
|
||||
memcpy(data, this->data, n);
|
||||
flushbits(n*8);
|
||||
}
|
||||
|
||||
uint8_t BitReader::getbits1()
|
||||
{
|
||||
uint8_t byte = data[0];
|
||||
uint32_t count = (numBits-1) & 7;
|
||||
byte &= mask[count];
|
||||
byte >>= count;
|
||||
|
||||
numBits--;
|
||||
if ((numBits % 8) == 0)
|
||||
data++;
|
||||
return byte;
|
||||
}
|
||||
|
||||
uint32_t BitReader::getbits(uint32_t n)
|
||||
{
|
||||
uint32_t val = showbits(n);
|
||||
flushbits(n);
|
||||
return val;
|
||||
}
|
||||
|
||||
uint8_t BitReader::showbits1() const
|
||||
{
|
||||
uint8_t byte = data[0];
|
||||
uint32_t count = (numBits-1) & 7;
|
||||
byte &= mask[count];
|
||||
byte >>= count;
|
||||
return byte;
|
||||
}
|
||||
|
||||
uint32_t BitReader::showbits(uint32_t n) const
|
||||
{
|
||||
uint32_t val;
|
||||
switch((numBits+7) >> 3)
|
||||
{
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
val=(data[0]<<24);
|
||||
break;
|
||||
case 2:
|
||||
val=(data[0]<<24) | (data[1]<<16);
|
||||
break;
|
||||
case 3:
|
||||
val=(data[0]<<24) | (data[1]<<16) | (data[2]<<8);
|
||||
break;
|
||||
default:
|
||||
val=(data[0]<<24) | (data[1]<<16) | (data[2]<<8) | data[3];
|
||||
break;
|
||||
}
|
||||
uint32_t c = ((numBits-1) & 7) + 25;
|
||||
return (val>>(c-n)) & msk[n];
|
||||
}
|
||||
|
||||
void BitReader::flushbits(uint32_t n)
|
||||
{
|
||||
uint32_t oldpos = (numBits+7)>>3;
|
||||
numBits-=n;
|
||||
uint32_t newpos = (numBits+7)>>3;
|
||||
data += (oldpos - newpos);
|
||||
}
|
||||
|
||||
bool BitReader::empty()
|
||||
{
|
||||
return numBits==0;
|
||||
}
|
||||
|
||||
uint32_t BitReader::size() const
|
||||
{
|
||||
return numBits;
|
||||
}
|
18
Src/f263/BitReader.h
Normal file
18
Src/f263/BitReader.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <bfc/platform/types.h>
|
||||
class BitReader
|
||||
{
|
||||
public:
|
||||
uint8_t getbits1();
|
||||
uint32_t getbits(uint32_t n);
|
||||
uint8_t showbits1() const;
|
||||
uint32_t showbits(uint32_t n) const;
|
||||
void flushbits(uint32_t n);
|
||||
bool empty();
|
||||
uint32_t size() const; // in bits
|
||||
void alignbyte(); // aligns bitstream to the next byte (or current byte if already aligned)
|
||||
void getbytes(void *data, uint32_t n);
|
||||
//private:
|
||||
const uint8_t *data;
|
||||
uint32_t numBits;
|
||||
};
|
144
Src/f263/Block.cpp
Normal file
144
Src/f263/Block.cpp
Normal file
@ -0,0 +1,144 @@
|
||||
#include "Decoder.h"
|
||||
#include "indices.h"
|
||||
#include "vlc_table.h"
|
||||
|
||||
static unsigned char zig_zag_scan[64]={
|
||||
0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,
|
||||
12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,
|
||||
35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,
|
||||
58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63
|
||||
};
|
||||
|
||||
#define ESCAPE 7167
|
||||
// mode 1 = Inter (or Intra in advanced intra coding mode)
|
||||
// mode 0 = Intra
|
||||
void Decoder::getblock(int comp, int mode)
|
||||
{
|
||||
int val, i, j, sign;
|
||||
unsigned int code;
|
||||
VLCtab *tab;
|
||||
short *bp;
|
||||
int run, last, level, QP;
|
||||
short *qval;
|
||||
|
||||
|
||||
/* TODO: benski>
|
||||
i think this whole function can get replaced with
|
||||
ippiDecodeCoeffsIntra_H263_1u16s (mode==0)
|
||||
or
|
||||
ippiDecodeCoeffsInter_H263_1u16s (mode == 1)
|
||||
with pCoef = bp
|
||||
modQuantFlag = escapemode>=1
|
||||
scan = IPPVC_SCAN_ZIGZAG
|
||||
|
||||
*/
|
||||
bp = block[comp];
|
||||
|
||||
/* decode AC coefficients (or all coefficients in advanced intra coding
|
||||
* mode) */
|
||||
|
||||
for (i = (mode == 0);; i++)
|
||||
{
|
||||
|
||||
code = buffer.showbits(12);
|
||||
|
||||
|
||||
if (code >= 512)
|
||||
tab = &DCT3Dtab0[(code >> 5) - 16];
|
||||
else if (code >= 128)
|
||||
tab = &DCT3Dtab1[(code >> 2) - 32];
|
||||
else if (code >= 8)
|
||||
tab = &DCT3Dtab2[(code >> 0) - 8];
|
||||
else
|
||||
{
|
||||
fault = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
run = (tab->val >> 4) & 255;
|
||||
level = tab->val & 15;
|
||||
last = (tab->val >> 12) & 1;
|
||||
|
||||
buffer.flushbits(tab->len);
|
||||
if (tab->val == ESCAPE)
|
||||
{
|
||||
/* escape */
|
||||
if (escapemode >= 1)
|
||||
{
|
||||
int is11 = buffer.getbits1();
|
||||
sign=0;
|
||||
last = buffer.getbits1();
|
||||
i+=run = buffer.getbits(6);
|
||||
if (is11)
|
||||
{
|
||||
level = buffer.getbits(11);
|
||||
if ((sign = (level>=1024)))
|
||||
val = 2048 - level;
|
||||
else
|
||||
val = level;
|
||||
}
|
||||
else
|
||||
{
|
||||
level = buffer.getbits(7);
|
||||
if ((sign = (level>=64)))
|
||||
val = 128 - level;
|
||||
else
|
||||
val = level;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
last = buffer.getbits1();
|
||||
i += run = buffer.getbits(6);
|
||||
level = buffer.getbits(8);
|
||||
|
||||
if ((sign = (level >= 128)))
|
||||
val = 256 - level;
|
||||
else
|
||||
val = level;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i += run;
|
||||
val = level;
|
||||
sign = buffer.getbits(1);
|
||||
}
|
||||
|
||||
|
||||
if (i >= 64)
|
||||
{
|
||||
fault = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Descan in the proper order in advanced intra coding mode */
|
||||
|
||||
|
||||
j = zig_zag_scan[i];
|
||||
qval = &bp[j];
|
||||
QP = quant;
|
||||
|
||||
|
||||
|
||||
/* TODO: benski>
|
||||
ippiQuantInvIntra_H263_16s_C1I
|
||||
or
|
||||
ippiQuantInvInter_H263_16s_C1I (mode == 1)
|
||||
but outside the loop
|
||||
pSrcDst = bp
|
||||
QP = quant
|
||||
modQuantFlag = escapemode >= 1
|
||||
*/
|
||||
/* TMN3 dequantization */
|
||||
if ((QP % 2) == 1)
|
||||
*qval = (sign ? -(QP * (2 * val + 1)) : QP * (2 * val + 1));
|
||||
else
|
||||
*qval = (sign ? -(QP * (2 * val + 1) - 1) : QP * (2 * val + 1) - 1);
|
||||
|
||||
if (last)
|
||||
{
|
||||
/* That's it */
|
||||
return;
|
||||
}
|
||||
}}
|
133
Src/f263/Decoder.cpp
Normal file
133
Src/f263/Decoder.cpp
Normal file
@ -0,0 +1,133 @@
|
||||
#include "Decoder.h"
|
||||
|
||||
|
||||
bool Decoder::initted;
|
||||
unsigned char *Decoder::clp;
|
||||
unsigned char Decoder::clp_table[1024];
|
||||
|
||||
int Decoder::DecodeFrame(YV12_PLANES *yv12, int *width, int *height, int *keyframe)
|
||||
{
|
||||
if (getheader())
|
||||
{
|
||||
if (firstFrame)
|
||||
{
|
||||
if (init())
|
||||
return 1;
|
||||
}
|
||||
|
||||
Frame frame;
|
||||
getpicture(frame);
|
||||
yv12->y.baseAddr = frame[0];
|
||||
yv12->y.rowBytes = coded_picture_width;
|
||||
yv12->u.baseAddr = frame[1];
|
||||
yv12->u.rowBytes = chrom_width;
|
||||
yv12->v.baseAddr = frame[2];
|
||||
yv12->v.rowBytes = chrom_width;
|
||||
|
||||
*width = horizontal_size;
|
||||
*height = vertical_size;
|
||||
*keyframe = (pict_type == PCT_INTRA)?1:0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Decoder::Decoder()
|
||||
{
|
||||
for (int cc=0; cc<3; cc++)
|
||||
{
|
||||
refframe[cc]=0;
|
||||
newframe[cc]=0;
|
||||
oldrefframe[cc]=0;
|
||||
edgeframe[cc]=0;
|
||||
edgeframeorig[cc]=0;
|
||||
}
|
||||
|
||||
horizontal_size=0;
|
||||
vertical_size=0;
|
||||
mb_width=0;
|
||||
mb_height=0;
|
||||
coded_picture_width=0;
|
||||
coded_picture_height=0;
|
||||
chrom_width=0;
|
||||
chrom_height=0;
|
||||
pict_type=0;
|
||||
fault=0;
|
||||
refidct=0;
|
||||
quant=0;
|
||||
escapemode=0;
|
||||
|
||||
firstFrame=true;
|
||||
if (!initted)
|
||||
{
|
||||
/* clip table */
|
||||
clp=&clp_table[384];
|
||||
|
||||
for (int i=-384; i<640; i++)
|
||||
clp[i] = (i<0) ? 0 : ((i>255) ? 255 : i);
|
||||
|
||||
initted=true;
|
||||
}
|
||||
idct.init();
|
||||
}
|
||||
|
||||
Decoder::~Decoder()
|
||||
{
|
||||
for (int cc=0; cc<3; cc++)
|
||||
{
|
||||
free(refframe[cc]);
|
||||
free(oldrefframe[cc]);
|
||||
free(edgeframeorig[cc]);
|
||||
}
|
||||
}
|
||||
|
||||
#define ROUNDUP16(size) (((size)+15) & ~15)
|
||||
|
||||
int Decoder::init()
|
||||
{
|
||||
int cc;
|
||||
unsigned int size;
|
||||
|
||||
mb_width = (horizontal_size+15)/16;
|
||||
mb_height = (vertical_size +15)/16;
|
||||
coded_picture_width = ROUNDUP16(horizontal_size);
|
||||
coded_picture_height = ROUNDUP16(vertical_size);
|
||||
chrom_width = coded_picture_width>>1;
|
||||
chrom_height = coded_picture_height>>1;
|
||||
|
||||
if (coded_picture_width >= (65536 - 64)
|
||||
|| coded_picture_height >= (65536 - 64))
|
||||
return 1;
|
||||
|
||||
for (cc=0; cc<3; cc++)
|
||||
{
|
||||
if (cc==0)
|
||||
size = coded_picture_width*coded_picture_height;
|
||||
else
|
||||
size = chrom_width*chrom_height;
|
||||
|
||||
refframe[cc] = (unsigned char *)malloc(size);
|
||||
oldrefframe[cc] = (unsigned char *)malloc(size);
|
||||
}
|
||||
|
||||
for (cc=0; cc<3; cc++)
|
||||
{
|
||||
if (cc==0)
|
||||
{
|
||||
size = (coded_picture_width+64)*(coded_picture_height+64);
|
||||
edgeframeorig[cc] = (unsigned char *)malloc(size);
|
||||
|
||||
edgeframe[cc] = edgeframeorig[cc] + (coded_picture_width+64) * 32 + 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = (chrom_width+32)*(chrom_height+32);
|
||||
edgeframeorig[cc] = (unsigned char *)malloc(size);
|
||||
|
||||
edgeframe[cc] = edgeframeorig[cc] + (chrom_width+32) * 16 + 16;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
139
Src/f263/Decoder.h
Normal file
139
Src/f263/Decoder.h
Normal file
@ -0,0 +1,139 @@
|
||||
#pragma once
|
||||
#include <bfc/platform/types.h>
|
||||
#include "BitReader.h"
|
||||
#include "IDCT.h"
|
||||
#include "IDCTRef.h"
|
||||
#include "lib.h"
|
||||
|
||||
/* this is necessary for the max resolution 16CIF */
|
||||
#define MBC 88
|
||||
#define MBR 72
|
||||
|
||||
#define PSC 1
|
||||
#define PSC_LENGTH 17
|
||||
#define SE_CODE 31
|
||||
|
||||
#define MODE_INTER 0
|
||||
#define MODE_INTER_Q 1
|
||||
#define MODE_INTER4V 2
|
||||
#define MODE_INTRA 3
|
||||
#define MODE_INTRA_Q 4
|
||||
#define MODE_INTER4V_Q 5
|
||||
|
||||
#define PBMODE_NORMAL 0
|
||||
#define PBMODE_MVDB 1
|
||||
#define PBMODE_CBPB_MVDB 2
|
||||
|
||||
#define ESCAPE 7167
|
||||
#define ESCAPE_INDEX 102
|
||||
#define EP_FORWARD_PREDICTION 0
|
||||
#define EI_EP_UPWARD_PREDICTION 1
|
||||
#define EP_BIDIRECTIONAL_PREDICTION 2
|
||||
#define EI_EP_INTRA_PREDICTION 3
|
||||
#define MAX_LAYERS 2
|
||||
|
||||
/* picture types */
|
||||
#define PCT_INTRA 0
|
||||
#define PCT_INTER 1
|
||||
#define PCT_DISPOSABLE_INTER 2
|
||||
//#define PCT_IPB 2
|
||||
#define PCT_B 3
|
||||
|
||||
#define ON 1
|
||||
#define OFF 0
|
||||
#define YES 1
|
||||
#define NO 0
|
||||
|
||||
#define B_EI_EP_STUFFING 5
|
||||
#define INVALID_MBTYPE 255
|
||||
|
||||
#define B_DIRECT_PREDICTION 0
|
||||
#define B_FORWARD_PREDICTION 1
|
||||
#define B_BACKWARD_PREDICTION 2
|
||||
#define B_BIDIRECTIONAL_PREDICTION 3
|
||||
#define B_INTRA_PREDICTION 4
|
||||
|
||||
#define SF_SQCIF 1 /* 001 */
|
||||
#define SF_QCIF 2 /* 010 */
|
||||
#define SF_CIF 3 /* 011 */
|
||||
#define SF_4CIF 4 /* 100 */
|
||||
#define SF_16CIF 5 /* 101 */
|
||||
|
||||
|
||||
/* this is necessary for the max resolution 16CIF */
|
||||
#define MBC 88
|
||||
#define MBR 72
|
||||
|
||||
#define NO_VEC 999
|
||||
|
||||
typedef unsigned char *Frame[3];
|
||||
class Decoder
|
||||
{
|
||||
public:
|
||||
Decoder();
|
||||
~Decoder();
|
||||
int init();
|
||||
|
||||
void getpicture(Frame frame);
|
||||
int getheader();
|
||||
|
||||
int DecodeFrame(YV12_PLANES *yv12, int *width, int *height, int *keyframe);
|
||||
|
||||
|
||||
static unsigned char *clp;
|
||||
|
||||
BitReader buffer;
|
||||
private:
|
||||
void reconstruct(int bx, int by, int mode);
|
||||
|
||||
void get_I_P_MBs();
|
||||
void horiz_edge_filter(unsigned char *rec, int width, int height, int chr);
|
||||
void vert_edge_filter(unsigned char *rec, int width, int height, int chr);
|
||||
void edge_filter(unsigned char *lum, unsigned char *Cb, unsigned char *Cr, int width, int height);
|
||||
void vert_post_filter(unsigned char *rec, int width, int height, int chr);
|
||||
void horiz_post_filter(unsigned char *rec, int width, int height, int chr);
|
||||
void PostFilter(unsigned char *lum, unsigned char *Cb, unsigned char *Cr,int width, int height);
|
||||
void addblock(int comp, int bx, int by, int addflag);
|
||||
int find_pmv(int x, int y, int block, int comp);
|
||||
void getpicturehdr();
|
||||
|
||||
|
||||
void getblock(int comp, int mode);
|
||||
void clearblock(int comp);
|
||||
|
||||
void startcode();
|
||||
|
||||
/* vlc */
|
||||
int getTMNMV(void);
|
||||
int getMCBPC(void);
|
||||
int getMBTYPE (int *cbp_present, int *quant_present);
|
||||
int getMCBPCintra(void);
|
||||
int getCBPY(void);
|
||||
|
||||
private:
|
||||
Frame refframe, oldrefframe, newframe;
|
||||
Frame edgeframe, edgeframeorig;
|
||||
int MV[2][5][MBR+1][MBC+2];
|
||||
int modemap[MBR+1][MBC+2];
|
||||
int coded_map[MBR + 1][MBC + 1];
|
||||
int quant_map[MBR + 1][MBC + 1];
|
||||
unsigned int horizontal_size,vertical_size,mb_width,mb_height;
|
||||
unsigned int coded_picture_width, coded_picture_height;
|
||||
unsigned int chrom_width,chrom_height;
|
||||
int pict_type;
|
||||
int fault;
|
||||
int deblock;
|
||||
int refidct;
|
||||
int quant;
|
||||
int escapemode;
|
||||
bool firstFrame;
|
||||
|
||||
IDCT idct;
|
||||
|
||||
/* block data */
|
||||
short block[12][64];
|
||||
static bool initted;
|
||||
static unsigned char clp_table[1024];
|
||||
|
||||
|
||||
};
|
92
Src/f263/Header.cpp
Normal file
92
Src/f263/Header.cpp
Normal file
@ -0,0 +1,92 @@
|
||||
#include "Decoder.h"
|
||||
|
||||
|
||||
/*
|
||||
* decode headers from one input stream
|
||||
* until an End of Sequence or picture start code
|
||||
* is found
|
||||
*/
|
||||
int Decoder::getheader()
|
||||
{
|
||||
unsigned int sorenson_version;
|
||||
|
||||
/* look for startcode */
|
||||
startcode();
|
||||
buffer.getbits(PSC_LENGTH);
|
||||
sorenson_version = buffer.getbits(5);
|
||||
if (sorenson_version <= 1)
|
||||
{
|
||||
escapemode=sorenson_version;
|
||||
getpicturehdr();
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* align to start of next startcode */
|
||||
|
||||
void Decoder::startcode()
|
||||
{
|
||||
/* search for new picture start code */
|
||||
while (buffer.showbits(PSC_LENGTH)!=1l)
|
||||
buffer.flushbits(1);
|
||||
}
|
||||
|
||||
/* decode picture header */
|
||||
|
||||
void Decoder::getpicturehdr()
|
||||
{
|
||||
int pei, tmp;
|
||||
|
||||
buffer.getbits(8);
|
||||
|
||||
tmp = buffer.getbits(3);
|
||||
switch(tmp)
|
||||
{
|
||||
case 0:
|
||||
horizontal_size = buffer.getbits(8);
|
||||
vertical_size = buffer.getbits(8);
|
||||
break;
|
||||
case 1:
|
||||
horizontal_size = buffer.getbits(16);
|
||||
vertical_size = buffer.getbits(16);
|
||||
break;
|
||||
case 2:
|
||||
horizontal_size = 352;
|
||||
vertical_size = 288;
|
||||
break;
|
||||
case 3:
|
||||
horizontal_size = 176;
|
||||
vertical_size = 144;
|
||||
break;
|
||||
case 4:
|
||||
horizontal_size = 128;
|
||||
vertical_size = 96;
|
||||
break;
|
||||
case 5:
|
||||
horizontal_size = 320;
|
||||
vertical_size = 240;
|
||||
break;
|
||||
case 6:
|
||||
horizontal_size = 160;
|
||||
vertical_size = 120;
|
||||
break;
|
||||
|
||||
}
|
||||
pict_type = buffer.getbits(2);
|
||||
deblock=buffer.getbits(1); // deblocking flag
|
||||
quant = buffer.getbits(5);
|
||||
|
||||
pei = buffer.getbits(1);
|
||||
pspare:
|
||||
if (pei) {
|
||||
/* extra info for possible future backward compatible additions */
|
||||
buffer.getbits(8); /* not used */
|
||||
pei = buffer.getbits(1);
|
||||
if (pei) goto pspare; /* keep on reading pspare until pei=0 */
|
||||
}
|
||||
|
||||
}
|
||||
|
870
Src/f263/Picture.cpp
Normal file
870
Src/f263/Picture.cpp
Normal file
@ -0,0 +1,870 @@
|
||||
#include "Decoder.h"
|
||||
#define sign(a) ((a) < 0 ? -1 : 1)
|
||||
/* private prototypes*/
|
||||
static int motion_decode(int vec,int pmv);
|
||||
static void make_edge_image(const unsigned char *src, unsigned char *dst, int width, int height, int edge);
|
||||
|
||||
/* decode one frame or field picture */
|
||||
|
||||
void Decoder::getpicture(Frame decodedFrame)
|
||||
{
|
||||
int i;
|
||||
unsigned char *tmp;
|
||||
|
||||
for (i=0; i<3; i++)
|
||||
{
|
||||
tmp = oldrefframe[i];
|
||||
oldrefframe[i] = refframe[i];
|
||||
refframe[i] = tmp;
|
||||
newframe[i] = refframe[i];
|
||||
}
|
||||
|
||||
if (!firstFrame)
|
||||
{
|
||||
make_edge_image(oldrefframe[0],edgeframe[0],coded_picture_width,
|
||||
coded_picture_height,32);
|
||||
make_edge_image(oldrefframe[1],edgeframe[1],chrom_width, chrom_height,16);
|
||||
make_edge_image(oldrefframe[2],edgeframe[2],chrom_width, chrom_height,16);
|
||||
}
|
||||
|
||||
//getMBs();
|
||||
get_I_P_MBs();
|
||||
|
||||
if (deblock)
|
||||
edge_filter(newframe[0], newframe[1], newframe[2],
|
||||
coded_picture_width, coded_picture_height);
|
||||
|
||||
/*
|
||||
PostFilter(newframe[0], newframe[1], newframe[2],
|
||||
coded_picture_width, coded_picture_height);
|
||||
*/
|
||||
|
||||
decodedFrame[0] = newframe[0];
|
||||
decodedFrame[1] = newframe[1];
|
||||
decodedFrame[2] = newframe[2];
|
||||
|
||||
firstFrame=false;
|
||||
}
|
||||
|
||||
|
||||
/* decode all macroblocks of the current picture */
|
||||
|
||||
|
||||
void Decoder::clearblock(int comp)
|
||||
{
|
||||
int *bp;
|
||||
int i;
|
||||
|
||||
bp = (int *)block[comp];
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
bp[0] = bp[1] = bp[2] = bp[3] = 0;
|
||||
bp += 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* move/add 8x8-Block from block[comp] to refframe or bframe */
|
||||
|
||||
void Decoder::addblock(int comp, int bx, int by, int addflag)
|
||||
{
|
||||
int cc,i, iincr;
|
||||
unsigned char *rfp;
|
||||
short *bp;
|
||||
|
||||
bp = block[comp];
|
||||
|
||||
/* TODO: benski>
|
||||
ippiCopy8x8_8u_C1R (addflag = 0)
|
||||
ippiAdd8x8_16s8u_C1IRS (addflag = 1)
|
||||
*/
|
||||
cc = (comp<4) ? 0 : (comp&1)+1; /* color component index */
|
||||
|
||||
if (cc==0)
|
||||
{
|
||||
/* luminance */
|
||||
|
||||
/* frame DCT coding */
|
||||
rfp = newframe[0]
|
||||
+ coded_picture_width*(by+((comp&2)<<2)) + bx + ((comp&1)<<3);
|
||||
|
||||
iincr = coded_picture_width;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* chrominance */
|
||||
|
||||
/* scale coordinates */
|
||||
bx >>= 1;
|
||||
by >>= 1;
|
||||
/* frame DCT coding */
|
||||
rfp = newframe[cc] + chrom_width*by + bx;
|
||||
iincr = chrom_width;
|
||||
}
|
||||
|
||||
|
||||
if (addflag)
|
||||
{
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
rfp[0] = clp[bp[0]+rfp[0]];
|
||||
rfp[1] = clp[bp[1]+rfp[1]];
|
||||
rfp[2] = clp[bp[2]+rfp[2]];
|
||||
rfp[3] = clp[bp[3]+rfp[3]];
|
||||
rfp[4] = clp[bp[4]+rfp[4]];
|
||||
rfp[5] = clp[bp[5]+rfp[5]];
|
||||
rfp[6] = clp[bp[6]+rfp[6]];
|
||||
rfp[7] = clp[bp[7]+rfp[7]];
|
||||
bp += 8;
|
||||
rfp+= iincr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
rfp[0] = clp[bp[0]];
|
||||
rfp[1] = clp[bp[1]];
|
||||
rfp[2] = clp[bp[2]];
|
||||
rfp[3] = clp[bp[3]];
|
||||
rfp[4] = clp[bp[4]];
|
||||
rfp[5] = clp[bp[5]];
|
||||
rfp[6] = clp[bp[6]];
|
||||
rfp[7] = clp[bp[7]];
|
||||
bp += 8;
|
||||
rfp += iincr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int motion_decode(int vec, int pmv)
|
||||
{
|
||||
if (vec > 31) vec -= 64;
|
||||
vec += pmv;
|
||||
|
||||
if (vec > 31)
|
||||
vec -= 64;
|
||||
if (vec < -32)
|
||||
vec += 64;
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
int Decoder::find_pmv(int x, int y, int block, int comp)
|
||||
|
||||
{
|
||||
int p1,p2,p3;
|
||||
int xin1,xin2,xin3;
|
||||
int yin1,yin2,yin3;
|
||||
int vec1,vec2,vec3;
|
||||
int l8,o8,or8;
|
||||
|
||||
x++;y++;
|
||||
|
||||
l8 = (modemap[y][x-1] == MODE_INTER4V ? 1 : 0);
|
||||
o8 = (modemap[y-1][x] == MODE_INTER4V ? 1 : 0);
|
||||
or8 = (modemap[y-1][x+1] == MODE_INTER4V ? 1 : 0);
|
||||
|
||||
switch (block)
|
||||
{
|
||||
case 0:
|
||||
vec1 = (l8 ? 2 : 0) ; yin1 = y ; xin1 = x-1;
|
||||
vec2 = (o8 ? 3 : 0) ; yin2 = y-1; xin2 = x;
|
||||
vec3 = (or8? 3 : 0) ; yin3 = y-1; xin3 = x+1;
|
||||
break;
|
||||
case 1:
|
||||
vec1 = (l8 ? 2 : 0) ; yin1 = y ; xin1 = x-1;
|
||||
vec2 = (o8 ? 3 : 0) ; yin2 = y-1; xin2 = x;
|
||||
vec3 = (or8? 3 : 0) ; yin3 = y-1; xin3 = x+1;
|
||||
break;
|
||||
case 2:
|
||||
vec1 = 1 ; yin1 = y ; xin1 = x;
|
||||
vec2 = (o8 ? 4 : 0) ; yin2 = y-1; xin2 = x;
|
||||
vec3 = (or8? 3 : 0) ; yin3 = y-1; xin3 = x+1;
|
||||
break;
|
||||
case 3:
|
||||
vec1 = (l8 ? 4 : 0) ; yin1 = y ; xin1 = x-1;
|
||||
vec2 = 1 ; yin2 = y ; xin2 = x;
|
||||
vec3 = 2 ; yin3 = y ; xin3 = x;
|
||||
break;
|
||||
case 4:
|
||||
vec1 = 3 ; yin1 = y ; xin1 = x;
|
||||
vec2 = 1 ; yin2 = y ; xin2 = x;
|
||||
vec3 = 2 ; yin3 = y ; xin3 = x;
|
||||
break;
|
||||
default:
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
p1 = MV[comp][vec1][yin1][xin1];
|
||||
p2 = MV[comp][vec2][yin2][xin2];
|
||||
p3 = MV[comp][vec3][yin3][xin3];
|
||||
|
||||
if (p2 == NO_VEC)
|
||||
{
|
||||
p2 = p3 = p1;
|
||||
}
|
||||
|
||||
return p1+p2+p3 - max(p1,max(p2,p3)) - min(p1,min(p2,p3));
|
||||
}
|
||||
|
||||
|
||||
void make_edge_image(const unsigned char *src,unsigned char *dst,int width,int height,int edge)
|
||||
{
|
||||
int i,j;
|
||||
unsigned char *p1,*p2,*p3,*p4;
|
||||
const unsigned char *o1,*o2,*o3,*o4;
|
||||
|
||||
/* center image */
|
||||
p1 = dst;
|
||||
o1 = src;
|
||||
for (j = 0; j < height;j++)
|
||||
{
|
||||
for (i = 0; i < width; i++)
|
||||
{
|
||||
*(p1 + i) = *(o1 + i);
|
||||
}
|
||||
p1 += width + (edge<<1);
|
||||
o1 += width;
|
||||
}
|
||||
|
||||
/* left and right edges */
|
||||
p1 = dst-1;
|
||||
o1 = src;
|
||||
for (j = 0; j < height;j++)
|
||||
{
|
||||
for (i = 0; i < edge; i++)
|
||||
{
|
||||
*(p1 - i) = *o1;
|
||||
*(p1 + width + i + 1) = *(o1 + width - 1);
|
||||
}
|
||||
p1 += width + (edge<<1);
|
||||
o1 += width;
|
||||
}
|
||||
|
||||
/* top and bottom edges */
|
||||
p1 = dst;
|
||||
p2 = dst + (width + (edge<<1))*(height-1);
|
||||
o1 = src;
|
||||
o2 = src + width*(height-1);
|
||||
for (j = 0; j < edge;j++)
|
||||
{
|
||||
p1 = p1 - (width + (edge<<1));
|
||||
p2 = p2 + (width + (edge<<1));
|
||||
for (i = 0; i < width; i++)
|
||||
{
|
||||
*(p1 + i) = *(o1 + i);
|
||||
*(p2 + i) = *(o2 + i);
|
||||
}
|
||||
}
|
||||
|
||||
/* corners */
|
||||
p1 = dst - (width+(edge<<1)) - 1;
|
||||
p2 = p1 + width + 1;
|
||||
p3 = dst + (width+(edge<<1))*(height)-1;
|
||||
p4 = p3 + width + 1;
|
||||
|
||||
o1 = src;
|
||||
o2 = o1 + width - 1;
|
||||
o3 = src + width*(height-1);
|
||||
o4 = o3 + width - 1;
|
||||
for (j = 0; j < edge; j++)
|
||||
{
|
||||
for (i = 0; i < edge; i++)
|
||||
{
|
||||
*(p1 - i) = *o1;
|
||||
*(p2 + i) = *o2;
|
||||
*(p3 - i) = *o3;
|
||||
*(p4 + i) = *o4;
|
||||
}
|
||||
p1 = p1 - (width + (edge<<1));
|
||||
p2 = p2 - (width + (edge<<1));
|
||||
p3 = p3 + width + (edge<<1);
|
||||
p4 = p4 + width + (edge<<1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static bool Mode_IsInter(int Mode)
|
||||
{
|
||||
return (Mode == MODE_INTER || Mode == MODE_INTER_Q ||
|
||||
Mode == MODE_INTER4V || Mode == MODE_INTER4V_Q);
|
||||
}
|
||||
|
||||
|
||||
static bool Mode_IsIntra(int Mode)
|
||||
{
|
||||
return (Mode == MODE_INTRA || Mode == MODE_INTRA_Q);
|
||||
}
|
||||
|
||||
void Decoder::get_I_P_MBs()
|
||||
{
|
||||
int comp;
|
||||
int MBA, MBAmax;
|
||||
|
||||
int COD = 0, MCBPC, CBPY, CBP = 0, CBPB = 0, MODB = 0, Mode = 0, DQUANT;
|
||||
int mvx = 0, mvy = 0, pmv0, pmv1, xpos, ypos, k;
|
||||
int startmv, stopmv, last_done = 0, pCBP = 0, pCBPB = 0, pCOD = 0, pMODB = 0;
|
||||
int DQ_tab[4] = {-1, -2, 1, 2};
|
||||
unsigned int i;
|
||||
short *bp;
|
||||
|
||||
/* number of macroblocks per picture */
|
||||
MBAmax = mb_width * mb_height;
|
||||
|
||||
MBA = 0; /* macroblock address */
|
||||
xpos = ypos = 0;
|
||||
|
||||
/* mark MV's above the picture */
|
||||
for (i = 1; i < mb_width + 1; i++)
|
||||
{
|
||||
for (k = 0; k < 5; k++)
|
||||
{
|
||||
MV[0][k][0][i] = NO_VEC;
|
||||
MV[1][k][0][i] = NO_VEC;
|
||||
}
|
||||
modemap[0][i] = MODE_INTRA;
|
||||
}
|
||||
/* zero MV's on the sides of the picture */
|
||||
for (i = 0; i < mb_height + 1; i++)
|
||||
{
|
||||
for (k = 0; k < 5; k++)
|
||||
{
|
||||
MV[0][k][i][0] = 0;
|
||||
MV[1][k][i][0] = 0;
|
||||
MV[0][k][i][mb_width + 1] = 0;
|
||||
MV[1][k][i][mb_width + 1] = 0;
|
||||
}
|
||||
modemap[i][0] = MODE_INTRA;
|
||||
modemap[i][mb_width + 1] = MODE_INTRA;
|
||||
}
|
||||
/* initialize the qcoeff used in advanced intra coding */
|
||||
|
||||
fault = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
||||
|
||||
resync:
|
||||
/* This version of the decoder does not resync on every possible
|
||||
* error, and it does not do all possible error checks. It is not
|
||||
* difficult to make it much more error robust, but I do not think it
|
||||
* is necessary to include this in the freely available version. */
|
||||
|
||||
if (fault)
|
||||
{
|
||||
startcode(); /* sync on new startcode */
|
||||
fault = 0;
|
||||
}
|
||||
|
||||
|
||||
xpos = MBA % mb_width;
|
||||
ypos = MBA / mb_width;
|
||||
|
||||
if (MBA >= MBAmax)
|
||||
{
|
||||
/* all macroblocks decoded */
|
||||
return;
|
||||
}
|
||||
read_cod:
|
||||
|
||||
|
||||
if (PCT_INTER == pict_type || PCT_DISPOSABLE_INTER == pict_type)
|
||||
{
|
||||
COD = buffer.showbits(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
COD = 0; /* Intra picture -> not skipped */
|
||||
coded_map[ypos + 1][xpos + 1] = 1;
|
||||
}
|
||||
|
||||
|
||||
if (!COD)
|
||||
{
|
||||
/* COD == 0 --> not skipped */
|
||||
|
||||
if (PCT_INTER == pict_type || PCT_DISPOSABLE_INTER == pict_type)
|
||||
{
|
||||
/* flush COD bit */
|
||||
buffer.flushbits(1);
|
||||
}
|
||||
if (PCT_INTRA == pict_type)
|
||||
{
|
||||
MCBPC = getMCBPCintra();
|
||||
}
|
||||
else
|
||||
{
|
||||
MCBPC = getMCBPC();
|
||||
}
|
||||
|
||||
|
||||
if (fault)
|
||||
goto resync;
|
||||
|
||||
if (MCBPC == 255)
|
||||
{
|
||||
/* stuffing - read next COD without advancing MB count. */
|
||||
goto read_cod;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* normal MB data */
|
||||
Mode = MCBPC & 7;
|
||||
|
||||
|
||||
/* MODB and CBPB */
|
||||
|
||||
|
||||
CBPY = getCBPY();
|
||||
|
||||
}
|
||||
|
||||
/* Decode Mode and CBP */
|
||||
if ((Mode == MODE_INTRA || Mode == MODE_INTRA_Q))
|
||||
{
|
||||
/* Intra */
|
||||
coded_map[ypos + 1][xpos + 1] = 1;
|
||||
|
||||
CBPY = CBPY ^ 15; /* needed in huffman coding only */
|
||||
}
|
||||
|
||||
CBP = (CBPY << 2) | (MCBPC >> 4);
|
||||
|
||||
if (Mode == MODE_INTER_Q || Mode == MODE_INTRA_Q || Mode == MODE_INTER4V_Q)
|
||||
{
|
||||
/* Read DQUANT if necessary */
|
||||
|
||||
DQUANT = buffer.getbits(2);
|
||||
quant += DQ_tab[DQUANT];
|
||||
|
||||
|
||||
if (quant > 31 || quant < 1)
|
||||
{
|
||||
quant = max(1, (31, quant));
|
||||
/* could set fault-flag and resync here */
|
||||
fault = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* motion vectors */
|
||||
if (Mode == MODE_INTER || Mode == MODE_INTER_Q ||
|
||||
Mode == MODE_INTER4V || Mode == MODE_INTER4V_Q)
|
||||
{
|
||||
if (Mode == MODE_INTER4V || Mode == MODE_INTER4V_Q)
|
||||
{
|
||||
startmv = 1;
|
||||
stopmv = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
startmv = 0;
|
||||
stopmv = 0;
|
||||
}
|
||||
|
||||
for (k = startmv; k <= stopmv; k++)
|
||||
{
|
||||
mvx = getTMNMV();
|
||||
mvy = getTMNMV();
|
||||
|
||||
pmv0 = find_pmv(xpos, ypos, k, 0);
|
||||
pmv1 = find_pmv(xpos, ypos, k, 1);
|
||||
|
||||
mvx = motion_decode(mvx, pmv0);
|
||||
mvy = motion_decode(mvy, pmv1);
|
||||
|
||||
/* store coded or not-coded */
|
||||
coded_map[ypos + 1][xpos + 1] = 1;
|
||||
MV[0][k][ypos+1][xpos+1] = mvx;
|
||||
MV[1][k][ypos+1][xpos+1] = mvy;
|
||||
}
|
||||
|
||||
}
|
||||
/* Intra. */
|
||||
else
|
||||
{
|
||||
}
|
||||
if (fault)
|
||||
goto resync;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* COD == 1 --> skipped MB */
|
||||
if (MBA >= MBAmax)
|
||||
{
|
||||
/* all macroblocks decoded */
|
||||
return;
|
||||
}
|
||||
|
||||
if (PCT_INTER == pict_type || PCT_DISPOSABLE_INTER == pict_type)
|
||||
buffer.flushbits(1);
|
||||
|
||||
Mode = MODE_INTER;
|
||||
/* Reset CBP */
|
||||
CBP = CBPB = 0;
|
||||
coded_map[ypos + 1][xpos + 1] = 0;
|
||||
|
||||
/* reset motion vectors */
|
||||
MV[0][0][ypos + 1][xpos + 1] = 0;
|
||||
MV[1][0][ypos + 1][xpos + 1] = 0;
|
||||
}
|
||||
|
||||
/* Store mode and prediction type */
|
||||
modemap[ypos + 1][xpos + 1] = Mode;
|
||||
|
||||
/* store defaults for advanced intra coding mode */
|
||||
|
||||
if (Mode == MODE_INTRA || Mode == MODE_INTRA_Q)
|
||||
{
|
||||
MV[0][0][ypos + 1][xpos + 1] = MV[1][0][ypos + 1][xpos + 1] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!COD)
|
||||
{
|
||||
Mode = modemap[ypos + 1][xpos + 1];
|
||||
|
||||
/* decode blocks */
|
||||
for (comp = 0; comp < 6; comp++)
|
||||
{
|
||||
clearblock(comp);
|
||||
if ((Mode == MODE_INTRA || Mode == MODE_INTRA_Q))
|
||||
{
|
||||
/* Intra (except in advanced intra coding mode) */
|
||||
bp = block[comp];
|
||||
|
||||
|
||||
bp[0] = buffer.getbits(8);
|
||||
|
||||
if (bp[0] == 255) /* Spec. in H.26P, not in TMN4 */
|
||||
bp[0] = 128;
|
||||
bp[0] *= 8; /* Iquant */
|
||||
if ((CBP & (1 << (6 - 1 - comp))))
|
||||
{
|
||||
getblock(comp, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Inter (or Intra in advanced intra coding mode) */
|
||||
if ((CBP & (1 << (6 - 1 - comp))))
|
||||
{
|
||||
getblock(comp, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (fault)
|
||||
goto resync;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* decode the last MB if data is missing */
|
||||
|
||||
/* advance to next macroblock */
|
||||
MBA++;
|
||||
pCBP = CBP;
|
||||
pCBPB = CBPB;
|
||||
pCOD = COD;
|
||||
pMODB = MODB;
|
||||
quant_map[ypos + 1][xpos + 1] = quant;
|
||||
|
||||
int bx = 16 * xpos;
|
||||
int by = 16 * ypos;
|
||||
|
||||
Mode = modemap[by / 16 + 1][bx / 16 + 1];
|
||||
|
||||
/* motion compensation for P-frame */
|
||||
if (Mode == MODE_INTER || Mode == MODE_INTER_Q ||
|
||||
Mode == MODE_INTER4V || Mode == MODE_INTER4V_Q)
|
||||
{
|
||||
reconstruct(bx, by, Mode);
|
||||
}
|
||||
|
||||
/* copy or add block data into P-picture */
|
||||
for (comp = 0; comp < 6; comp++)
|
||||
{
|
||||
/* inverse DCT */
|
||||
if (Mode == MODE_INTRA || Mode == MODE_INTRA_Q)
|
||||
{
|
||||
idct.idct(block[comp]);
|
||||
addblock(comp, bx, by, 0);
|
||||
}
|
||||
else if ((pCBP & (1 << (6 - 1 - comp))))
|
||||
{
|
||||
/* No need to to do this for blocks with no coeffs */
|
||||
idct.idct(block[comp]);
|
||||
addblock(comp, bx, by, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int STRENGTH[] = {1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12};
|
||||
void Decoder::horiz_edge_filter(unsigned char *rec, int width, int height, int chr)
|
||||
{
|
||||
int i, j;
|
||||
int delta, d1, d2;
|
||||
int mbc, mbr, do_filter;
|
||||
int QP;
|
||||
int mbr_above;
|
||||
|
||||
|
||||
/* horizontal edges */
|
||||
for (j = 8; j < height; j += 8)
|
||||
{
|
||||
if (!chr)
|
||||
{
|
||||
mbr = j >> 4;
|
||||
mbr_above = (j - 8) >> 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbr = j >> 3;
|
||||
mbr_above = mbr - 1;
|
||||
}
|
||||
const int * const cur_coded_map = coded_map[mbr + 1];
|
||||
for (i = 0; i < width; i++)
|
||||
{
|
||||
// TODO: replace all below with FilterDeblocking8x8HorEdge_H263(rec+i+(j+1)*width, width, QP) and i+=8 ?
|
||||
if (!chr)
|
||||
{
|
||||
mbc = i >> 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbc = i >> 3;
|
||||
}
|
||||
|
||||
do_filter = cur_coded_map[mbc + 1] || coded_map[mbr_above + 1][mbc + 1];
|
||||
if (do_filter)
|
||||
{
|
||||
QP = cur_coded_map[mbc + 1] ? quant_map[mbr + 1][mbc + 1] : quant_map[mbr_above + 1][mbc + 1];
|
||||
|
||||
|
||||
delta = (int)(((int)(*(rec + i + (j - 2) * width)) +
|
||||
(int)(*(rec + i + (j - 1) * width) * (-4)) +
|
||||
(int)(*(rec + i + (j) * width) * (4)) +
|
||||
(int)(*(rec + i + (j + 1) * width) * (-1))) / 8.0);
|
||||
|
||||
d1 = sign(delta) * max(0, abs(delta) - max(0, 2 * (abs(delta) - STRENGTH[QP - 1])));
|
||||
|
||||
d2 = min(abs(d1 / 2), max(-abs(d1 / 2), (int)(((*(rec + i + (j - 2) * width) -
|
||||
*(rec + i + (j + 1) * width))) / 4)));
|
||||
|
||||
*(rec + i + (j + 1) * width) += d2; /* D */
|
||||
*(rec + i + (j) * width) = min(255, max(0, (int)(*(rec + i + (j) * width)) - d1)); /* C */
|
||||
*(rec + i + (j - 1) * width) = min(255, max(0, (int)(*(rec + i + (j - 1) * width)) + d1)); /* B */
|
||||
*(rec + i + (j - 2) * width) -= d2; /* A */
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void Decoder::vert_edge_filter(unsigned char *rec, int width, int height, int chr)
|
||||
{
|
||||
int i, j;
|
||||
int delta, d1, d2;
|
||||
int mbc, mbr;
|
||||
int do_filter;
|
||||
int QP;
|
||||
int mbc_left;
|
||||
|
||||
|
||||
/* vertical edges */
|
||||
for (i = 8; i < width; i += 8)
|
||||
{
|
||||
if (!chr)
|
||||
{
|
||||
mbc = i >> 4;
|
||||
mbc_left = (i - 8) >> 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbc = i >> 3;
|
||||
mbc_left = mbc - 1;
|
||||
}
|
||||
// TODO: replace all below with FilterDeblocking8x8VerEdge_H263(rec+i +j*width, width, QP) and i+=8 ?
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
if (!chr)
|
||||
{
|
||||
mbr = j >> 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbr = j >> 3;
|
||||
|
||||
}
|
||||
do_filter = coded_map[mbr + 1][mbc + 1] || coded_map[mbr + 1][mbc_left + 1];
|
||||
|
||||
if (do_filter)
|
||||
{
|
||||
|
||||
QP = coded_map[mbr + 1][mbc + 1] ?
|
||||
quant_map[mbr + 1][mbc + 1] : quant_map[mbr + 1][mbc_left + 1];
|
||||
|
||||
delta = (int)(((int)(*(rec + i - 2 + j * width)) +
|
||||
(int)(*(rec + i - 1 + j * width) * (-4)) +
|
||||
(int)(*(rec + i + j * width) * (4)) +
|
||||
(int)(*(rec + i + 1 + j * width) * (-1))) / 8.0);
|
||||
|
||||
d1 = sign(delta) * max(0, abs(delta) -
|
||||
max(0, 2 * (abs(delta) - STRENGTH[QP - 1])));
|
||||
|
||||
d2 = min(abs(d1 / 2), max(-abs(d1 / 2),
|
||||
(int)((*(rec + i - 2 + j * width) -
|
||||
*(rec + i + 1 + j * width)) / 4)));
|
||||
|
||||
*(rec + i + 1 + j * width) += d2; /* D */
|
||||
*(rec + i + j * width) = min(255, max(0, (int)(*(rec + i + j * width)) - d1)); /* C */
|
||||
*(rec + i - 1 + j * width) = min(255, max(0, (int)(*(rec + i - 1 + j * width)) + d1)); /* B */
|
||||
*(rec + i - 2 + j * width) -= d2; /* A */
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void Decoder::edge_filter(unsigned char *lum, unsigned char *Cb, unsigned char *Cr, int width, int height)
|
||||
{
|
||||
|
||||
/* Luma */
|
||||
horiz_edge_filter(lum, width, height, 0);
|
||||
vert_edge_filter(lum, width, height, 0);
|
||||
|
||||
/* Chroma */
|
||||
horiz_edge_filter(Cb, width / 2, height / 2, 1);
|
||||
vert_edge_filter(Cb, width / 2, height / 2, 1);
|
||||
horiz_edge_filter(Cr, width / 2, height / 2, 1);
|
||||
vert_edge_filter(Cr, width / 2, height / 2, 1);
|
||||
|
||||
/* that's it */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Decoder::PostFilter(unsigned char *lum, unsigned char *Cb, unsigned char *Cr,
|
||||
int width, int height)
|
||||
{
|
||||
|
||||
/* Luma */
|
||||
horiz_post_filter(lum, width, height, 0);
|
||||
vert_post_filter(lum, width, height, 0);
|
||||
|
||||
/* Chroma */
|
||||
horiz_post_filter(Cb, width / 2, height / 2, 1);
|
||||
vert_post_filter(Cb, width / 2, height / 2, 1);
|
||||
horiz_post_filter(Cr, width / 2, height / 2, 1);
|
||||
vert_post_filter(Cr, width / 2, height / 2, 1);
|
||||
|
||||
/* that's it */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static int STRENGTH1[] = {1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4};
|
||||
void Decoder::horiz_post_filter(unsigned char *rec, int width, int height, int chr)
|
||||
{
|
||||
int i, j;
|
||||
int delta, d1;
|
||||
int mbc, mbr;
|
||||
int QP;
|
||||
int mbr_above;
|
||||
|
||||
|
||||
/* horizontal edges */
|
||||
for (j = 8; j < height; j += 8)
|
||||
{
|
||||
for (i = 0; i < width; i++)
|
||||
{
|
||||
if (!chr)
|
||||
{
|
||||
mbr = j >> 4;
|
||||
mbc = i >> 4;
|
||||
mbr_above = (j - 8) >> 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbr = j >> 3;
|
||||
mbc = i >> 3;
|
||||
mbr_above = mbr - 1;
|
||||
}
|
||||
|
||||
QP = coded_map[mbr + 1][mbc + 1] ?
|
||||
quant_map[mbr + 1][mbc + 1] : quant_map[mbr_above + 1][mbc + 1];
|
||||
|
||||
delta = (int)(((int)(*(rec + i + (j - 3) * width)) +
|
||||
(int)(*(rec + i + (j - 2) * width)) +
|
||||
(int)(*(rec + i + (j - 1) * width)) +
|
||||
(int)(*(rec + i + (j) * width) * (-6)) +
|
||||
(int)(*(rec + i + (j + 1) * width)) +
|
||||
(int)(*(rec + i + (j + 2) * width)) +
|
||||
(int)(*(rec + i + (j + 3) * width))) / 8.0);
|
||||
|
||||
d1 = sign(delta) * max(0, abs(delta) - max(0, 2 * (abs(delta) - STRENGTH1[QP - 1])));
|
||||
|
||||
/* Filter D */
|
||||
*(rec + i + (j) * width) += d1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static int STRENGTH2[] = {1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3};
|
||||
void Decoder::vert_post_filter(unsigned char *rec, int width, int height, int chr)
|
||||
{
|
||||
int i, j;
|
||||
int delta, d1;
|
||||
int mbc, mbr;
|
||||
int QP;
|
||||
int mbc_left;
|
||||
|
||||
|
||||
/* vertical edges */
|
||||
for (i = 8; i < width; i += 8)
|
||||
{
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
if (!chr)
|
||||
{
|
||||
mbr = j >> 4;
|
||||
mbc = i >> 4;
|
||||
mbc_left = (i - 8) >> 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbr = j >> 3;
|
||||
mbc = i >> 3;
|
||||
mbc_left = mbc - 1;
|
||||
}
|
||||
|
||||
QP = coded_map[mbr + 1][mbc + 1] ?
|
||||
quant_map[mbr + 1][mbc + 1] : quant_map[mbr + 1][mbc_left + 1];
|
||||
|
||||
delta = (int)(((int)(*(rec + i - 3 + j * width)) +
|
||||
(int)(*(rec + i - 2 + j * width)) +
|
||||
(int)(*(rec + i - 1 + j * width)) +
|
||||
(int)(*(rec + i + j * width) * (-6)) +
|
||||
(int)(*(rec + i + 1 + j * width)) +
|
||||
(int)(*(rec + i + 2 + j * width)) +
|
||||
(int)(*(rec + i + 3 + j * width))) / 8.0);
|
||||
|
||||
d1 = sign(delta) * max(0, abs(delta) - max(0, 2 * (abs(delta) - STRENGTH2[QP - 1])));
|
||||
|
||||
/* Post Filter D */
|
||||
*(rec + i + j * width) += d1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
343
Src/f263/Reconstruction.cpp
Normal file
343
Src/f263/Reconstruction.cpp
Normal file
@ -0,0 +1,343 @@
|
||||
#include "Decoder.h"
|
||||
|
||||
#define sign(a) ((a) < 0 ? -1 : 1)
|
||||
|
||||
/* private prototypes */
|
||||
static void recon_comp (unsigned char *src, unsigned char *dst,
|
||||
int lx, int lx2, int w, int h, int x, int y, int dx, int dy);
|
||||
|
||||
static void rec(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void recc(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void rech(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void rechc(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void h263_recv(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void recvc(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void rec4(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
static void rec4c(unsigned char *s, unsigned char *d, int lx, int lx2, int h);
|
||||
|
||||
static int roundtab[16]= {0,0,0,1,1,1,1,1,1,1,1,1,1,1,2,2};
|
||||
|
||||
void Decoder::reconstruct(int bx, int by, int mode)
|
||||
{
|
||||
int w, h, lx, lx2, dx, dy, xp, yp, comp, sum;
|
||||
int x, y;
|
||||
unsigned char *src[3];
|
||||
|
||||
x = bx / 16 + 1;
|
||||
y = by / 16 + 1;
|
||||
lx = coded_picture_width;
|
||||
|
||||
lx2 = coded_picture_width + 64;
|
||||
src[0] = edgeframe[0];
|
||||
src[1] = edgeframe[1];
|
||||
src[2] = edgeframe[2];
|
||||
|
||||
/* P prediction */
|
||||
w = 8;
|
||||
h = 8;
|
||||
/* Y */
|
||||
/* 4 MV can be used without OBMC in * deblocking filter mode */
|
||||
|
||||
if (mode == MODE_INTER4V || mode == MODE_INTER4V_Q)
|
||||
{
|
||||
for (comp = 0; comp < 4; comp++)
|
||||
{
|
||||
dx = MV[0][comp + 1][y][x];
|
||||
dy = MV[1][comp + 1][y][x];
|
||||
|
||||
xp = bx + ((comp & 1) << 3);
|
||||
yp = by + ((comp & 2) << 2);
|
||||
recon_comp(src[0], newframe[0], lx, lx2, w, h, xp, yp, dx, dy);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dx = MV[0][0][y][x];
|
||||
dy = MV[1][0][y][x];
|
||||
recon_comp(src[0], newframe[0], lx, lx2, w << 1, h << 1, bx, by, dx, dy);
|
||||
// TODO: MC16x16
|
||||
}
|
||||
|
||||
/* Chroma */
|
||||
if (mode == MODE_INTER4V || mode == MODE_INTER4V_Q)
|
||||
{
|
||||
sum = MV[0][1][y][x] + MV[0][2][y][x] + MV[0][3][y][x] + MV[0][4][y][x];
|
||||
dx = sign(sum) * (roundtab[abs(sum) % 16] + (abs(sum) / 16) * 2);
|
||||
|
||||
sum = MV[1][1][y][x] + MV[1][2][y][x] + MV[1][3][y][x] + MV[1][4][y][x];
|
||||
dy = sign(sum) * (roundtab[abs(sum) % 16] + (abs(sum) / 16) * 2);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
dx = MV[0][0][y][x];
|
||||
dy = MV[1][0][y][x];
|
||||
/* chroma rounding */
|
||||
dx = (dx % 4 == 0 ? dx >> 1 : (dx >> 1) | 1);
|
||||
dy = (dy % 4 == 0 ? dy >> 1 : (dy >> 1) | 1);
|
||||
}
|
||||
lx >>= 1;
|
||||
bx >>= 1;
|
||||
lx2 >>= 1;
|
||||
by >>= 1;
|
||||
/* Chroma */
|
||||
recon_comp(src[1], newframe[1], lx, lx2, w, h, bx, by, dx, dy);
|
||||
recon_comp(src[2], newframe[2], lx, lx2, w, h, bx, by, dx, dy);
|
||||
}
|
||||
|
||||
static void recon_comp(unsigned char *src,unsigned char *dst,int lx,int lx2,int w,int h,int x,int y,int dx,int dy)
|
||||
{
|
||||
int xint, xh, yint, yh;
|
||||
unsigned char *s, *d;
|
||||
|
||||
xint = dx>>1;
|
||||
xh = dx & 1;
|
||||
yint = dy>>1;
|
||||
yh = dy & 1;
|
||||
|
||||
/* origins */
|
||||
s = src + lx2*(y+yint) + x + xint;
|
||||
d = dst + lx*y + x;
|
||||
|
||||
if (!xh && !yh)
|
||||
if (w!=8)
|
||||
rec(s,d,lx,lx2,h);
|
||||
else
|
||||
recc(s,d,lx,lx2,h);
|
||||
else if (!xh && yh)
|
||||
if (w!=8)
|
||||
h263_recv(s,d,lx,lx2,h);
|
||||
else
|
||||
recvc(s,d,lx,lx2,h);
|
||||
else if (xh && !yh)
|
||||
if (w!=8)
|
||||
rech(s,d,lx,lx2,h);
|
||||
else
|
||||
rechc(s,d,lx,lx2,h);
|
||||
else /* if (xh && yh) */
|
||||
if (w!=8)
|
||||
rec4(s,d,lx,lx2,h);
|
||||
else
|
||||
rec4c(s,d,lx,lx2,h);
|
||||
}
|
||||
|
||||
static void rec(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
int j;
|
||||
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
d[0] = s[0];
|
||||
d[1] = s[1];
|
||||
d[2] = s[2];
|
||||
d[3] = s[3];
|
||||
d[4] = s[4];
|
||||
d[5] = s[5];
|
||||
d[6] = s[6];
|
||||
d[7] = s[7];
|
||||
d[8] = s[8];
|
||||
d[9] = s[9];
|
||||
d[10] = s[10];
|
||||
d[11] = s[11];
|
||||
d[12] = s[12];
|
||||
d[13] = s[13];
|
||||
d[14] = s[14];
|
||||
d[15] = s[15];
|
||||
s+= lx2;
|
||||
d+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
static void recc(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
int j;
|
||||
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
d[0] = s[0];
|
||||
d[1] = s[1];
|
||||
d[2] = s[2];
|
||||
d[3] = s[3];
|
||||
d[4] = s[4];
|
||||
d[5] = s[5];
|
||||
d[6] = s[6];
|
||||
d[7] = s[7];
|
||||
s+= lx2;
|
||||
d+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
static void rech(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
unsigned char *dp,*sp;
|
||||
int j;
|
||||
unsigned int s1,s2;
|
||||
|
||||
sp = s;
|
||||
dp = d;
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
s1=sp[0];
|
||||
dp[0] = (unsigned int)(s1+(s2=sp[1])+1)>>1;
|
||||
dp[1] = (unsigned int)(s2+(s1=sp[2])+1)>>1;
|
||||
dp[2] = (unsigned int)(s1+(s2=sp[3])+1)>>1;
|
||||
dp[3] = (unsigned int)(s2+(s1=sp[4])+1)>>1;
|
||||
dp[4] = (unsigned int)(s1+(s2=sp[5])+1)>>1;
|
||||
dp[5] = (unsigned int)(s2+(s1=sp[6])+1)>>1;
|
||||
dp[6] = (unsigned int)(s1+(s2=sp[7])+1)>>1;
|
||||
dp[7] = (unsigned int)(s2+(s1=sp[8])+1)>>1;
|
||||
dp[8] = (unsigned int)(s1+(s2=sp[9])+1)>>1;
|
||||
dp[9] = (unsigned int)(s2+(s1=sp[10])+1)>>1;
|
||||
dp[10] = (unsigned int)(s1+(s2=sp[11])+1)>>1;
|
||||
dp[11] = (unsigned int)(s2+(s1=sp[12])+1)>>1;
|
||||
dp[12] = (unsigned int)(s1+(s2=sp[13])+1)>>1;
|
||||
dp[13] = (unsigned int)(s2+(s1=sp[14])+1)>>1;
|
||||
dp[14] = (unsigned int)(s1+(s2=sp[15])+1)>>1;
|
||||
dp[15] = (unsigned int)(s2+sp[16]+1)>>1;
|
||||
sp+= lx2;
|
||||
dp+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
static void rechc(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
unsigned char *dp,*sp;
|
||||
int j;
|
||||
unsigned int s1,s2;
|
||||
|
||||
sp = s;
|
||||
dp = d;
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
s1=sp[0];
|
||||
dp[0] = (unsigned int)(s1+(s2=sp[1])+1)>>1;
|
||||
dp[1] = (unsigned int)(s2+(s1=sp[2])+1)>>1;
|
||||
dp[2] = (unsigned int)(s1+(s2=sp[3])+1)>>1;
|
||||
dp[3] = (unsigned int)(s2+(s1=sp[4])+1)>>1;
|
||||
dp[4] = (unsigned int)(s1+(s2=sp[5])+1)>>1;
|
||||
dp[5] = (unsigned int)(s2+(s1=sp[6])+1)>>1;
|
||||
dp[6] = (unsigned int)(s1+(s2=sp[7])+1)>>1;
|
||||
dp[7] = (unsigned int)(s2+sp[8]+1)>>1;
|
||||
sp+= lx2;
|
||||
dp+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void h263_recv(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
unsigned char *dp,*sp,*sp2;
|
||||
int j;
|
||||
|
||||
sp = s;
|
||||
sp2 = s+lx2;
|
||||
dp = d;
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
dp[0] = (unsigned int)(sp[0]+sp2[0]+1)>>1;
|
||||
dp[1] = (unsigned int)(sp[1]+sp2[1]+1)>>1;
|
||||
dp[2] = (unsigned int)(sp[2]+sp2[2]+1)>>1;
|
||||
dp[3] = (unsigned int)(sp[3]+sp2[3]+1)>>1;
|
||||
dp[4] = (unsigned int)(sp[4]+sp2[4]+1)>>1;
|
||||
dp[5] = (unsigned int)(sp[5]+sp2[5]+1)>>1;
|
||||
dp[6] = (unsigned int)(sp[6]+sp2[6]+1)>>1;
|
||||
dp[7] = (unsigned int)(sp[7]+sp2[7]+1)>>1;
|
||||
dp[8] = (unsigned int)(sp[8]+sp2[8]+1)>>1;
|
||||
dp[9] = (unsigned int)(sp[9]+sp2[9]+1)>>1;
|
||||
dp[10] = (unsigned int)(sp[10]+sp2[10]+1)>>1;
|
||||
dp[11] = (unsigned int)(sp[11]+sp2[11]+1)>>1;
|
||||
dp[12] = (unsigned int)(sp[12]+sp2[12]+1)>>1;
|
||||
dp[13] = (unsigned int)(sp[13]+sp2[13]+1)>>1;
|
||||
dp[14] = (unsigned int)(sp[14]+sp2[14]+1)>>1;
|
||||
dp[15] = (unsigned int)(sp[15]+sp2[15]+1)>>1;
|
||||
sp+= lx2;
|
||||
sp2+= lx2;
|
||||
dp+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
static void recvc(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
unsigned char *dp,*sp,*sp2;
|
||||
int j;
|
||||
|
||||
sp = s;
|
||||
sp2 = s+lx2;
|
||||
dp = d;
|
||||
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
dp[0] = (unsigned int)(sp[0]+sp2[0]+1)>>1;
|
||||
dp[1] = (unsigned int)(sp[1]+sp2[1]+1)>>1;
|
||||
dp[2] = (unsigned int)(sp[2]+sp2[2]+1)>>1;
|
||||
dp[3] = (unsigned int)(sp[3]+sp2[3]+1)>>1;
|
||||
dp[4] = (unsigned int)(sp[4]+sp2[4]+1)>>1;
|
||||
dp[5] = (unsigned int)(sp[5]+sp2[5]+1)>>1;
|
||||
dp[6] = (unsigned int)(sp[6]+sp2[6]+1)>>1;
|
||||
dp[7] = (unsigned int)(sp[7]+sp2[7]+1)>>1;
|
||||
sp+= lx2;
|
||||
sp2+= lx2;
|
||||
dp+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
static void rec4(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
unsigned char *dp,*sp,*sp2;
|
||||
int j;
|
||||
unsigned int s1,s2,s3,s4;
|
||||
|
||||
sp = s;
|
||||
sp2 = s+lx2;
|
||||
dp = d;
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
s1=sp[0]; s3=sp2[0];
|
||||
dp[0] = (unsigned int)(s1+(s2=sp[1])+s3+(s4=sp2[1])+2)>>2;
|
||||
dp[1] = (unsigned int)(s2+(s1=sp[2])+s4+(s3=sp2[2])+2)>>2;
|
||||
dp[2] = (unsigned int)(s1+(s2=sp[3])+s3+(s4=sp2[3])+2)>>2;
|
||||
dp[3] = (unsigned int)(s2+(s1=sp[4])+s4+(s3=sp2[4])+2)>>2;
|
||||
dp[4] = (unsigned int)(s1+(s2=sp[5])+s3+(s4=sp2[5])+2)>>2;
|
||||
dp[5] = (unsigned int)(s2+(s1=sp[6])+s4+(s3=sp2[6])+2)>>2;
|
||||
dp[6] = (unsigned int)(s1+(s2=sp[7])+s3+(s4=sp2[7])+2)>>2;
|
||||
dp[7] = (unsigned int)(s2+(s1=sp[8])+s4+(s3=sp2[8])+2)>>2;
|
||||
dp[8] = (unsigned int)(s1+(s2=sp[9])+s3+(s4=sp2[9])+2)>>2;
|
||||
dp[9] = (unsigned int)(s2+(s1=sp[10])+s4+(s3=sp2[10])+2)>>2;
|
||||
dp[10] = (unsigned int)(s1+(s2=sp[11])+s3+(s4=sp2[11])+2)>>2;
|
||||
dp[11] = (unsigned int)(s2+(s1=sp[12])+s4+(s3=sp2[12])+2)>>2;
|
||||
dp[12] = (unsigned int)(s1+(s2=sp[13])+s3+(s4=sp2[13])+2)>>2;
|
||||
dp[13] = (unsigned int)(s2+(s1=sp[14])+s4+(s3=sp2[14])+2)>>2;
|
||||
dp[14] = (unsigned int)(s1+(s2=sp[15])+s3+(s4=sp2[15])+2)>>2;
|
||||
dp[15] = (unsigned int)(s2+sp[16]+s4+sp2[16]+2)>>2;
|
||||
sp+= lx2;
|
||||
sp2+= lx2;
|
||||
dp+= lx;
|
||||
}
|
||||
}
|
||||
|
||||
static void rec4c(unsigned char *s,unsigned char *d,int lx,int lx2,int h)
|
||||
{
|
||||
unsigned char *dp,*sp,*sp2;
|
||||
int j;
|
||||
unsigned int s1,s2,s3,s4;
|
||||
|
||||
sp = s;
|
||||
sp2 = s+lx2;
|
||||
dp = d;
|
||||
for (j=0; j<h; j++)
|
||||
{
|
||||
s1=sp[0]; s3=sp2[0];
|
||||
dp[0] = (unsigned int)(s1+(s2=sp[1])+s3+(s4=sp2[1])+2)>>2;
|
||||
dp[1] = (unsigned int)(s2+(s1=sp[2])+s4+(s3=sp2[2])+2)>>2;
|
||||
dp[2] = (unsigned int)(s1+(s2=sp[3])+s3+(s4=sp2[3])+2)>>2;
|
||||
dp[3] = (unsigned int)(s2+(s1=sp[4])+s4+(s3=sp2[4])+2)>>2;
|
||||
dp[4] = (unsigned int)(s1+(s2=sp[5])+s3+(s4=sp2[5])+2)>>2;
|
||||
dp[5] = (unsigned int)(s2+(s1=sp[6])+s4+(s3=sp2[6])+2)>>2;
|
||||
dp[6] = (unsigned int)(s1+(s2=sp[7])+s3+(s4=sp2[7])+2)>>2;
|
||||
dp[7] = (unsigned int)(s2+sp[8]+s4+sp2[8]+2)>>2;
|
||||
sp+= lx2;
|
||||
sp2+= lx2;
|
||||
dp+= lx;
|
||||
}
|
||||
}
|
||||
|
6
Src/f263/api.h
Normal file
6
Src/f263/api.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <api/service/api_service.h>
|
||||
|
||||
extern api_service *serviceManager;
|
||||
#define WASABI_API_SVC serviceManager
|
43
Src/f263/f263.sln
Normal file
43
Src/f263/f263.sln
Normal file
@ -0,0 +1,43 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29424.173
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "f263", "f263.vcxproj", "{133EA77F-540F-4BEC-B276-31F0A5A26056}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D} = {E110CF48-9CA7-492B-BEA5-98FD87A7284D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "f263_static", "f263_static.vcxproj", "{E110CF48-9CA7-492B-BEA5-98FD87A7284D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Release|Win32.Build.0 = Release|Win32
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Debug|x64.Build.0 = Debug|x64
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Release|x64.ActiveCfg = Release|x64
|
||||
{E110CF48-9CA7-492B-BEA5-98FD87A7284D}.Release|x64.Build.0 = Release|x64
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Release|Win32.Build.0 = Release|Win32
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Debug|x64.Build.0 = Debug|x64
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Release|x64.ActiveCfg = Release|x64
|
||||
{133EA77F-540F-4BEC-B276-31F0A5A26056}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CEEA74C0-E99C-4636-9BC4-7E51C71476A4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
256
Src/f263/f263.vcxproj
Normal file
256
Src/f263/f263.vcxproj
Normal file
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>f263</ProjectName>
|
||||
<ProjectGuid>{133EA77F-540F-4BEC-B276-31F0A5A26056}</ProjectGuid>
|
||||
<RootNamespace>f263</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.lib</TargetExt>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.lib</TargetExt>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(ProjectDir)x86_Debug\$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x86_Debug\$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Message>
|
||||
</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(ProjectName).w5s</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(ProjectDir)x64_Release\$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x64_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)*.w5s ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.w5s ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(ProjectName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(ProjectDir)x86_Release\$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x86_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Message>
|
||||
</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(ProjectName).w5s</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(ProjectDir)x64_Release\$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x64_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)*.w5s ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.w5s ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wasabi\bfc\bfc.vcxproj">
|
||||
<Project>{d0ec862e-dddd-4f4f-934f-b75dc9062dc1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wasabi\Wasabi.vcxproj">
|
||||
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="f263_static.vcxproj">
|
||||
<Project>{e110cf48-9ca7-492b-bea5-98fd87a7284d}</Project>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="api.h" />
|
||||
<ClInclude Include="factory_f263.h" />
|
||||
<ClInclude Include="flv_f263_decoder.h" />
|
||||
<ClInclude Include="impl_f263decoder.h" />
|
||||
<ClInclude Include="mkv_f263_decoder.h" />
|
||||
<ClInclude Include="obj_f263decoder.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="factory_f263.cpp" />
|
||||
<ClCompile Include="flv_f263_decoder.cpp" />
|
||||
<ClCompile Include="impl_f263decoder.cpp" />
|
||||
<ClCompile Include="mkv_f263_decoder.cpp" />
|
||||
<ClCompile Include="w5s.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="f263.w5s.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
59
Src/f263/f263.vcxproj.filters
Normal file
59
Src/f263/f263.vcxproj.filters
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="factory_f263.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="flv_f263_decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="impl_f263decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mkv_f263_decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="w5s.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="factory_f263.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="flv_f263_decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="impl_f263decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mkv_f263_decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="obj_f263decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{64b69af7-d46d-4bf2-ba93-decdf17bb73c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{f8396b92-0933-4ffa-bf39-cc5a5f0d1945}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{4dc6e908-f456-4836-8523-63e2b168aa89}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="f263.w5s.rc">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
76
Src/f263/f263.w5s.rc
Normal file
76
Src/f263/f263.w5s.rc
Normal file
@ -0,0 +1,76 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.K.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""version.rc2""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.K.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "version.rc2"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
215
Src/f263/f263_static.vcxproj
Normal file
215
Src/f263/f263_static.vcxproj
Normal file
@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E110CF48-9CA7-492B-BEA5-98FD87A7284D}</ProjectGuid>
|
||||
<RootNamespace>f263_static</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)_static\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)_static\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)_static\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)_static\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)_static\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)_static\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)_static\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)_static\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BitReader.cpp" />
|
||||
<ClCompile Include="Block.cpp" />
|
||||
<ClCompile Include="Decoder.cpp" />
|
||||
<ClCompile Include="Header.cpp" />
|
||||
<ClCompile Include="idct.cpp" />
|
||||
<ClCompile Include="idctref.cpp" />
|
||||
<ClCompile Include="indices.cpp" />
|
||||
<ClCompile Include="lib.cpp" />
|
||||
<ClCompile Include="Picture.cpp" />
|
||||
<ClCompile Include="Reconstruction.cpp" />
|
||||
<ClCompile Include="vlc.cpp" />
|
||||
<ClCompile Include="vlc_table.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="BitReader.h" />
|
||||
<ClInclude Include="Decoder.h" />
|
||||
<ClInclude Include="idct.h" />
|
||||
<ClInclude Include="idctref.h" />
|
||||
<ClInclude Include="indices.h" />
|
||||
<ClInclude Include="lib.h" />
|
||||
<ClInclude Include="vlc_table.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
75
Src/f263/f263_static.vcxproj.filters
Normal file
75
Src/f263/f263_static.vcxproj.filters
Normal file
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BitReader.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Block.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Header.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="idct.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="idctref.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="indices.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lib.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Picture.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Reconstruction.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="vlc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="vlc_table.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="vlc_table.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="indices.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="idctref.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="idct.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="BitReader.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{1abe055e-8bcd-4762-8596-456bb1379502}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{a1e69691-593e-4d99-8e28-7fc4fdbef57c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{61f45802-cce5-4d5f-ac0c-e30ed6c350d4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
316
Src/f263/f263w5s.vcxproj
Normal file
316
Src/f263/f263w5s.vcxproj
Normal file
@ -0,0 +1,316 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<ProjectName>f263.w5s</ProjectName>
|
||||
<ProjectGuid>{1A8AE3E1-9D6C-444A-A2F3-046C9ED6F5A8}</ProjectGuid>
|
||||
<RootNamespace>f263.w5s</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>17.0.32505.173</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(PlatformShortName)_$(Configuration).w5s\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration).w5s\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<TargetName>f263</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<TargetName>f263</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(PlatformShortName)_$(Configuration).w5s\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration).w5s\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<TargetName>f263</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<TargetName>f263</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnableManifest>false</VcpkgEnableManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Vcpkg">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Vcpkg">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention />
|
||||
<ImportLibrary>$(OutDir)f263w5s.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)f263w5s.lib</ImportLibrary>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>msvcprt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(OutDir)f263w5s.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>.\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>../Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;F263_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<IgnoreSpecificDefaultLibraries>msvcprt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(OutDir)f263w5s.lib</ImportLibrary>
|
||||
<AdditionalLibraryDirectories>.\$(PlatformShortName)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wasabi\bfc\bfc.vcxproj">
|
||||
<Project>{d0ec862e-dddd-4f4f-934f-b75dc9062dc1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wasabi\Wasabi.vcxproj">
|
||||
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="f263_static.vcxproj">
|
||||
<Project>{e110cf48-9ca7-492b-bea5-98fd87a7284d}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="api.h" />
|
||||
<ClInclude Include="factory_f263.h" />
|
||||
<ClInclude Include="flv_f263_decoder.h" />
|
||||
<ClInclude Include="impl_f263decoder.h" />
|
||||
<ClInclude Include="mkv_f263_decoder.h" />
|
||||
<ClInclude Include="obj_f263decoder.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="factory_f263.cpp" />
|
||||
<ClCompile Include="flv_f263_decoder.cpp" />
|
||||
<ClCompile Include="impl_f263decoder.cpp" />
|
||||
<ClCompile Include="mkv_f263_decoder.cpp" />
|
||||
<ClCompile Include="w5s.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="f263.w5s.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
60
Src/f263/f263w5s.vcxproj.filters
Normal file
60
Src/f263/f263w5s.vcxproj.filters
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{a532cd7c-d8b7-4dcc-86f5-8b155074c11d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{dd8457ec-7c3b-41df-9bf7-8fd496c4294e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="factory_f263.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="flv_f263_decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="impl_f263decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mkv_f263_decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="obj_f263decoder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="factory_f263.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="flv_f263_decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="impl_f263decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mkv_f263_decoder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="w5s.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="f263.w5s.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
66
Src/f263/factory_f263.cpp
Normal file
66
Src/f263/factory_f263.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
#include "api.h"
|
||||
#include "factory_f263.h"
|
||||
#include "impl_f263decoder.h"
|
||||
|
||||
static const char serviceName[] = "F263 Decoder";
|
||||
|
||||
FOURCC F263Factory::GetServiceType()
|
||||
{
|
||||
return WaSvc::OBJECT;
|
||||
}
|
||||
|
||||
const char *F263Factory::GetServiceName()
|
||||
{
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
GUID F263Factory::GetGUID()
|
||||
{
|
||||
return obj_f263decoderGUID;
|
||||
}
|
||||
|
||||
void *F263Factory::GetInterface(int global_lock)
|
||||
{
|
||||
F263Decoder *f263decoder = new F263Decoder;
|
||||
obj_f263decoder *ifc= static_cast<obj_f263decoder *>(f263decoder);
|
||||
// if (global_lock)
|
||||
// WASABI_API_SVC->service_lock(this, (void *)ifc);
|
||||
return ifc;
|
||||
}
|
||||
|
||||
int F263Factory::SupportNonLockingInterface()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int F263Factory::ReleaseInterface(void *ifc)
|
||||
{
|
||||
//WASABI_API_SVC->service_unlock(ifc);
|
||||
obj_f263decoder *decoderIFC = static_cast<obj_f263decoder *>(ifc);
|
||||
F263Decoder *decoder = static_cast<F263Decoder *>(decoderIFC);
|
||||
delete decoder;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *F263Factory::GetTestString()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int F263Factory::ServiceNotify(int msg, int param1, int param2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define CBCLASS F263Factory
|
||||
START_DISPATCH;
|
||||
CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
|
||||
CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
|
||||
CB(WASERVICEFACTORY_GETGUID, GetGUID)
|
||||
CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
|
||||
CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
|
||||
CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
|
||||
CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
|
||||
CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
27
Src/f263/factory_f263.h
Normal file
27
Src/f263/factory_f263.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* copyright 2008 Ben Allison */
|
||||
#ifndef NULLSOFT_FACTORY_F263_H
|
||||
#define NULLSOFT_FACTORY_F263_H
|
||||
|
||||
#include "api.h"
|
||||
#include <api/service/waservicefactory.h>
|
||||
#include <api/service/services.h>
|
||||
|
||||
class F263Factory : public waServiceFactory
|
||||
{
|
||||
public:
|
||||
FOURCC GetServiceType();
|
||||
const char *GetServiceName();
|
||||
GUID GetGUID();
|
||||
void *GetInterface(int global_lock);
|
||||
int SupportNonLockingInterface();
|
||||
int ReleaseInterface(void *ifc);
|
||||
const char *GetTestString();
|
||||
int ServiceNotify(int msg, int param1, int param2);
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
102
Src/f263/flv_f263_decoder.cpp
Normal file
102
Src/f263/flv_f263_decoder.cpp
Normal file
@ -0,0 +1,102 @@
|
||||
#include "flv_f263_decoder.h"
|
||||
#include "lib.h"
|
||||
|
||||
int FLVDecoderCreator::CreateVideoDecoder(int format_type, int width, int height, ifc_flvvideodecoder **decoder)
|
||||
{
|
||||
if (format_type == FLV::VIDEO_FORMAT_SORENSON)
|
||||
{
|
||||
void *ctx = F263_CreateDecoder();
|
||||
if (!ctx)
|
||||
return CREATEDECODER_FAILURE;
|
||||
*decoder = new FLVSorenson(ctx);
|
||||
return CREATEDECODER_SUCCESS;
|
||||
}
|
||||
return CREATEDECODER_NOT_MINE;
|
||||
}
|
||||
|
||||
int FLVDecoderCreator::HandlesVideo(int format_type)
|
||||
{
|
||||
if (format_type == FLV::VIDEO_FORMAT_SORENSON)
|
||||
{
|
||||
return CREATEDECODER_SUCCESS;
|
||||
}
|
||||
return CREATEDECODER_NOT_MINE;
|
||||
}
|
||||
|
||||
#define CBCLASS FLVDecoderCreator
|
||||
START_DISPATCH;
|
||||
CB(CREATE_VIDEO_DECODER, CreateVideoDecoder)
|
||||
CB(HANDLES_VIDEO, HandlesVideo)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
||||
|
||||
/* --- */
|
||||
|
||||
FLVSorenson::FLVSorenson(void *decoder) : decoder(decoder)
|
||||
{
|
||||
last_timestamp=0;
|
||||
width=0;
|
||||
height=0;
|
||||
decoded=0;
|
||||
}
|
||||
|
||||
int FLVSorenson::GetOutputFormat(int *x, int *y, int *color_format)
|
||||
{
|
||||
if (width && height)
|
||||
{
|
||||
*x = width;
|
||||
*y = height;
|
||||
*color_format = '21VY';
|
||||
return FLV_VIDEO_SUCCESS;
|
||||
}
|
||||
return FLV_VIDEO_FAILURE;
|
||||
}
|
||||
|
||||
int FLVSorenson::DecodeSample(const void *inputBuffer, size_t inputBufferBytes, int32_t timestamp)
|
||||
{
|
||||
last_timestamp = timestamp;
|
||||
int keyframe;
|
||||
|
||||
int ret = F263_DecodeFrame(decoder, const_cast<void *>(inputBuffer), inputBufferBytes, &yv12, &width, &height, &keyframe);
|
||||
if (ret == F263_OK)
|
||||
{
|
||||
decoded=1;
|
||||
return FLV_VIDEO_SUCCESS;
|
||||
}
|
||||
else
|
||||
return FLV_VIDEO_FAILURE;
|
||||
}
|
||||
|
||||
void FLVSorenson::Flush()
|
||||
{
|
||||
}
|
||||
|
||||
void FLVSorenson::Close()
|
||||
{
|
||||
if (decoder)
|
||||
F263_DestroyDecoder(decoder);
|
||||
delete this;
|
||||
}
|
||||
|
||||
int FLVSorenson::GetPicture(void **data, void **decoder_data, uint64_t *timestamp)
|
||||
{
|
||||
if (decoded)
|
||||
{
|
||||
*timestamp = last_timestamp;
|
||||
*decoder_data = 0;
|
||||
*data = &yv12;
|
||||
decoded=0;
|
||||
return FLV_VIDEO_SUCCESS;
|
||||
}
|
||||
return FLV_VIDEO_FAILURE;
|
||||
}
|
||||
|
||||
#define CBCLASS FLVSorenson
|
||||
START_DISPATCH;
|
||||
CB(FLV_VIDEO_GETOUTPUTFORMAT, GetOutputFormat)
|
||||
CB(FLV_VIDEO_DECODE, DecodeSample)
|
||||
VCB(FLV_VIDEO_FLUSH, Flush)
|
||||
VCB(FLV_VIDEO_CLOSE, Close)
|
||||
CB(FLV_VIDEO_GET_PICTURE, GetPicture)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
39
Src/f263/flv_f263_decoder.h
Normal file
39
Src/f263/flv_f263_decoder.h
Normal file
@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
#include "../Plugins/Input/in_flv/svc_flvdecoder.h"
|
||||
#include "../Plugins/Input/in_flv/FLVVideoHeader.h"
|
||||
#include "../Plugins/Input/in_flv/ifc_flvvideodecoder.h"
|
||||
#include "../Winamp/wa_ipc.h" // for YV12_PLANES
|
||||
|
||||
// {8E100A48-C03B-4453-A1FA-6B944FC23F6A}
|
||||
static const GUID flv_h263_guid=
|
||||
{ 0x8e100a48, 0xc03b, 0x4453, { 0xa1, 0xfa, 0x6b, 0x94, 0x4f, 0xc2, 0x3f, 0x6a } };
|
||||
|
||||
class FLVDecoderCreator : public svc_flvdecoder
|
||||
{
|
||||
public:
|
||||
static const char *getServiceName() { return "H.263 FLV Decoder"; }
|
||||
static GUID getServiceGuid() { return flv_h263_guid; }
|
||||
int CreateVideoDecoder(int format_type, int width, int height, ifc_flvvideodecoder **decoder);
|
||||
int HandlesVideo(int format_type);
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
class FLVSorenson : public ifc_flvvideodecoder
|
||||
{
|
||||
public:
|
||||
FLVSorenson(void *decoder);
|
||||
int GetOutputFormat(int *x, int *y, int *color_format);
|
||||
int DecodeSample(const void *inputBuffer, size_t inputBufferBytes, int32_t timestamp);
|
||||
void Flush();
|
||||
void Close();
|
||||
int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
|
||||
private:
|
||||
void *decoder;
|
||||
YV12_PLANES yv12;
|
||||
int32_t last_timestamp;
|
||||
int width, height;
|
||||
int decoded;
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
162
Src/f263/idct.cpp
Normal file
162
Src/f263/idct.cpp
Normal file
@ -0,0 +1,162 @@
|
||||
#include "idct.h"
|
||||
#define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */
|
||||
#define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */
|
||||
#define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */
|
||||
#define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */
|
||||
#define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */
|
||||
#define W7 565 /* 2048*sqrt(2)*cos(7*pi/16) */
|
||||
|
||||
|
||||
short IDCT::iclip[1024];
|
||||
short *IDCT::iclp=0;
|
||||
bool IDCT::initted = false;
|
||||
|
||||
|
||||
/* row (horizontal) IDCT
|
||||
*
|
||||
* 7 pi 1
|
||||
* dst[k] = sum c[l] * src[l] * cos( -- * ( k + - ) * l )
|
||||
* l=0 8 2
|
||||
*
|
||||
* where: c[0] = 128
|
||||
* c[1..7] = 128*sqrt(2)
|
||||
*/
|
||||
|
||||
void IDCT::idctrow(short *blk)
|
||||
{
|
||||
int x0, x1, x2, x3, x4, x5, x6, x7, x8;
|
||||
|
||||
/* shortcut */
|
||||
if (!((x1 = blk[4]<<11) | (x2 = blk[6]) | (x3 = blk[2]) |
|
||||
(x4 = blk[1]) | (x5 = blk[7]) | (x6 = blk[5]) | (x7 = blk[3])))
|
||||
{
|
||||
blk[0]=blk[1]=blk[2]=blk[3]=blk[4]=blk[5]=blk[6]=blk[7]=blk[0]<<3;
|
||||
return;
|
||||
}
|
||||
|
||||
x0 = (blk[0]<<11) + 128; /* for proper rounding in the fourth stage */
|
||||
|
||||
/* first stage */
|
||||
x8 = W7*(x4+x5);
|
||||
x4 = x8 + (W1-W7)*x4;
|
||||
x5 = x8 - (W1+W7)*x5;
|
||||
x8 = W3*(x6+x7);
|
||||
x6 = x8 - (W3-W5)*x6;
|
||||
x7 = x8 - (W3+W5)*x7;
|
||||
|
||||
/* second stage */
|
||||
x8 = x0 + x1;
|
||||
x0 -= x1;
|
||||
x1 = W6*(x3+x2);
|
||||
x2 = x1 - (W2+W6)*x2;
|
||||
x3 = x1 + (W2-W6)*x3;
|
||||
x1 = x4 + x6;
|
||||
x4 -= x6;
|
||||
x6 = x5 + x7;
|
||||
x5 -= x7;
|
||||
|
||||
/* third stage */
|
||||
x7 = x8 + x3;
|
||||
x8 -= x3;
|
||||
x3 = x0 + x2;
|
||||
x0 -= x2;
|
||||
x2 = (181*(x4+x5)+128)>>8;
|
||||
x4 = (181*(x4-x5)+128)>>8;
|
||||
|
||||
/* fourth stage */
|
||||
blk[0] = (x7+x1)>>8;
|
||||
blk[1] = (x3+x2)>>8;
|
||||
blk[2] = (x0+x4)>>8;
|
||||
blk[3] = (x8+x6)>>8;
|
||||
blk[4] = (x8-x6)>>8;
|
||||
blk[5] = (x0-x4)>>8;
|
||||
blk[6] = (x3-x2)>>8;
|
||||
blk[7] = (x7-x1)>>8;
|
||||
}
|
||||
|
||||
/* column (vertical) IDCT
|
||||
*
|
||||
* 7 pi 1
|
||||
* dst[8*k] = sum c[l] * src[8*l] * cos( -- * ( k + - ) * l )
|
||||
* l=0 8 2
|
||||
*
|
||||
* where: c[0] = 1/1024
|
||||
* c[1..7] = (1/1024)*sqrt(2)
|
||||
*/
|
||||
void IDCT::idctcol(short *blk)
|
||||
{
|
||||
int x0, x1, x2, x3, x4, x5, x6, x7, x8;
|
||||
|
||||
/* shortcut */
|
||||
if (!((x1 = (blk[8*4]<<8)) | (x2 = blk[8*6]) | (x3 = blk[8*2]) |
|
||||
(x4 = blk[8*1]) | (x5 = blk[8*7]) | (x6 = blk[8*5]) | (x7 = blk[8*3])))
|
||||
{
|
||||
blk[8*0]=blk[8*1]=blk[8*2]=blk[8*3]=blk[8*4]=blk[8*5]=blk[8*6]=blk[8*7]=
|
||||
iclp[(blk[8*0]+32)>>6];
|
||||
return;
|
||||
}
|
||||
|
||||
x0 = (blk[8*0]<<8) + 8192;
|
||||
|
||||
/* first stage */
|
||||
x8 = W7*(x4+x5) + 4;
|
||||
x4 = (x8+(W1-W7)*x4)>>3;
|
||||
x5 = (x8-(W1+W7)*x5)>>3;
|
||||
x8 = W3*(x6+x7) + 4;
|
||||
x6 = (x8-(W3-W5)*x6)>>3;
|
||||
x7 = (x8-(W3+W5)*x7)>>3;
|
||||
|
||||
/* second stage */
|
||||
x8 = x0 + x1;
|
||||
x0 -= x1;
|
||||
x1 = W6*(x3+x2) + 4;
|
||||
x2 = (x1-(W2+W6)*x2)>>3;
|
||||
x3 = (x1+(W2-W6)*x3)>>3;
|
||||
x1 = x4 + x6;
|
||||
x4 -= x6;
|
||||
x6 = x5 + x7;
|
||||
x5 -= x7;
|
||||
|
||||
/* third stage */
|
||||
x7 = x8 + x3;
|
||||
x8 -= x3;
|
||||
x3 = x0 + x2;
|
||||
x0 -= x2;
|
||||
x2 = (181*(x4+x5)+128)>>8;
|
||||
x4 = (181*(x4-x5)+128)>>8;
|
||||
|
||||
/* fourth stage */
|
||||
blk[8*0] = iclp[(x7+x1)>>14];
|
||||
blk[8*1] = iclp[(x3+x2)>>14];
|
||||
blk[8*2] = iclp[(x0+x4)>>14];
|
||||
blk[8*3] = iclp[(x8+x6)>>14];
|
||||
blk[8*4] = iclp[(x8-x6)>>14];
|
||||
blk[8*5] = iclp[(x0-x4)>>14];
|
||||
blk[8*6] = iclp[(x3-x2)>>14];
|
||||
blk[8*7] = iclp[(x7-x1)>>14];
|
||||
}
|
||||
|
||||
/* two dimensional inverse discrete cosine transform */
|
||||
void IDCT::idct(short *block)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
idctrow(block+8*i);
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
idctcol(block+i);
|
||||
}
|
||||
|
||||
void IDCT::init()
|
||||
{
|
||||
if (!initted)
|
||||
{
|
||||
int i;
|
||||
|
||||
iclp = iclip+512;
|
||||
for (i= -512; i<512; i++)
|
||||
iclp[i] = (i<-256) ? -256 : ((i>255) ? 255 : i);
|
||||
initted=true;
|
||||
}
|
||||
}
|
14
Src/f263/idct.h
Normal file
14
Src/f263/idct.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
class IDCT
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void idct(short *block);
|
||||
private:
|
||||
void idctcol(short *blk);
|
||||
void idctrow(short *blk);
|
||||
|
||||
static bool initted;
|
||||
static short iclip[1024]; /* clipping table */
|
||||
static short *iclp;
|
||||
};
|
66
Src/f263/idctref.cpp
Normal file
66
Src/f263/idctref.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
#include "idctref.h"
|
||||
#include <math.h>
|
||||
#ifndef PI
|
||||
# ifdef M_PI
|
||||
# define PI M_PI
|
||||
# else
|
||||
# define PI 3.14159265358979323846
|
||||
# endif
|
||||
#endif
|
||||
|
||||
bool IDCTRef::initted = false;
|
||||
double IDCTRef::c[8][8]; /* cosine transform matrix for 8x1 IDCT */
|
||||
|
||||
|
||||
/* initialize DCT coefficient matrix */
|
||||
|
||||
void IDCTRef::init()
|
||||
{
|
||||
if (!initted)
|
||||
{
|
||||
int freq, time;
|
||||
|
||||
for (freq=0; freq < 8; freq++)
|
||||
{
|
||||
double scale = (freq == 0) ? sqrt(0.125) : 0.5;
|
||||
for (time=0; time<8; time++)
|
||||
c[freq][time] = scale*cos((PI/8.0)*freq*(time + 0.5));
|
||||
}
|
||||
initted=true;
|
||||
}
|
||||
}
|
||||
|
||||
/* perform IDCT matrix multiply for 8x8 coefficient block */
|
||||
|
||||
void IDCTRef::idct(short *block)
|
||||
{
|
||||
int i, j, k, v;
|
||||
double partial_product;
|
||||
double tmp[64];
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
for (j=0; j<8; j++)
|
||||
{
|
||||
partial_product = 0.0;
|
||||
|
||||
for (k=0; k<8; k++)
|
||||
partial_product+= c[k][j]*block[8*i+k];
|
||||
|
||||
tmp[8*i+j] = partial_product;
|
||||
}
|
||||
|
||||
/* Transpose operation is integrated into address mapping by switching
|
||||
loop order of i and j */
|
||||
|
||||
for (j=0; j<8; j++)
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
partial_product = 0.0;
|
||||
|
||||
for (k=0; k<8; k++)
|
||||
partial_product+= c[k][i]*tmp[8*k+j];
|
||||
|
||||
v = (int)floor(partial_product+0.5);
|
||||
block[8*i+j] = (v<-256) ? -256 : ((v>255) ? 255 : v);
|
||||
}
|
||||
}
|
11
Src/f263/idctref.h
Normal file
11
Src/f263/idctref.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
class IDCTRef
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void idct(short *block);
|
||||
private:
|
||||
|
||||
static bool initted;
|
||||
static double c[8][8]; /* cosine transform matrix for 8x1 IDCT */
|
||||
};
|
24
Src/f263/impl_f263decoder.cpp
Normal file
24
Src/f263/impl_f263decoder.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "impl_f263decoder.h"
|
||||
#include "lib.h"
|
||||
|
||||
F263Decoder::F263Decoder() : context(0)
|
||||
{
|
||||
context = F263_CreateDecoder();
|
||||
}
|
||||
|
||||
F263Decoder::~F263Decoder()
|
||||
{
|
||||
if (context)
|
||||
F263_DestroyDecoder(context);
|
||||
}
|
||||
|
||||
int F263Decoder::DecodeFrame(void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe)
|
||||
{
|
||||
return F263_DecodeFrame(context, frameData, frameSize, yv12, width, height, keyframe);
|
||||
}
|
||||
|
||||
#define CBCLASS F263Decoder
|
||||
START_DISPATCH;
|
||||
CB(DISP_DECODEFRAME, DecodeFrame)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
15
Src/f263/impl_f263decoder.h
Normal file
15
Src/f263/impl_f263decoder.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "obj_f263decoder.h"
|
||||
|
||||
class F263Decoder : public obj_f263decoder
|
||||
{
|
||||
public:
|
||||
F263Decoder();
|
||||
~F263Decoder();
|
||||
int DecodeFrame(void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe);
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
|
||||
private:
|
||||
void *context;
|
||||
};
|
34
Src/f263/indices.cpp
Normal file
34
Src/f263/indices.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
#include "indices.h"
|
||||
int codtab[2]= {0,1};
|
||||
|
||||
int mcbpctab[21] = {0,16,32,48,1,17,33,49,2,18,34,50,3,19,35,51,4,20,36,52,255};
|
||||
|
||||
int mcbpc_intratab[9] = {3,19,35,51,4,20,36,52,255};
|
||||
|
||||
int modb_tab[3] = {0, 1, 2};
|
||||
|
||||
int ycbpb_tab[2] = {0, 1};
|
||||
|
||||
int uvcbpb_tab[2] = {0, 1};
|
||||
|
||||
int cbpytab[16] = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
|
||||
|
||||
int cbpy_intratab[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
|
||||
|
||||
int dquanttab[4] = {1,0,3,4};
|
||||
|
||||
int mvdtab[64] = {32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
|
||||
|
||||
int intradctab[254] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,255,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254};
|
||||
|
||||
int tcoeftab[103] = {1,2,3,4,5,6,7,8,9,10,11,12,17,18,19,20,21,22,33,34,35,36,49,50,51,65,66,67,81,82,83,97,98,99,113,114,129,130,145,146,161,162,177,193,209,225,241,257,273,289,305,321,337,353,369,385,401,417,4097,4098,4099,4113,4114,4129,4145,4161,4177,4193,4209,4225,4241,4257,4273,4289,4305,4321,4337,4353,4369,4385,4401,4417,4433,4449,4465,4481,4497,4513,4529,4545,4561,4577,4593,4609,4625,4641,4657,4673,4689,4705,4721,4737,7167};
|
||||
|
||||
int signtab[2] = {0,1};
|
||||
|
||||
int lasttab[2] = {0,1};
|
||||
|
||||
int last_intratab[2] = {0,1};
|
||||
|
||||
int runtab[64] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
|
||||
|
||||
int leveltab[254] = {129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127};
|
18
Src/f263/indices.h
Normal file
18
Src/f263/indices.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
extern int codtab[];
|
||||
extern int mcbpctab[];
|
||||
extern int mcbpc_intratab[];
|
||||
extern int modb_tab[];
|
||||
extern int ycbpb_tab[];
|
||||
extern int uvcbpb_tab[];
|
||||
extern int cbpytab[];
|
||||
extern int cbpy_intratab[];
|
||||
extern int dquanttab[];
|
||||
extern int mvdtab[];
|
||||
extern int intradctab[];
|
||||
extern int tcoeftab[];
|
||||
extern int signtab[];
|
||||
extern int lasttab[];
|
||||
extern int last_intratab[];
|
||||
extern int runtab[];
|
||||
extern int leveltab[];
|
27
Src/f263/lib.cpp
Normal file
27
Src/f263/lib.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "Decoder.h"
|
||||
#include "lib.h"
|
||||
|
||||
void *F263_CreateDecoder()
|
||||
{
|
||||
return new Decoder;
|
||||
}
|
||||
|
||||
int F263_DecodeFrame(void *context, void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe)
|
||||
{
|
||||
if (frameSize > 0x1FFFFFFF)
|
||||
return F263_ERROR_TOO_MUCH_DATA;
|
||||
|
||||
if (!frameData)
|
||||
return F263_ERROR_NO_DATA;
|
||||
|
||||
Decoder *decoder = (Decoder *)context;
|
||||
decoder->buffer.data = (uint8_t *)frameData;
|
||||
decoder->buffer.numBits = (uint32_t)(frameSize*8);
|
||||
return decoder->DecodeFrame(yv12, width, height, keyframe);
|
||||
}
|
||||
|
||||
void F263_DestroyDecoder(void *context)
|
||||
{
|
||||
Decoder *decoder = (Decoder *)context;
|
||||
delete decoder;
|
||||
}
|
22
Src/f263/lib.h
Normal file
22
Src/f263/lib.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef NULLSOFT_F263_LIB_H
|
||||
#define NULLSOFT_F263_LIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define F263_OK 0
|
||||
#define F263_ERROR_TOO_MUCH_DATA 2
|
||||
#define F263_ERROR_NO_DATA 3
|
||||
|
||||
#include "../Winamp/wa_ipc.h"
|
||||
|
||||
void *F263_CreateDecoder();
|
||||
int F263_DecodeFrame(void *context, void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe);
|
||||
void F263_DestroyDecoder(void *context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
94
Src/f263/mkv_f263_decoder.cpp
Normal file
94
Src/f263/mkv_f263_decoder.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
#include "mkv_f263_decoder.h"
|
||||
#include "lib.h"
|
||||
|
||||
int MKVDecoderCreator::CreateVideoDecoder(const char *codec_id, const nsmkv::TrackEntryData *track_entry_data, const nsmkv::VideoData *video_data, ifc_mkvvideodecoder **decoder)
|
||||
{
|
||||
if (!strcmp(codec_id, "V_MS/VFW/FOURCC"))
|
||||
{
|
||||
if (track_entry_data->codec_private && track_entry_data->codec_private_len)
|
||||
{
|
||||
const BITMAPINFOHEADER *header = (const BITMAPINFOHEADER *)track_entry_data->codec_private;
|
||||
if (header->biCompression == '1VLF')
|
||||
{
|
||||
void *ctx = F263_CreateDecoder();
|
||||
*decoder = new MKVFLV1(ctx);
|
||||
return CREATEDECODER_SUCCESS;
|
||||
}
|
||||
}
|
||||
return CREATEDECODER_NOT_MINE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CREATEDECODER_NOT_MINE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define CBCLASS MKVDecoderCreator
|
||||
START_DISPATCH;
|
||||
CB(CREATE_VIDEO_DECODER, CreateVideoDecoder)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
||||
|
||||
|
||||
|
||||
MKVFLV1::MKVFLV1(void *ctx) : decoder(ctx)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int MKVFLV1::GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio)
|
||||
{
|
||||
if (width && height)
|
||||
{
|
||||
*x = width;
|
||||
*y = height;
|
||||
*color_format = '21VY';
|
||||
*aspect_ratio=1.0;
|
||||
return MKV_SUCCESS;
|
||||
}
|
||||
return MKV_FAILURE;
|
||||
}
|
||||
|
||||
int MKVFLV1::DecodeBlock(const void *inputBuffer, size_t inputBufferBytes, uint64_t timestamp)
|
||||
{
|
||||
last_timestamp = (int32_t)timestamp;
|
||||
int keyframe;
|
||||
|
||||
int ret = F263_DecodeFrame(decoder, const_cast<void *>(inputBuffer), inputBufferBytes, &yv12, &width, &height, &keyframe);
|
||||
if (ret == F263_OK)
|
||||
{
|
||||
decoded=1;
|
||||
return MKV_SUCCESS;
|
||||
}
|
||||
else
|
||||
return MKV_FAILURE;
|
||||
}
|
||||
|
||||
void MKVFLV1::Flush()
|
||||
{
|
||||
}
|
||||
|
||||
int MKVFLV1::GetPicture(void **data, void **decoder_data, uint64_t *timestamp)
|
||||
{
|
||||
if (decoded)
|
||||
{
|
||||
*timestamp = last_timestamp;
|
||||
*decoder_data = 0;
|
||||
*data = &yv12;
|
||||
decoded=0;
|
||||
return MKV_SUCCESS;
|
||||
}
|
||||
return MKV_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
#define CBCLASS MKVFLV1
|
||||
START_DISPATCH;
|
||||
CB(GET_OUTPUT_PROPERTIES, GetOutputProperties)
|
||||
CB(DECODE_BLOCK, DecodeBlock)
|
||||
VCB(FLUSH, Flush)
|
||||
CB(GET_PICTURE, GetPicture)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
||||
|
38
Src/f263/mkv_f263_decoder.h
Normal file
38
Src/f263/mkv_f263_decoder.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
#include "../Plugins/Input/in_mkv/ifc_mkvvideodecoder.h"
|
||||
#include "../Plugins/Input/in_mkv/svc_mkvdecoder.h"
|
||||
#include "../winamp/wa_ipc.h"
|
||||
|
||||
// {0071721C-7B4D-4766-B165-E42BC080DA74}
|
||||
static const GUID mkv_flv1_guid =
|
||||
{ 0x71721c, 0x7b4d, 0x4766, { 0xb1, 0x65, 0xe4, 0x2b, 0xc0, 0x80, 0xda, 0x74 } };
|
||||
|
||||
|
||||
class MKVDecoderCreator : public svc_mkvdecoder
|
||||
{
|
||||
public:
|
||||
static const char *getServiceName() { return "FLV1 MKV Decoder"; }
|
||||
static GUID getServiceGuid() { return mkv_flv1_guid; }
|
||||
int CreateVideoDecoder(const char *codec_id, const nsmkv::TrackEntryData *track_entry_data, const nsmkv::VideoData *video_data, ifc_mkvvideodecoder **decoder);
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
|
||||
class MKVFLV1 : public ifc_mkvvideodecoder
|
||||
{
|
||||
public:
|
||||
MKVFLV1(void *decoder);
|
||||
int GetOutputProperties(int *x, int *y, int *color_format, double *aspect_ratio);
|
||||
int DecodeBlock(const void *inputBuffer, size_t inputBufferBytes, uint64_t timestamp);
|
||||
void Flush();
|
||||
int GetPicture(void **data, void **decoder_data, uint64_t *timestamp);
|
||||
private:
|
||||
void *decoder;
|
||||
YV12_PLANES yv12;
|
||||
int32_t last_timestamp;
|
||||
int width, height;
|
||||
int decoded;
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
37
Src/f263/obj_f263decoder.h
Normal file
37
Src/f263/obj_f263decoder.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef F263_OBJ_F263DECODER_H
|
||||
#define F263_OBJ_F263DECODER_H
|
||||
|
||||
#include <bfc/dispatch.h>
|
||||
#include <bfc/platform/types.h>
|
||||
struct YV12_PLANES;
|
||||
class obj_f263decoder : public Dispatchable
|
||||
{
|
||||
protected:
|
||||
obj_f263decoder() {}
|
||||
~obj_f263decoder() {}
|
||||
public:
|
||||
int DecodeFrame(void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe);
|
||||
|
||||
enum
|
||||
{
|
||||
DISP_DECODEFRAME = 0,
|
||||
};
|
||||
enum
|
||||
{
|
||||
SUCCESS = 0,
|
||||
FAILURE = 1,
|
||||
FAILURE_TOO_MUCH_DATA = 2,
|
||||
FAILURE_NO_DATA = 3,
|
||||
};
|
||||
};
|
||||
|
||||
inline int obj_f263decoder::DecodeFrame(void *frameData, size_t frameSize, YV12_PLANES *yv12, int *width, int *height, int *keyframe)
|
||||
{
|
||||
return _call(DISP_DECODEFRAME, (int)FAILURE, frameData, frameSize, yv12, width, height, keyframe);
|
||||
}
|
||||
|
||||
// {496FA082-39F0-424e-9B25-1B234262796D}
|
||||
static const GUID obj_f263decoderGUID =
|
||||
{ 0x496fa082, 0x39f0, 0x424e, { 0x9b, 0x25, 0x1b, 0x23, 0x42, 0x62, 0x79, 0x6d } };
|
||||
|
||||
#endif
|
14
Src/f263/resource.h
Normal file
14
Src/f263/resource.h
Normal file
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by f263.w5s.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
39
Src/f263/version.rc2
Normal file
39
Src/f263/version.rc2
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "../Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION WINAMP_PRODUCTVER
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp 5.x System Component"
|
||||
VALUE "FileVersion", STR_WINAMP_PRODUCTVER
|
||||
VALUE "InternalName", "f263.w5s"
|
||||
VALUE "LegalCopyright", "Copyright <20> 2005-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "f263.w5s"
|
||||
VALUE "ProductName", "Winamp F263 Decoder Service"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
187
Src/f263/vlc.cpp
Normal file
187
Src/f263/vlc.cpp
Normal file
@ -0,0 +1,187 @@
|
||||
#include "Decoder.h"
|
||||
#include "vlc_table.h"
|
||||
|
||||
static int PRED_type_EP[] = {0,0,1,1,1,2,2,2,3,3};
|
||||
static int QUANT_present_EP[] = {0,1,0,0,1,0,0,1,0,1};
|
||||
static int CBP_present_EP[] = {1,1,0,1,1,0,1,1,1,1};
|
||||
static VLCtab MBTYPEtabEP[] = {
|
||||
{-1,0}, {9,8}, {8,7}, {8,7}, {7,6}, {7,6}, {7,6}, {7,6},
|
||||
{4,5}, {4,5}, {4,5}, {4,5}, {4,5}, {4,5}, {4,5}, {4,5},
|
||||
{5,5}, {5,5}, {5,5}, {5,5}, {5,5}, {5,5}, {5,5}, {5,5},
|
||||
{6,5}, {6,5}, {6,5}, {6,5}, {6,5}, {6,5}, {6,5}, {6,5},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}
|
||||
};
|
||||
static int PRED_type_B[] = {0,0,1,1,1,2,2,2,3,3,3,4,4};
|
||||
static int QUANT_present_B[] = {0,1,0,0,1,0,0,1,0,0,1,0,1};
|
||||
static int CBPC_pattern_EI[] = {0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3};
|
||||
static int CBP_present_B[] = {1,1,0,1,1,0,1,1,0,1,1,1,1};
|
||||
static VLCtab MBTYPEtabB[] = {
|
||||
{-1,0}, {12,7}, {11,6}, {11,6}, {10,5}, {10,5}, {10,5}, {10,5},
|
||||
{1,4}, {1,4}, {1,4}, {1,4}, {1,4}, {1,4}, {1,4}, {1,4},
|
||||
{8,5}, {8,5}, {8,5}, {8,5}, {9,5}, {9,5}, {9,5}, {9,5},
|
||||
{4,5}, {4,5}, {4,5}, {4,5}, {7,5}, {7,5}, {7,5}, {7,5},
|
||||
{5,3}, {5,3}, {5,3}, {5,3}, {5,3}, {5,3}, {5,3}, {5,3},
|
||||
{5,3}, {5,3}, {5,3}, {5,3}, {5,3}, {5,3}, {5,3}, {5,3},
|
||||
{6,3}, {6,3}, {6,3}, {6,3}, {6,3}, {6,3}, {6,3}, {6,3},
|
||||
{6,3}, {6,3}, {6,3}, {6,3}, {6,3}, {6,3}, {6,3}, {6,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}
|
||||
};
|
||||
|
||||
static int QUANT_present_EI[] = {0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1};
|
||||
static VLCtab MBTYPEtabEI[] = {
|
||||
{-1,0}, {8,8}, {5,7}, {5,7}, {6,7}, {6,7}, {7,7}, {7,7},
|
||||
{-1,0}, {9,8}, {10,8}, {11,8}, {12,8}, {13,8}, {14,8}, {15,8},
|
||||
{4,4}, {4,4}, {4,4}, {4,4}, {4,4}, {4,4}, {4,4}, {4,4},
|
||||
{4,4}, {4,4}, {4,4}, {4,4}, {4,4}, {4,4}, {4,4}, {4,4},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3},
|
||||
{3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}, {3,3}
|
||||
};
|
||||
|
||||
static int PRED_type_EI[] = {1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3};
|
||||
|
||||
int Decoder::getTMNMV()
|
||||
{
|
||||
int code;
|
||||
|
||||
if (buffer.getbits1())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((code = buffer.showbits(12))>=512)
|
||||
{
|
||||
code = (code>>8) - 2;
|
||||
buffer.flushbits(TMNMVtab0[code].len);
|
||||
|
||||
return TMNMVtab0[code].val;
|
||||
}
|
||||
|
||||
if (code>=128)
|
||||
{
|
||||
code = (code>>2) -32;
|
||||
buffer.flushbits(TMNMVtab1[code].len);
|
||||
|
||||
|
||||
return TMNMVtab1[code].val;
|
||||
}
|
||||
|
||||
if ((code-=5)<0)
|
||||
{
|
||||
fault=1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
buffer.flushbits(TMNMVtab2[code].len);
|
||||
|
||||
return TMNMVtab2[code].val;
|
||||
}
|
||||
|
||||
|
||||
int Decoder::getMCBPC()
|
||||
{
|
||||
int code;
|
||||
|
||||
code = buffer.showbits (13);
|
||||
|
||||
if (code >> 4 == 1)
|
||||
{
|
||||
/* macroblock stuffing */
|
||||
buffer.flushbits (9);
|
||||
return 255;
|
||||
}
|
||||
if (code == 0)
|
||||
{
|
||||
fault = 1;
|
||||
return 0;
|
||||
}
|
||||
if (code >= 4096)
|
||||
{
|
||||
buffer.flushbits (1);
|
||||
return 0;
|
||||
}
|
||||
if (code >= 16)
|
||||
{
|
||||
buffer.flushbits (MCBPCtab0[code >> 4].len);
|
||||
return MCBPCtab0[code >> 4].val;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer.flushbits (MCBPCtab1[code - 8].len);
|
||||
return MCBPCtab1[code - 8].val;
|
||||
}
|
||||
}
|
||||
|
||||
int Decoder::getMCBPCintra()
|
||||
{
|
||||
int code;
|
||||
|
||||
code = buffer.showbits(9);
|
||||
|
||||
if (code == 1) {
|
||||
/* macroblock stuffing */
|
||||
buffer.flushbits(9);
|
||||
return 255;
|
||||
}
|
||||
|
||||
if (code < 8) {
|
||||
fault = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
code >>= 3;
|
||||
|
||||
if (code>=32)
|
||||
{
|
||||
buffer.flushbits(1);
|
||||
return 3;
|
||||
}
|
||||
|
||||
buffer.flushbits(MCBPCtabintra[code].len);
|
||||
|
||||
return MCBPCtabintra[code].val;
|
||||
}
|
||||
|
||||
int Decoder::getCBPY()
|
||||
{
|
||||
int code;
|
||||
|
||||
code = buffer.showbits(6);
|
||||
if (code < 2) {
|
||||
fault = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (code>=48)
|
||||
{
|
||||
buffer.flushbits(2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
buffer.flushbits(CBPYtab[code].len);
|
||||
|
||||
return CBPYtab[code].val;
|
||||
}
|
66
Src/f263/vlc_table.cpp
Normal file
66
Src/f263/vlc_table.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
#include "vlc_table.h"
|
||||
|
||||
VLCtab DCT3Dtab0[] = {
|
||||
{4225,7}, {4209,7}, {4193,7}, {4177,7}, {193,7}, {177,7},
|
||||
{161,7}, {4,7}, {4161,6}, {4161,6}, {4145,6}, {4145,6},
|
||||
{4129,6}, {4129,6}, {4113,6}, {4113,6}, {145,6}, {145,6},
|
||||
{129,6}, {129,6}, {113,6}, {113,6}, {97,6}, {97,6},
|
||||
{18,6}, {18,6}, {3,6}, {3,6}, {81,5}, {81,5},
|
||||
{81,5}, {81,5}, {65,5}, {65,5}, {65,5}, {65,5},
|
||||
{49,5}, {49,5}, {49,5}, {49,5}, {4097,4}, {4097,4},
|
||||
{4097,4}, {4097,4}, {4097,4}, {4097,4}, {4097,4}, {4097,4},
|
||||
{1,2}, {1,2}, {1,2}, {1,2}, {1,2}, {1,2},
|
||||
{1,2}, {1,2}, {1,2}, {1,2}, {1,2}, {1,2},
|
||||
{1,2}, {1,2}, {1,2}, {1,2}, {1,2}, {1,2},
|
||||
{1,2}, {1,2}, {1,2}, {1,2}, {1,2}, {1,2},
|
||||
{1,2}, {1,2}, {1,2}, {1,2}, {1,2}, {1,2},
|
||||
{1,2}, {1,2}, {17,3}, {17,3}, {17,3}, {17,3},
|
||||
{17,3}, {17,3}, {17,3}, {17,3}, {17,3}, {17,3},
|
||||
{17,3}, {17,3}, {17,3}, {17,3}, {17,3}, {17,3},
|
||||
{33,4}, {33,4}, {33,4}, {33,4}, {33,4}, {33,4},
|
||||
{33,4}, {33,4}, {2,4}, {2,4},{2,4},{2,4},
|
||||
{2,4}, {2,4},{2,4},{2,4},
|
||||
};
|
||||
|
||||
|
||||
VLCtab DCT3Dtab1[] = {
|
||||
{9,10}, {8,10}, {4481,9}, {4481,9}, {4465,9}, {4465,9},
|
||||
{4449,9}, {4449,9}, {4433,9}, {4433,9}, {4417,9}, {4417,9},
|
||||
{4401,9}, {4401,9}, {4385,9}, {4385,9}, {4369,9}, {4369,9},
|
||||
{4098,9}, {4098,9}, {353,9}, {353,9}, {337,9}, {337,9},
|
||||
{321,9}, {321,9}, {305,9}, {305,9}, {289,9}, {289,9},
|
||||
{273,9}, {273,9}, {257,9}, {257,9}, {241,9}, {241,9},
|
||||
{66,9}, {66,9}, {50,9}, {50,9}, {7,9}, {7,9},
|
||||
{6,9}, {6,9}, {4353,8}, {4353,8}, {4353,8}, {4353,8},
|
||||
{4337,8}, {4337,8}, {4337,8}, {4337,8}, {4321,8}, {4321,8},
|
||||
{4321,8}, {4321,8}, {4305,8}, {4305,8}, {4305,8}, {4305,8},
|
||||
{4289,8}, {4289,8}, {4289,8}, {4289,8}, {4273,8}, {4273,8},
|
||||
{4273,8}, {4273,8}, {4257,8}, {4257,8}, {4257,8}, {4257,8},
|
||||
{4241,8}, {4241,8}, {4241,8}, {4241,8}, {225,8}, {225,8},
|
||||
{225,8}, {225,8}, {209,8}, {209,8}, {209,8}, {209,8},
|
||||
{34,8}, {34,8}, {34,8}, {34,8}, {19,8}, {19,8},
|
||||
{19,8}, {19,8}, {5,8}, {5,8}, {5,8}, {5,8},
|
||||
};
|
||||
|
||||
VLCtab DCT3Dtab2[] = {
|
||||
{4114,11}, {4114,11}, {4099,11}, {4099,11}, {11,11}, {11,11},
|
||||
{10,11}, {10,11}, {4545,10}, {4545,10}, {4545,10}, {4545,10},
|
||||
{4529,10}, {4529,10}, {4529,10}, {4529,10}, {4513,10}, {4513,10},
|
||||
{4513,10}, {4513,10}, {4497,10}, {4497,10}, {4497,10}, {4497,10},
|
||||
{146,10}, {146,10}, {146,10}, {146,10}, {130,10}, {130,10},
|
||||
{130,10}, {130,10}, {114,10}, {114,10}, {114,10}, {114,10},
|
||||
{98,10}, {98,10}, {98,10}, {98,10}, {82,10}, {82,10},
|
||||
{82,10}, {82,10}, {51,10}, {51,10}, {51,10}, {51,10},
|
||||
{35,10}, {35,10}, {35,10}, {35,10}, {20,10}, {20,10},
|
||||
{20,10}, {20,10}, {12,11}, {12,11}, {21,11}, {21,11},
|
||||
{369,11}, {369,11}, {385,11}, {385,11}, {4561,11}, {4561,11},
|
||||
{4577,11}, {4577,11}, {4593,11}, {4593,11}, {4609,11}, {4609,11},
|
||||
{22,12}, {36,12}, {67,12}, {83,12}, {99,12}, {162,12},
|
||||
{401,12}, {417,12}, {4625,12}, {4641,12}, {4657,12}, {4673,12},
|
||||
{4689,12}, {4705,12}, {4721,12}, {4737,12}, {7167,7},
|
||||
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7},
|
||||
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7},
|
||||
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7},
|
||||
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7},
|
||||
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7},
|
||||
{7167,7}, };
|
153
Src/f263/vlc_table.h
Normal file
153
Src/f263/vlc_table.h
Normal file
@ -0,0 +1,153 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
int val, len;
|
||||
} VLCtab;
|
||||
|
||||
typedef struct {
|
||||
char run, level, len;
|
||||
} DCTtab;
|
||||
|
||||
|
||||
static VLCtab TMNMVtab0[] = {
|
||||
{3,4}, {61,4}, {2,3}, {2,3}, {62,3}, {62,3},
|
||||
{1,2}, {1,2}, {1,2}, {1,2}, {63,2}, {63,2}, {63,2}, {63,2}
|
||||
};
|
||||
|
||||
static VLCtab TMNMVtab1[] = {
|
||||
{12,10}, {52,10}, {11,10}, {53,10}, {10,9}, {10,9},
|
||||
{54,9}, {54,9}, {9,9}, {9,9}, {55,9}, {55,9},
|
||||
{8,9}, {8,9}, {56,9}, {56,9}, {7,7}, {7,7},
|
||||
{7,7}, {7,7}, {7,7}, {7,7}, {7,7}, {7,7},
|
||||
{57,7}, {57,7}, {57,7}, {57,7}, {57,7}, {57,7},
|
||||
{57,7}, {57,7}, {6,7}, {6,7}, {6,7}, {6,7},
|
||||
{6,7}, {6,7}, {6,7}, {6,7}, {58,7}, {58,7},
|
||||
{58,7}, {58,7}, {58,7}, {58,7}, {58,7}, {58,7},
|
||||
{5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7},
|
||||
{5,7}, {5,7}, {59,7}, {59,7}, {59,7}, {59,7},
|
||||
{59,7}, {59,7}, {59,7}, {59,7}, {4,6}, {4,6},
|
||||
{4,6}, {4,6}, {4,6}, {4,6}, {4,6}, {4,6},
|
||||
{4,6}, {4,6}, {4,6}, {4,6}, {4,6}, {4,6},
|
||||
{4,6}, {4,6}, {60,6}, {60,6},{60,6},{60,6},
|
||||
{60,6},{60,6},{60,6},{60,6},{60,6},{60,6},
|
||||
{60,6},{60,6},{60,6},{60,6},{60,6},{60,6}
|
||||
};
|
||||
|
||||
static VLCtab TMNMVtab2[] = {
|
||||
{32,12}, {31,12}, {33,12}, {30,11}, {30,11}, {34,11},
|
||||
{34,11}, {29,11}, {29,11}, {35,11}, {35,11}, {28,11},
|
||||
{28,11}, {36,11}, {36,11}, {27,11}, {27,11}, {37,11},
|
||||
{37,11}, {26,11}, {26,11}, {38,11}, {38,11}, {25,11},
|
||||
{25,11}, {39,11}, {39,11}, {24,10}, {24,10}, {24,10},
|
||||
{24,10}, {40,10}, {40,10}, {40,10}, {40,10}, {23,10},
|
||||
{23,10}, {23,10}, {23,10}, {41,10}, {41,10}, {41,10},
|
||||
{41,10}, {22,10}, {22,10}, {22,10}, {22,10}, {42,10},
|
||||
{42,10}, {42,10}, {42,10}, {21,10}, {21,10}, {21,10},
|
||||
{21,10}, {43,10}, {43,10}, {43,10}, {43,10}, {20,10},
|
||||
{20,10}, {20,10}, {20,10}, {44,10}, {44,10}, {44,10},
|
||||
{44,10}, {19,10}, {19,10}, {19,10}, {19,10}, {45,10},
|
||||
{45,10}, {45,10}, {45,10}, {18,10}, {18,10}, {18,10},
|
||||
{18,10}, {46,10}, {46,10}, {46,10}, {46,10}, {17,10},
|
||||
{17,10}, {17,10}, {17,10}, {47,10}, {47,10}, {47,10},
|
||||
{47,10}, {16,10}, {16,10}, {16,10}, {16,10}, {48,10},
|
||||
{48,10}, {48,10}, {48,10}, {15,10}, {15,10}, {15,10},
|
||||
{15,10}, {49,10}, {49,10}, {49,10}, {49,10}, {14,10},
|
||||
{14,10}, {14,10}, {14,10}, {50,10}, {50,10}, {50,10},
|
||||
{50,10}, {13,10}, {13,10}, {13,10}, {13,10}, {51,10},
|
||||
{51,10}, {51,10}, {51,10}
|
||||
};
|
||||
|
||||
|
||||
static VLCtab MCBPCtab[] = {
|
||||
{-1,0},
|
||||
{255,9}, {52,9}, {36,9}, {20,9}, {49,9}, {35,8}, {35,8}, {19,8}, {19,8},
|
||||
{50,8}, {50,8}, {51,7}, {51,7}, {51,7}, {51,7}, {34,7}, {34,7}, {34,7},
|
||||
{34,7}, {18,7}, {18,7}, {18,7}, {18,7}, {33,7}, {33,7}, {33,7}, {33,7},
|
||||
{17,7}, {17,7}, {17,7}, {17,7}, {4,6}, {4,6}, {4,6}, {4,6}, {4,6},
|
||||
{4,6}, {4,6}, {4,6}, {48,6}, {48,6}, {48,6}, {48,6}, {48,6}, {48,6},
|
||||
{48,6}, {48,6}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5},
|
||||
{3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3},
|
||||
};
|
||||
|
||||
static VLCtab MCBPCtabintra[] = {
|
||||
{-1,0},
|
||||
{20,6}, {36,6}, {52,6}, {4,4}, {4,4}, {4,4},
|
||||
{4,4}, {19,3}, {19,3}, {19,3}, {19,3}, {19,3},
|
||||
{19,3}, {19,3}, {19,3}, {35,3}, {35,3}, {35,3},
|
||||
{35,3}, {35,3}, {35,3}, {35,3}, {35,3}, {51,3},
|
||||
{51,3}, {51,3}, {51,3}, {51,3}, {51,3}, {51,3},
|
||||
{51,3},
|
||||
};
|
||||
|
||||
static VLCtab CBPYtab[48] =
|
||||
{ {-1,0}, {-1,0}, {9,6}, {6,6}, {7,5}, {7,5}, {11,5}, {11,5},
|
||||
{13,5}, {13,5}, {14,5}, {14,5}, {15,4}, {15,4}, {15,4}, {15,4},
|
||||
{3,4}, {3,4}, {3,4}, {3,4}, {5,4},{5,4},{5,4},{5,4},
|
||||
{1,4}, {1,4}, {1,4}, {1,4}, {10,4}, {10,4}, {10,4}, {10,4},
|
||||
{2,4}, {2,4}, {2,4}, {2,4}, {12,4}, {12,4}, {12,4}, {12,4},
|
||||
{4,4}, {4,4}, {4,4}, {4,4}, {8,4}, {8,4}, {8,4}, {8,4},
|
||||
};
|
||||
|
||||
extern VLCtab DCT3Dtab0[];
|
||||
extern VLCtab DCT3Dtab1[];
|
||||
extern VLCtab DCT3Dtab2[];
|
||||
|
||||
static VLCtab MCBPCtab0[] = {
|
||||
{-1,0},
|
||||
{255,9}, {52,9}, {36,9}, {20,9}, {49,9}, {35,8}, {35,8}, {19,8}, {19,8},
|
||||
{50,8}, {50,8}, {51,7}, {51,7}, {51,7}, {51,7}, {34,7}, {34,7}, {34,7},
|
||||
{34,7}, {18,7}, {18,7}, {18,7}, {18,7}, {33,7}, {33,7}, {33,7}, {33,7},
|
||||
{17,7}, {17,7}, {17,7}, {17,7}, {4,6}, {4,6}, {4,6}, {4,6}, {4,6},
|
||||
{4,6}, {4,6}, {4,6}, {48,6}, {48,6}, {48,6}, {48,6}, {48,6}, {48,6},
|
||||
{48,6}, {48,6}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5},
|
||||
{3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5}, {3,5},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {32,4},
|
||||
{32,4}, {32,4}, {32,4}, {32,4}, {32,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4}, {16,4},
|
||||
{16,4}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3}, {2,3},
|
||||
{2,3}, {2,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3},
|
||||
{1,3}, {1,3}, {1,3},
|
||||
};
|
||||
|
||||
static VLCtab MCBPCtab1[] = {
|
||||
{5,11}, {5,11}, {5,11}, {5,11}, {21,13}, {21,13}, {37,13}, {53,13},
|
||||
};
|
||||
|
58
Src/f263/w5s.cpp
Normal file
58
Src/f263/w5s.cpp
Normal file
@ -0,0 +1,58 @@
|
||||
/* copyright 2008 Ben Allison */
|
||||
#include "../Agave/Component/ifc_wa5component.h"
|
||||
#include "factory_f263.h"
|
||||
#include "flv_f263_decoder.h"
|
||||
#include "mkv_f263_decoder.h"
|
||||
#include "../nu/Singleton.h"
|
||||
|
||||
class WA5_F263 : public ifc_wa5component
|
||||
{
|
||||
public:
|
||||
void RegisterServices(api_service *service);
|
||||
int RegisterServicesSafeModeOk();
|
||||
void DeregisterServices(api_service *service);
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
api_service *serviceManager=0;
|
||||
|
||||
WA5_F263 wa5_f263;
|
||||
F263Factory f263Factory;
|
||||
static FLVDecoderCreator flvCreator;
|
||||
static SingletonServiceFactory<svc_flvdecoder, FLVDecoderCreator> flvFactory;
|
||||
static MKVDecoderCreator mkvCreator;
|
||||
static SingletonServiceFactory<svc_mkvdecoder, MKVDecoderCreator> mkvFactory;
|
||||
void WA5_F263::RegisterServices(api_service *service)
|
||||
{
|
||||
WASABI_API_SVC = service;
|
||||
|
||||
WASABI_API_SVC->service_register(&f263Factory);
|
||||
flvFactory.Register(WASABI_API_SVC, &flvCreator);
|
||||
mkvFactory.Register(WASABI_API_SVC, &mkvCreator);
|
||||
}
|
||||
|
||||
int WA5_F263::RegisterServicesSafeModeOk()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void WA5_F263::DeregisterServices(api_service *service)
|
||||
{
|
||||
service->service_deregister(&f263Factory);
|
||||
flvFactory.Deregister(WASABI_API_SVC);
|
||||
mkvFactory.Deregister(WASABI_API_SVC);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport) ifc_wa5component *GetWinamp5SystemComponent()
|
||||
{
|
||||
return &wa5_f263;
|
||||
}
|
||||
|
||||
#define CBCLASS WA5_F263
|
||||
START_DISPATCH;
|
||||
VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices)
|
||||
CB(15, RegisterServicesSafeModeOk)
|
||||
VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
Reference in New Issue
Block a user