aboutsummaryrefslogtreecommitdiff
path: root/video/codecs
diff options
context:
space:
mode:
authorMatthew Hoops2012-04-14 17:06:31 -0400
committerMatthew Hoops2012-04-14 17:06:31 -0400
commit473a09786d0688e7ab9689be4f6e60172a288cb2 (patch)
treea882b293fe948ce72ed4b3f6aafccde6482a3ce5 /video/codecs
parent870ab35f5b184bc7af950437de4e5cb4f2afeddd (diff)
downloadscummvm-rg350-473a09786d0688e7ab9689be4f6e60172a288cb2.tar.gz
scummvm-rg350-473a09786d0688e7ab9689be4f6e60172a288cb2.tar.bz2
scummvm-rg350-473a09786d0688e7ab9689be4f6e60172a288cb2.zip
GRAPHICS: Make YUV410 conversion code use bilinear interpolation
SVQ1 no longer looks blocky and now looks a lot closer to what QuickTime outputs
Diffstat (limited to 'video/codecs')
-rw-r--r--video/codecs/svq1.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp
index dc64429d4a..eba0c90305 100644
--- a/video/codecs/svq1.cpp
+++ b/video/codecs/svq1.cpp
@@ -191,14 +191,18 @@ const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *st
for (int i = 0; i < 3; i++) {
int width, height;
if (i == 0) {
- width = yWidth;
+ width = yWidth;
height = yHeight;
+ current[i] = new byte[width * height];
} else {
- width = uvWidth;
+ width = uvWidth;
height = uvHeight;
- }
- current[i] = new byte[width * height];
+ // Add an extra row's worth of data to not go out-of-bounds in the
+ // color conversion. Then fill that with "empty" data.
+ current[i] = new byte[width * (height + 1)];
+ memset(current[i] + width * height, 0x80, width);
+ }
if (frameType == 0) { // I Frame
// Keyframe (I)