diff options
author | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 08:24:32 +0000 |
---|---|---|
committer | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 08:24:32 +0000 |
commit | 433e9a1e0ba40fca511aa903932781c703caf75b (patch) | |
tree | e3721a7732026920e9949c18795d7550d0b23a78 /media/base/yuv_row_win.cc | |
parent | 39ca7de68778d0987c7308d5e6c19886c2bbcfc6 (diff) | |
download | chromium_src-433e9a1e0ba40fca511aa903932781c703caf75b.zip chromium_src-433e9a1e0ba40fca511aa903932781c703caf75b.tar.gz chromium_src-433e9a1e0ba40fca511aa903932781c703caf75b.tar.bz2 |
Filter YUV scaling at half size and below with center of pixel
BUG=19113
TEST=use playerwtl and reduce size to half and turn filtering on/off. Should look better.
Review URL: http://codereview.chromium.org/1625017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/yuv_row_win.cc')
-rw-r--r-- | media/base/yuv_row_win.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/media/base/yuv_row_win.cc b/media/base/yuv_row_win.cc index 1315ae4..b5049a5 100644 --- a/media/base/yuv_row_win.cc +++ b/media/base/yuv_row_win.cc @@ -353,8 +353,11 @@ void LinearScaleYUVToRGB32Row(const uint8* y_buf, mov ecx, [esp + 32 + 20] // width imul ecx, [esp + 32 + 24] // source_dx mov [esp + 32 + 20], ecx // source_width = width * source_dx - xor ebx, ebx // x - + mov ecx, [esp + 32 + 24] // source_dx + xor ebx, ebx // x = 0 + cmp ecx, 0x20000 + jl lscaleend + mov ebx, 0x8000 // x = 0.5 for 1/2 or less jmp lscaleend lscaleloop: mov eax, ebx @@ -552,7 +555,7 @@ void LinearScaleYUVToRGB32Row(const uint8* y_buf, int width, int source_dx) { int x = 0; - if (source_dx >= 2) { + if (source_dx >= 0x20000) { x = 32768; } for (int i = 0; i < width; i += 2) { |