From dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 02:14:51 +0200 Subject: GRAPHICS: Prefer getBasePtr over direct Surface::pixels access. --- graphics/decoders/jpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/decoders/jpeg.cpp') diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp index 75fdcd6e5a..d2829e3576 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); - YUVToRGBMan.convert444(_rgbSurface, Graphics::YUVToRGBManager::kScaleFull, (byte *)yComponent->pixels, (byte *)uComponent->pixels, (byte *)vComponent->pixels, yComponent->w, yComponent->h, yComponent->pitch, uComponent->pitch); + YUVToRGBMan.convert444(_rgbSurface, Graphics::YUVToRGBManager::kScaleFull, (const byte *)yComponent->getBasePtr(0, 0), (const byte *)uComponent->getBasePtr(0, 0), (const byte *)vComponent->getBasePtr(0, 0), yComponent->w, yComponent->h, yComponent->pitch, uComponent->pitch); return _rgbSurface; } -- cgit v1.2.3 From 5111746911958bd35422e9614b0961a6b911ea06 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 02:35:31 +0200 Subject: GRAPHICS: Take advantage of Surface::getPixels. --- graphics/decoders/jpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/decoders/jpeg.cpp') diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp index d2829e3576..ff018c799a 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); - YUVToRGBMan.convert444(_rgbSurface, Graphics::YUVToRGBManager::kScaleFull, (const byte *)yComponent->getBasePtr(0, 0), (const byte *)uComponent->getBasePtr(0, 0), (const byte *)vComponent->getBasePtr(0, 0), yComponent->w, yComponent->h, yComponent->pitch, uComponent->pitch); + YUVToRGBMan.convert444(_rgbSurface, Graphics::YUVToRGBManager::kScaleFull, (const byte *)yComponent->getPixels(), (const byte *)uComponent->getPixels(), (const byte *)vComponent->getPixels(), yComponent->w, yComponent->h, yComponent->pitch, uComponent->pitch); return _rgbSurface; } -- cgit v1.2.3