diff options
| -rw-r--r-- | base/main.cpp | 2 | ||||
| -rw-r--r-- | graphics/decoders/jpeg.cpp | 2 | ||||
| -rw-r--r-- | graphics/yuv_to_rgb.cpp | 112 | ||||
| -rw-r--r-- | graphics/yuv_to_rgb.h | 107 | ||||
| -rw-r--r-- | video/bink_decoder.cpp | 2 | ||||
| -rw-r--r-- | video/codecs/svq1.cpp | 2 | ||||
| -rw-r--r-- | video/psx_decoder.cpp | 2 | ||||
| -rw-r--r-- | video/theora_decoder.cpp | 2 | 
8 files changed, 112 insertions, 119 deletions
| diff --git a/base/main.cpp b/base/main.cpp index f538243f48..355a65f883 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -57,6 +57,7 @@  #include "graphics/cursorman.h"  #include "graphics/fontman.h" +#include "graphics/yuv_to_rgb.h"  #ifdef USE_FREETYPE2  #include "graphics/fonts/ttf.h"  #endif @@ -512,6 +513,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {  	Graphics::shutdownTTF();  #endif  	EngineManager::destroy(); +	Graphics::YUVToRGBManager::destroy();  	return 0;  } diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp index a871377ca1..77ca316c6d 100644 --- a/graphics/decoders/jpeg.cpp +++ b/graphics/decoders/jpeg.cpp @@ -81,7 +81,7 @@ const Surface *JPEGDecoder::getSurface() const {  	const Graphics::Surface *uComponent = getComponent(2);  	const Graphics::Surface *vComponent = getComponent(3); -	convertYUV444ToRGB(_rgbSurface, (byte *)yComponent->pixels, (byte *)uComponent->pixels, (byte *)vComponent->pixels, yComponent->w, yComponent->h, yComponent->pitch, uComponent->pitch); +	YUVToRGBMan.convert444(_rgbSurface, (byte *)yComponent->pixels, (byte *)uComponent->pixels, (byte *)vComponent->pixels, yComponent->w, yComponent->h, yComponent->pitch, uComponent->pitch);  	return _rgbSurface;  } diff --git a/graphics/yuv_to_rgb.cpp b/graphics/yuv_to_rgb.cpp index 78903d0cd8..1afd0d295b 100644 --- a/graphics/yuv_to_rgb.cpp +++ b/graphics/yuv_to_rgb.cpp @@ -83,10 +83,12 @@  // BASIS, AND BROWN UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE,  // SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -#include "common/scummsys.h" -#include "common/singleton.h" -  #include "graphics/surface.h" +#include "graphics/yuv_to_rgb.h" + +namespace Common { +DECLARE_SINGLETON(Graphics::YUVToRGBManager); +}  namespace Graphics { @@ -95,42 +97,18 @@ public:  	YUVToRGBLookup(Graphics::PixelFormat format);  	~YUVToRGBLookup(); -	int16 *_colorTab;  	uint32 *_rgbToPix;  };  YUVToRGBLookup::YUVToRGBLookup(Graphics::PixelFormat format) { -	_colorTab = new int16[4 * 256]; // 2048 bytes - -	int16 *Cr_r_tab = &_colorTab[0 * 256]; -	int16 *Cr_g_tab = &_colorTab[1 * 256]; -	int16 *Cb_g_tab = &_colorTab[2 * 256]; -	int16 *Cb_b_tab = &_colorTab[3 * 256]; -  	_rgbToPix = new uint32[3 * 768]; // 9216 bytes  	uint32 *r_2_pix_alloc = &_rgbToPix[0 * 768];  	uint32 *g_2_pix_alloc = &_rgbToPix[1 * 768];  	uint32 *b_2_pix_alloc = &_rgbToPix[2 * 768]; -	int16 CR, CB; -	int i; - -	// Generate the tables for the display surface - -	for (i = 0; i < 256; i++) { -		// Gamma correction (luminescence table) and chroma correction -		// would be done here. See the Berkeley mpeg_play sources. - -		CR = CB = (i - 128); -		Cr_r_tab[i] = (int16) ( (0.419 / 0.299) * CR) + 0 * 768 + 256; -		Cr_g_tab[i] = (int16) (-(0.299 / 0.419) * CR) + 1 * 768 + 256; -		Cb_g_tab[i] = (int16) (-(0.114 / 0.331) * CB); -		Cb_b_tab[i] = (int16) ( (0.587 / 0.331) * CB) + 2 * 768 + 256; -	} -  	// Set up entries 0-255 in rgb-to-pixel value tables. -	for (i = 0; i < 256; i++) { +	for (int i = 0; i < 256; i++) {  		r_2_pix_alloc[i + 256] = format.RGBToColor(i, 0, 0);  		g_2_pix_alloc[i + 256] = format.RGBToColor(0, i, 0);  		b_2_pix_alloc[i + 256] = format.RGBToColor(0, 0, i); @@ -138,7 +116,7 @@ YUVToRGBLookup::YUVToRGBLookup(Graphics::PixelFormat format) {  	// Spread out the values we have to the rest of the array so that we do  	// not need to check for overflow. -	for (i = 0; i < 256; i++) { +	for (int i = 0; i < 256; i++) {  		r_2_pix_alloc[i] = r_2_pix_alloc[256];  		r_2_pix_alloc[i + 512] = r_2_pix_alloc[511];  		g_2_pix_alloc[i] = g_2_pix_alloc[256]; @@ -150,24 +128,28 @@ YUVToRGBLookup::YUVToRGBLookup(Graphics::PixelFormat format) {  YUVToRGBLookup::~YUVToRGBLookup() {  	delete[] _rgbToPix; -	delete[] _colorTab;  } -class YUVToRGBManager : public Common::Singleton<YUVToRGBManager> { -public: -	const YUVToRGBLookup *getLookup(Graphics::PixelFormat format); +YUVToRGBManager::YUVToRGBManager() { +	_lookup = 0; -private: -	friend class Common::Singleton<SingletonBaseType>; -	YUVToRGBManager(); -	~YUVToRGBManager(); +	int16 *Cr_r_tab = &_colorTab[0 * 256]; +	int16 *Cr_g_tab = &_colorTab[1 * 256]; +	int16 *Cb_g_tab = &_colorTab[2 * 256]; +	int16 *Cb_b_tab = &_colorTab[3 * 256]; -	Graphics::PixelFormat _lastFormat; -	YUVToRGBLookup *_lookup; -}; +	// Generate the tables for the display surface -YUVToRGBManager::YUVToRGBManager() { -	_lookup = 0; +	for (int i = 0; i < 256; i++) { +		// Gamma correction (luminescence table) and chroma correction +		// would be done here. See the Berkeley mpeg_play sources. + +		int16 CR = (i - 128), CB = CR; +		Cr_r_tab[i] = (int16) ( (0.419 / 0.299) * CR) + 0 * 768 + 256; +		Cr_g_tab[i] = (int16) (-(0.299 / 0.419) * CR) + 1 * 768 + 256; +		Cb_g_tab[i] = (int16) (-(0.114 / 0.331) * CB); +		Cb_b_tab[i] = (int16) ( (0.587 / 0.331) * CB) + 2 * 768 + 256; +	}  }  YUVToRGBManager::~YUVToRGBManager() { @@ -184,24 +166,14 @@ const YUVToRGBLookup *YUVToRGBManager::getLookup(Graphics::PixelFormat format) {  	return _lookup;  } -} // End of namespace Graphics - -namespace Common { -DECLARE_SINGLETON(Graphics::YUVToRGBManager); -} - -#define YUVToRGBMan (Graphics::YUVToRGBManager::instance()) - -namespace Graphics { -  #define PUT_PIXEL(s, d) \  	L = &rgbToPix[(s)]; \  	*((PixelInt *)(d)) = (L[cr_r] | L[crb_g] | L[cb_b])  template<typename PixelInt> -void convertYUV444ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { +void convertYUV444ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, int16 *colorTab, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) {  	// Keep the tables in pointers here to avoid a dereference on each pixel -	const int16 *Cr_r_tab = lookup->_colorTab; +	const int16 *Cr_r_tab = colorTab;  	const int16 *Cr_g_tab = Cr_r_tab + 256;  	const int16 *Cb_g_tab = Cr_g_tab + 256;  	const int16 *Cb_b_tab = Cb_g_tab + 256; @@ -229,28 +201,28 @@ void convertYUV444ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup  	}  } -void convertYUV444ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { +void YUVToRGBManager::convert444(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) {  	// Sanity checks  	assert(dst && dst->pixels);  	assert(dst->format.bytesPerPixel == 2 || dst->format.bytesPerPixel == 4);  	assert(ySrc && uSrc && vSrc); -	const YUVToRGBLookup *lookup = YUVToRGBMan.getLookup(dst->format); +	const YUVToRGBLookup *lookup = getLookup(dst->format);  	// Use a templated function to avoid an if check on every pixel  	if (dst->format.bytesPerPixel == 2) -		convertYUV444ToRGB<uint16>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); +		convertYUV444ToRGB<uint16>((byte *)dst->pixels, dst->pitch, lookup, _colorTab, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch);  	else -		convertYUV444ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); +		convertYUV444ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, _colorTab, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch);  }  template<typename PixelInt> -void convertYUV420ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { +void convertYUV420ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, int16 *colorTab, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) {  	int halfHeight = yHeight >> 1;  	int halfWidth = yWidth >> 1;  	// Keep the tables in pointers here to avoid a dereference on each pixel -	const int16 *Cr_r_tab = lookup->_colorTab; +	const int16 *Cr_r_tab = colorTab;  	const int16 *Cr_g_tab = Cr_r_tab + 256;  	const int16 *Cb_g_tab = Cr_g_tab + 256;  	const int16 *Cb_b_tab = Cb_g_tab + 256; @@ -283,7 +255,7 @@ void convertYUV420ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup  	}  } -void convertYUV420ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { +void YUVToRGBManager::convert420(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) {  	// Sanity checks  	assert(dst && dst->pixels);  	assert(dst->format.bytesPerPixel == 2 || dst->format.bytesPerPixel == 4); @@ -291,13 +263,13 @@ void convertYUV420ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uS  	assert((yWidth & 1) == 0);  	assert((yHeight & 1) == 0); -	const YUVToRGBLookup *lookup = YUVToRGBMan.getLookup(dst->format); +	const YUVToRGBLookup *lookup = getLookup(dst->format);  	// Use a templated function to avoid an if check on every pixel  	if (dst->format.bytesPerPixel == 2) -		convertYUV420ToRGB<uint16>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); +		convertYUV420ToRGB<uint16>((byte *)dst->pixels, dst->pitch, lookup, _colorTab, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch);  	else -		convertYUV420ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); +		convertYUV420ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, _colorTab, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch);  }  #define READ_QUAD(ptr, prefix) \ @@ -325,9 +297,9 @@ void convertYUV420ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uS  	xDiff++  template<typename PixelInt> -void convertYUV410ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { +void convertYUV410ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, int16 *colorTab, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) {  	// Keep the tables in pointers here to avoid a dereference on each pixel -	const int16 *Cr_r_tab = lookup->_colorTab; +	const int16 *Cr_r_tab = colorTab;  	const int16 *Cr_g_tab = Cr_r_tab + 256;  	const int16 *Cb_g_tab = Cr_g_tab + 256;  	const int16 *Cb_b_tab = Cb_g_tab + 256; @@ -368,7 +340,7 @@ void convertYUV410ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup  #undef DO_INTERPOLATION  #undef DO_YUV410_PIXEL -void convertYUV410ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { +void YUVToRGBManager::convert410(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) {  	// Sanity checks  	assert(dst && dst->pixels);  	assert(dst->format.bytesPerPixel == 2 || dst->format.bytesPerPixel == 4); @@ -376,13 +348,13 @@ void convertYUV410ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uS  	assert((yWidth & 3) == 0);  	assert((yHeight & 3) == 0); -	const YUVToRGBLookup *lookup = YUVToRGBMan.getLookup(dst->format); +	const YUVToRGBLookup *lookup = getLookup(dst->format);  	// Use a templated function to avoid an if check on every pixel  	if (dst->format.bytesPerPixel == 2) -		convertYUV410ToRGB<uint16>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); +		convertYUV410ToRGB<uint16>((byte *)dst->pixels, dst->pitch, lookup, _colorTab, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch);  	else -		convertYUV410ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); +		convertYUV410ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, _colorTab, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch);  }  } // End of namespace Graphics diff --git a/graphics/yuv_to_rgb.h b/graphics/yuv_to_rgb.h index 73a2c69d7d..3af3fe87e4 100644 --- a/graphics/yuv_to_rgb.h +++ b/graphics/yuv_to_rgb.h @@ -32,57 +32,76 @@  #define GRAPHICS_YUV_TO_RGB_H  #include "common/scummsys.h" +#include "common/singleton.h"  #include "graphics/surface.h"  namespace Graphics { -/** - * Convert a YUV444 image to an RGB surface - * - * @param dst     the destination surface - * @param ySrc    the source of the y component - * @param uSrc    the source of the u component - * @param vSrc    the source of the v component - * @param yWidth  the width of the y surface - * @param yHeight the height of the y surface - * @param yPitch  the pitch of the y surface - * @param uvPitch the pitch of the u and v surfaces - */ -void convertYUV444ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch); +class YUVToRGBLookup; -/** - * Convert a YUV420 image to an RGB surface - * - * @param dst     the destination surface - * @param ySrc    the source of the y component - * @param uSrc    the source of the u component - * @param vSrc    the source of the v component - * @param yWidth  the width of the y surface (must be divisible by 2) - * @param yHeight the height of the y surface (must be divisible by 2) - * @param yPitch  the pitch of the y surface - * @param uvPitch the pitch of the u and v surfaces - */ -void convertYUV420ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch); +class YUVToRGBManager : public Common::Singleton<YUVToRGBManager> { +public: +	/** +	 * Convert a YUV444 image to an RGB surface +	 * +	 * @param dst     the destination surface +	 * @param ySrc    the source of the y component +	 * @param uSrc    the source of the u component +	 * @param vSrc    the source of the v component +	 * @param yWidth  the width of the y surface +	 * @param yHeight the height of the y surface +	 * @param yPitch  the pitch of the y surface +	 * @param uvPitch the pitch of the u and v surfaces +	 */ +	void convert444(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch); -/** - * Convert a YUV410 image to an RGB surface - * - * Since the chroma has a very low resolution in 410, we perform bilinear scaling - * on the two chroma planes to produce the image. The chroma planes must have - * at least one extra row that can be read from in order to produce a proper - * image (filled with 0x80). This is required in order to speed up this function. - * - * @param dst     the destination surface - * @param ySrc    the source of the y component - * @param uSrc    the source of the u component - * @param vSrc    the source of the v component - * @param yWidth  the width of the y surface (must be divisible by 4) - * @param yHeight the height of the y surface (must be divisible by 4) - * @param yPitch  the pitch of the y surface - * @param uvPitch the pitch of the u and v surfaces - */ -void convertYUV410ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch); +	/** +	 * Convert a YUV420 image to an RGB surface +	 * +	 * @param dst     the destination surface +	 * @param ySrc    the source of the y component +	 * @param uSrc    the source of the u component +	 * @param vSrc    the source of the v component +	 * @param yWidth  the width of the y surface (must be divisible by 2) +	 * @param yHeight the height of the y surface (must be divisible by 2) +	 * @param yPitch  the pitch of the y surface +	 * @param uvPitch the pitch of the u and v surfaces +	 */ +	void convert420(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch); + +	/** +	 * Convert a YUV410 image to an RGB surface	 +	 * +	 * Since the chroma has a very low resolution in 410, we perform bilinear scaling +	 * on the two chroma planes to produce the image. The chroma planes must have +	 * at least one extra row that can be read from in order to produce a proper +	 * image (filled with 0x80). This is required in order to speed up this function. +	 * +	 * @param dst     the destination surface +	 * @param ySrc    the source of the y component +	 * @param uSrc    the source of the u component +	 * @param vSrc    the source of the v component +	 * @param yWidth  the width of the y surface (must be divisible by 4) +	 * @param yHeight the height of the y surface (must be divisible by 4) +	 * @param yPitch  the pitch of the y surface +	 * @param uvPitch the pitch of the u and v surfaces +	 */ +	void convert410(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch); + +private: +	friend class Common::Singleton<SingletonBaseType>; +	YUVToRGBManager(); +	~YUVToRGBManager(); + +	const YUVToRGBLookup *getLookup(Graphics::PixelFormat format); + +	Graphics::PixelFormat _lastFormat; +	YUVToRGBLookup *_lookup; +	int16 _colorTab[4 * 256]; // 2048 bytes +};  } // End of namespace Graphics +#define YUVToRGBMan (::Graphics::YUVToRGBManager::instance()) +  #endif diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index 30632cdd6c..65f0f6c0af 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -348,7 +348,7 @@ void BinkDecoder::BinkVideoTrack::decodePacket(VideoFrame &frame) {  	// The width used here is the surface-width, and not the video-width  	// to allow for odd-sized videos.  	assert(_curPlanes[0] && _curPlanes[1] && _curPlanes[2]); -	Graphics::convertYUV420ToRGB(&_surface, _curPlanes[0], _curPlanes[1], _curPlanes[2], +	YUVToRGBMan.convert420(&_surface, _curPlanes[0], _curPlanes[1], _curPlanes[2],  			_surfaceWidth, _surfaceHeight, _surfaceWidth, _surfaceWidth >> 1);  	// And swap the planes with the reference planes diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp index 14452ab15b..41bd1dc507 100644 --- a/video/codecs/svq1.cpp +++ b/video/codecs/svq1.cpp @@ -256,7 +256,7 @@ const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *st  		_surface->h = _height;  	} -	convertYUV410ToRGB(_surface, current[0], current[1], current[2], yWidth, yHeight, yWidth, uvWidth); +	YUVToRGBMan.convert410(_surface, current[0], current[1], current[2], yWidth, yHeight, yWidth, uvWidth);  	// Store the current surfaces for later and free the old ones  	for (int i = 0; i < 3; i++) { diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp index fa7f1e8cfe..7cdc53d511 100644 --- a/video/psx_decoder.cpp +++ b/video/psx_decoder.cpp @@ -483,7 +483,7 @@ void PSXStreamDecoder::PSXVideoTrack::decodeFrame(Common::SeekableReadStream *fr  			decodeMacroBlock(&bits, mbX, mbY, scale, version);  	// Output data onto the frame -	Graphics::convertYUV420ToRGB(_surface, _yBuffer, _cbBuffer, _crBuffer, _surface->w, _surface->h, _macroBlocksW * 16, _macroBlocksW * 8); +	YUVToRGBMan.convert420(_surface, _yBuffer, _cbBuffer, _crBuffer, _surface->w, _surface->h, _macroBlocksW * 16, _macroBlocksW * 8);  	_curFrame++; diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp index d7260469e6..8b579321ac 100644 --- a/video/theora_decoder.cpp +++ b/video/theora_decoder.cpp @@ -328,7 +328,7 @@ void TheoraDecoder::TheoraVideoTrack::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuf  	assert(YUVBuffer[kBufferU].height == YUVBuffer[kBufferY].height >> 1);  	assert(YUVBuffer[kBufferV].height == YUVBuffer[kBufferY].height >> 1); -	Graphics::convertYUV420ToRGB(&_surface, YUVBuffer[kBufferY].data, YUVBuffer[kBufferU].data, YUVBuffer[kBufferV].data, YUVBuffer[kBufferY].width, YUVBuffer[kBufferY].height, YUVBuffer[kBufferY].stride, YUVBuffer[kBufferU].stride); +	YUVToRGBMan.convert420(&_surface, YUVBuffer[kBufferY].data, YUVBuffer[kBufferU].data, YUVBuffer[kBufferV].data, YUVBuffer[kBufferY].width, YUVBuffer[kBufferY].height, YUVBuffer[kBufferY].stride, YUVBuffer[kBufferU].stride);  }  static vorbis_info *info = 0; | 
