1 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. 2 // Copyright (C) 1999-2003 Forgotten 3 // Copyright (C) 2005 Forgotten and the VBA development team 4 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 2, or(at your option) 8 // any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software Foundation, 17 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19 20 #define abs32(value) (value & 0x7FFFFFFF) 21 #define abs16(value) (value & 0x7FFF) 22 23 const int Ymask = 0x00FF0000; 24 const int Umask = 0x0000FF00; 25 const int Vmask = 0x000000FF; 26 const int trY = 0x00300000; 27 const int trU = 0x00000700; 28 const int trV = 0x00000006; 29 30 void Interp1(unsigned char * pc, unsigned int c1, unsigned int c2); 31 void Interp2(unsigned char * pc, unsigned int c1, unsigned int c2, unsigned int c3); 32 void Interp3(unsigned char * pc, unsigned int c1, unsigned int c2); 33 void Interp4(unsigned char * pc, unsigned int c1, unsigned int c2, unsigned int c3); 34 void Interp5(unsigned char * pc, unsigned int c1, unsigned int c2); 35 void Interp1_16(unsigned char * pc, unsigned short c1, unsigned short c2); 36 void Interp2_16(unsigned char * pc, unsigned short c1, unsigned short c2, unsigned short c3); 37 void Interp3_16(unsigned char * pc, unsigned short c1, unsigned short c2); 38 void Interp4_16(unsigned char * pc, unsigned short c1, unsigned short c2, unsigned short c3); 39 void Interp5_16(unsigned char * pc, unsigned short c1, unsigned short c2); 40 bool Diff(unsigned int c1, unsigned int c2); 41 unsigned int RGBtoYUV(unsigned int c); 42