From 5e279996eb1f448712d1a6b64218a6cf65159a57 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:35:12 +0200 Subject: VIDEO: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. Certain codecs seem to use a Surface with Bpp 2, but do not have any proper format description. Whoever is maintaining these should check this commit and fix the format properly. --- video/qt_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/qt_decoder.cpp') diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 826b7bfcaf..6c0c34a40c 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -526,7 +526,7 @@ void QuickTimeDecoder::init() { if (getScaleFactorX() != 1 || getScaleFactorY() != 1) { // We have to initialize the scaled surface _scaledSurface = new Graphics::Surface(); - _scaledSurface->create(getWidth(), getHeight(), getPixelFormat().bytesPerPixel); + _scaledSurface->create(getWidth(), getHeight(), getPixelFormat()); } } } -- cgit v1.2.3 From f90bbf9cfad20c6122b98d8b2f99c2cdaa5ce5d6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 17:25:08 +0200 Subject: VIDEO: Prefer Surface::format over Surface::bytesPerPixel. --- video/qt_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/qt_decoder.cpp') diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 6c0c34a40c..24225ece89 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -381,7 +381,7 @@ const Graphics::Surface *QuickTimeDecoder::scaleSurface(const Graphics::Surface for (int32 j = 0; j < _scaledSurface->h; j++) for (int32 k = 0; k < _scaledSurface->w; k++) - memcpy(_scaledSurface->getBasePtr(k, j), frame->getBasePtr((k * getScaleFactorX()).toInt() , (j * getScaleFactorY()).toInt()), frame->bytesPerPixel); + memcpy(_scaledSurface->getBasePtr(k, j), frame->getBasePtr((k * getScaleFactorX()).toInt() , (j * getScaleFactorY()).toInt()), frame->format.bytesPerPixel); return _scaledSurface; } -- cgit v1.2.3 From 9414d7a6e287ff8abfb5746b564e92c8f0e6de58 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Sun, 24 Apr 2011 11:34:27 +0300 Subject: JANITORIAL: Reduce header dependencies in shared code Some backends may break as I only compiled SDL --- video/qt_decoder.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'video/qt_decoder.cpp') diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 826b7bfcaf..9e125fe99b 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -39,20 +39,32 @@ #include "common/memstream.h" #include "common/util.h" #include "common/zlib.h" +#include "common/stream.h" +#include "common/system.h" +#include "common/textconsole.h" +#include "common/types.h" + +#include "graphics/pixelformat.h" +#include "graphics/surface.h" + + +#include "audio/audiostream.h" // Audio codecs #include "audio/decoders/adpcm.h" #include "audio/decoders/raw.h" -#include "video/codecs/qdm2.h" // Video codecs +#include "video/codecs/codec.h" #include "video/codecs/cinepak.h" #include "video/codecs/mjpeg.h" +#include "video/codecs/qdm2.h" #include "video/codecs/qtrle.h" #include "video/codecs/rpza.h" #include "video/codecs/smc.h" #include "video/codecs/cdtoons.h" + namespace Video { //////////////////////////////////////////// -- cgit v1.2.3