⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blit_soft.h

📁 大名鼎鼎的CE下播放软件,TCPPMP的源代码!!!2410下可以流畅的解QVGA的H264,MPEG4等格式.
💻 H
字号:
/*****************************************************************************
 *
 * This program is free software ; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 * $Id: blit_soft.h 585 2006-01-16 09:48:55Z picard $
 *
 * The Core Pocket Media Player
 * Copyright (c) 2004-2005 Gabor Kovacs
 *
 ****************************************************************************/

#ifndef __BLIT_SOFT_H
#define __BLIT_SOFT_H

#define LOOKUP_FIX		4

struct blit_soft;
typedef void (STDCALL *blitsoftentry)(struct blit_soft* This, 
							  uint8_t** DstPtr,uint8_t** SrcPtr,
							  int DstPitch,int SrcPitch,
							  int Width,int Height,uintptr_t Src2SrcLast);

typedef struct blit_soft
{
	blitsoftentry Entry;
	void* LookUp_Data; //sh3 need it somewhere in the begining
	int16_t Col[3][2][4]; // should at offset 8 for mmx code

	dyncode Code;
	pixel Dst;
	pixel Src;
	blitfx FX;

	int SrcBPP;
	int SrcBPP2;
	int DstBPP;
	int DstBPP2;
	int SrcType;
	int DstType;

	int Caps;
	int SrcAlignPos;
	int DstAlignPos;
	int DstAlignSize;

	int SrcUVX2;
	int SrcUVY2;
	int SrcUVPitch2;
	int DstUVX2;
	int DstUVY2;
	int DstUVPitch2;
	int DirX; // destination space
	int DstSize[3];
	int DstPos[3];
	int SrcSize[3];
	int SrcPos[3];
	int RScaleX; // reverse scale, unit=16
	int RScaleY; // reverse scale, unit=16
	int DitherSize;
	const rgb* SrcPalette;
	const rgb* DstPalette;

	int SrcHalfX;
	int SrcHalfY;
	int SrcDoubleX;
	int SrcDoubleY;
	int DstHalfX;
	int DstHalfY;
	int DstDoubleX;
	int DstDoubleY;
	int DstStepX;

	boolmem_t ArithStretch;
	boolmem_t SwapXY;
	boolmem_t Slices;
	boolmem_t SlicesReverse;
	boolmem_t DstLeftRight;
	boolmem_t DstUpDown;
	boolmem_t SrcUpDown;
	boolmem_t ARM5;
	boolmem_t QAdd;
	boolmem_t WMMX;
	boolmem_t ColorLookup;
	boolmem_t Dither;
	boolmem_t SrcYUV;
	boolmem_t HalfX;
	boolmem_t HalfY;
	boolmem_t DoubleX;
	boolmem_t DoubleY;
	boolmem_t Scale;
	boolmem_t OnlyDiff;
	boolmem_t OnlyDiff2;// adjusted OnlyDiff (diff mode not always available)
	boolmem_t RealOnlyDiff;

	dyninst* PalPtr;
	dyninst* DiffMask;
	dyninst* InvertMask;
	dyninst* Skip;
	dyninst* YMul;
	dyninst* GAdd;
	dyninst* RAdd;
	dyninst* BAdd;
	dyninst* GVMul;
	dyninst* RVMul;
	dyninst* GUMul;
	dyninst* BUMul;

	dyninst* LookUp;
	int LookUp_U;
	int LookUp_V;
	int LookUp_Size;

	int _YMul;
	int _GAdd;
	int _RAdd;
	int _BAdd;
	int _GVMul;
	int _RVMul;
	int _GUMul;
	int _BUMul;
	bool_t IsYNextRow;
	bool_t IsUVNextRow;

	bool_t Upper;
	int Pos;
	int LookUpOfs;

} blit_soft;

void Stretch_RGB_UV(blit_soft* This);
void Double_RGB_UV(blit_soft* This);
void Fix_RGB_UV(blit_soft* This);
void Fix_Gray_UV(blit_soft* This);
void Half_RGB_UV(blit_soft* This);
void Universal_RGB_UV(blit_soft* This);
void Fix_Any_YUV(blit_soft* This);
void Fix_PackedYUV_YUV(blit_soft* This);
void WMMXFix_RGB_UV(blit_soft* This);
void Any_RGB_RGB(blit_soft* This);
void Stretch_RGB_RGB(blit_soft* This);

void CalcColor(blit_soft* This);
void CalcYUVLookUp(blit_soft* This);
void CalcPalRGBLookUp(blit_soft* This);
void CalcPalYUVLookUp(blit_soft* This);

// 4*256:Y + 768*n:SAT + 4*256:U + 4*256:V 
void CalcLookUp(blit_soft* This, bool_t Dither);

void CalcYUVMMX(blit_soft* This);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -