diff options
| author | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-12 18:54:28 +0000 |
|---|---|---|
| committer | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-12 18:54:28 +0000 |
| commit | a58cfdac407bc1d8fedc11acd924b275ba28cc51 (patch) | |
| tree | b4c2e08c34ef1bfe0ba947ef8eed931c9a43fc0e /libpcsxcore/mdec.c | |
| parent | 9bdd06684bcc627c06ddcf4c406f6b48f0dfe389 (diff) | |
Commited patch in issue #8171 (by darktjm).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64524 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/mdec.c')
| -rw-r--r-- | libpcsxcore/mdec.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c index 303bd679..b25b9612 100644 --- a/libpcsxcore/mdec.c +++ b/libpcsxcore/mdec.c @@ -19,7 +19,7 @@ ***************************************************************************/ #include "mdec.h" -
+ /* memory speed is 1 byte per MDEC_BIAS psx clock * That mean (PSXCLK / MDEC_BIAS) B/s * MDEC_BIAS = 2.0 => ~16MB/s @@ -31,8 +31,8 @@ * 320x240x16@50Hz => 7.68 MB/s * 320x240x16@60Hz => 9.216 MB/s * so 2.0 to 4.0 should be fine. - */
-#define MDEC_BIAS 2.0f
+ */ +#define MDEC_BIAS 2.0f #define DSIZE 8 #define DSIZE2 (DSIZE * DSIZE) @@ -80,7 +80,7 @@ static inline void fillrow(int *blk, int val) { = blk[4] = blk[5] = blk[6] = blk[7] = val; } -void idct(int *block,int used_col) { +static void idct(int *block,int used_col) { int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; int z5, z10, z11, z12, z13; int *ptr; @@ -263,7 +263,7 @@ static void iqtab_init(int *iqtab, unsigned char *iq_y) { #define MDEC_END_OF_DATA 0xfe00 -unsigned short *rl2blk(int *blk, unsigned short *mdec_rl) { +static unsigned short *rl2blk(int *blk, unsigned short *mdec_rl) { int i, k, q_scale, rl, used_col; int *iqtab; @@ -324,7 +324,7 @@ unsigned short *rl2blk(int *blk, unsigned short *mdec_rl) { #define CLAMP_SCALE8(a) (CLAMP8(SCALE8(a))) #define CLAMP_SCALE5(a) (CLAMP5(SCALE5(a))) -inline void putlinebw15(u16 *image, int *Yblk) { +static inline void putlinebw15(u16 *image, int *Yblk) { int i; int A = (mdec.reg0 & MDEC0_STP) ? 0x8000 : 0; @@ -335,7 +335,7 @@ inline void putlinebw15(u16 *image, int *Yblk) { } } -inline void putquadrgb15(u16 *image, int *Yblk, int Cr, int Cb) { +static inline void putquadrgb15(u16 *image, int *Yblk, int Cr, int Cb) { int Y, R, G, B; int A = (mdec.reg0 & MDEC0_STP) ? 0x8000 : 0; R = MULR(Cr); @@ -353,7 +353,7 @@ inline void putquadrgb15(u16 *image, int *Yblk, int Cr, int Cb) { image[17] = MAKERGB15(CLAMP_SCALE5(Y + R), CLAMP_SCALE5(Y + G), CLAMP_SCALE5(Y + B), A); } -inline void yuv2rgb15(int *blk, unsigned short *image) { +static inline void yuv2rgb15(int *blk, unsigned short *image) { int x, y; int *Yblk = blk + DSIZE2 * 2; int *Crblk = blk; @@ -376,7 +376,7 @@ inline void yuv2rgb15(int *blk, unsigned short *image) { } } -inline void putlinebw24(u8 * image, int *Yblk) { +static inline void putlinebw24(u8 * image, int *Yblk) { int i; unsigned char Y; for (i = 0; i < 8 * 3; i += 3, Yblk++) { @@ -387,7 +387,7 @@ inline void putlinebw24(u8 * image, int *Yblk) { } } -inline void putquadrgb24(u8 * image, int *Yblk, int Cr, int Cb) { +static inline void putquadrgb24(u8 * image, int *Yblk, int Cr, int Cb) { int Y, R, G, B; R = MULR(Cr); @@ -545,7 +545,7 @@ void psxDma1(u32 adr, u32 bcr, u32 chcr) { int dmacnt; if (chcr != 0x01000200) return; -
+ size = (bcr >> 16) * (bcr & 0xffff); /* size in byte */ size *= 4; @@ -558,7 +558,7 @@ void psxDma1(u32 adr, u32 bcr, u32 chcr) { mdec.pending_dma1.bcr = bcr; mdec.pending_dma1.chcr = chcr; /* do not free the dma */ - } else {
+ } else { image = (u8 *)PSXM(adr); @@ -619,9 +619,9 @@ void psxDma1(u32 adr, u32 bcr, u32 chcr) { memcpy(image, mdec.block_buffer, size); mdec.block_buffer_pos = mdec.block_buffer + size; } - }
+ } - /* define the power of mdec */
+ /* define the power of mdec */ MDECOUTDMA_INT((int) ((dmacnt* MDEC_BIAS))); } } |
