Commit c0d6dee4 authored by fbarchard@google.com's avatar fbarchard@google.com

Fix for ARGBColorTable x86 assembly. Sav

BUG=51
TEST=TestARGBColorTable
Review URL: https://webrtc-codereview.appspot.com/667011

git-svn-id: http://libyuv.googlecode.com/svn/trunk@307 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 452472df
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 306 Version: 307
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 306 #define LIBYUV_VERSION 307
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -59,10 +59,11 @@ enum FourCC { ...@@ -59,10 +59,11 @@ enum FourCC {
FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // bgr565. FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // bgr565.
FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // abgr1555. FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // abgr1555.
FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444. FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444.
FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'),
FOURCC_RAW = FOURCC('r', 'a', 'w', ' '), FOURCC_RAW = FOURCC('r', 'a', 'w', ' '),
FOURCC_NV21 = FOURCC('N', 'V', '2', '1'), FOURCC_NV21 = FOURCC('N', 'V', '2', '1'),
FOURCC_NV12 = FOURCC('N', 'V', '1', '2'), FOURCC_NV12 = FOURCC('N', 'V', '1', '2'),
FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'),
FOURCC_H264 = FOURCC('H', '2', '6', '4'),
// Next four are Bayer RGB formats. The four characters define the order of // Next four are Bayer RGB formats. The four characters define the order of
// the colours in each 2x2 pixel grid, going left-to-right and top-to-bottom. // the colours in each 2x2 pixel grid, going left-to-right and top-to-bottom.
FOURCC_RGGB = FOURCC('R', 'G', 'G', 'B'), FOURCC_RGGB = FOURCC('R', 'G', 'G', 'B'),
...@@ -112,10 +113,11 @@ enum FourCCBpp { ...@@ -112,10 +113,11 @@ enum FourCCBpp {
FOURCC_BPP_RGBP = 16, FOURCC_BPP_RGBP = 16,
FOURCC_BPP_RGBO = 16, FOURCC_BPP_RGBO = 16,
FOURCC_BPP_R444 = 16, FOURCC_BPP_R444 = 16,
FOURCC_BPP_MJPG = 0, // 0 means unknown.
FOURCC_BPP_RAW = 24, FOURCC_BPP_RAW = 24,
FOURCC_BPP_NV21 = 12, FOURCC_BPP_NV21 = 12,
FOURCC_BPP_NV12 = 12, FOURCC_BPP_NV12 = 12,
FOURCC_BPP_MJPG = 0, // 0 means unknown.
FOURCC_BPP_H264 = 0,
// Next four are Bayer RGB formats. The four characters define the order of // Next four are Bayer RGB formats. The four characters define the order of
// the colours in each 2x2 pixel grid, going left-to-right and top-to-bottom. // the colours in each 2x2 pixel grid, going left-to-right and top-to-bottom.
FOURCC_BPP_RGGB = 8, FOURCC_BPP_RGGB = 8,
......
...@@ -86,7 +86,7 @@ extern "C" { ...@@ -86,7 +86,7 @@ extern "C" {
// The following are Windows only: // The following are Windows only:
#if !defined(YUV_DISABLE_ASM) && defined(_M_IX86) #if !defined(YUV_DISABLE_ASM) && defined(_M_IX86)
// TODO(fbarchard): Investigate possible issue in this function and reenable. // TODO(fbarchard): Investigate possible issue in this function and reenable.
#define HAS_ARGBCOLORTABLEROW_X86_DISABLED #define HAS_ARGBCOLORTABLEROW_X86
#endif #endif
// The following are disabled when SSSE3 is available: // The following are disabled when SSSE3 is available:
......
...@@ -3031,11 +3031,12 @@ void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, ...@@ -3031,11 +3031,12 @@ void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb,
int width) { int width) {
__asm { __asm {
push ebx push ebx
push esi
push edi push edi
push ebp push ebp
mov eax, [esp + 12 + 4] /* dst_argb */ mov eax, [esp + 16 + 4] /* dst_argb */
mov edi, [esp + 12 + 8] /* table_argb */ mov edi, [esp + 16 + 8] /* table_argb */
mov ecx, [esp + 12 + 12] /* width */ mov ecx, [esp + 16 + 12] /* width */
xor ebx, ebx xor ebx, ebx
xor edx, edx xor edx, edx
...@@ -3064,6 +3065,7 @@ void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, ...@@ -3064,6 +3065,7 @@ void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb,
jg convertloop jg convertloop
pop ebp pop ebp
pop edi pop edi
pop esi
pop ebx pop ebx
ret ret
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment