Changeset 5633


Ignore:
Timestamp:
Jul 28, 2017 2:51:44 AM (6 years ago)
Author:
nanang
Message:

Re #2004: Update libyuv version from libyuv git master repo dated 27 July 2017, the compile errors on old gcc versions issue persists though.

Location:
pjproject/trunk/third_party
Files:
7 added
3 deleted
61 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/build/yuv/Makefile

    r5424 r5633  
    4949        rotate_common.o     \ 
    5050        rotate_gcc.o        \ 
    51         rotate_mips.o       \ 
     51        rotate_dspr2.o      \ 
    5252        rotate_neon64.o     \ 
    5353        rotate_neon.o       \ 
     
    5656        row_common.o        \ 
    5757        row_gcc.o           \ 
    58         row_mips.o          \ 
     58        row_dspr2.o         \ 
    5959        row_neon64.o        \ 
    6060        row_neon.o          \ 
     
    6565        scale_common.o      \ 
    6666        scale_gcc.o         \ 
    67         scale_mips.o        \ 
     67        scale_dspr2.o       \ 
    6868        scale_neon64.o      \ 
    6969        scale_neon.o        \ 
  • pjproject/trunk/third_party/build/yuv/Notes.txt

    r5358 r5633  
    11Notes: 
    2 * Source code for libyuv from https://chromium.googlesource.com/libyuv/libyuv/ dated 23 June 2016. 
     2 
     3* Source code for libyuv from https://chromium.googlesource.com/libyuv/libyuv/ dated 27 July 2017. 
     4 
    35* All code is compilable, except for compare_win.cc 
    46  - Use older version (https://chromium.googlesource.com/libyuv/libyuv/+/baf6a3c1bd385e7ffe6b7634560e71fb49e4f589%5E%21/) 
     
    1618    __declspec(naked) 
    1719    -------------------------------------------------------------------------------------- 
    18 * Disable some compiler warning which apear alot: 
    19   - warning C4100: unreferenced formal parameter 
    20   - warning C4127: conditional expression is constant 
    21   - warning C4244: '=' : conversion from 'uint32' to 'uint8', possible loss of data 
     20 
     21* Added these lines to file include/libyuv/basic_types.h: 
     22  -- 
     23  #if _MSC_VER==1400 
     24  #   include <stdint.h>  // for uint8_t 
     25  #endif 
     26  ... 
     27  #if defined(_MSC_VER) 
     28  #  pragma warning(disable:4996) // This function or variable may be unsafe. 
     29  #endif 
     30  -- 
  • pjproject/trunk/third_party/yuv/include/libyuv.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_H_ 
    1212#define INCLUDE_LIBYUV_H_ 
    1313 
     
    3030#include "libyuv/video_common.h" 
    3131 
    32 #endif  // INCLUDE_LIBYUV_H_  NOLINT 
     32#endif  // INCLUDE_LIBYUV_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/basic_types.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_ 
    1212#define INCLUDE_LIBYUV_BASIC_TYPES_H_ 
    1313 
    1414#include <stddef.h>  // for NULL, size_t 
    1515 
    16 #if defined(__ANDROID__) || (defined(_MSC_VER) && (_MSC_VER < 1600)) 
     16#if defined(_MSC_VER) && (_MSC_VER < 1600) 
     17#if _MSC_VER==1400 
     18#   include <stdint.h>  // for uint8_t 
     19#endif 
    1720#include <sys/types.h>  // for uintptr_t on x86 
    1821#else 
    1922#include <stdint.h>  // for uintptr_t 
     23#endif 
     24 
     25#if defined(_MSC_VER) 
     26#  pragma warning(disable:4996) // This function or variable may be unsafe. 
    2027#endif 
    2128 
     
    2734typedef __int64 int64; 
    2835#ifndef INT64_C 
    29 #define INT64_C(x) x ## I64 
     36#define INT64_C(x) x##I64 
    3037#endif 
    3138#ifndef UINT64_C 
    32 #define UINT64_C(x) x ## UI64 
     39#define UINT64_C(x) x##UI64 
    3340#endif 
    3441#define INT64_F "I64" 
     
    3643#if defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) 
    3744typedef unsigned long uint64;  // NOLINT 
    38 typedef long int64;  // NOLINT 
     45typedef long int64;            // NOLINT 
    3946#ifndef INT64_C 
    40 #define INT64_C(x) x ## L 
     47#define INT64_C(x) x##L 
    4148#endif 
    4249#ifndef UINT64_C 
    43 #define UINT64_C(x) x ## UL 
     50#define UINT64_C(x) x##UL 
    4451#endif 
    4552#define INT64_F "l" 
    4653#else  // defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) 
    4754typedef unsigned long long uint64;  // NOLINT 
    48 typedef long long int64;  // NOLINT 
     55typedef long long int64;            // NOLINT 
    4956#ifndef INT64_C 
    50 #define INT64_C(x) x ## LL 
     57#define INT64_C(x) x##LL 
    5158#endif 
    5259#ifndef UINT64_C 
    53 #define UINT64_C(x) x ## ULL 
     60#define UINT64_C(x) x##ULL 
    5461#endif 
    5562#define INT64_F "ll" 
     
    5966typedef int int32; 
    6067typedef unsigned short uint16;  // NOLINT 
    61 typedef short int16;  // NOLINT 
     68typedef short int16;            // NOLINT 
    6269typedef unsigned char uint8; 
    6370typedef signed char int8; 
     
    6673 
    6774// Detect compiler is for x86 or x64. 
    68 #if defined(__x86_64__) || defined(_M_X64) || \ 
    69     defined(__i386__) || defined(_M_IX86) 
     75#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ 
     76    defined(_M_IX86) 
    7077#define CPU_X86 1 
    7178#endif 
     
    7784#ifndef ALIGNP 
    7885#ifdef __cplusplus 
    79 #define ALIGNP(p, t) \ 
    80     (reinterpret_cast<uint8*>(((reinterpret_cast<uintptr_t>(p) + \ 
    81     ((t) - 1)) & ~((t) - 1)))) 
     86#define ALIGNP(p, t)        \ 
     87  reinterpret_cast<uint8*>( \ 
     88      ((reinterpret_cast<uintptr_t>(p) + ((t)-1)) & ~((t)-1))) 
    8289#else 
    8390#define ALIGNP(p, t) \ 
    84     ((uint8*)((((uintptr_t)(p) + ((t) - 1)) & ~((t) - 1)))) /* NOLINT */ 
     91  (uint8*)((((uintptr_t)(p) + ((t)-1)) & ~((t)-1))) /* NOLINT */ 
    8592#endif 
    8693#endif 
     
    96103#endif  // LIBYUV_BUILDING_SHARED_LIBRARY 
    97104#elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \ 
    98     (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \ 
    99     defined(LIBYUV_USING_SHARED_LIBRARY)) 
    100 #define LIBYUV_API __attribute__ ((visibility ("default"))) 
     105    (defined(LIBYUV_BUILDING_SHARED_LIBRARY) ||                      \ 
     106     defined(LIBYUV_USING_SHARED_LIBRARY)) 
     107#define LIBYUV_API __attribute__((visibility("default"))) 
    101108#else 
    102109#define LIBYUV_API 
     
    109116 
    110117// Visual C x86 or GCC little endian. 
    111 #if defined(__x86_64__) || defined(_M_X64) || \ 
    112   defined(__i386__) || defined(_M_IX86) || \ 
    113   defined(__arm__) || defined(_M_ARM) || \ 
    114   (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) 
     118#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ 
     119    defined(_M_IX86) || defined(__arm__) || defined(_M_ARM) ||     \ 
     120    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) 
    115121#define LIBYUV_LITTLE_ENDIAN 
    116122#endif 
    117123 
    118 #endif  // INCLUDE_LIBYUV_BASIC_TYPES_H_  NOLINT 
     124#endif  // INCLUDE_LIBYUV_BASIC_TYPES_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/compare.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_COMPARE_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_COMPARE_H_ 
    1212#define INCLUDE_LIBYUV_COMPARE_H_ 
    1313 
     
    2323uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed); 
    2424 
     25// Hamming Distance 
     26LIBYUV_API 
     27uint64 ComputeHammingDistance(const uint8* src_a, 
     28                              const uint8* src_b, 
     29                              int count); 
     30 
    2531// Scan an opaque argb image and return fourcc based on alpha offset. 
    2632// Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown. 
     
    3036// Sum Square Error - used to compute Mean Square Error or PSNR. 
    3137LIBYUV_API 
    32 uint64 ComputeSumSquareError(const uint8* src_a, 
    33                              const uint8* src_b, int count); 
     38uint64 ComputeSumSquareError(const uint8* src_a, const uint8* src_b, int count); 
    3439 
    3540LIBYUV_API 
    36 uint64 ComputeSumSquareErrorPlane(const uint8* src_a, int stride_a, 
    37                                   const uint8* src_b, int stride_b, 
    38                                   int width, int height); 
     41uint64 ComputeSumSquareErrorPlane(const uint8* src_a, 
     42                                  int stride_a, 
     43                                  const uint8* src_b, 
     44                                  int stride_b, 
     45                                  int width, 
     46                                  int height); 
    3947 
    4048static const int kMaxPsnr = 128; 
     
    4452 
    4553LIBYUV_API 
    46 double CalcFramePsnr(const uint8* src_a, int stride_a, 
    47                      const uint8* src_b, int stride_b, 
    48                      int width, int height); 
     54double CalcFramePsnr(const uint8* src_a, 
     55                     int stride_a, 
     56                     const uint8* src_b, 
     57                     int stride_b, 
     58                     int width, 
     59                     int height); 
    4960 
    5061LIBYUV_API 
    51 double I420Psnr(const uint8* src_y_a, int stride_y_a, 
    52                 const uint8* src_u_a, int stride_u_a, 
    53                 const uint8* src_v_a, int stride_v_a, 
    54                 const uint8* src_y_b, int stride_y_b, 
    55                 const uint8* src_u_b, int stride_u_b, 
    56                 const uint8* src_v_b, int stride_v_b, 
    57                 int width, int height); 
     62double I420Psnr(const uint8* src_y_a, 
     63                int stride_y_a, 
     64                const uint8* src_u_a, 
     65                int stride_u_a, 
     66                const uint8* src_v_a, 
     67                int stride_v_a, 
     68                const uint8* src_y_b, 
     69                int stride_y_b, 
     70                const uint8* src_u_b, 
     71                int stride_u_b, 
     72                const uint8* src_v_b, 
     73                int stride_v_b, 
     74                int width, 
     75                int height); 
    5876 
    5977LIBYUV_API 
    60 double CalcFrameSsim(const uint8* src_a, int stride_a, 
    61                      const uint8* src_b, int stride_b, 
    62                      int width, int height); 
     78double CalcFrameSsim(const uint8* src_a, 
     79                     int stride_a, 
     80                     const uint8* src_b, 
     81                     int stride_b, 
     82                     int width, 
     83                     int height); 
    6384 
    6485LIBYUV_API 
    65 double I420Ssim(const uint8* src_y_a, int stride_y_a, 
    66                 const uint8* src_u_a, int stride_u_a, 
    67                 const uint8* src_v_a, int stride_v_a, 
    68                 const uint8* src_y_b, int stride_y_b, 
    69                 const uint8* src_u_b, int stride_u_b, 
    70                 const uint8* src_v_b, int stride_v_b, 
    71                 int width, int height); 
     86double I420Ssim(const uint8* src_y_a, 
     87                int stride_y_a, 
     88                const uint8* src_u_a, 
     89                int stride_u_a, 
     90                const uint8* src_v_a, 
     91                int stride_v_a, 
     92                const uint8* src_y_b, 
     93                int stride_y_b, 
     94                const uint8* src_u_b, 
     95                int stride_u_b, 
     96                const uint8* src_v_b, 
     97                int stride_v_b, 
     98                int width, 
     99                int height); 
    72100 
    73101#ifdef __cplusplus 
     
    76104#endif 
    77105 
    78 #endif  // INCLUDE_LIBYUV_COMPARE_H_  NOLINT 
     106#endif  // INCLUDE_LIBYUV_COMPARE_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/compare_row.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_COMPARE_ROW_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_COMPARE_ROW_H_ 
    1212#define INCLUDE_LIBYUV_COMPARE_ROW_H_ 
    1313 
     
    3131 
    3232// Visual C 2012 required for AVX2. 
    33 #if defined(_M_IX86) && !defined(__clang__) && \ 
    34     defined(_MSC_VER) && _MSC_VER >= 1700 
     33#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ 
     34    _MSC_VER >= 1700 
    3535#define VISUALC_HAS_AVX2 1 
    3636#endif  // VisualStudio >= 2012 
     
    4343#endif  // __clang__ 
    4444 
    45 #if !defined(LIBYUV_DISABLE_X86) && \ 
    46     defined(_M_IX86) && (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) 
     45#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ 
     46    (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) 
    4747#define HAS_HASHDJB2_AVX2 
    4848#endif 
     
    5050// The following are available for Visual C and GCC: 
    5151#if !defined(LIBYUV_DISABLE_X86) && \ 
    52     (defined(__x86_64__) || (defined(__i386__) || defined(_M_IX86))) 
     52    (defined(__x86_64__) || defined(__i386__) || defined(_M_IX86)) 
    5353#define HAS_HASHDJB2_SSE41 
    5454#define HAS_SUMSQUAREERROR_SSE2 
     55#define HAS_HAMMINGDISTANCE_X86 
    5556#endif 
    5657 
     
    6667    (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) 
    6768#define HAS_SUMSQUAREERROR_NEON 
     69#define HAS_HAMMINGDISTANCE_NEON 
    6870#endif 
     71 
     72uint32 HammingDistance_C(const uint8* src_a, const uint8* src_b, int count); 
     73uint32 HammingDistance_X86(const uint8* src_a, const uint8* src_b, int count); 
     74uint32 HammingDistance_NEON(const uint8* src_a, const uint8* src_b, int count); 
    6975 
    7076uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count); 
     
    8288#endif 
    8389 
    84 #endif  // INCLUDE_LIBYUV_COMPARE_ROW_H_  NOLINT 
     90#endif  // INCLUDE_LIBYUV_COMPARE_ROW_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/convert.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_CONVERT_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_CONVERT_H_ 
    1212#define INCLUDE_LIBYUV_CONVERT_H_ 
    1313 
     
    1515 
    1616#include "libyuv/rotate.h"  // For enum RotationMode. 
     17 
     18// TODO(fbarchard): fix WebRTC source to include following libyuv headers: 
     19#include "libyuv/convert_argb.h"      // For WebRTC I420ToARGB. b/620 
     20#include "libyuv/convert_from.h"      // For WebRTC ConvertFromI420. b/620 
     21#include "libyuv/planar_functions.h"  // For WebRTC I420Rect, CopyPlane. b/618 
    1722 
    1823#ifdef __cplusplus 
     
    2328// Convert I444 to I420. 
    2429LIBYUV_API 
    25 int I444ToI420(const uint8* src_y, int src_stride_y, 
    26                const uint8* src_u, int src_stride_u, 
    27                const uint8* src_v, int src_stride_v, 
    28                uint8* dst_y, int dst_stride_y, 
    29                uint8* dst_u, int dst_stride_u, 
    30                uint8* dst_v, int dst_stride_v, 
    31                int width, int height); 
     30int I444ToI420(const uint8* src_y, 
     31               int src_stride_y, 
     32               const uint8* src_u, 
     33               int src_stride_u, 
     34               const uint8* src_v, 
     35               int src_stride_v, 
     36               uint8* dst_y, 
     37               int dst_stride_y, 
     38               uint8* dst_u, 
     39               int dst_stride_u, 
     40               uint8* dst_v, 
     41               int dst_stride_v, 
     42               int width, 
     43               int height); 
    3244 
    3345// Convert I422 to I420. 
    3446LIBYUV_API 
    35 int I422ToI420(const uint8* src_y, int src_stride_y, 
    36                const uint8* src_u, int src_stride_u, 
    37                const uint8* src_v, int src_stride_v, 
    38                uint8* dst_y, int dst_stride_y, 
    39                uint8* dst_u, int dst_stride_u, 
    40                uint8* dst_v, int dst_stride_v, 
    41                int width, int height); 
    42  
    43 // Convert I411 to I420. 
    44 LIBYUV_API 
    45 int I411ToI420(const uint8* src_y, int src_stride_y, 
    46                const uint8* src_u, int src_stride_u, 
    47                const uint8* src_v, int src_stride_v, 
    48                uint8* dst_y, int dst_stride_y, 
    49                uint8* dst_u, int dst_stride_u, 
    50                uint8* dst_v, int dst_stride_v, 
    51                int width, int height); 
     47int I422ToI420(const uint8* src_y, 
     48               int src_stride_y, 
     49               const uint8* src_u, 
     50               int src_stride_u, 
     51               const uint8* src_v, 
     52               int src_stride_v, 
     53               uint8* dst_y, 
     54               int dst_stride_y, 
     55               uint8* dst_u, 
     56               int dst_stride_u, 
     57               uint8* dst_v, 
     58               int dst_stride_v, 
     59               int width, 
     60               int height); 
    5261 
    5362// Copy I420 to I420. 
    5463#define I420ToI420 I420Copy 
    5564LIBYUV_API 
    56 int I420Copy(const uint8* src_y, int src_stride_y, 
    57              const uint8* src_u, int src_stride_u, 
    58              const uint8* src_v, int src_stride_v, 
    59              uint8* dst_y, int dst_stride_y, 
    60              uint8* dst_u, int dst_stride_u, 
    61              uint8* dst_v, int dst_stride_v, 
    62              int width, int height); 
     65int I420Copy(const uint8* src_y, 
     66             int src_stride_y, 
     67             const uint8* src_u, 
     68             int src_stride_u, 
     69             const uint8* src_v, 
     70             int src_stride_v, 
     71             uint8* dst_y, 
     72             int dst_stride_y, 
     73             uint8* dst_u, 
     74             int dst_stride_u, 
     75             uint8* dst_v, 
     76             int dst_stride_v, 
     77             int width, 
     78             int height); 
    6379 
    6480// Convert I400 (grey) to I420. 
    6581LIBYUV_API 
    66 int I400ToI420(const uint8* src_y, int src_stride_y, 
    67                uint8* dst_y, int dst_stride_y, 
    68                uint8* dst_u, int dst_stride_u, 
    69                uint8* dst_v, int dst_stride_v, 
    70                int width, int height); 
     82int I400ToI420(const uint8* src_y, 
     83               int src_stride_y, 
     84               uint8* dst_y, 
     85               int dst_stride_y, 
     86               uint8* dst_u, 
     87               int dst_stride_u, 
     88               uint8* dst_v, 
     89               int dst_stride_v, 
     90               int width, 
     91               int height); 
    7192 
    7293#define J400ToJ420 I400ToI420 
     
    7495// Convert NV12 to I420. 
    7596LIBYUV_API 
    76 int NV12ToI420(const uint8* src_y, int src_stride_y, 
    77                const uint8* src_uv, int src_stride_uv, 
    78                uint8* dst_y, int dst_stride_y, 
    79                uint8* dst_u, int dst_stride_u, 
    80                uint8* dst_v, int dst_stride_v, 
    81                int width, int height); 
     97int NV12ToI420(const uint8* src_y, 
     98               int src_stride_y, 
     99               const uint8* src_uv, 
     100               int src_stride_uv, 
     101               uint8* dst_y, 
     102               int dst_stride_y, 
     103               uint8* dst_u, 
     104               int dst_stride_u, 
     105               uint8* dst_v, 
     106               int dst_stride_v, 
     107               int width, 
     108               int height); 
    82109 
    83110// Convert NV21 to I420. 
    84111LIBYUV_API 
    85 int NV21ToI420(const uint8* src_y, int src_stride_y, 
    86                const uint8* src_vu, int src_stride_vu, 
    87                uint8* dst_y, int dst_stride_y, 
    88                uint8* dst_u, int dst_stride_u, 
    89                uint8* dst_v, int dst_stride_v, 
    90                int width, int height); 
     112int NV21ToI420(const uint8* src_y, 
     113               int src_stride_y, 
     114               const uint8* src_vu, 
     115               int src_stride_vu, 
     116               uint8* dst_y, 
     117               int dst_stride_y, 
     118               uint8* dst_u, 
     119               int dst_stride_u, 
     120               uint8* dst_v, 
     121               int dst_stride_v, 
     122               int width, 
     123               int height); 
    91124 
    92125// Convert YUY2 to I420. 
    93126LIBYUV_API 
    94 int YUY2ToI420(const uint8* src_yuy2, int src_stride_yuy2, 
    95                uint8* dst_y, int dst_stride_y, 
    96                uint8* dst_u, int dst_stride_u, 
    97                uint8* dst_v, int dst_stride_v, 
    98                int width, int height); 
     127int YUY2ToI420(const uint8* src_yuy2, 
     128               int src_stride_yuy2, 
     129               uint8* dst_y, 
     130               int dst_stride_y, 
     131               uint8* dst_u, 
     132               int dst_stride_u, 
     133               uint8* dst_v, 
     134               int dst_stride_v, 
     135               int width, 
     136               int height); 
    99137 
    100138// Convert UYVY to I420. 
    101139LIBYUV_API 
    102 int UYVYToI420(const uint8* src_uyvy, int src_stride_uyvy, 
    103                uint8* dst_y, int dst_stride_y, 
    104                uint8* dst_u, int dst_stride_u, 
    105                uint8* dst_v, int dst_stride_v, 
    106                int width, int height); 
     140int UYVYToI420(const uint8* src_uyvy, 
     141               int src_stride_uyvy, 
     142               uint8* dst_y, 
     143               int dst_stride_y, 
     144               uint8* dst_u, 
     145               int dst_stride_u, 
     146               uint8* dst_v, 
     147               int dst_stride_v, 
     148               int width, 
     149               int height); 
    107150 
    108151// Convert M420 to I420. 
    109152LIBYUV_API 
    110 int M420ToI420(const uint8* src_m420, int src_stride_m420, 
    111                uint8* dst_y, int dst_stride_y, 
    112                uint8* dst_u, int dst_stride_u, 
    113                uint8* dst_v, int dst_stride_v, 
    114                int width, int height); 
     153int M420ToI420(const uint8* src_m420, 
     154               int src_stride_m420, 
     155               uint8* dst_y, 
     156               int dst_stride_y, 
     157               uint8* dst_u, 
     158               int dst_stride_u, 
     159               uint8* dst_v, 
     160               int dst_stride_v, 
     161               int width, 
     162               int height); 
     163 
     164// Convert Android420 to I420. 
     165LIBYUV_API 
     166int Android420ToI420(const uint8* src_y, 
     167                     int src_stride_y, 
     168                     const uint8* src_u, 
     169                     int src_stride_u, 
     170                     const uint8* src_v, 
     171                     int src_stride_v, 
     172                     int pixel_stride_uv, 
     173                     uint8* dst_y, 
     174                     int dst_stride_y, 
     175                     uint8* dst_u, 
     176                     int dst_stride_u, 
     177                     uint8* dst_v, 
     178                     int dst_stride_v, 
     179                     int width, 
     180                     int height); 
    115181 
    116182// ARGB little endian (bgra in memory) to I420. 
    117183LIBYUV_API 
    118 int ARGBToI420(const uint8* src_frame, int src_stride_frame, 
    119                uint8* dst_y, int dst_stride_y, 
    120                uint8* dst_u, int dst_stride_u, 
    121                uint8* dst_v, int dst_stride_v, 
    122                int width, int height); 
     184int ARGBToI420(const uint8* src_frame, 
     185               int src_stride_frame, 
     186               uint8* dst_y, 
     187               int dst_stride_y, 
     188               uint8* dst_u, 
     189               int dst_stride_u, 
     190               uint8* dst_v, 
     191               int dst_stride_v, 
     192               int width, 
     193               int height); 
    123194 
    124195// BGRA little endian (argb in memory) to I420. 
    125196LIBYUV_API 
    126 int BGRAToI420(const uint8* src_frame, int src_stride_frame, 
    127                uint8* dst_y, int dst_stride_y, 
    128                uint8* dst_u, int dst_stride_u, 
    129                uint8* dst_v, int dst_stride_v, 
    130                int width, int height); 
     197int BGRAToI420(const uint8* src_frame, 
     198               int src_stride_frame, 
     199               uint8* dst_y, 
     200               int dst_stride_y, 
     201               uint8* dst_u, 
     202               int dst_stride_u, 
     203               uint8* dst_v, 
     204               int dst_stride_v, 
     205               int width, 
     206               int height); 
    131207 
    132208// ABGR little endian (rgba in memory) to I420. 
    133209LIBYUV_API 
    134 int ABGRToI420(const uint8* src_frame, int src_stride_frame, 
    135                uint8* dst_y, int dst_stride_y, 
    136                uint8* dst_u, int dst_stride_u, 
    137                uint8* dst_v, int dst_stride_v, 
    138                int width, int height); 
     210int ABGRToI420(const uint8* src_frame, 
     211               int src_stride_frame, 
     212               uint8* dst_y, 
     213               int dst_stride_y, 
     214               uint8* dst_u, 
     215               int dst_stride_u, 
     216               uint8* dst_v, 
     217               int dst_stride_v, 
     218               int width, 
     219               int height); 
    139220 
    140221// RGBA little endian (abgr in memory) to I420. 
    141222LIBYUV_API 
    142 int RGBAToI420(const uint8* src_frame, int src_stride_frame, 
    143                uint8* dst_y, int dst_stride_y, 
    144                uint8* dst_u, int dst_stride_u, 
    145                uint8* dst_v, int dst_stride_v, 
    146                int width, int height); 
     223int RGBAToI420(const uint8* src_frame, 
     224               int src_stride_frame, 
     225               uint8* dst_y, 
     226               int dst_stride_y, 
     227               uint8* dst_u, 
     228               int dst_stride_u, 
     229               uint8* dst_v, 
     230               int dst_stride_v, 
     231               int width, 
     232               int height); 
    147233 
    148234// RGB little endian (bgr in memory) to I420. 
    149235LIBYUV_API 
    150 int RGB24ToI420(const uint8* src_frame, int src_stride_frame, 
    151                 uint8* dst_y, int dst_stride_y, 
    152                 uint8* dst_u, int dst_stride_u, 
    153                 uint8* dst_v, int dst_stride_v, 
    154                 int width, int height); 
     236int RGB24ToI420(const uint8* src_frame, 
     237                int src_stride_frame, 
     238                uint8* dst_y, 
     239                int dst_stride_y, 
     240                uint8* dst_u, 
     241                int dst_stride_u, 
     242                uint8* dst_v, 
     243                int dst_stride_v, 
     244                int width, 
     245                int height); 
    155246 
    156247// RGB big endian (rgb in memory) to I420. 
    157248LIBYUV_API 
    158 int RAWToI420(const uint8* src_frame, int src_stride_frame, 
    159               uint8* dst_y, int dst_stride_y, 
    160               uint8* dst_u, int dst_stride_u, 
    161               uint8* dst_v, int dst_stride_v, 
    162               int width, int height); 
     249int RAWToI420(const uint8* src_frame, 
     250              int src_stride_frame, 
     251              uint8* dst_y, 
     252              int dst_stride_y, 
     253              uint8* dst_u, 
     254              int dst_stride_u, 
     255              uint8* dst_v, 
     256              int dst_stride_v, 
     257              int width, 
     258              int height); 
    163259 
    164260// RGB16 (RGBP fourcc) little endian to I420. 
    165261LIBYUV_API 
    166 int RGB565ToI420(const uint8* src_frame, int src_stride_frame, 
    167                  uint8* dst_y, int dst_stride_y, 
    168                  uint8* dst_u, int dst_stride_u, 
    169                  uint8* dst_v, int dst_stride_v, 
    170                  int width, int height); 
     262int RGB565ToI420(const uint8* src_frame, 
     263                 int src_stride_frame, 
     264                 uint8* dst_y, 
     265                 int dst_stride_y, 
     266                 uint8* dst_u, 
     267                 int dst_stride_u, 
     268                 uint8* dst_v, 
     269                 int dst_stride_v, 
     270                 int width, 
     271                 int height); 
    171272 
    172273// RGB15 (RGBO fourcc) little endian to I420. 
    173274LIBYUV_API 
    174 int ARGB1555ToI420(const uint8* src_frame, int src_stride_frame, 
    175                    uint8* dst_y, int dst_stride_y, 
    176                    uint8* dst_u, int dst_stride_u, 
    177                    uint8* dst_v, int dst_stride_v, 
    178                    int width, int height); 
     275int ARGB1555ToI420(const uint8* src_frame, 
     276                   int src_stride_frame, 
     277                   uint8* dst_y, 
     278                   int dst_stride_y, 
     279                   uint8* dst_u, 
     280                   int dst_stride_u, 
     281                   uint8* dst_v, 
     282                   int dst_stride_v, 
     283                   int width, 
     284                   int height); 
    179285 
    180286// RGB12 (R444 fourcc) little endian to I420. 
    181287LIBYUV_API 
    182 int ARGB4444ToI420(const uint8* src_frame, int src_stride_frame, 
    183                    uint8* dst_y, int dst_stride_y, 
    184                    uint8* dst_u, int dst_stride_u, 
    185                    uint8* dst_v, int dst_stride_v, 
    186                    int width, int height); 
     288int ARGB4444ToI420(const uint8* src_frame, 
     289                   int src_stride_frame, 
     290                   uint8* dst_y, 
     291                   int dst_stride_y, 
     292                   uint8* dst_u, 
     293                   int dst_stride_u, 
     294                   uint8* dst_v, 
     295                   int dst_stride_v, 
     296                   int width, 
     297                   int height); 
    187298 
    188299#ifdef HAVE_JPEG 
     
    190301// dst_width/height for clipping determine final size. 
    191302LIBYUV_API 
    192 int MJPGToI420(const uint8* sample, size_t sample_size, 
    193                uint8* dst_y, int dst_stride_y, 
    194                uint8* dst_u, int dst_stride_u, 
    195                uint8* dst_v, int dst_stride_v, 
    196                int src_width, int src_height, 
    197                int dst_width, int dst_height); 
     303int MJPGToI420(const uint8* sample, 
     304               size_t sample_size, 
     305               uint8* dst_y, 
     306               int dst_stride_y, 
     307               uint8* dst_u, 
     308               int dst_stride_u, 
     309               uint8* dst_v, 
     310               int dst_stride_v, 
     311               int src_width, 
     312               int src_height, 
     313               int dst_width, 
     314               int dst_height); 
    198315 
    199316// Query size of MJPG in pixels. 
    200317LIBYUV_API 
    201 int MJPGSize(const uint8* sample, size_t sample_size, 
    202              int* width, int* height); 
     318int MJPGSize(const uint8* sample, size_t sample_size, int* width, int* height); 
    203319#endif 
    204320 
     
    226342// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. 
    227343LIBYUV_API 
    228 int ConvertToI420(const uint8* src_frame, size_t src_size, 
    229                   uint8* dst_y, int dst_stride_y, 
    230                   uint8* dst_u, int dst_stride_u, 
    231                   uint8* dst_v, int dst_stride_v, 
    232                   int crop_x, int crop_y, 
    233                   int src_width, int src_height, 
    234                   int crop_width, int crop_height, 
     344int ConvertToI420(const uint8* src_frame, 
     345                  size_t src_size, 
     346                  uint8* dst_y, 
     347                  int dst_stride_y, 
     348                  uint8* dst_u, 
     349                  int dst_stride_u, 
     350                  uint8* dst_v, 
     351                  int dst_stride_v, 
     352                  int crop_x, 
     353                  int crop_y, 
     354                  int src_width, 
     355                  int src_height, 
     356                  int crop_width, 
     357                  int crop_height, 
    235358                  enum RotationMode rotation, 
    236359                  uint32 format); 
     
    241364#endif 
    242365 
    243 #endif  // INCLUDE_LIBYUV_CONVERT_H_  NOLINT 
     366#endif  // INCLUDE_LIBYUV_CONVERT_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/convert_argb.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ 
    1212#define INCLUDE_LIBYUV_CONVERT_ARGB_H_ 
    1313 
     
    3131// Copy ARGB to ARGB. 
    3232LIBYUV_API 
    33 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 
    34              uint8* dst_argb, int dst_stride_argb, 
    35              int width, int height); 
     33int ARGBCopy(const uint8* src_argb, 
     34             int src_stride_argb, 
     35             uint8* dst_argb, 
     36             int dst_stride_argb, 
     37             int width, 
     38             int height); 
    3639 
    3740// Convert I420 to ARGB. 
    3841LIBYUV_API 
    39 int I420ToARGB(const uint8* src_y, int src_stride_y, 
    40                const uint8* src_u, int src_stride_u, 
    41                const uint8* src_v, int src_stride_v, 
    42                uint8* dst_argb, int dst_stride_argb, 
    43                int width, int height); 
     42int I420ToARGB(const uint8* src_y, 
     43               int src_stride_y, 
     44               const uint8* src_u, 
     45               int src_stride_u, 
     46               const uint8* src_v, 
     47               int src_stride_v, 
     48               uint8* dst_argb, 
     49               int dst_stride_argb, 
     50               int width, 
     51               int height); 
     52 
     53// Duplicate prototype for function in convert_from.h for remoting. 
     54LIBYUV_API 
     55int I420ToABGR(const uint8* src_y, 
     56               int src_stride_y, 
     57               const uint8* src_u, 
     58               int src_stride_u, 
     59               const uint8* src_v, 
     60               int src_stride_v, 
     61               uint8* dst_argb, 
     62               int dst_stride_argb, 
     63               int width, 
     64               int height); 
    4465 
    4566// Convert I422 to ARGB. 
    4667LIBYUV_API 
    47 int I422ToARGB(const uint8* src_y, int src_stride_y, 
    48                const uint8* src_u, int src_stride_u, 
    49                const uint8* src_v, int src_stride_v, 
    50                uint8* dst_argb, int dst_stride_argb, 
    51                int width, int height); 
     68int I422ToARGB(const uint8* src_y, 
     69               int src_stride_y, 
     70               const uint8* src_u, 
     71               int src_stride_u, 
     72               const uint8* src_v, 
     73               int src_stride_v, 
     74               uint8* dst_argb, 
     75               int dst_stride_argb, 
     76               int width, 
     77               int height); 
    5278 
    5379// Convert I444 to ARGB. 
    5480LIBYUV_API 
    55 int I444ToARGB(const uint8* src_y, int src_stride_y, 
    56                const uint8* src_u, int src_stride_u, 
    57                const uint8* src_v, int src_stride_v, 
    58                uint8* dst_argb, int dst_stride_argb, 
    59                int width, int height); 
     81int I444ToARGB(const uint8* src_y, 
     82               int src_stride_y, 
     83               const uint8* src_u, 
     84               int src_stride_u, 
     85               const uint8* src_v, 
     86               int src_stride_v, 
     87               uint8* dst_argb, 
     88               int dst_stride_argb, 
     89               int width, 
     90               int height); 
    6091 
    6192// Convert J444 to ARGB. 
    6293LIBYUV_API 
    63 int J444ToARGB(const uint8* src_y, int src_stride_y, 
    64                const uint8* src_u, int src_stride_u, 
    65                const uint8* src_v, int src_stride_v, 
    66                uint8* dst_argb, int dst_stride_argb, 
    67                int width, int height); 
     94int J444ToARGB(const uint8* src_y, 
     95               int src_stride_y, 
     96               const uint8* src_u, 
     97               int src_stride_u, 
     98               const uint8* src_v, 
     99               int src_stride_v, 
     100               uint8* dst_argb, 
     101               int dst_stride_argb, 
     102               int width, 
     103               int height); 
    68104 
    69105// Convert I444 to ABGR. 
    70106LIBYUV_API 
    71 int I444ToABGR(const uint8* src_y, int src_stride_y, 
    72                const uint8* src_u, int src_stride_u, 
    73                const uint8* src_v, int src_stride_v, 
    74                uint8* dst_abgr, int dst_stride_abgr, 
    75                int width, int height); 
    76  
    77 // Convert I411 to ARGB. 
    78 LIBYUV_API 
    79 int I411ToARGB(const uint8* src_y, int src_stride_y, 
    80                const uint8* src_u, int src_stride_u, 
    81                const uint8* src_v, int src_stride_v, 
    82                uint8* dst_argb, int dst_stride_argb, 
    83                int width, int height); 
     107int I444ToABGR(const uint8* src_y, 
     108               int src_stride_y, 
     109               const uint8* src_u, 
     110               int src_stride_u, 
     111               const uint8* src_v, 
     112               int src_stride_v, 
     113               uint8* dst_abgr, 
     114               int dst_stride_abgr, 
     115               int width, 
     116               int height); 
    84117 
    85118// Convert I420 with Alpha to preattenuated ARGB. 
    86119LIBYUV_API 
    87 int I420AlphaToARGB(const uint8* src_y, int src_stride_y, 
    88                     const uint8* src_u, int src_stride_u, 
    89                     const uint8* src_v, int src_stride_v, 
    90                     const uint8* src_a, int src_stride_a, 
    91                     uint8* dst_argb, int dst_stride_argb, 
    92                     int width, int height, int attenuate); 
     120int I420AlphaToARGB(const uint8* src_y, 
     121                    int src_stride_y, 
     122                    const uint8* src_u, 
     123                    int src_stride_u, 
     124                    const uint8* src_v, 
     125                    int src_stride_v, 
     126                    const uint8* src_a, 
     127                    int src_stride_a, 
     128                    uint8* dst_argb, 
     129                    int dst_stride_argb, 
     130                    int width, 
     131                    int height, 
     132                    int attenuate); 
    93133 
    94134// Convert I420 with Alpha to preattenuated ABGR. 
    95135LIBYUV_API 
    96 int I420AlphaToABGR(const uint8* src_y, int src_stride_y, 
    97                     const uint8* src_u, int src_stride_u, 
    98                     const uint8* src_v, int src_stride_v, 
    99                     const uint8* src_a, int src_stride_a, 
    100                     uint8* dst_abgr, int dst_stride_abgr, 
    101                     int width, int height, int attenuate); 
     136int I420AlphaToABGR(const uint8* src_y, 
     137                    int src_stride_y, 
     138                    const uint8* src_u, 
     139                    int src_stride_u, 
     140                    const uint8* src_v, 
     141                    int src_stride_v, 
     142                    const uint8* src_a, 
     143                    int src_stride_a, 
     144                    uint8* dst_abgr, 
     145                    int dst_stride_abgr, 
     146                    int width, 
     147                    int height, 
     148                    int attenuate); 
    102149 
    103150// Convert I400 (grey) to ARGB.  Reverse of ARGBToI400. 
    104151LIBYUV_API 
    105 int I400ToARGB(const uint8* src_y, int src_stride_y, 
    106                uint8* dst_argb, int dst_stride_argb, 
    107                int width, int height); 
     152int I400ToARGB(const uint8* src_y, 
     153               int src_stride_y, 
     154               uint8* dst_argb, 
     155               int dst_stride_argb, 
     156               int width, 
     157               int height); 
    108158 
    109159// Convert J400 (jpeg grey) to ARGB. 
    110160LIBYUV_API 
    111 int J400ToARGB(const uint8* src_y, int src_stride_y, 
    112                uint8* dst_argb, int dst_stride_argb, 
    113                int width, int height); 
     161int J400ToARGB(const uint8* src_y, 
     162               int src_stride_y, 
     163               uint8* dst_argb, 
     164               int dst_stride_argb, 
     165               int width, 
     166               int height); 
    114167 
    115168// Alias. 
     
    118171// Convert NV12 to ARGB. 
    119172LIBYUV_API 
    120 int NV12ToARGB(const uint8* src_y, int src_stride_y, 
    121                const uint8* src_uv, int src_stride_uv, 
    122                uint8* dst_argb, int dst_stride_argb, 
    123                int width, int height); 
     173int NV12ToARGB(const uint8* src_y, 
     174               int src_stride_y, 
     175               const uint8* src_uv, 
     176               int src_stride_uv, 
     177               uint8* dst_argb, 
     178               int dst_stride_argb, 
     179               int width, 
     180               int height); 
    124181 
    125182// Convert NV21 to ARGB. 
    126183LIBYUV_API 
    127 int NV21ToARGB(const uint8* src_y, int src_stride_y, 
    128                const uint8* src_vu, int src_stride_vu, 
    129                uint8* dst_argb, int dst_stride_argb, 
    130                int width, int height); 
     184int NV21ToARGB(const uint8* src_y, 
     185               int src_stride_y, 
     186               const uint8* src_vu, 
     187               int src_stride_vu, 
     188               uint8* dst_argb, 
     189               int dst_stride_argb, 
     190               int width, 
     191               int height); 
    131192 
    132193// Convert M420 to ARGB. 
    133194LIBYUV_API 
    134 int M420ToARGB(const uint8* src_m420, int src_stride_m420, 
    135                uint8* dst_argb, int dst_stride_argb, 
    136                int width, int height); 
     195int M420ToARGB(const uint8* src_m420, 
     196               int src_stride_m420, 
     197               uint8* dst_argb, 
     198               int dst_stride_argb, 
     199               int width, 
     200               int height); 
    137201 
    138202// Convert YUY2 to ARGB. 
    139203LIBYUV_API 
    140 int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2, 
    141                uint8* dst_argb, int dst_stride_argb, 
    142                int width, int height); 
     204int YUY2ToARGB(const uint8* src_yuy2, 
     205               int src_stride_yuy2, 
     206               uint8* dst_argb, 
     207               int dst_stride_argb, 
     208               int width, 
     209               int height); 
    143210 
    144211// Convert UYVY to ARGB. 
    145212LIBYUV_API 
    146 int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy, 
    147                uint8* dst_argb, int dst_stride_argb, 
    148                int width, int height); 
     213int UYVYToARGB(const uint8* src_uyvy, 
     214               int src_stride_uyvy, 
     215               uint8* dst_argb, 
     216               int dst_stride_argb, 
     217               int width, 
     218               int height); 
    149219 
    150220// Convert J420 to ARGB. 
    151221LIBYUV_API 
    152 int J420ToARGB(const uint8* src_y, int src_stride_y, 
    153                const uint8* src_u, int src_stride_u, 
    154                const uint8* src_v, int src_stride_v, 
    155                uint8* dst_argb, int dst_stride_argb, 
    156                int width, int height); 
     222int J420ToARGB(const uint8* src_y, 
     223               int src_stride_y, 
     224               const uint8* src_u, 
     225               int src_stride_u, 
     226               const uint8* src_v, 
     227               int src_stride_v, 
     228               uint8* dst_argb, 
     229               int dst_stride_argb, 
     230               int width, 
     231               int height); 
    157232 
    158233// Convert J422 to ARGB. 
    159234LIBYUV_API 
    160 int J422ToARGB(const uint8* src_y, int src_stride_y, 
    161                const uint8* src_u, int src_stride_u, 
    162                const uint8* src_v, int src_stride_v, 
    163                uint8* dst_argb, int dst_stride_argb, 
    164                int width, int height); 
     235int J422ToARGB(const uint8* src_y, 
     236               int src_stride_y, 
     237               const uint8* src_u, 
     238               int src_stride_u, 
     239               const uint8* src_v, 
     240               int src_stride_v, 
     241               uint8* dst_argb, 
     242               int dst_stride_argb, 
     243               int width, 
     244               int height); 
    165245 
    166246// Convert J420 to ABGR. 
    167247LIBYUV_API 
    168 int J420ToABGR(const uint8* src_y, int src_stride_y, 
    169                const uint8* src_u, int src_stride_u, 
    170                const uint8* src_v, int src_stride_v, 
    171                uint8* dst_abgr, int dst_stride_abgr, 
    172                int width, int height); 
     248int J420ToABGR(const uint8* src_y, 
     249               int src_stride_y, 
     250               const uint8* src_u, 
     251               int src_stride_u, 
     252               const uint8* src_v, 
     253               int src_stride_v, 
     254               uint8* dst_abgr, 
     255               int dst_stride_abgr, 
     256               int width, 
     257               int height); 
    173258 
    174259// Convert J422 to ABGR. 
    175260LIBYUV_API 
    176 int J422ToABGR(const uint8* src_y, int src_stride_y, 
    177                const uint8* src_u, int src_stride_u, 
    178                const uint8* src_v, int src_stride_v, 
    179                uint8* dst_abgr, int dst_stride_abgr, 
    180                int width, int height); 
     261int J422ToABGR(const uint8* src_y, 
     262               int src_stride_y, 
     263               const uint8* src_u, 
     264               int src_stride_u, 
     265               const uint8* src_v, 
     266               int src_stride_v, 
     267               uint8* dst_abgr, 
     268               int dst_stride_abgr, 
     269               int width, 
     270               int height); 
    181271 
    182272// Convert H420 to ARGB. 
    183273LIBYUV_API 
    184 int H420ToARGB(const uint8* src_y, int src_stride_y, 
    185                const uint8* src_u, int src_stride_u, 
    186                const uint8* src_v, int src_stride_v, 
    187                uint8* dst_argb, int dst_stride_argb, 
    188                int width, int height); 
     274int H420ToARGB(const uint8* src_y, 
     275               int src_stride_y, 
     276               const uint8* src_u, 
     277               int src_stride_u, 
     278               const uint8* src_v, 
     279               int src_stride_v, 
     280               uint8* dst_argb, 
     281               int dst_stride_argb, 
     282               int width, 
     283               int height); 
    189284 
    190285// Convert H422 to ARGB. 
    191286LIBYUV_API 
    192 int H422ToARGB(const uint8* src_y, int src_stride_y, 
    193                const uint8* src_u, int src_stride_u, 
    194                const uint8* src_v, int src_stride_v, 
    195                uint8* dst_argb, int dst_stride_argb, 
    196                int width, int height); 
     287int H422ToARGB(const uint8* src_y, 
     288               int src_stride_y, 
     289               const uint8* src_u, 
     290               int src_stride_u, 
     291               const uint8* src_v, 
     292               int src_stride_v, 
     293               uint8* dst_argb, 
     294               int dst_stride_argb, 
     295               int width, 
     296               int height); 
    197297 
    198298// Convert H420 to ABGR. 
    199299LIBYUV_API 
    200 int H420ToABGR(const uint8* src_y, int src_stride_y, 
    201                const uint8* src_u, int src_stride_u, 
    202                const uint8* src_v, int src_stride_v, 
    203                uint8* dst_abgr, int dst_stride_abgr, 
    204                int width, int height); 
     300int H420ToABGR(const uint8* src_y, 
     301               int src_stride_y, 
     302               const uint8* src_u, 
     303               int src_stride_u, 
     304               const uint8* src_v, 
     305               int src_stride_v, 
     306               uint8* dst_abgr, 
     307               int dst_stride_abgr, 
     308               int width, 
     309               int height); 
    205310 
    206311// Convert H422 to ABGR. 
    207312LIBYUV_API 
    208 int H422ToABGR(const uint8* src_y, int src_stride_y, 
    209                const uint8* src_u, int src_stride_u, 
    210                const uint8* src_v, int src_stride_v, 
    211                uint8* dst_abgr, int dst_stride_abgr, 
    212                int width, int height); 
     313int H422ToABGR(const uint8* src_y, 
     314               int src_stride_y, 
     315               const uint8* src_u, 
     316               int src_stride_u, 
     317               const uint8* src_v, 
     318               int src_stride_v, 
     319               uint8* dst_abgr, 
     320               int dst_stride_abgr, 
     321               int width, 
     322               int height); 
    213323 
    214324// BGRA little endian (argb in memory) to ARGB. 
    215325LIBYUV_API 
    216 int BGRAToARGB(const uint8* src_frame, int src_stride_frame, 
    217                uint8* dst_argb, int dst_stride_argb, 
    218                int width, int height); 
     326int BGRAToARGB(const uint8* src_frame, 
     327               int src_stride_frame, 
     328               uint8* dst_argb, 
     329               int dst_stride_argb, 
     330               int width, 
     331               int height); 
    219332 
    220333// ABGR little endian (rgba in memory) to ARGB. 
    221334LIBYUV_API 
    222 int ABGRToARGB(const uint8* src_frame, int src_stride_frame, 
    223                uint8* dst_argb, int dst_stride_argb, 
    224                int width, int height); 
     335int ABGRToARGB(const uint8* src_frame, 
     336               int src_stride_frame, 
     337               uint8* dst_argb, 
     338               int dst_stride_argb, 
     339               int width, 
     340               int height); 
    225341 
    226342// RGBA little endian (abgr in memory) to ARGB. 
    227343LIBYUV_API 
    228 int RGBAToARGB(const uint8* src_frame, int src_stride_frame, 
    229                uint8* dst_argb, int dst_stride_argb, 
    230                int width, int height); 
     344int RGBAToARGB(const uint8* src_frame, 
     345               int src_stride_frame, 
     346               uint8* dst_argb, 
     347               int dst_stride_argb, 
     348               int width, 
     349               int height); 
    231350 
    232351// Deprecated function name. 
     
    235354// RGB little endian (bgr in memory) to ARGB. 
    236355LIBYUV_API 
    237 int RGB24ToARGB(const uint8* src_frame, int src_stride_frame, 
    238                 uint8* dst_argb, int dst_stride_argb, 
    239                 int width, int height); 
     356int RGB24ToARGB(const uint8* src_frame, 
     357                int src_stride_frame, 
     358                uint8* dst_argb, 
     359                int dst_stride_argb, 
     360                int width, 
     361                int height); 
    240362 
    241363// RGB big endian (rgb in memory) to ARGB. 
    242364LIBYUV_API 
    243 int RAWToARGB(const uint8* src_frame, int src_stride_frame, 
    244               uint8* dst_argb, int dst_stride_argb, 
    245               int width, int height); 
     365int RAWToARGB(const uint8* src_frame, 
     366              int src_stride_frame, 
     367              uint8* dst_argb, 
     368              int dst_stride_argb, 
     369              int width, 
     370              int height); 
    246371 
    247372// RGB16 (RGBP fourcc) little endian to ARGB. 
    248373LIBYUV_API 
    249 int RGB565ToARGB(const uint8* src_frame, int src_stride_frame, 
    250                  uint8* dst_argb, int dst_stride_argb, 
    251                  int width, int height); 
     374int RGB565ToARGB(const uint8* src_frame, 
     375                 int src_stride_frame, 
     376                 uint8* dst_argb, 
     377                 int dst_stride_argb, 
     378                 int width, 
     379                 int height); 
    252380 
    253381// RGB15 (RGBO fourcc) little endian to ARGB. 
    254382LIBYUV_API 
    255 int ARGB1555ToARGB(const uint8* src_frame, int src_stride_frame, 
    256                    uint8* dst_argb, int dst_stride_argb, 
    257                    int width, int height); 
     383int ARGB1555ToARGB(const uint8* src_frame, 
     384                   int src_stride_frame, 
     385                   uint8* dst_argb, 
     386                   int dst_stride_argb, 
     387                   int width, 
     388                   int height); 
    258389 
    259390// RGB12 (R444 fourcc) little endian to ARGB. 
    260391LIBYUV_API 
    261 int ARGB4444ToARGB(const uint8* src_frame, int src_stride_frame, 
    262                    uint8* dst_argb, int dst_stride_argb, 
    263                    int width, int height); 
     392int ARGB4444ToARGB(const uint8* src_frame, 
     393                   int src_stride_frame, 
     394                   uint8* dst_argb, 
     395                   int dst_stride_argb, 
     396                   int width, 
     397                   int height); 
    264398 
    265399#ifdef HAVE_JPEG 
     
    267401// dst_width/height for clipping determine final size. 
    268402LIBYUV_API 
    269 int MJPGToARGB(const uint8* sample, size_t sample_size, 
    270                uint8* dst_argb, int dst_stride_argb, 
    271                int src_width, int src_height, 
    272                int dst_width, int dst_height); 
     403int MJPGToARGB(const uint8* sample, 
     404               size_t sample_size, 
     405               uint8* dst_argb, 
     406               int dst_stride_argb, 
     407               int src_width, 
     408               int src_height, 
     409               int dst_width, 
     410               int dst_height); 
    273411#endif 
    274412 
     
    296434// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. 
    297435LIBYUV_API 
    298 int ConvertToARGB(const uint8* src_frame, size_t src_size, 
    299                   uint8* dst_argb, int dst_stride_argb, 
    300                   int crop_x, int crop_y, 
    301                   int src_width, int src_height, 
    302                   int crop_width, int crop_height, 
     436int ConvertToARGB(const uint8* src_frame, 
     437                  size_t src_size, 
     438                  uint8* dst_argb, 
     439                  int dst_stride_argb, 
     440                  int crop_x, 
     441                  int crop_y, 
     442                  int src_width, 
     443                  int src_height, 
     444                  int crop_width, 
     445                  int crop_height, 
    303446                  enum RotationMode rotation, 
    304447                  uint32 format); 
     
    309452#endif 
    310453 
    311 #endif  // INCLUDE_LIBYUV_CONVERT_ARGB_H_  NOLINT 
     454#endif  // INCLUDE_LIBYUV_CONVERT_ARGB_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/convert_from.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_ 
    1212#define INCLUDE_LIBYUV_CONVERT_FROM_H_ 
    1313 
     
    2525 
    2626LIBYUV_API 
    27 int I420ToI422(const uint8* src_y, int src_stride_y, 
    28                const uint8* src_u, int src_stride_u, 
    29                const uint8* src_v, int src_stride_v, 
    30                uint8* dst_y, int dst_stride_y, 
    31                uint8* dst_u, int dst_stride_u, 
    32                uint8* dst_v, int dst_stride_v, 
    33                int width, int height); 
    34  
    35 LIBYUV_API 
    36 int I420ToI444(const uint8* src_y, int src_stride_y, 
    37                const uint8* src_u, int src_stride_u, 
    38                const uint8* src_v, int src_stride_v, 
    39                uint8* dst_y, int dst_stride_y, 
    40                uint8* dst_u, int dst_stride_u, 
    41                uint8* dst_v, int dst_stride_v, 
    42                int width, int height); 
    43  
    44 LIBYUV_API 
    45 int I420ToI411(const uint8* src_y, int src_stride_y, 
    46                const uint8* src_u, int src_stride_u, 
    47                const uint8* src_v, int src_stride_v, 
    48                uint8* dst_y, int dst_stride_y, 
    49                uint8* dst_u, int dst_stride_u, 
    50                uint8* dst_v, int dst_stride_v, 
    51                int width, int height); 
     27int I420ToI422(const uint8* src_y, 
     28               int src_stride_y, 
     29               const uint8* src_u, 
     30               int src_stride_u, 
     31               const uint8* src_v, 
     32               int src_stride_v, 
     33               uint8* dst_y, 
     34               int dst_stride_y, 
     35               uint8* dst_u, 
     36               int dst_stride_u, 
     37               uint8* dst_v, 
     38               int dst_stride_v, 
     39               int width, 
     40               int height); 
     41 
     42LIBYUV_API 
     43int I420ToI444(const uint8* src_y, 
     44               int src_stride_y, 
     45               const uint8* src_u, 
     46               int src_stride_u, 
     47               const uint8* src_v, 
     48               int src_stride_v, 
     49               uint8* dst_y, 
     50               int dst_stride_y, 
     51               uint8* dst_u, 
     52               int dst_stride_u, 
     53               uint8* dst_v, 
     54               int dst_stride_v, 
     55               int width, 
     56               int height); 
    5257 
    5358// Copy to I400. Source can be I420, I422, I444, I400, NV12 or NV21. 
    5459LIBYUV_API 
    55 int I400Copy(const uint8* src_y, int src_stride_y, 
    56              uint8* dst_y, int dst_stride_y, 
    57              int width, int height); 
    58  
    59 LIBYUV_API 
    60 int I420ToNV12(const uint8* src_y, int src_stride_y, 
    61                const uint8* src_u, int src_stride_u, 
    62                const uint8* src_v, int src_stride_v, 
    63                uint8* dst_y, int dst_stride_y, 
    64                uint8* dst_uv, int dst_stride_uv, 
    65                int width, int height); 
    66  
    67 LIBYUV_API 
    68 int I420ToNV21(const uint8* src_y, int src_stride_y, 
    69                const uint8* src_u, int src_stride_u, 
    70                const uint8* src_v, int src_stride_v, 
    71                uint8* dst_y, int dst_stride_y, 
    72                uint8* dst_vu, int dst_stride_vu, 
    73                int width, int height); 
    74  
    75 LIBYUV_API 
    76 int I420ToYUY2(const uint8* src_y, int src_stride_y, 
    77                const uint8* src_u, int src_stride_u, 
    78                const uint8* src_v, int src_stride_v, 
    79                uint8* dst_frame, int dst_stride_frame, 
    80                int width, int height); 
    81  
    82 LIBYUV_API 
    83 int I420ToUYVY(const uint8* src_y, int src_stride_y, 
    84                const uint8* src_u, int src_stride_u, 
    85                const uint8* src_v, int src_stride_v, 
    86                uint8* dst_frame, int dst_stride_frame, 
    87                int width, int height); 
    88  
    89 LIBYUV_API 
    90 int I420ToARGB(const uint8* src_y, int src_stride_y, 
    91                const uint8* src_u, int src_stride_u, 
    92                const uint8* src_v, int src_stride_v, 
    93                uint8* dst_argb, int dst_stride_argb, 
    94                int width, int height); 
    95  
    96 LIBYUV_API 
    97 int I420ToBGRA(const uint8* src_y, int src_stride_y, 
    98                const uint8* src_u, int src_stride_u, 
    99                const uint8* src_v, int src_stride_v, 
    100                uint8* dst_argb, int dst_stride_argb, 
    101                int width, int height); 
    102  
    103 LIBYUV_API 
    104 int I420ToABGR(const uint8* src_y, int src_stride_y, 
    105                const uint8* src_u, int src_stride_u, 
    106                const uint8* src_v, int src_stride_v, 
    107                uint8* dst_argb, int dst_stride_argb, 
    108                int width, int height); 
    109  
    110 LIBYUV_API 
    111 int I420ToRGBA(const uint8* src_y, int src_stride_y, 
    112                const uint8* src_u, int src_stride_u, 
    113                const uint8* src_v, int src_stride_v, 
    114                uint8* dst_rgba, int dst_stride_rgba, 
    115                int width, int height); 
    116  
    117 LIBYUV_API 
    118 int I420ToRGB24(const uint8* src_y, int src_stride_y, 
    119                 const uint8* src_u, int src_stride_u, 
    120                 const uint8* src_v, int src_stride_v, 
    121                 uint8* dst_frame, int dst_stride_frame, 
    122                 int width, int height); 
    123  
    124 LIBYUV_API 
    125 int I420ToRAW(const uint8* src_y, int src_stride_y, 
    126               const uint8* src_u, int src_stride_u, 
    127               const uint8* src_v, int src_stride_v, 
    128               uint8* dst_frame, int dst_stride_frame, 
    129               int width, int height); 
    130  
    131 LIBYUV_API 
    132 int I420ToRGB565(const uint8* src_y, int src_stride_y, 
    133                  const uint8* src_u, int src_stride_u, 
    134                  const uint8* src_v, int src_stride_v, 
    135                  uint8* dst_frame, int dst_stride_frame, 
    136                  int width, int height); 
     60int I400Copy(const uint8* src_y, 
     61             int src_stride_y, 
     62             uint8* dst_y, 
     63             int dst_stride_y, 
     64             int width, 
     65             int height); 
     66 
     67LIBYUV_API 
     68int I420ToNV12(const uint8* src_y, 
     69               int src_stride_y, 
     70               const uint8* src_u, 
     71               int src_stride_u, 
     72               const uint8* src_v, 
     73               int src_stride_v, 
     74               uint8* dst_y, 
     75               int dst_stride_y, 
     76               uint8* dst_uv, 
     77               int dst_stride_uv, 
     78               int width, 
     79               int height); 
     80 
     81LIBYUV_API 
     82int I420ToNV21(const uint8* src_y, 
     83               int src_stride_y, 
     84               const uint8* src_u, 
     85               int src_stride_u, 
     86               const uint8* src_v, 
     87               int src_stride_v, 
     88               uint8* dst_y, 
     89               int dst_stride_y, 
     90               uint8* dst_vu, 
     91               int dst_stride_vu, 
     92               int width, 
     93               int height); 
     94 
     95LIBYUV_API 
     96int I420ToYUY2(const uint8* src_y, 
     97               int src_stride_y, 
     98               const uint8* src_u, 
     99               int src_stride_u, 
     100               const uint8* src_v, 
     101               int src_stride_v, 
     102               uint8* dst_frame, 
     103               int dst_stride_frame, 
     104               int width, 
     105               int height); 
     106 
     107LIBYUV_API 
     108int I420ToUYVY(const uint8* src_y, 
     109               int src_stride_y, 
     110               const uint8* src_u, 
     111               int src_stride_u, 
     112               const uint8* src_v, 
     113               int src_stride_v, 
     114               uint8* dst_frame, 
     115               int dst_stride_frame, 
     116               int width, 
     117               int height); 
     118 
     119LIBYUV_API 
     120int I420ToARGB(const uint8* src_y, 
     121               int src_stride_y, 
     122               const uint8* src_u, 
     123               int src_stride_u, 
     124               const uint8* src_v, 
     125               int src_stride_v, 
     126               uint8* dst_argb, 
     127               int dst_stride_argb, 
     128               int width, 
     129               int height); 
     130 
     131LIBYUV_API 
     132int I420ToBGRA(const uint8* src_y, 
     133               int src_stride_y, 
     134               const uint8* src_u, 
     135               int src_stride_u, 
     136               const uint8* src_v, 
     137               int src_stride_v, 
     138               uint8* dst_argb, 
     139               int dst_stride_argb, 
     140               int width, 
     141               int height); 
     142 
     143LIBYUV_API 
     144int I420ToABGR(const uint8* src_y, 
     145               int src_stride_y, 
     146               const uint8* src_u, 
     147               int src_stride_u, 
     148               const uint8* src_v, 
     149               int src_stride_v, 
     150               uint8* dst_argb, 
     151               int dst_stride_argb, 
     152               int width, 
     153               int height); 
     154 
     155LIBYUV_API 
     156int I420ToRGBA(const uint8* src_y, 
     157               int src_stride_y, 
     158               const uint8* src_u, 
     159               int src_stride_u, 
     160               const uint8* src_v, 
     161               int src_stride_v, 
     162               uint8* dst_rgba, 
     163               int dst_stride_rgba, 
     164               int width, 
     165               int height); 
     166 
     167LIBYUV_API 
     168int I420ToRGB24(const uint8* src_y, 
     169                int src_stride_y, 
     170                const uint8* src_u, 
     171                int src_stride_u, 
     172                const uint8* src_v, 
     173                int src_stride_v, 
     174                uint8* dst_frame, 
     175                int dst_stride_frame, 
     176                int width, 
     177                int height); 
     178 
     179LIBYUV_API 
     180int I420ToRAW(const uint8* src_y, 
     181              int src_stride_y, 
     182              const uint8* src_u, 
     183              int src_stride_u, 
     184              const uint8* src_v, 
     185              int src_stride_v, 
     186              uint8* dst_frame, 
     187              int dst_stride_frame, 
     188              int width, 
     189              int height); 
     190 
     191LIBYUV_API 
     192int I420ToRGB565(const uint8* src_y, 
     193                 int src_stride_y, 
     194                 const uint8* src_u, 
     195                 int src_stride_u, 
     196                 const uint8* src_v, 
     197                 int src_stride_v, 
     198                 uint8* dst_frame, 
     199                 int dst_stride_frame, 
     200                 int width, 
     201                 int height); 
     202 
     203LIBYUV_API 
     204int I422ToRGB565(const uint8* src_y, 
     205                 int src_stride_y, 
     206                 const uint8* src_u, 
     207                 int src_stride_u, 
     208                 const uint8* src_v, 
     209                 int src_stride_v, 
     210                 uint8* dst_frame, 
     211                 int dst_stride_frame, 
     212                 int width, 
     213                 int height); 
    137214 
    138215// Convert I420 To RGB565 with 4x4 dither matrix (16 bytes). 
     
    141218 
    142219LIBYUV_API 
    143 int I420ToRGB565Dither(const uint8* src_y, int src_stride_y, 
    144                        const uint8* src_u, int src_stride_u, 
    145                        const uint8* src_v, int src_stride_v, 
    146                        uint8* dst_frame, int dst_stride_frame, 
    147                        const uint8* dither4x4, int width, int height); 
    148  
    149 LIBYUV_API 
    150 int I420ToARGB1555(const uint8* src_y, int src_stride_y, 
    151                    const uint8* src_u, int src_stride_u, 
    152                    const uint8* src_v, int src_stride_v, 
    153                    uint8* dst_frame, int dst_stride_frame, 
    154                    int width, int height); 
    155  
    156 LIBYUV_API 
    157 int I420ToARGB4444(const uint8* src_y, int src_stride_y, 
    158                    const uint8* src_u, int src_stride_u, 
    159                    const uint8* src_v, int src_stride_v, 
    160                    uint8* dst_frame, int dst_stride_frame, 
    161                    int width, int height); 
     220int I420ToRGB565Dither(const uint8* src_y, 
     221                       int src_stride_y, 
     222                       const uint8* src_u, 
     223                       int src_stride_u, 
     224                       const uint8* src_v, 
     225                       int src_stride_v, 
     226                       uint8* dst_frame, 
     227                       int dst_stride_frame, 
     228                       const uint8* dither4x4, 
     229                       int width, 
     230                       int height); 
     231 
     232LIBYUV_API 
     233int I420ToARGB1555(const uint8* src_y, 
     234                   int src_stride_y, 
     235                   const uint8* src_u, 
     236                   int src_stride_u, 
     237                   const uint8* src_v, 
     238                   int src_stride_v, 
     239                   uint8* dst_frame, 
     240                   int dst_stride_frame, 
     241                   int width, 
     242                   int height); 
     243 
     244LIBYUV_API 
     245int I420ToARGB4444(const uint8* src_y, 
     246                   int src_stride_y, 
     247                   const uint8* src_u, 
     248                   int src_stride_u, 
     249                   const uint8* src_v, 
     250                   int src_stride_v, 
     251                   uint8* dst_frame, 
     252                   int dst_stride_frame, 
     253                   int width, 
     254                   int height); 
    162255 
    163256// Convert I420 to specified format. 
     
    165258//    buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. 
    166259LIBYUV_API 
    167 int ConvertFromI420(const uint8* y, int y_stride, 
    168                     const uint8* u, int u_stride, 
    169                     const uint8* v, int v_stride, 
    170                     uint8* dst_sample, int dst_sample_stride, 
    171                     int width, int height, 
     260int ConvertFromI420(const uint8* y, 
     261                    int y_stride, 
     262                    const uint8* u, 
     263                    int u_stride, 
     264                    const uint8* v, 
     265                    int v_stride, 
     266                    uint8* dst_sample, 
     267                    int dst_sample_stride, 
     268                    int width, 
     269                    int height, 
    172270                    uint32 format); 
    173271 
     
    177275#endif 
    178276 
    179 #endif  // INCLUDE_LIBYUV_CONVERT_FROM_H_  NOLINT 
     277#endif  // INCLUDE_LIBYUV_CONVERT_FROM_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/convert_from_argb.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ 
    1212#define INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ 
    1313 
     
    2222#define ARGBToARGB ARGBCopy 
    2323LIBYUV_API 
    24 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 
    25              uint8* dst_argb, int dst_stride_argb, 
    26              int width, int height); 
     24int ARGBCopy(const uint8* src_argb, 
     25             int src_stride_argb, 
     26             uint8* dst_argb, 
     27             int dst_stride_argb, 
     28             int width, 
     29             int height); 
    2730 
    2831// Convert ARGB To BGRA. 
    2932LIBYUV_API 
    30 int ARGBToBGRA(const uint8* src_argb, int src_stride_argb, 
    31                uint8* dst_bgra, int dst_stride_bgra, 
    32                int width, int height); 
     33int ARGBToBGRA(const uint8* src_argb, 
     34               int src_stride_argb, 
     35               uint8* dst_bgra, 
     36               int dst_stride_bgra, 
     37               int width, 
     38               int height); 
    3339 
    3440// Convert ARGB To ABGR. 
    3541LIBYUV_API 
    36 int ARGBToABGR(const uint8* src_argb, int src_stride_argb, 
    37                uint8* dst_abgr, int dst_stride_abgr, 
    38                int width, int height); 
     42int ARGBToABGR(const uint8* src_argb, 
     43               int src_stride_argb, 
     44               uint8* dst_abgr, 
     45               int dst_stride_abgr, 
     46               int width, 
     47               int height); 
    3948 
    4049// Convert ARGB To RGBA. 
    4150LIBYUV_API 
    42 int ARGBToRGBA(const uint8* src_argb, int src_stride_argb, 
    43                uint8* dst_rgba, int dst_stride_rgba, 
    44                int width, int height); 
     51int ARGBToRGBA(const uint8* src_argb, 
     52               int src_stride_argb, 
     53               uint8* dst_rgba, 
     54               int dst_stride_rgba, 
     55               int width, 
     56               int height); 
    4557 
    4658// Convert ARGB To RGB24. 
    4759LIBYUV_API 
    48 int ARGBToRGB24(const uint8* src_argb, int src_stride_argb, 
    49                 uint8* dst_rgb24, int dst_stride_rgb24, 
    50                 int width, int height); 
     60int ARGBToRGB24(const uint8* src_argb, 
     61                int src_stride_argb, 
     62                uint8* dst_rgb24, 
     63                int dst_stride_rgb24, 
     64                int width, 
     65                int height); 
    5166 
    5267// Convert ARGB To RAW. 
    5368LIBYUV_API 
    54 int ARGBToRAW(const uint8* src_argb, int src_stride_argb, 
    55               uint8* dst_rgb, int dst_stride_rgb, 
    56               int width, int height); 
     69int ARGBToRAW(const uint8* src_argb, 
     70              int src_stride_argb, 
     71              uint8* dst_rgb, 
     72              int dst_stride_rgb, 
     73              int width, 
     74              int height); 
    5775 
    5876// Convert ARGB To RGB565. 
    5977LIBYUV_API 
    60 int ARGBToRGB565(const uint8* src_argb, int src_stride_argb, 
    61                  uint8* dst_rgb565, int dst_stride_rgb565, 
    62                  int width, int height); 
     78int ARGBToRGB565(const uint8* src_argb, 
     79                 int src_stride_argb, 
     80                 uint8* dst_rgb565, 
     81                 int dst_stride_rgb565, 
     82                 int width, 
     83                 int height); 
    6384 
    6485// Convert ARGB To RGB565 with 4x4 dither matrix (16 bytes). 
     
    6889// const uint8(*dither)[4][4]; 
    6990LIBYUV_API 
    70 int ARGBToRGB565Dither(const uint8* src_argb, int src_stride_argb, 
    71                        uint8* dst_rgb565, int dst_stride_rgb565, 
    72                        const uint8* dither4x4, int width, int height); 
     91int ARGBToRGB565Dither(const uint8* src_argb, 
     92                       int src_stride_argb, 
     93                       uint8* dst_rgb565, 
     94                       int dst_stride_rgb565, 
     95                       const uint8* dither4x4, 
     96                       int width, 
     97                       int height); 
    7398 
    7499// Convert ARGB To ARGB1555. 
    75100LIBYUV_API 
    76 int ARGBToARGB1555(const uint8* src_argb, int src_stride_argb, 
    77                    uint8* dst_argb1555, int dst_stride_argb1555, 
    78                    int width, int height); 
     101int ARGBToARGB1555(const uint8* src_argb, 
     102                   int src_stride_argb, 
     103                   uint8* dst_argb1555, 
     104                   int dst_stride_argb1555, 
     105                   int width, 
     106                   int height); 
    79107 
    80108// Convert ARGB To ARGB4444. 
    81109LIBYUV_API 
    82 int ARGBToARGB4444(const uint8* src_argb, int src_stride_argb, 
    83                    uint8* dst_argb4444, int dst_stride_argb4444, 
    84                    int width, int height); 
     110int ARGBToARGB4444(const uint8* src_argb, 
     111                   int src_stride_argb, 
     112                   uint8* dst_argb4444, 
     113                   int dst_stride_argb4444, 
     114                   int width, 
     115                   int height); 
    85116 
    86117// Convert ARGB To I444. 
    87118LIBYUV_API 
    88 int ARGBToI444(const uint8* src_argb, int src_stride_argb, 
    89                uint8* dst_y, int dst_stride_y, 
    90                uint8* dst_u, int dst_stride_u, 
    91                uint8* dst_v, int dst_stride_v, 
    92                int width, int height); 
     119int ARGBToI444(const uint8* src_argb, 
     120               int src_stride_argb, 
     121               uint8* dst_y, 
     122               int dst_stride_y, 
     123               uint8* dst_u, 
     124               int dst_stride_u, 
     125               uint8* dst_v, 
     126               int dst_stride_v, 
     127               int width, 
     128               int height); 
    93129 
    94130// Convert ARGB To I422. 
    95131LIBYUV_API 
    96 int ARGBToI422(const uint8* src_argb, int src_stride_argb, 
    97                uint8* dst_y, int dst_stride_y, 
    98                uint8* dst_u, int dst_stride_u, 
    99                uint8* dst_v, int dst_stride_v, 
    100                int width, int height); 
     132int ARGBToI422(const uint8* src_argb, 
     133               int src_stride_argb, 
     134               uint8* dst_y, 
     135               int dst_stride_y, 
     136               uint8* dst_u, 
     137               int dst_stride_u, 
     138               uint8* dst_v, 
     139               int dst_stride_v, 
     140               int width, 
     141               int height); 
    101142 
    102143// Convert ARGB To I420. (also in convert.h) 
    103144LIBYUV_API 
    104 int ARGBToI420(const uint8* src_argb, int src_stride_argb, 
    105                uint8* dst_y, int dst_stride_y, 
    106                uint8* dst_u, int dst_stride_u, 
    107                uint8* dst_v, int dst_stride_v, 
    108                int width, int height); 
     145int ARGBToI420(const uint8* src_argb, 
     146               int src_stride_argb, 
     147               uint8* dst_y, 
     148               int dst_stride_y, 
     149               uint8* dst_u, 
     150               int dst_stride_u, 
     151               uint8* dst_v, 
     152               int dst_stride_v, 
     153               int width, 
     154               int height); 
    109155 
    110156// Convert ARGB to J420. (JPeg full range I420). 
    111157LIBYUV_API 
    112 int ARGBToJ420(const uint8* src_argb, int src_stride_argb, 
    113                uint8* dst_yj, int dst_stride_yj, 
    114                uint8* dst_u, int dst_stride_u, 
    115                uint8* dst_v, int dst_stride_v, 
    116                int width, int height); 
     158int ARGBToJ420(const uint8* src_argb, 
     159               int src_stride_argb, 
     160               uint8* dst_yj, 
     161               int dst_stride_yj, 
     162               uint8* dst_u, 
     163               int dst_stride_u, 
     164               uint8* dst_v, 
     165               int dst_stride_v, 
     166               int width, 
     167               int height); 
    117168 
    118169// Convert ARGB to J422. 
    119170LIBYUV_API 
    120 int ARGBToJ422(const uint8* src_argb, int src_stride_argb, 
    121                uint8* dst_yj, int dst_stride_yj, 
    122                uint8* dst_u, int dst_stride_u, 
    123                uint8* dst_v, int dst_stride_v, 
    124                int width, int height); 
    125  
    126 // Convert ARGB To I411. 
    127 LIBYUV_API 
    128 int ARGBToI411(const uint8* src_argb, int src_stride_argb, 
    129                uint8* dst_y, int dst_stride_y, 
    130                uint8* dst_u, int dst_stride_u, 
    131                uint8* dst_v, int dst_stride_v, 
    132                int width, int height); 
     171int ARGBToJ422(const uint8* src_argb, 
     172               int src_stride_argb, 
     173               uint8* dst_yj, 
     174               int dst_stride_yj, 
     175               uint8* dst_u, 
     176               int dst_stride_u, 
     177               uint8* dst_v, 
     178               int dst_stride_v, 
     179               int width, 
     180               int height); 
    133181 
    134182// Convert ARGB to J400. (JPeg full range). 
    135183LIBYUV_API 
    136 int ARGBToJ400(const uint8* src_argb, int src_stride_argb, 
    137                uint8* dst_yj, int dst_stride_yj, 
    138                int width, int height); 
     184int ARGBToJ400(const uint8* src_argb, 
     185               int src_stride_argb, 
     186               uint8* dst_yj, 
     187               int dst_stride_yj, 
     188               int width, 
     189               int height); 
    139190 
    140191// Convert ARGB to I400. 
    141192LIBYUV_API 
    142 int ARGBToI400(const uint8* src_argb, int src_stride_argb, 
    143                uint8* dst_y, int dst_stride_y, 
    144                int width, int height); 
     193int ARGBToI400(const uint8* src_argb, 
     194               int src_stride_argb, 
     195               uint8* dst_y, 
     196               int dst_stride_y, 
     197               int width, 
     198               int height); 
    145199 
    146200// Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB) 
    147201LIBYUV_API 
    148 int ARGBToG(const uint8* src_argb, int src_stride_argb, 
    149             uint8* dst_g, int dst_stride_g, 
    150             int width, int height); 
     202int ARGBToG(const uint8* src_argb, 
     203            int src_stride_argb, 
     204            uint8* dst_g, 
     205            int dst_stride_g, 
     206            int width, 
     207            int height); 
    151208 
    152209// Convert ARGB To NV12. 
    153210LIBYUV_API 
    154 int ARGBToNV12(const uint8* src_argb, int src_stride_argb, 
    155                uint8* dst_y, int dst_stride_y, 
    156                uint8* dst_uv, int dst_stride_uv, 
    157                int width, int height); 
     211int ARGBToNV12(const uint8* src_argb, 
     212               int src_stride_argb, 
     213               uint8* dst_y, 
     214               int dst_stride_y, 
     215               uint8* dst_uv, 
     216               int dst_stride_uv, 
     217               int width, 
     218               int height); 
    158219 
    159220// Convert ARGB To NV21. 
    160221LIBYUV_API 
    161 int ARGBToNV21(const uint8* src_argb, int src_stride_argb, 
    162                uint8* dst_y, int dst_stride_y, 
    163                uint8* dst_vu, int dst_stride_vu, 
    164                int width, int height); 
     222int ARGBToNV21(const uint8* src_argb, 
     223               int src_stride_argb, 
     224               uint8* dst_y, 
     225               int dst_stride_y, 
     226               uint8* dst_vu, 
     227               int dst_stride_vu, 
     228               int width, 
     229               int height); 
    165230 
    166231// Convert ARGB To NV21. 
    167232LIBYUV_API 
    168 int ARGBToNV21(const uint8* src_argb, int src_stride_argb, 
    169                uint8* dst_y, int dst_stride_y, 
    170                uint8* dst_vu, int dst_stride_vu, 
    171                int width, int height); 
     233int ARGBToNV21(const uint8* src_argb, 
     234               int src_stride_argb, 
     235               uint8* dst_y, 
     236               int dst_stride_y, 
     237               uint8* dst_vu, 
     238               int dst_stride_vu, 
     239               int width, 
     240               int height); 
    172241 
    173242// Convert ARGB To YUY2. 
    174243LIBYUV_API 
    175 int ARGBToYUY2(const uint8* src_argb, int src_stride_argb, 
    176                uint8* dst_yuy2, int dst_stride_yuy2, 
    177                int width, int height); 
     244int ARGBToYUY2(const uint8* src_argb, 
     245               int src_stride_argb, 
     246               uint8* dst_yuy2, 
     247               int dst_stride_yuy2, 
     248               int width, 
     249               int height); 
    178250 
    179251// Convert ARGB To UYVY. 
    180252LIBYUV_API 
    181 int ARGBToUYVY(const uint8* src_argb, int src_stride_argb, 
    182                uint8* dst_uyvy, int dst_stride_uyvy, 
    183                int width, int height); 
     253int ARGBToUYVY(const uint8* src_argb, 
     254               int src_stride_argb, 
     255               uint8* dst_uyvy, 
     256               int dst_stride_uyvy, 
     257               int width, 
     258               int height); 
    184259 
    185260#ifdef __cplusplus 
     
    188263#endif 
    189264 
    190 #endif  // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_  NOLINT 
     265#endif  // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/cpu_id.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_CPU_ID_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_CPU_ID_H_ 
    1212#define INCLUDE_LIBYUV_CPU_ID_H_ 
    1313 
     
    3232static const int kCpuHasSSSE3 = 0x40; 
    3333static const int kCpuHasSSE41 = 0x80; 
    34 static const int kCpuHasSSE42 = 0x100; 
     34static const int kCpuHasSSE42 = 0x100;  // unused at this time. 
    3535static const int kCpuHasAVX = 0x200; 
    3636static const int kCpuHasAVX2 = 0x400; 
     
    3838static const int kCpuHasFMA3 = 0x1000; 
    3939static const int kCpuHasAVX3 = 0x2000; 
    40 // 0x2000, 0x4000, 0x8000 reserved for future X86 flags. 
     40static const int kCpuHasF16C = 0x4000; 
     41 
     42// 0x8000 reserved for future X86 flags. 
    4143 
    4244// These flags are only valid on MIPS processors. 
    4345static const int kCpuHasMIPS = 0x10000; 
    4446static const int kCpuHasDSPR2 = 0x20000; 
     47static const int kCpuHasMSA = 0x40000; 
    4548 
    46 // Internal function used to auto-init. 
     49// Optional init function. TestCpuFlag does an auto-init. 
     50// Returns cpu_info flags. 
    4751LIBYUV_API 
    4852int InitCpuFlags(void); 
     53 
     54// Detect CPU has SSE2 etc. 
     55// Test_flag parameter should be one of kCpuHas constants above. 
     56// Returns non-zero if instruction set is detected 
     57static __inline int TestCpuFlag(int test_flag) { 
     58  LIBYUV_API extern int cpu_info_; 
     59#ifdef __ATOMIC_RELAXED 
     60  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED); 
     61#else 
     62  int cpu_info = cpu_info_; 
     63#endif 
     64  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag; 
     65} 
    4966 
    5067// Internal function for parsing /proc/cpuinfo. 
     
    5269int ArmCpuCaps(const char* cpuinfo_name); 
    5370 
    54 // Detect CPU has SSE2 etc. 
    55 // Test_flag parameter should be one of kCpuHas constants above. 
    56 // returns non-zero if instruction set is detected 
    57 static __inline int TestCpuFlag(int test_flag) { 
    58   LIBYUV_API extern int cpu_info_; 
    59   return (!cpu_info_ ? InitCpuFlags() : cpu_info_) & test_flag; 
    60 } 
    61  
    6271// For testing, allow CPU flags to be disabled. 
    6372// ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. 
    6473// MaskCpuFlags(-1) to enable all cpu specific optimizations. 
    6574// MaskCpuFlags(1) to disable all cpu specific optimizations. 
     75// MaskCpuFlags(0) to reset state so next call will auto init. 
     76// Returns cpu_info flags. 
    6677LIBYUV_API 
    67 void MaskCpuFlags(int enable_flags); 
     78int MaskCpuFlags(int enable_flags); 
    6879 
    6980// Low level cpuid for X86. Returns zeros on other CPUs. 
     
    7182// ecx is typically the cpu number, and should normally be zero. 
    7283LIBYUV_API 
    73 void CpuId(uint32 eax, uint32 ecx, uint32* cpu_info); 
     84void CpuId(int eax, int ecx, int* cpu_info); 
    7485 
    7586#ifdef __cplusplus 
     
    7889#endif 
    7990 
    80 #endif  // INCLUDE_LIBYUV_CPU_ID_H_  NOLINT 
     91#endif  // INCLUDE_LIBYUV_CPU_ID_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/mjpeg_decoder.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_ 
    1212#define INCLUDE_LIBYUV_MJPEG_DECODER_H_ 
    1313 
     
    3838  kJpegYuv420, 
    3939  kJpegYuv422, 
    40   kJpegYuv411, 
    4140  kJpegYuv444, 
    4241  kJpegYuv400, 
     
    146145  // image scanlines. 
    147146  // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. 
    148   LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, void* opaque, 
    149                         int dst_width, int dst_height); 
     147  LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, 
     148                               void* opaque, 
     149                               int dst_width, 
     150                               int dst_height); 
    150151 
    151152  // The helper function which recognizes the jpeg sub-sampling type. 
    152153  static JpegSubsamplingType JpegSubsamplingTypeHelper( 
    153      int* subsample_x, int* subsample_y, int number_of_components); 
     154      int* subsample_x, 
     155      int* subsample_y, 
     156      int number_of_components); 
    154157 
    155158 private: 
     
    190193 
    191194#endif  //  __cplusplus 
    192 #endif  // INCLUDE_LIBYUV_MJPEG_DECODER_H_  NOLINT 
     195#endif  // INCLUDE_LIBYUV_MJPEG_DECODER_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/planar_functions.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 
    1212#define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 
    1313 
     
    2525// Copy a plane of data. 
    2626LIBYUV_API 
    27 void CopyPlane(const uint8* src_y, int src_stride_y, 
    28                uint8* dst_y, int dst_stride_y, 
    29                int width, int height); 
    30  
    31 LIBYUV_API 
    32 void CopyPlane_16(const uint16* src_y, int src_stride_y, 
    33                   uint16* dst_y, int dst_stride_y, 
    34                   int width, int height); 
     27void CopyPlane(const uint8* src_y, 
     28               int src_stride_y, 
     29               uint8* dst_y, 
     30               int dst_stride_y, 
     31               int width, 
     32               int height); 
     33 
     34LIBYUV_API 
     35void CopyPlane_16(const uint16* src_y, 
     36                  int src_stride_y, 
     37                  uint16* dst_y, 
     38                  int dst_stride_y, 
     39                  int width, 
     40                  int height); 
    3541 
    3642// Set a plane of data to a 32 bit value. 
    3743LIBYUV_API 
    38 void SetPlane(uint8* dst_y, int dst_stride_y, 
    39               int width, int height, 
     44void SetPlane(uint8* dst_y, 
     45              int dst_stride_y, 
     46              int width, 
     47              int height, 
    4048              uint32 value); 
    4149 
     50// Split interleaved UV plane into separate U and V planes. 
     51LIBYUV_API 
     52void SplitUVPlane(const uint8* src_uv, 
     53                  int src_stride_uv, 
     54                  uint8* dst_u, 
     55                  int dst_stride_u, 
     56                  uint8* dst_v, 
     57                  int dst_stride_v, 
     58                  int width, 
     59                  int height); 
     60 
     61// Merge separate U and V planes into one interleaved UV plane. 
     62LIBYUV_API 
     63void MergeUVPlane(const uint8* src_u, 
     64                  int src_stride_u, 
     65                  const uint8* src_v, 
     66                  int src_stride_v, 
     67                  uint8* dst_uv, 
     68                  int dst_stride_uv, 
     69                  int width, 
     70                  int height); 
     71 
    4272// Copy I400.  Supports inverting. 
    4373LIBYUV_API 
    44 int I400ToI400(const uint8* src_y, int src_stride_y, 
    45                uint8* dst_y, int dst_stride_y, 
    46                int width, int height); 
     74int I400ToI400(const uint8* src_y, 
     75               int src_stride_y, 
     76               uint8* dst_y, 
     77               int dst_stride_y, 
     78               int width, 
     79               int height); 
    4780 
    4881#define J400ToJ400 I400ToI400 
     
    5184#define I422ToI422 I422Copy 
    5285LIBYUV_API 
    53 int I422Copy(const uint8* src_y, int src_stride_y, 
    54              const uint8* src_u, int src_stride_u, 
    55              const uint8* src_v, int src_stride_v, 
    56              uint8* dst_y, int dst_stride_y, 
    57              uint8* dst_u, int dst_stride_u, 
    58              uint8* dst_v, int dst_stride_v, 
    59              int width, int height); 
     86int I422Copy(const uint8* src_y, 
     87             int src_stride_y, 
     88             const uint8* src_u, 
     89             int src_stride_u, 
     90             const uint8* src_v, 
     91             int src_stride_v, 
     92             uint8* dst_y, 
     93             int dst_stride_y, 
     94             uint8* dst_u, 
     95             int dst_stride_u, 
     96             uint8* dst_v, 
     97             int dst_stride_v, 
     98             int width, 
     99             int height); 
    60100 
    61101// Copy I444 to I444. 
    62102#define I444ToI444 I444Copy 
    63103LIBYUV_API 
    64 int I444Copy(const uint8* src_y, int src_stride_y, 
    65              const uint8* src_u, int src_stride_u, 
    66              const uint8* src_v, int src_stride_v, 
    67              uint8* dst_y, int dst_stride_y, 
    68              uint8* dst_u, int dst_stride_u, 
    69              uint8* dst_v, int dst_stride_v, 
    70              int width, int height); 
     104int I444Copy(const uint8* src_y, 
     105             int src_stride_y, 
     106             const uint8* src_u, 
     107             int src_stride_u, 
     108             const uint8* src_v, 
     109             int src_stride_v, 
     110             uint8* dst_y, 
     111             int dst_stride_y, 
     112             uint8* dst_u, 
     113             int dst_stride_u, 
     114             uint8* dst_v, 
     115             int dst_stride_v, 
     116             int width, 
     117             int height); 
    71118 
    72119// Convert YUY2 to I422. 
    73120LIBYUV_API 
    74 int YUY2ToI422(const uint8* src_yuy2, int src_stride_yuy2, 
    75                uint8* dst_y, int dst_stride_y, 
    76                uint8* dst_u, int dst_stride_u, 
    77                uint8* dst_v, int dst_stride_v, 
    78                int width, int height); 
     121int YUY2ToI422(const uint8* src_yuy2, 
     122               int src_stride_yuy2, 
     123               uint8* dst_y, 
     124               int dst_stride_y, 
     125               uint8* dst_u, 
     126               int dst_stride_u, 
     127               uint8* dst_v, 
     128               int dst_stride_v, 
     129               int width, 
     130               int height); 
    79131 
    80132// Convert UYVY to I422. 
    81133LIBYUV_API 
    82 int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, 
    83                uint8* dst_y, int dst_stride_y, 
    84                uint8* dst_u, int dst_stride_u, 
    85                uint8* dst_v, int dst_stride_v, 
    86                int width, int height); 
    87  
    88 LIBYUV_API 
    89 int YUY2ToNV12(const uint8* src_yuy2, int src_stride_yuy2, 
    90                uint8* dst_y, int dst_stride_y, 
    91                uint8* dst_uv, int dst_stride_uv, 
    92                int width, int height); 
    93  
    94 LIBYUV_API 
    95 int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy, 
    96                uint8* dst_y, int dst_stride_y, 
    97                uint8* dst_uv, int dst_stride_uv, 
    98                int width, int height); 
     134int UYVYToI422(const uint8* src_uyvy, 
     135               int src_stride_uyvy, 
     136               uint8* dst_y, 
     137               int dst_stride_y, 
     138               uint8* dst_u, 
     139               int dst_stride_u, 
     140               uint8* dst_v, 
     141               int dst_stride_v, 
     142               int width, 
     143               int height); 
     144 
     145LIBYUV_API 
     146int YUY2ToNV12(const uint8* src_yuy2, 
     147               int src_stride_yuy2, 
     148               uint8* dst_y, 
     149               int dst_stride_y, 
     150               uint8* dst_uv, 
     151               int dst_stride_uv, 
     152               int width, 
     153               int height); 
     154 
     155LIBYUV_API 
     156int UYVYToNV12(const uint8* src_uyvy, 
     157               int src_stride_uyvy, 
     158               uint8* dst_y, 
     159               int dst_stride_y, 
     160               uint8* dst_uv, 
     161               int dst_stride_uv, 
     162               int width, 
     163               int height); 
     164 
     165LIBYUV_API 
     166int YUY2ToY(const uint8* src_yuy2, 
     167            int src_stride_yuy2, 
     168            uint8* dst_y, 
     169            int dst_stride_y, 
     170            int width, 
     171            int height); 
    99172 
    100173// Convert I420 to I400. (calls CopyPlane ignoring u/v). 
    101174LIBYUV_API 
    102 int I420ToI400(const uint8* src_y, int src_stride_y, 
    103                const uint8* src_u, int src_stride_u, 
    104                const uint8* src_v, int src_stride_v, 
    105                uint8* dst_y, int dst_stride_y, 
    106                int width, int height); 
     175int I420ToI400(const uint8* src_y, 
     176               int src_stride_y, 
     177               const uint8* src_u, 
     178               int src_stride_u, 
     179               const uint8* src_v, 
     180               int src_stride_v, 
     181               uint8* dst_y, 
     182               int dst_stride_y, 
     183               int width, 
     184               int height); 
    107185 
    108186// Alias 
     
    112190// I420 mirror. 
    113191LIBYUV_API 
    114 int I420Mirror(const uint8* src_y, int src_stride_y, 
    115                const uint8* src_u, int src_stride_u, 
    116                const uint8* src_v, int src_stride_v, 
    117                uint8* dst_y, int dst_stride_y, 
    118                uint8* dst_u, int dst_stride_u, 
    119                uint8* dst_v, int dst_stride_v, 
    120                int width, int height); 
     192int I420Mirror(const uint8* src_y, 
     193               int src_stride_y, 
     194               const uint8* src_u, 
     195               int src_stride_u, 
     196               const uint8* src_v, 
     197               int src_stride_v, 
     198               uint8* dst_y, 
     199               int dst_stride_y, 
     200               uint8* dst_u, 
     201               int dst_stride_u, 
     202               uint8* dst_v, 
     203               int dst_stride_v, 
     204               int width, 
     205               int height); 
    121206 
    122207// Alias 
     
    126211// Pass negative height to achieve 180 degree rotation. 
    127212LIBYUV_API 
    128 int I400Mirror(const uint8* src_y, int src_stride_y, 
    129                uint8* dst_y, int dst_stride_y, 
    130                int width, int height); 
     213int I400Mirror(const uint8* src_y, 
     214               int src_stride_y, 
     215               uint8* dst_y, 
     216               int dst_stride_y, 
     217               int width, 
     218               int height); 
    131219 
    132220// Alias 
     
    135223// ARGB mirror. 
    136224LIBYUV_API 
    137 int ARGBMirror(const uint8* src_argb, int src_stride_argb, 
    138                uint8* dst_argb, int dst_stride_argb, 
    139                int width, int height); 
     225int ARGBMirror(const uint8* src_argb, 
     226               int src_stride_argb, 
     227               uint8* dst_argb, 
     228               int dst_stride_argb, 
     229               int width, 
     230               int height); 
    140231 
    141232// Convert NV12 to RGB565. 
    142233LIBYUV_API 
    143 int NV12ToRGB565(const uint8* src_y, int src_stride_y, 
    144                  const uint8* src_uv, int src_stride_uv, 
    145                  uint8* dst_rgb565, int dst_stride_rgb565, 
    146                  int width, int height); 
     234int NV12ToRGB565(const uint8* src_y, 
     235                 int src_stride_y, 
     236                 const uint8* src_uv, 
     237                 int src_stride_uv, 
     238                 uint8* dst_rgb565, 
     239                 int dst_stride_rgb565, 
     240                 int width, 
     241                 int height); 
    147242 
    148243// I422ToARGB is in convert_argb.h 
    149244// Convert I422 to BGRA. 
    150245LIBYUV_API 
    151 int I422ToBGRA(const uint8* src_y, int src_stride_y, 
    152                const uint8* src_u, int src_stride_u, 
    153                const uint8* src_v, int src_stride_v, 
    154                uint8* dst_bgra, int dst_stride_bgra, 
    155                int width, int height); 
     246int I422ToBGRA(const uint8* src_y, 
     247               int src_stride_y, 
     248               const uint8* src_u, 
     249               int src_stride_u, 
     250               const uint8* src_v, 
     251               int src_stride_v, 
     252               uint8* dst_bgra, 
     253               int dst_stride_bgra, 
     254               int width, 
     255               int height); 
    156256 
    157257// Convert I422 to ABGR. 
    158258LIBYUV_API 
    159 int I422ToABGR(const uint8* src_y, int src_stride_y, 
    160                const uint8* src_u, int src_stride_u, 
    161                const uint8* src_v, int src_stride_v, 
    162                uint8* dst_abgr, int dst_stride_abgr, 
    163                int width, int height); 
     259int I422ToABGR(const uint8* src_y, 
     260               int src_stride_y, 
     261               const uint8* src_u, 
     262               int src_stride_u, 
     263               const uint8* src_v, 
     264               int src_stride_v, 
     265               uint8* dst_abgr, 
     266               int dst_stride_abgr, 
     267               int width, 
     268               int height); 
    164269 
    165270// Convert I422 to RGBA. 
    166271LIBYUV_API 
    167 int I422ToRGBA(const uint8* src_y, int src_stride_y, 
    168                const uint8* src_u, int src_stride_u, 
    169                const uint8* src_v, int src_stride_v, 
    170                uint8* dst_rgba, int dst_stride_rgba, 
    171                int width, int height); 
     272int I422ToRGBA(const uint8* src_y, 
     273               int src_stride_y, 
     274               const uint8* src_u, 
     275               int src_stride_u, 
     276               const uint8* src_v, 
     277               int src_stride_v, 
     278               uint8* dst_rgba, 
     279               int dst_stride_rgba, 
     280               int width, 
     281               int height); 
    172282 
    173283// Alias 
     
    175285 
    176286LIBYUV_API 
    177 int RAWToRGB24(const uint8* src_raw, int src_stride_raw, 
    178                uint8* dst_rgb24, int dst_stride_rgb24, 
    179                int width, int height); 
     287int RAWToRGB24(const uint8* src_raw, 
     288               int src_stride_raw, 
     289               uint8* dst_rgb24, 
     290               int dst_stride_rgb24, 
     291               int width, 
     292               int height); 
    180293 
    181294// Draw a rectangle into I420. 
    182295LIBYUV_API 
    183 int I420Rect(uint8* dst_y, int dst_stride_y, 
    184              uint8* dst_u, int dst_stride_u, 
    185              uint8* dst_v, int dst_stride_v, 
    186              int x, int y, int width, int height, 
    187              int value_y, int value_u, int value_v); 
     296int I420Rect(uint8* dst_y, 
     297             int dst_stride_y, 
     298             uint8* dst_u, 
     299             int dst_stride_u, 
     300             uint8* dst_v, 
     301             int dst_stride_v, 
     302             int x, 
     303             int y, 
     304             int width, 
     305             int height, 
     306             int value_y, 
     307             int value_u, 
     308             int value_v); 
    188309 
    189310// Draw a rectangle into ARGB. 
    190311LIBYUV_API 
    191 int ARGBRect(uint8* dst_argb, int dst_stride_argb, 
    192              int x, int y, int width, int height, uint32 value); 
     312int ARGBRect(uint8* dst_argb, 
     313             int dst_stride_argb, 
     314             int x, 
     315             int y, 
     316             int width, 
     317             int height, 
     318             uint32 value); 
    193319 
    194320// Convert ARGB to gray scale ARGB. 
    195321LIBYUV_API 
    196 int ARGBGrayTo(const uint8* src_argb, int src_stride_argb, 
    197                uint8* dst_argb, int dst_stride_argb, 
    198                int width, int height); 
     322int ARGBGrayTo(const uint8* src_argb, 
     323               int src_stride_argb, 
     324               uint8* dst_argb, 
     325               int dst_stride_argb, 
     326               int width, 
     327               int height); 
    199328 
    200329// Make a rectangle of ARGB gray scale. 
    201330LIBYUV_API 
    202 int ARGBGray(uint8* dst_argb, int dst_stride_argb, 
    203              int x, int y, int width, int height); 
     331int ARGBGray(uint8* dst_argb, 
     332             int dst_stride_argb, 
     333             int x, 
     334             int y, 
     335             int width, 
     336             int height); 
    204337 
    205338// Make a rectangle of ARGB Sepia tone. 
    206339LIBYUV_API 
    207 int ARGBSepia(uint8* dst_argb, int dst_stride_argb, 
    208               int x, int y, int width, int height); 
     340int ARGBSepia(uint8* dst_argb, 
     341              int dst_stride_argb, 
     342              int x, 
     343              int y, 
     344              int width, 
     345              int height); 
    209346 
    210347// Apply a matrix rotation to each ARGB pixel. 
     
    215352// The last 4 coefficients apply to B, G, R, A and produce A of the output. 
    216353LIBYUV_API 
    217 int ARGBColorMatrix(const uint8* src_argb, int src_stride_argb, 
    218                     uint8* dst_argb, int dst_stride_argb, 
     354int ARGBColorMatrix(const uint8* src_argb, 
     355                    int src_stride_argb, 
     356                    uint8* dst_argb, 
     357                    int dst_stride_argb, 
    219358                    const int8* matrix_argb, 
    220                     int width, int height); 
     359                    int width, 
     360                    int height); 
    221361 
    222362// Deprecated. Use ARGBColorMatrix instead. 
     
    227367// The last 4 coefficients apply to B, G, R, A and produce R of the output. 
    228368LIBYUV_API 
    229 int RGBColorMatrix(uint8* dst_argb, int dst_stride_argb, 
     369int RGBColorMatrix(uint8* dst_argb, 
     370                   int dst_stride_argb, 
    230371                   const int8* matrix_rgb, 
    231                    int x, int y, int width, int height); 
     372                   int x, 
     373                   int y, 
     374                   int width, 
     375                   int height); 
    232376 
    233377// Apply a color table each ARGB pixel. 
    234378// Table contains 256 ARGB values. 
    235379LIBYUV_API 
    236 int ARGBColorTable(uint8* dst_argb, int dst_stride_argb, 
     380int ARGBColorTable(uint8* dst_argb, 
     381                   int dst_stride_argb, 
    237382                   const uint8* table_argb, 
    238                    int x, int y, int width, int height); 
     383                   int x, 
     384                   int y, 
     385                   int width, 
     386                   int height); 
    239387 
    240388// Apply a color table each ARGB pixel but preserve destination alpha. 
    241389// Table contains 256 ARGB values. 
    242390LIBYUV_API 
    243 int RGBColorTable(uint8* dst_argb, int dst_stride_argb, 
     391int RGBColorTable(uint8* dst_argb, 
     392                  int dst_stride_argb, 
    244393                  const uint8* table_argb, 
    245                   int x, int y, int width, int height); 
     394                  int x, 
     395                  int y, 
     396                  int width, 
     397                  int height); 
    246398 
    247399// Apply a luma/color table each ARGB pixel but preserve destination alpha. 
     
    249401// RGB (YJ style) and C is an 8 bit color component (R, G or B). 
    250402LIBYUV_API 
    251 int ARGBLumaColorTable(const uint8* src_argb, int src_stride_argb, 
    252                        uint8* dst_argb, int dst_stride_argb, 
     403int ARGBLumaColorTable(const uint8* src_argb, 
     404                       int src_stride_argb, 
     405                       uint8* dst_argb, 
     406                       int dst_stride_argb, 
    253407                       const uint8* luma_rgb_table, 
    254                        int width, int height); 
     408                       int width, 
     409                       int height); 
    255410 
    256411// Apply a 3 term polynomial to ARGB values. 
     
    263418 
    264419LIBYUV_API 
    265 int ARGBPolynomial(const uint8* src_argb, int src_stride_argb, 
    266                    uint8* dst_argb, int dst_stride_argb, 
     420int ARGBPolynomial(const uint8* src_argb, 
     421                   int src_stride_argb, 
     422                   uint8* dst_argb, 
     423                   int dst_stride_argb, 
    267424                   const float* poly, 
    268                    int width, int height); 
     425                   int width, 
     426                   int height); 
     427 
     428// Convert plane of 16 bit shorts to half floats. 
     429// Source values are multiplied by scale before storing as half float. 
     430LIBYUV_API 
     431int HalfFloatPlane(const uint16* src_y, 
     432                   int src_stride_y, 
     433                   uint16* dst_y, 
     434                   int dst_stride_y, 
     435                   float scale, 
     436                   int width, 
     437                   int height); 
    269438 
    270439// Quantize a rectangle of ARGB. Alpha unaffected. 
     
    273442// interval_offset should be a value between 0 and 255. 
    274443LIBYUV_API 
    275 int ARGBQuantize(uint8* dst_argb, int dst_stride_argb, 
    276                  int scale, int interval_size, int interval_offset, 
    277                  int x, int y, int width, int height); 
     444int ARGBQuantize(uint8* dst_argb, 
     445                 int dst_stride_argb, 
     446                 int scale, 
     447                 int interval_size, 
     448                 int interval_offset, 
     449                 int x, 
     450                 int y, 
     451                 int width, 
     452                 int height); 
    278453 
    279454// Copy ARGB to ARGB. 
    280455LIBYUV_API 
    281 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 
    282              uint8* dst_argb, int dst_stride_argb, 
    283              int width, int height); 
     456int ARGBCopy(const uint8* src_argb, 
     457             int src_stride_argb, 
     458             uint8* dst_argb, 
     459             int dst_stride_argb, 
     460             int width, 
     461             int height); 
    284462 
    285463// Copy Alpha channel of ARGB to alpha of ARGB. 
    286464LIBYUV_API 
    287 int ARGBCopyAlpha(const uint8* src_argb, int src_stride_argb, 
    288                   uint8* dst_argb, int dst_stride_argb, 
    289                   int width, int height); 
     465int ARGBCopyAlpha(const uint8* src_argb, 
     466                  int src_stride_argb, 
     467                  uint8* dst_argb, 
     468                  int dst_stride_argb, 
     469                  int width, 
     470                  int height); 
    290471 
    291472// Extract the alpha channel from ARGB. 
    292473LIBYUV_API 
    293 int ARGBExtractAlpha(const uint8* src_argb, int src_stride_argb, 
    294                      uint8* dst_a, int dst_stride_a, 
    295                      int width, int height); 
     474int ARGBExtractAlpha(const uint8* src_argb, 
     475                     int src_stride_argb, 
     476                     uint8* dst_a, 
     477                     int dst_stride_a, 
     478                     int width, 
     479                     int height); 
    296480 
    297481// Copy Y channel to Alpha of ARGB. 
    298482LIBYUV_API 
    299 int ARGBCopyYToAlpha(const uint8* src_y, int src_stride_y, 
    300                      uint8* dst_argb, int dst_stride_argb, 
    301                      int width, int height); 
    302  
    303 typedef void (*ARGBBlendRow)(const uint8* src_argb0, const uint8* src_argb1, 
    304                              uint8* dst_argb, int width); 
     483int ARGBCopyYToAlpha(const uint8* src_y, 
     484                     int src_stride_y, 
     485                     uint8* dst_argb, 
     486                     int dst_stride_argb, 
     487                     int width, 
     488                     int height); 
     489 
     490typedef void (*ARGBBlendRow)(const uint8* src_argb0, 
     491                             const uint8* src_argb1, 
     492                             uint8* dst_argb, 
     493                             int width); 
    305494 
    306495// Get function to Alpha Blend ARGB pixels and store to destination. 
     
    312501// Alpha of destination is set to 255. 
    313502LIBYUV_API 
    314 int ARGBBlend(const uint8* src_argb0, int src_stride_argb0, 
    315               const uint8* src_argb1, int src_stride_argb1, 
    316               uint8* dst_argb, int dst_stride_argb, 
    317               int width, int height); 
     503int ARGBBlend(const uint8* src_argb0, 
     504              int src_stride_argb0, 
     505              const uint8* src_argb1, 
     506              int src_stride_argb1, 
     507              uint8* dst_argb, 
     508              int dst_stride_argb, 
     509              int width, 
     510              int height); 
    318511 
    319512// Alpha Blend plane and store to destination. 
    320513// Source is not pre-multiplied by alpha. 
    321514LIBYUV_API 
    322 int BlendPlane(const uint8* src_y0, int src_stride_y0, 
    323                const uint8* src_y1, int src_stride_y1, 
    324                const uint8* alpha, int alpha_stride, 
    325                uint8* dst_y, int dst_stride_y, 
    326                int width, int height); 
     515int BlendPlane(const uint8* src_y0, 
     516               int src_stride_y0, 
     517               const uint8* src_y1, 
     518               int src_stride_y1, 
     519               const uint8* alpha, 
     520               int alpha_stride, 
     521               uint8* dst_y, 
     522               int dst_stride_y, 
     523               int width, 
     524               int height); 
    327525 
    328526// Alpha Blend YUV images and store to destination. 
     
    330528// Alpha is full width x height and subsampled to half size to apply to UV. 
    331529LIBYUV_API 
    332 int I420Blend(const uint8* src_y0, int src_stride_y0, 
    333               const uint8* src_u0, int src_stride_u0, 
    334               const uint8* src_v0, int src_stride_v0, 
    335               const uint8* src_y1, int src_stride_y1, 
    336               const uint8* src_u1, int src_stride_u1, 
    337               const uint8* src_v1, int src_stride_v1, 
    338               const uint8* alpha, int alpha_stride, 
    339               uint8* dst_y, int dst_stride_y, 
    340               uint8* dst_u, int dst_stride_u, 
    341               uint8* dst_v, int dst_stride_v, 
    342               int width, int height); 
     530int I420Blend(const uint8* src_y0, 
     531              int src_stride_y0, 
     532              const uint8* src_u0, 
     533              int src_stride_u0, 
     534              const uint8* src_v0, 
     535              int src_stride_v0, 
     536              const uint8* src_y1, 
     537              int src_stride_y1, 
     538              const uint8* src_u1, 
     539              int src_stride_u1, 
     540              const uint8* src_v1, 
     541              int src_stride_v1, 
     542              const uint8* alpha, 
     543              int alpha_stride, 
     544              uint8* dst_y, 
     545              int dst_stride_y, 
     546              uint8* dst_u, 
     547              int dst_stride_u, 
     548              uint8* dst_v, 
     549              int dst_stride_v, 
     550              int width, 
     551              int height); 
    343552 
    344553// Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. 
    345554LIBYUV_API 
    346 int ARGBMultiply(const uint8* src_argb0, int src_stride_argb0, 
    347                  const uint8* src_argb1, int src_stride_argb1, 
    348                  uint8* dst_argb, int dst_stride_argb, 
    349                  int width, int height); 
     555int ARGBMultiply(const uint8* src_argb0, 
     556                 int src_stride_argb0, 
     557                 const uint8* src_argb1, 
     558                 int src_stride_argb1, 
     559                 uint8* dst_argb, 
     560                 int dst_stride_argb, 
     561                 int width, 
     562                 int height); 
    350563 
    351564// Add ARGB image with ARGB image. Saturates to 255. 
    352565LIBYUV_API 
    353 int ARGBAdd(const uint8* src_argb0, int src_stride_argb0, 
    354             const uint8* src_argb1, int src_stride_argb1, 
    355             uint8* dst_argb, int dst_stride_argb, 
    356             int width, int height); 
     566int ARGBAdd(const uint8* src_argb0, 
     567            int src_stride_argb0, 
     568            const uint8* src_argb1, 
     569            int src_stride_argb1, 
     570            uint8* dst_argb, 
     571            int dst_stride_argb, 
     572            int width, 
     573            int height); 
    357574 
    358575// Subtract ARGB image (argb1) from ARGB image (argb0). Saturates to 0. 
    359576LIBYUV_API 
    360 int ARGBSubtract(const uint8* src_argb0, int src_stride_argb0, 
    361                  const uint8* src_argb1, int src_stride_argb1, 
    362                  uint8* dst_argb, int dst_stride_argb, 
    363                  int width, int height); 
     577int ARGBSubtract(const uint8* src_argb0, 
     578                 int src_stride_argb0, 
     579                 const uint8* src_argb1, 
     580                 int src_stride_argb1, 
     581                 uint8* dst_argb, 
     582                 int dst_stride_argb, 
     583                 int width, 
     584                 int height); 
    364585 
    365586// Convert I422 to YUY2. 
    366587LIBYUV_API 
    367 int I422ToYUY2(const uint8* src_y, int src_stride_y, 
    368                const uint8* src_u, int src_stride_u, 
    369                const uint8* src_v, int src_stride_v, 
    370                uint8* dst_frame, int dst_stride_frame, 
    371                int width, int height); 
     588int I422ToYUY2(const uint8* src_y, 
     589               int src_stride_y, 
     590               const uint8* src_u, 
     591               int src_stride_u, 
     592               const uint8* src_v, 
     593               int src_stride_v, 
     594               uint8* dst_frame, 
     595               int dst_stride_frame, 
     596               int width, 
     597               int height); 
    372598 
    373599// Convert I422 to UYVY. 
    374600LIBYUV_API 
    375 int I422ToUYVY(const uint8* src_y, int src_stride_y, 
    376                const uint8* src_u, int src_stride_u, 
    377                const uint8* src_v, int src_stride_v, 
    378                uint8* dst_frame, int dst_stride_frame, 
    379                int width, int height); 
     601int I422ToUYVY(const uint8* src_y, 
     602               int src_stride_y, 
     603               const uint8* src_u, 
     604               int src_stride_u, 
     605               const uint8* src_v, 
     606               int src_stride_v, 
     607               uint8* dst_frame, 
     608               int dst_stride_frame, 
     609               int width, 
     610               int height); 
    380611 
    381612// Convert unattentuated ARGB to preattenuated ARGB. 
    382613LIBYUV_API 
    383 int ARGBAttenuate(const uint8* src_argb, int src_stride_argb, 
    384                   uint8* dst_argb, int dst_stride_argb, 
    385                   int width, int height); 
     614int ARGBAttenuate(const uint8* src_argb, 
     615                  int src_stride_argb, 
     616                  uint8* dst_argb, 
     617                  int dst_stride_argb, 
     618                  int width, 
     619                  int height); 
    386620 
    387621// Convert preattentuated ARGB to unattenuated ARGB. 
    388622LIBYUV_API 
    389 int ARGBUnattenuate(const uint8* src_argb, int src_stride_argb, 
    390                     uint8* dst_argb, int dst_stride_argb, 
    391                     int width, int height); 
     623int ARGBUnattenuate(const uint8* src_argb, 
     624                    int src_stride_argb, 
     625                    uint8* dst_argb, 
     626                    int dst_stride_argb, 
     627                    int width, 
     628                    int height); 
    392629 
    393630// Internal function - do not call directly. 
     
    395632// of all values above and to the left of the entry. Used by ARGBBlur. 
    396633LIBYUV_API 
    397 int ARGBComputeCumulativeSum(const uint8* src_argb, int src_stride_argb, 
    398                              int32* dst_cumsum, int dst_stride32_cumsum, 
    399                              int width, int height); 
     634int ARGBComputeCumulativeSum(const uint8* src_argb, 
     635                             int src_stride_argb, 
     636                             int32* dst_cumsum, 
     637                             int dst_stride32_cumsum, 
     638                             int width, 
     639                             int height); 
    400640 
    401641// Blur ARGB image. 
     
    406646// Blur is optimized for radius of 5 (11x11) or less. 
    407647LIBYUV_API 
    408 int ARGBBlur(const uint8* src_argb, int src_stride_argb, 
    409              uint8* dst_argb, int dst_stride_argb, 
    410              int32* dst_cumsum, int dst_stride32_cumsum, 
    411              int width, int height, int radius); 
     648int ARGBBlur(const uint8* src_argb, 
     649             int src_stride_argb, 
     650             uint8* dst_argb, 
     651             int dst_stride_argb, 
     652             int32* dst_cumsum, 
     653             int dst_stride32_cumsum, 
     654             int width, 
     655             int height, 
     656             int radius); 
    412657 
    413658// Multiply ARGB image by ARGB value. 
    414659LIBYUV_API 
    415 int ARGBShade(const uint8* src_argb, int src_stride_argb, 
    416               uint8* dst_argb, int dst_stride_argb, 
    417               int width, int height, uint32 value); 
     660int ARGBShade(const uint8* src_argb, 
     661              int src_stride_argb, 
     662              uint8* dst_argb, 
     663              int dst_stride_argb, 
     664              int width, 
     665              int height, 
     666              uint32 value); 
    418667 
    419668// Interpolate between two images using specified amount of interpolation 
     
    422671// and 255 means 1% src0 and 99% src1. 
    423672LIBYUV_API 
    424 int InterpolatePlane(const uint8* src0, int src_stride0, 
    425                      const uint8* src1, int src_stride1, 
    426                      uint8* dst, int dst_stride, 
    427                      int width, int height, int interpolation); 
     673int InterpolatePlane(const uint8* src0, 
     674                     int src_stride0, 
     675                     const uint8* src1, 
     676                     int src_stride1, 
     677                     uint8* dst, 
     678                     int dst_stride, 
     679                     int width, 
     680                     int height, 
     681                     int interpolation); 
    428682 
    429683// Interpolate between two ARGB images using specified amount of interpolation 
    430684// Internally calls InterpolatePlane with width * 4 (bpp). 
    431685LIBYUV_API 
    432 int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0, 
    433                     const uint8* src_argb1, int src_stride_argb1, 
    434                     uint8* dst_argb, int dst_stride_argb, 
    435                     int width, int height, int interpolation); 
     686int ARGBInterpolate(const uint8* src_argb0, 
     687                    int src_stride_argb0, 
     688                    const uint8* src_argb1, 
     689                    int src_stride_argb1, 
     690                    uint8* dst_argb, 
     691                    int dst_stride_argb, 
     692                    int width, 
     693                    int height, 
     694                    int interpolation); 
    436695 
    437696// Interpolate between two YUV images using specified amount of interpolation 
     
    439698// are half width and half height. 
    440699LIBYUV_API 
    441 int I420Interpolate(const uint8* src0_y, int src0_stride_y, 
    442                     const uint8* src0_u, int src0_stride_u, 
    443                     const uint8* src0_v, int src0_stride_v, 
    444                     const uint8* src1_y, int src1_stride_y, 
    445                     const uint8* src1_u, int src1_stride_u, 
    446                     const uint8* src1_v, int src1_stride_v, 
    447                     uint8* dst_y, int dst_stride_y, 
    448                     uint8* dst_u, int dst_stride_u, 
    449                     uint8* dst_v, int dst_stride_v, 
    450                     int width, int height, int interpolation); 
     700int I420Interpolate(const uint8* src0_y, 
     701                    int src0_stride_y, 
     702                    const uint8* src0_u, 
     703                    int src0_stride_u, 
     704                    const uint8* src0_v, 
     705                    int src0_stride_v, 
     706                    const uint8* src1_y, 
     707                    int src1_stride_y, 
     708                    const uint8* src1_u, 
     709                    int src1_stride_u, 
     710                    const uint8* src1_v, 
     711                    int src1_stride_v, 
     712                    uint8* dst_y, 
     713                    int dst_stride_y, 
     714                    uint8* dst_u, 
     715                    int dst_stride_u, 
     716                    uint8* dst_v, 
     717                    int dst_stride_v, 
     718                    int width, 
     719                    int height, 
     720                    int interpolation); 
    451721 
    452722#if defined(__pnacl__) || defined(__CLR_VER) || \ 
     
    469739// of destination. Useful for scaling, rotation, mirror, texture mapping. 
    470740LIBYUV_API 
    471 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride, 
    472                      uint8* dst_argb, const float* uv_dudv, int width); 
    473 LIBYUV_API 
    474 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride, 
    475                         uint8* dst_argb, const float* uv_dudv, int width); 
     741void ARGBAffineRow_C(const uint8* src_argb, 
     742                     int src_argb_stride, 
     743                     uint8* dst_argb, 
     744                     const float* uv_dudv, 
     745                     int width); 
     746LIBYUV_API 
     747void ARGBAffineRow_SSE2(const uint8* src_argb, 
     748                        int src_argb_stride, 
     749                        uint8* dst_argb, 
     750                        const float* uv_dudv, 
     751                        int width); 
    476752 
    477753// Shuffle ARGB channel order.  e.g. BGRA to ARGB. 
    478754// shuffler is 16 bytes and must be aligned. 
    479755LIBYUV_API 
    480 int ARGBShuffle(const uint8* src_bgra, int src_stride_bgra, 
    481                 uint8* dst_argb, int dst_stride_argb, 
    482                 const uint8* shuffler, int width, int height); 
     756int ARGBShuffle(const uint8* src_bgra, 
     757                int src_stride_bgra, 
     758                uint8* dst_argb, 
     759                int dst_stride_argb, 
     760                const uint8* shuffler, 
     761                int width, 
     762                int height); 
    483763 
    484764// Sobel ARGB effect with planar output. 
    485765LIBYUV_API 
    486 int ARGBSobelToPlane(const uint8* src_argb, int src_stride_argb, 
    487                      uint8* dst_y, int dst_stride_y, 
    488                      int width, int height); 
     766int ARGBSobelToPlane(const uint8* src_argb, 
     767                     int src_stride_argb, 
     768                     uint8* dst_y, 
     769                     int dst_stride_y, 
     770                     int width, 
     771                     int height); 
    489772 
    490773// Sobel ARGB effect. 
    491774LIBYUV_API 
    492 int ARGBSobel(const uint8* src_argb, int src_stride_argb, 
    493               uint8* dst_argb, int dst_stride_argb, 
    494               int width, int height); 
     775int ARGBSobel(const uint8* src_argb, 
     776              int src_stride_argb, 
     777              uint8* dst_argb, 
     778              int dst_stride_argb, 
     779              int width, 
     780              int height); 
    495781 
    496782// Sobel ARGB effect w/ Sobel X, Sobel, Sobel Y in ARGB. 
    497783LIBYUV_API 
    498 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, 
    499                 uint8* dst_argb, int dst_stride_argb, 
    500                 int width, int height); 
     784int ARGBSobelXY(const uint8* src_argb, 
     785                int src_stride_argb, 
     786                uint8* dst_argb, 
     787                int dst_stride_argb, 
     788                int width, 
     789                int height); 
    501790 
    502791#ifdef __cplusplus 
     
    505794#endif 
    506795 
    507 #endif  // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_  NOLINT 
     796#endif  // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/rotate.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_ROTATE_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_ROTATE_H_ 
    1212#define INCLUDE_LIBYUV_ROTATE_H_ 
    1313 
     
    2121// Supported rotation. 
    2222typedef enum RotationMode { 
    23   kRotate0 = 0,  // No rotation. 
    24   kRotate90 = 90,  // Rotate 90 degrees clockwise. 
     23  kRotate0 = 0,      // No rotation. 
     24  kRotate90 = 90,    // Rotate 90 degrees clockwise. 
    2525  kRotate180 = 180,  // Rotate 180 degrees. 
    2626  kRotate270 = 270,  // Rotate 270 degrees clockwise. 
     
    3434// Rotate I420 frame. 
    3535LIBYUV_API 
    36 int I420Rotate(const uint8* src_y, int src_stride_y, 
    37                const uint8* src_u, int src_stride_u, 
    38                const uint8* src_v, int src_stride_v, 
    39                uint8* dst_y, int dst_stride_y, 
    40                uint8* dst_u, int dst_stride_u, 
    41                uint8* dst_v, int dst_stride_v, 
    42                int src_width, int src_height, enum RotationMode mode); 
     36int I420Rotate(const uint8* src_y, 
     37               int src_stride_y, 
     38               const uint8* src_u, 
     39               int src_stride_u, 
     40               const uint8* src_v, 
     41               int src_stride_v, 
     42               uint8* dst_y, 
     43               int dst_stride_y, 
     44               uint8* dst_u, 
     45               int dst_stride_u, 
     46               uint8* dst_v, 
     47               int dst_stride_v, 
     48               int src_width, 
     49               int src_height, 
     50               enum RotationMode mode); 
    4351 
    4452// Rotate NV12 input and store in I420. 
    4553LIBYUV_API 
    46 int NV12ToI420Rotate(const uint8* src_y, int src_stride_y, 
    47                      const uint8* src_uv, int src_stride_uv, 
    48                      uint8* dst_y, int dst_stride_y, 
    49                      uint8* dst_u, int dst_stride_u, 
    50                      uint8* dst_v, int dst_stride_v, 
    51                      int src_width, int src_height, enum RotationMode mode); 
     54int NV12ToI420Rotate(const uint8* src_y, 
     55                     int src_stride_y, 
     56                     const uint8* src_uv, 
     57                     int src_stride_uv, 
     58                     uint8* dst_y, 
     59                     int dst_stride_y, 
     60                     uint8* dst_u, 
     61                     int dst_stride_u, 
     62                     uint8* dst_v, 
     63                     int dst_stride_v, 
     64                     int src_width, 
     65                     int src_height, 
     66                     enum RotationMode mode); 
    5267 
    5368// Rotate a plane by 0, 90, 180, or 270. 
    5469LIBYUV_API 
    55 int RotatePlane(const uint8* src, int src_stride, 
    56                 uint8* dst, int dst_stride, 
    57                 int src_width, int src_height, enum RotationMode mode); 
     70int RotatePlane(const uint8* src, 
     71                int src_stride, 
     72                uint8* dst, 
     73                int dst_stride, 
     74                int src_width, 
     75                int src_height, 
     76                enum RotationMode mode); 
    5877 
    5978// Rotate planes by 90, 180, 270. Deprecated. 
    6079LIBYUV_API 
    61 void RotatePlane90(const uint8* src, int src_stride, 
    62                    uint8* dst, int dst_stride, 
    63                    int width, int height); 
     80void RotatePlane90(const uint8* src, 
     81                   int src_stride, 
     82                   uint8* dst, 
     83                   int dst_stride, 
     84                   int width, 
     85                   int height); 
    6486 
    6587LIBYUV_API 
    66 void RotatePlane180(const uint8* src, int src_stride, 
    67                     uint8* dst, int dst_stride, 
    68                     int width, int height); 
     88void RotatePlane180(const uint8* src, 
     89                    int src_stride, 
     90                    uint8* dst, 
     91                    int dst_stride, 
     92                    int width, 
     93                    int height); 
    6994 
    7095LIBYUV_API 
    71 void RotatePlane270(const uint8* src, int src_stride, 
    72                     uint8* dst, int dst_stride, 
    73                     int width, int height); 
     96void RotatePlane270(const uint8* src, 
     97                    int src_stride, 
     98                    uint8* dst, 
     99                    int dst_stride, 
     100                    int width, 
     101                    int height); 
    74102 
    75103LIBYUV_API 
    76 void RotateUV90(const uint8* src, int src_stride, 
    77                 uint8* dst_a, int dst_stride_a, 
    78                 uint8* dst_b, int dst_stride_b, 
    79                 int width, int height); 
     104void RotateUV90(const uint8* src, 
     105                int src_stride, 
     106                uint8* dst_a, 
     107                int dst_stride_a, 
     108                uint8* dst_b, 
     109                int dst_stride_b, 
     110                int width, 
     111                int height); 
    80112 
    81113// Rotations for when U and V are interleaved. 
     
    84116// rotating them. Deprecated. 
    85117LIBYUV_API 
    86 void RotateUV180(const uint8* src, int src_stride, 
    87                  uint8* dst_a, int dst_stride_a, 
    88                  uint8* dst_b, int dst_stride_b, 
    89                  int width, int height); 
     118void RotateUV180(const uint8* src, 
     119                 int src_stride, 
     120                 uint8* dst_a, 
     121                 int dst_stride_a, 
     122                 uint8* dst_b, 
     123                 int dst_stride_b, 
     124                 int width, 
     125                 int height); 
    90126 
    91127LIBYUV_API 
    92 void RotateUV270(const uint8* src, int src_stride, 
    93                  uint8* dst_a, int dst_stride_a, 
    94                  uint8* dst_b, int dst_stride_b, 
    95                  int width, int height); 
     128void RotateUV270(const uint8* src, 
     129                 int src_stride, 
     130                 uint8* dst_a, 
     131                 int dst_stride_a, 
     132                 uint8* dst_b, 
     133                 int dst_stride_b, 
     134                 int width, 
     135                 int height); 
    96136 
    97137// The 90 and 270 functions are based on transposes. 
     
    100140// Deprecated. 
    101141LIBYUV_API 
    102 void TransposePlane(const uint8* src, int src_stride, 
    103                     uint8* dst, int dst_stride, 
    104                     int width, int height); 
     142void TransposePlane(const uint8* src, 
     143                    int src_stride, 
     144                    uint8* dst, 
     145                    int dst_stride, 
     146                    int width, 
     147                    int height); 
    105148 
    106149LIBYUV_API 
    107 void TransposeUV(const uint8* src, int src_stride, 
    108                  uint8* dst_a, int dst_stride_a, 
    109                  uint8* dst_b, int dst_stride_b, 
    110                  int width, int height); 
     150void TransposeUV(const uint8* src, 
     151                 int src_stride, 
     152                 uint8* dst_a, 
     153                 int dst_stride_a, 
     154                 uint8* dst_b, 
     155                 int dst_stride_b, 
     156                 int width, 
     157                 int height); 
    111158 
    112159#ifdef __cplusplus 
     
    115162#endif 
    116163 
    117 #endif  // INCLUDE_LIBYUV_ROTATE_H_  NOLINT 
     164#endif  // INCLUDE_LIBYUV_ROTATE_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/rotate_argb.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ 
    1212#define INCLUDE_LIBYUV_ROTATE_ARGB_H_ 
    1313 
     
    2222// Rotate ARGB frame 
    2323LIBYUV_API 
    24 int ARGBRotate(const uint8* src_argb, int src_stride_argb, 
    25                uint8* dst_argb, int dst_stride_argb, 
    26                int src_width, int src_height, enum RotationMode mode); 
     24int ARGBRotate(const uint8* src_argb, 
     25               int src_stride_argb, 
     26               uint8* dst_argb, 
     27               int dst_stride_argb, 
     28               int src_width, 
     29               int src_height, 
     30               enum RotationMode mode); 
    2731 
    2832#ifdef __cplusplus 
     
    3135#endif 
    3236 
    33 #endif  // INCLUDE_LIBYUV_ROTATE_ARGB_H_  NOLINT 
     37#endif  // INCLUDE_LIBYUV_ROTATE_ARGB_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/rotate_row.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ 
    1212#define INCLUDE_LIBYUV_ROTATE_ROW_H_ 
    1313 
     
    3737// The following are available for GCC 32 or 64 bit but not NaCL for 64 bit: 
    3838#if !defined(LIBYUV_DISABLE_X86) && \ 
    39     (defined(__i386__) || (defined(__x86_64__) && !defined(__native_client__))) 
     39    (defined(__i386__) ||           \ 
     40     (defined(__x86_64__) && !defined(__native_client__))) 
    4041#define HAS_TRANSPOSEWX8_SSSE3 
    4142#endif 
     
    5455#endif 
    5556 
    56 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ 
    57     defined(__mips__) && \ 
    58     defined(__mips_dsp) && (__mips_dsp_rev >= 2) 
     57#if !defined(LIBYUV_DISABLE_DSPR2) && !defined(__native_client__) && \ 
     58    defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) 
    5959#define HAS_TRANSPOSEWX8_DSPR2 
    6060#define HAS_TRANSPOSEUVWX8_DSPR2 
    6161#endif  // defined(__mips__) 
    6262 
    63 void TransposeWxH_C(const uint8* src, int src_stride, 
    64                     uint8* dst, int dst_stride, int width, int height); 
    65  
    66 void TransposeWx8_C(const uint8* src, int src_stride, 
    67                     uint8* dst, int dst_stride, int width); 
    68 void TransposeWx8_NEON(const uint8* src, int src_stride, 
    69                        uint8* dst, int dst_stride, int width); 
    70 void TransposeWx8_SSSE3(const uint8* src, int src_stride, 
    71                         uint8* dst, int dst_stride, int width); 
    72 void TransposeWx8_Fast_SSSE3(const uint8* src, int src_stride, 
    73                              uint8* dst, int dst_stride, int width); 
    74 void TransposeWx8_DSPR2(const uint8* src, int src_stride, 
    75                         uint8* dst, int dst_stride, int width); 
    76 void TransposeWx8_Fast_DSPR2(const uint8* src, int src_stride, 
    77                              uint8* dst, int dst_stride, int width); 
    78  
    79 void TransposeWx8_Any_NEON(const uint8* src, int src_stride, 
    80                            uint8* dst, int dst_stride, int width); 
    81 void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride, 
    82                             uint8* dst, int dst_stride, int width); 
    83 void TransposeWx8_Fast_Any_SSSE3(const uint8* src, int src_stride, 
    84                                  uint8* dst, int dst_stride, int width); 
    85 void TransposeWx8_Any_DSPR2(const uint8* src, int src_stride, 
    86                             uint8* dst, int dst_stride, int width); 
    87  
    88 void TransposeUVWxH_C(const uint8* src, int src_stride, 
    89                       uint8* dst_a, int dst_stride_a, 
    90                       uint8* dst_b, int dst_stride_b, 
    91                       int width, int height); 
    92  
    93 void TransposeUVWx8_C(const uint8* src, int src_stride, 
    94                       uint8* dst_a, int dst_stride_a, 
    95                       uint8* dst_b, int dst_stride_b, int width); 
    96 void TransposeUVWx8_SSE2(const uint8* src, int src_stride, 
    97                          uint8* dst_a, int dst_stride_a, 
    98                          uint8* dst_b, int dst_stride_b, int width); 
    99 void TransposeUVWx8_NEON(const uint8* src, int src_stride, 
    100                          uint8* dst_a, int dst_stride_a, 
    101                          uint8* dst_b, int dst_stride_b, int width); 
    102 void TransposeUVWx8_DSPR2(const uint8* src, int src_stride, 
    103                           uint8* dst_a, int dst_stride_a, 
    104                           uint8* dst_b, int dst_stride_b, int width); 
    105  
    106 void TransposeUVWx8_Any_SSE2(const uint8* src, int src_stride, 
    107                              uint8* dst_a, int dst_stride_a, 
    108                              uint8* dst_b, int dst_stride_b, int width); 
    109 void TransposeUVWx8_Any_NEON(const uint8* src, int src_stride, 
    110                              uint8* dst_a, int dst_stride_a, 
    111                              uint8* dst_b, int dst_stride_b, int width); 
    112 void TransposeUVWx8_Any_DSPR2(const uint8* src, int src_stride, 
    113                               uint8* dst_a, int dst_stride_a, 
    114                               uint8* dst_b, int dst_stride_b, int width); 
     63#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 
     64#define HAS_TRANSPOSEWX16_MSA 
     65#define HAS_TRANSPOSEUVWX16_MSA 
     66#endif 
     67 
     68void TransposeWxH_C(const uint8* src, 
     69                    int src_stride, 
     70                    uint8* dst, 
     71                    int dst_stride, 
     72                    int width, 
     73                    int height); 
     74 
     75void TransposeWx8_C(const uint8* src, 
     76                    int src_stride, 
     77                    uint8* dst, 
     78                    int dst_stride, 
     79                    int width); 
     80void TransposeWx16_C(const uint8* src, 
     81                     int src_stride, 
     82                     uint8* dst, 
     83                     int dst_stride, 
     84                     int width); 
     85void TransposeWx8_NEON(const uint8* src, 
     86                       int src_stride, 
     87                       uint8* dst, 
     88                       int dst_stride, 
     89                       int width); 
     90void TransposeWx8_SSSE3(const uint8* src, 
     91                        int src_stride, 
     92                        uint8* dst, 
     93                        int dst_stride, 
     94                        int width); 
     95void TransposeWx8_Fast_SSSE3(const uint8* src, 
     96                             int src_stride, 
     97                             uint8* dst, 
     98                             int dst_stride, 
     99                             int width); 
     100void TransposeWx8_DSPR2(const uint8* src, 
     101                        int src_stride, 
     102                        uint8* dst, 
     103                        int dst_stride, 
     104                        int width); 
     105void TransposeWx8_Fast_DSPR2(const uint8* src, 
     106                             int src_stride, 
     107                             uint8* dst, 
     108                             int dst_stride, 
     109                             int width); 
     110void TransposeWx16_MSA(const uint8* src, 
     111                       int src_stride, 
     112                       uint8* dst, 
     113                       int dst_stride, 
     114                       int width); 
     115 
     116void TransposeWx8_Any_NEON(const uint8* src, 
     117                           int src_stride, 
     118                           uint8* dst, 
     119                           int dst_stride, 
     120                           int width); 
     121void TransposeWx8_Any_SSSE3(const uint8* src, 
     122                            int src_stride, 
     123                            uint8* dst, 
     124                            int dst_stride, 
     125                            int width); 
     126void TransposeWx8_Fast_Any_SSSE3(const uint8* src, 
     127                                 int src_stride, 
     128                                 uint8* dst, 
     129                                 int dst_stride, 
     130                                 int width); 
     131void TransposeWx8_Any_DSPR2(const uint8* src, 
     132                            int src_stride, 
     133                            uint8* dst, 
     134                            int dst_stride, 
     135                            int width); 
     136void TransposeWx16_Any_MSA(const uint8* src, 
     137                           int src_stride, 
     138                           uint8* dst, 
     139                           int dst_stride, 
     140                           int width); 
     141 
     142void TransposeUVWxH_C(const uint8* src, 
     143                      int src_stride, 
     144                      uint8* dst_a, 
     145                      int dst_stride_a, 
     146                      uint8* dst_b, 
     147                      int dst_stride_b, 
     148                      int width, 
     149                      int height); 
     150 
     151void TransposeUVWx8_C(const uint8* src, 
     152                      int src_stride, 
     153                      uint8* dst_a, 
     154                      int dst_stride_a, 
     155                      uint8* dst_b, 
     156                      int dst_stride_b, 
     157                      int width); 
     158void TransposeUVWx16_C(const uint8* src, 
     159                       int src_stride, 
     160                       uint8* dst_a, 
     161                       int dst_stride_a, 
     162                       uint8* dst_b, 
     163                       int dst_stride_b, 
     164                       int width); 
     165void TransposeUVWx8_SSE2(const uint8* src, 
     166                         int src_stride, 
     167                         uint8* dst_a, 
     168                         int dst_stride_a, 
     169                         uint8* dst_b, 
     170                         int dst_stride_b, 
     171                         int width); 
     172void TransposeUVWx8_NEON(const uint8* src, 
     173                         int src_stride, 
     174                         uint8* dst_a, 
     175                         int dst_stride_a, 
     176                         uint8* dst_b, 
     177                         int dst_stride_b, 
     178                         int width); 
     179void TransposeUVWx8_DSPR2(const uint8* src, 
     180                          int src_stride, 
     181                          uint8* dst_a, 
     182                          int dst_stride_a, 
     183                          uint8* dst_b, 
     184                          int dst_stride_b, 
     185                          int width); 
     186void TransposeUVWx16_MSA(const uint8* src, 
     187                         int src_stride, 
     188                         uint8* dst_a, 
     189                         int dst_stride_a, 
     190                         uint8* dst_b, 
     191                         int dst_stride_b, 
     192                         int width); 
     193 
     194void TransposeUVWx8_Any_SSE2(const uint8* src, 
     195                             int src_stride, 
     196                             uint8* dst_a, 
     197                             int dst_stride_a, 
     198                             uint8* dst_b, 
     199                             int dst_stride_b, 
     200                             int width); 
     201void TransposeUVWx8_Any_NEON(const uint8* src, 
     202                             int src_stride, 
     203                             uint8* dst_a, 
     204                             int dst_stride_a, 
     205                             uint8* dst_b, 
     206                             int dst_stride_b, 
     207                             int width); 
     208void TransposeUVWx8_Any_DSPR2(const uint8* src, 
     209                              int src_stride, 
     210                              uint8* dst_a, 
     211                              int dst_stride_a, 
     212                              uint8* dst_b, 
     213                              int dst_stride_b, 
     214                              int width); 
     215void TransposeUVWx16_Any_MSA(const uint8* src, 
     216                             int src_stride, 
     217                             uint8* dst_a, 
     218                             int dst_stride_a, 
     219                             uint8* dst_b, 
     220                             int dst_stride_b, 
     221                             int width); 
    115222 
    116223#ifdef __cplusplus 
     
    119226#endif 
    120227 
    121 #endif  // INCLUDE_LIBYUV_ROTATE_ROW_H_  NOLINT 
     228#endif  // INCLUDE_LIBYUV_ROTATE_ROW_H_ 
  • pjproject/trunk/third_party/yuv/include/libyuv/row.h

    r5358 r5633  
    99 */ 
    1010 
    11 #ifndef INCLUDE_LIBYUV_ROW_H_  // NOLINT 
     11#ifndef INCLUDE_LIBYUV_ROW_H_ 
    1212#define INCLUDE_LIBYUV_ROW_H_ 
    1313 
     
    2121#endif 
    2222 
    23 #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) 
    24  
    25 #ifdef __cplusplus 
    26 #define align_buffer_64(var, size)                                             \ 
    27   uint8* var##_mem = reinterpret_cast<uint8*>(malloc((size) + 63));            \ 
    28   uint8* var = reinterpret_cast<uint8*>                                        \ 
    29       ((reinterpret_cast<intptr_t>(var##_mem) + 63) & ~63) 
    30 #else 
    31 #define align_buffer_64(var, size)                                             \ 
    32   uint8* var##_mem = (uint8*)(malloc((size) + 63));               /* NOLINT */ \ 
    33   uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63)       /* NOLINT */ 
    34 #endif 
     23#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1))) 
     24 
     25#define align_buffer_64(var, size)                                       \ 
     26  uint8* var##_mem = (uint8*)(malloc((size) + 63));         /* NOLINT */ \ 
     27  uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ 
    3528 
    3629#define free_aligned_buffer_64(var) \ 
    37   free(var##_mem);  \ 
     30  free(var##_mem);                  \ 
    3831  var = 0 
    3932 
     
    7871 
    7972// Visual C 2012 required for AVX2. 
    80 #if defined(_M_IX86) && !defined(__clang__) && \ 
    81     defined(_MSC_VER) && _MSC_VER >= 1700 
     73#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ 
     74    _MSC_VER >= 1700 
    8275#define VISUALC_HAS_AVX2 1 
    8376#endif  // VisualStudio >= 2012 
     
    9184#define HAS_ARGB1555TOARGBROW_SSE2 
    9285#define HAS_ARGB4444TOARGBROW_SSE2 
     86#define HAS_ARGBEXTRACTALPHAROW_SSE2 
    9387#define HAS_ARGBSETROW_X86 
    9488#define HAS_ARGBSHUFFLEROW_SSE2 
     
    10599#define HAS_ARGBTOYJROW_SSSE3 
    106100#define HAS_ARGBTOYROW_SSSE3 
    107 #define HAS_ARGBEXTRACTALPHAROW_SSE2 
    108101#define HAS_BGRATOUVROW_SSSE3 
    109102#define HAS_BGRATOYROW_SSSE3 
     
    111104#define HAS_COPYROW_SSE2 
    112105#define HAS_H422TOARGBROW_SSSE3 
     106#define HAS_HALFFLOATROW_SSE2 
    113107#define HAS_I400TOARGBROW_SSE2 
    114108#define HAS_I422TOARGB1555ROW_SSSE3 
     
    181175// The following functions fail on gcc/clang 32 bit with fpic and framepointer. 
    182176// caveat: clangcl uses row_win.cc which works. 
    183 #if defined(NDEBUG) || !(defined(_DEBUG) && defined(__i386__)) || \ 
    184     !defined(__i386__) || defined(_MSC_VER) 
    185 // TODO(fbarchard): fix build error on x86 debug 
    186 // https://code.google.com/p/libyuv/issues/detail?id=524 
    187 #define HAS_I411TOARGBROW_SSSE3 
     177#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ 
     178    defined(_MSC_VER) 
    188179// TODO(fbarchard): fix build error on android_full_debug=1 
    189180// https://code.google.com/p/libyuv/issues/detail?id=517 
     
    195186// require VS2012, clang 3.4 or gcc 4.7. 
    196187// The code supports NaCL but requires a new compiler and validator. 
    197 #if !defined(LIBYUV_DISABLE_X86) && (defined(VISUALC_HAS_AVX2) || \ 
    198     defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)) 
     188#if !defined(LIBYUV_DISABLE_X86) &&                          \ 
     189    (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \ 
     190     defined(GCC_HAS_AVX2)) 
    199191#define HAS_ARGBCOPYALPHAROW_AVX2 
    200192#define HAS_ARGBCOPYYTOALPHAROW_AVX2 
     193#define HAS_ARGBEXTRACTALPHAROW_AVX2 
    201194#define HAS_ARGBMIRRORROW_AVX2 
    202195#define HAS_ARGBPOLYNOMIALROW_AVX2 
     
    209202#define HAS_COPYROW_AVX 
    210203#define HAS_H422TOARGBROW_AVX2 
     204#define HAS_HALFFLOATROW_AVX2 
     205//  #define HAS_HALFFLOATROW_F16C  // Enable to test halffloat cast 
    211206#define HAS_I400TOARGBROW_AVX2 
    212 #if !(defined(_DEBUG) && defined(__i386__)) 
    213 // TODO(fbarchard): fix build error on android_full_debug=1 
    214 // https://code.google.com/p/libyuv/issues/detail?id=517 
    215 #define HAS_I422ALPHATOARGBROW_AVX2 
    216 #endif 
    217 #define HAS_I411TOARGBROW_AVX2 
    218207#define HAS_I422TOARGB1555ROW_AVX2 
    219208#define HAS_I422TOARGB4444ROW_AVX2 
     
    247236#define HAS_ARGBUNATTENUATEROW_AVX2 
    248237#define HAS_BLENDPLANEROW_AVX2 
     238 
     239#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ 
     240    defined(_MSC_VER) 
     241// TODO(fbarchard): fix build error on android_full_debug=1 
     242// https://code.google.com/p/libyuv/issues/detail?id=517 
     243#define HAS_I422ALPHATOARGBROW_AVX2 
     244#endif 
    249245#endif 
    250246 
     
    263259 
    264260// The following are also available on x64 Visual C. 
    265 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \ 
     261#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \ 
    266262    (!defined(__clang__) || defined(__SSSE3__)) 
    267263#define HAS_I422ALPHATOARGBROW_SSSE3 
     
    280276#define HAS_ARGB4444TOUVROW_NEON 
    281277#define HAS_ARGB4444TOYROW_NEON 
     278#define HAS_ARGBEXTRACTALPHAROW_NEON 
    282279#define HAS_ARGBSETROW_NEON 
    283280#define HAS_ARGBTOARGB1555ROW_NEON 
     
    287284#define HAS_ARGBTORGB565DITHERROW_NEON 
    288285#define HAS_ARGBTORGB565ROW_NEON 
    289 #define HAS_ARGBTOUV411ROW_NEON 
    290286#define HAS_ARGBTOUV444ROW_NEON 
    291287#define HAS_ARGBTOUVJROW_NEON 
     
    293289#define HAS_ARGBTOYJROW_NEON 
    294290#define HAS_ARGBTOYROW_NEON 
    295 #define HAS_ARGBEXTRACTALPHAROW_NEON 
    296291#define HAS_BGRATOUVROW_NEON 
    297292#define HAS_BGRATOYROW_NEON 
    298293#define HAS_COPYROW_NEON 
     294#define HAS_HALFFLOATROW_NEON 
    299295#define HAS_I400TOARGBROW_NEON 
    300 #define HAS_I411TOARGBROW_NEON 
    301296#define HAS_I422ALPHATOARGBROW_NEON 
    302297#define HAS_I422TOARGB1555ROW_NEON 
     
    361356 
    362357// The following are available on Mips platforms: 
    363 #if !defined(LIBYUV_DISABLE_MIPS) && defined(__mips__) && \ 
     358#if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips__) && \ 
    364359    (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6) 
    365360#define HAS_COPYROW_MIPS 
     
    370365#define HAS_MIRRORUVROW_DSPR2 
    371366#define HAS_SPLITUVROW_DSPR2 
     367#define HAS_RGB24TOARGBROW_DSPR2 
     368#define HAS_RAWTOARGBROW_DSPR2 
     369#define HAS_RGB565TOARGBROW_DSPR2 
     370#define HAS_ARGB1555TOARGBROW_DSPR2 
     371#define HAS_ARGB4444TOARGBROW_DSPR2 
     372#define HAS_I444TOARGBROW_DSPR2 
     373#define HAS_I422TOARGB4444ROW_DSPR2 
     374#define HAS_I422TOARGB1555ROW_DSPR2 
     375#define HAS_NV12TOARGBROW_DSPR2 
     376#define HAS_BGRATOUVROW_DSPR2 
     377#define HAS_BGRATOYROW_DSPR2 
     378#define HAS_ABGRTOUVROW_DSPR2 
     379#define HAS_ARGBTOYROW_DSPR2 
     380#define HAS_ABGRTOYROW_DSPR2 
     381#define HAS_RGBATOUVROW_DSPR2 
     382#define HAS_RGBATOYROW_DSPR2 
     383#define HAS_ARGBTOUVROW_DSPR2 
    372384#endif 
    373385#endif 
    374386 
    375 #if defined(_MSC_VER) && !defined(__CLR_VER) 
     387#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 
     388#define HAS_ARGBMIRRORROW_MSA 
     389#define HAS_I422TOUYVYROW_MSA 
     390#define HAS_I422TOYUY2ROW_MSA 
     391#define HAS_MIRRORROW_MSA 
     392#define HAS_UYVYTOUVROW_MSA 
     393#define HAS_UYVYTOYROW_MSA 
     394#define HAS_YUY2TOUV422ROW_MSA 
     395#define HAS_YUY2TOUVROW_MSA 
     396#define HAS_YUY2TOYROW_MSA 
     397#define HAS_ARGB4444TOARGBROW_MSA 
     398#define HAS_ARGBTOYROW_MSA 
     399#define HAS_ARGBTOUVROW_MSA 
     400#define HAS_I422TOARGBROW_MSA 
     401#define HAS_I422TORGBAROW_MSA 
     402#define HAS_I422ALPHATOARGBROW_MSA 
     403#define HAS_I422TORGB24ROW_MSA 
     404#define HAS_ARGBTORGB24ROW_MSA 
     405#define HAS_ARGBTORAWROW_MSA 
     406#define HAS_ARGBTORGB565ROW_MSA 
     407#define HAS_ARGBTOARGB1555ROW_MSA 
     408#define HAS_ARGBTOARGB4444ROW_MSA 
     409#define HAS_ARGBTOUV444ROW_MSA 
     410#define HAS_ARGBMULTIPLYROW_MSA 
     411#define HAS_ARGBADDROW_MSA 
     412#define HAS_ARGBSUBTRACTROW_MSA 
     413#define HAS_ARGBATTENUATEROW_MSA 
     414#define HAS_ARGBTORGB565DITHERROW_MSA 
     415#define HAS_ARGBSHUFFLEROW_MSA 
     416#define HAS_ARGBSHADEROW_MSA 
     417#define HAS_ARGBGRAYROW_MSA 
     418#define HAS_ARGBSEPIAROW_MSA 
     419#define HAS_ARGB1555TOARGBROW_MSA 
     420#define HAS_RGB565TOARGBROW_MSA 
     421#define HAS_RGB24TOARGBROW_MSA 
     422#define HAS_RAWTOARGBROW_MSA 
     423#define HAS_ARGB1555TOYROW_MSA 
     424#define HAS_RGB565TOYROW_MSA 
     425#define HAS_RGB24TOYROW_MSA 
     426#define HAS_RAWTOYROW_MSA 
     427#define HAS_ARGB1555TOUVROW_MSA 
     428#define HAS_RGB565TOUVROW_MSA 
     429#define HAS_RGB24TOUVROW_MSA 
     430#define HAS_RAWTOUVROW_MSA 
     431#define HAS_NV12TOARGBROW_MSA 
     432#define HAS_NV12TORGB565ROW_MSA 
     433#define HAS_NV21TOARGBROW_MSA 
     434#define HAS_SOBELROW_MSA 
     435#define HAS_SOBELTOPLANEROW_MSA 
     436#define HAS_SOBELXYROW_MSA 
     437#define HAS_ARGBTOYJROW_MSA 
     438#define HAS_BGRATOYROW_MSA 
     439#define HAS_ABGRTOYROW_MSA 
     440#define HAS_RGBATOYROW_MSA 
     441#define HAS_ARGBTOUVJROW_MSA 
     442#define HAS_BGRATOUVROW_MSA 
     443#define HAS_ABGRTOUVROW_MSA 
     444#define HAS_RGBATOUVROW_MSA 
     445#define HAS_I444TOARGBROW_MSA 
     446#define HAS_I400TOARGBROW_MSA 
     447#define HAS_J400TOARGBROW_MSA 
     448#define HAS_YUY2TOARGBROW_MSA 
     449#define HAS_UYVYTOARGBROW_MSA 
     450#define HAS_INTERPOLATEROW_MSA 
     451#define HAS_ARGBSETROW_MSA 
     452#define HAS_RAWTORGB24ROW_MSA 
     453#define HAS_MERGEUVROW_MSA 
     454#endif 
     455 
     456#if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) 
     457#if defined(VISUALC_HAS_AVX2) 
     458#define SIMD_ALIGNED(var) __declspec(align(32)) var 
     459#else 
    376460#define SIMD_ALIGNED(var) __declspec(align(16)) var 
    377 #define SIMD_ALIGNED32(var) __declspec(align(64)) var 
     461#endif 
    378462typedef __declspec(align(16)) int16 vec16[8]; 
    379463typedef __declspec(align(16)) int32 vec32[4]; 
     
    388472typedef __declspec(align(32)) uint32 ulvec32[8]; 
    389473typedef __declspec(align(32)) uint8 ulvec8[32]; 
    390 #elif defined(__GNUC__) && !defined(__pnacl__) 
     474#elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__)) 
    391475// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const. 
     476#if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2) 
     477#define SIMD_ALIGNED(var) var __attribute__((aligned(32))) 
     478#else 
    392479#define SIMD_ALIGNED(var) var __attribute__((aligned(16))) 
    393 #define SIMD_ALIGNED32(var) var __attribute__((aligned(64))) 
     480#endif 
    394481typedef int16 __attribute__((vector_size(16))) vec16; 
    395482typedef int32 __attribute__((vector_size(16))) vec32; 
     
    406493#else 
    407494#define SIMD_ALIGNED(var) var 
    408 #define SIMD_ALIGNED32(var) var 
    409495typedef int16 vec16[8]; 
    410496typedef int32 vec32[4]; 
     
    442528// This struct is for Intel color conversion. 
    443529struct YuvConstants { 
    444   lvec8 kUVToB; 
    445   lvec8 kUVToG; 
    446   lvec8 kUVToR; 
    447   lvec16 kUVBiasB; 
    448   lvec16 kUVBiasG; 
    449   lvec16 kUVBiasR; 
    450   lvec16 kYToRgb; 
     530  int8 kUVToB[32]; 
     531  int8 kUVToG[32]; 
     532  int8 kUVToR[32]; 
     533  int16 kUVBiasB[16]; 
     534  int16 kUVBiasG[16]; 
     535  int16 kUVBiasR[16]; 
     536  int16 kYToRgb[16]; 
    451537}; 
    452538 
    453539// Offsets into YuvConstants structure 
    454 #define KUVTOB   0 
    455 #define KUVTOG   32 
    456 #define KUVTOR   64 
     540#define KUVTOB 0 
     541#define KUVTOG 32 
     542#define KUVTOR 64 
    457543#define KUVBIASB 96 
    458544#define KUVBIASG 128 
    459545#define KUVBIASR 160 
    460 #define KYTORGB  192 
     546#define KYTORGB 192 
    461547#endif 
    462548 
    463549// Conversion matrix for YUV to RGB 
    464 extern const struct YuvConstants kYuvI601Constants;  // BT.601 
    465 extern const struct YuvConstants kYuvJPEGConstants;  // JPeg color space 
    466 extern const struct YuvConstants kYuvH709Constants;  // BT.709 
     550extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants);  // BT.601 
     551extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants);  // JPeg 
     552extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants);  // BT.709 
    467553 
    468554// Conversion matrix for YVU to BGR 
    469 extern const struct YuvConstants kYvuI601Constants;  // BT.601 
    470 extern const struct YuvConstants kYvuJPEGConstants;  // JPeg color space 
    471 extern const struct YuvConstants kYvuH709Constants;  // BT.709 
     555extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants);  // BT.601 
     556extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants);  // JPeg 
     557extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants);  // BT.709 
    472558 
    473559#if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) 
     
    491577#define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")" 
    492578#define MEMLEA(offset, base) #offset "(%q" #base ")" 
    493 #define MEMLEA3(offset, index, scale) \ 
    494     #offset "(,%q" #index "," #scale ")" 
     579#define MEMLEA3(offset, index, scale) #offset "(,%q" #index "," #scale ")" 
    495580#define MEMLEA4(offset, base, index, scale) \ 
    496     #offset "(%q" #base ",%q" #index "," #scale ")" 
     581  #offset "(%q" #base ",%q" #index "," #scale ")" 
    497582#define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15" 
    498583#define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15" 
    499 #define MEMOPREG(opcode, offset, base, index, scale, reg) \ 
    500     BUNDLELOCK \ 
    501     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 
    502     #opcode " (%%r15,%%r14),%%" #reg "\n" \ 
    503     BUNDLEUNLOCK 
    504 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \ 
    505     BUNDLELOCK \ 
    506     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 
    507     #opcode " %%" #reg ",(%%r15,%%r14)\n" \ 
    508     BUNDLEUNLOCK 
    509 #define MEMOPARG(opcode, offset, base, index, scale, arg) \ 
    510     BUNDLELOCK \ 
    511     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 
    512     #opcode " (%%r15,%%r14),%" #arg "\n" \ 
    513     BUNDLEUNLOCK 
    514 #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ 
    515     BUNDLELOCK \ 
    516     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 
    517     #opcode " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" \ 
    518     BUNDLEUNLOCK 
    519 #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ 
    520     BUNDLELOCK \ 
    521     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \ 
    522     #op " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" \ 
    523     BUNDLEUNLOCK 
     584#define MEMOPREG(opcode, offset, base, index, scale, reg)                 \ 
     585  BUNDLELOCK                                                              \ 
     586  "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 
     587  " (%%r15,%%r14),%%" #reg "\n" BUNDLEUNLOCK 
     588#define MEMOPMEM(opcode, reg, offset, base, index, scale)                 \ 
     589  BUNDLELOCK                                                              \ 
     590  "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 
     591  " %%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK 
     592#define MEMOPARG(opcode, offset, base, index, scale, arg)                 \ 
     593  BUNDLELOCK                                                              \ 
     594  "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 
     595  " (%%r15,%%r14),%" #arg "\n" BUNDLEUNLOCK 
     596#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2)         \ 
     597  BUNDLELOCK                                                              \ 
     598  "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ 
     599  " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" BUNDLEUNLOCK 
     600#define VEXTOPMEM(op, sel, reg, offset, base, index, scale)           \ 
     601  BUNDLELOCK                                                          \ 
     602  "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #op \ 
     603  " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK 
    524604#else  // defined(__native_client__) && defined(__x86_64__) 
    525605#define NACL_R14 
     
    528608#define MEMACCESS2(offset, base) #offset "(%" #base ")" 
    529609#define MEMLEA(offset, base) #offset "(%" #base ")" 
    530 #define MEMLEA3(offset, index, scale) \ 
    531     #offset "(,%" #index "," #scale ")" 
     610#define MEMLEA3(offset, index, scale) #offset "(,%" #index "," #scale ")" 
    532611#define MEMLEA4(offset, base, index, scale) \ 
    533     #offset "(%" #base ",%" #index "," #scale ")" 
     612  #offset "(%" #base ",%" #index "," #scale ")" 
    534613#define MEMMOVESTRING(s, d) 
    535614#define MEMSTORESTRING(reg, d) 
    536615#define MEMOPREG(opcode, offset, base, index, scale, reg) \ 
    537     #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n" 
     616  #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n" 
    538617#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ 
    539     #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n" 
     618  #opcode " %%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" 
    540619#define MEMOPARG(opcode, offset, base, index, scale, arg) \ 
    541     #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n" 
    542 #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ 
    543     #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 ",%%" \ 
    544     #reg2 "\n" 
     620  #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n" 
     621#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2)    \ 
     622  #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 \ 
     623          ",%%" #reg2 "\n" 
    545624#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ 
    546     #op " $" #sel ",%%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n" 
     625  #op " $" #sel ",%%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" 
    547626#endif  // defined(__native_client__) && defined(__x86_64__) 
    548627 
    549 #if defined(__arm__) || defined(__aarch64__) 
    550 #undef MEMACCESS 
    551 #if defined(__native_client__) 
    552 #define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n" 
    553 #else 
    554 #define MEMACCESS(base) 
     628// Intel Code Analizer markers.  Insert IACA_START IACA_END around code to be 
     629// measured and then run with iaca -64 libyuv_unittest. 
     630// IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within 
     631// inline assembly blocks. 
     632// example of iaca: 
     633// ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest 
     634 
     635#if defined(__x86_64__) || defined(__i386__) 
     636 
     637#define IACA_ASM_START  \ 
     638  ".byte 0x0F, 0x0B\n"  \ 
     639  " movl $111, %%ebx\n" \ 
     640  ".byte 0x64, 0x67, 0x90\n" 
     641 
     642#define IACA_ASM_END         \ 
     643  " movl $222, %%ebx\n"      \ 
     644  ".byte 0x64, 0x67, 0x90\n" \ 
     645  ".byte 0x0F, 0x0B\n" 
     646 
     647#define IACA_SSC_MARK(MARK_ID)                        \ 
     648  __asm__ __volatile__("\n\t  movl $" #MARK_ID        \ 
     649                       ", %%ebx"                      \ 
     650                       "\n\t  .byte 0x64, 0x67, 0x90" \ 
     651                       :                              \ 
     652                       :                              \ 
     653                       : "memory"); 
     654 
     655#define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B"); 
     656 
     657#else /* Visual C */ 
     658#define IACA_UD_BYTES \ 
     659  { __asm _emit 0x0F __asm _emit 0x0B } 
     660 
     661#define IACA_SSC_MARK(x) \ 
     662  { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 } 
     663 
     664#define IACA_VC64_START __writegsbyte(111, 111); 
     665#define IACA_VC64_END __writegsbyte(222, 222); 
    555666#endif 
    556 #endif 
     667 
     668#define IACA_START     \ 
     669  {                    \ 
     670    IACA_UD_BYTES      \ 
     671    IACA_SSC_MARK(111) \ 
     672  } 
     673#define IACA_END       \ 
     674  {                    \ 
     675    IACA_SSC_MARK(222) \ 
     676    IACA_UD_BYTES      \ 
     677  } 
    557678 
    558679void I444ToARGBRow_NEON(const uint8* src_y, 
     
    581702                        const struct YuvConstants* yuvconstants, 
    582703                        int width); 
    583 void I411ToARGBRow_NEON(const uint8* src_y, 
    584                         const uint8* src_u, 
    585                         const uint8* src_v, 
    586                         uint8* dst_argb, 
    587                         const struct YuvConstants* yuvconstants, 
    588                         int width); 
    589704void I422ToRGBARow_NEON(const uint8* src_y, 
    590705                        const uint8* src_u, 
     
    640755                        const struct YuvConstants* yuvconstants, 
    641756                        int width); 
     757void I444ToARGBRow_MSA(const uint8* src_y, 
     758                       const uint8* src_u, 
     759                       const uint8* src_v, 
     760                       uint8* dst_argb, 
     761                       const struct YuvConstants* yuvconstants, 
     762                       int width); 
     763void I444ToARGBRow_DSPR2(const uint8* src_y, 
     764                         const uint8* src_u, 
     765                         const uint8* src_v, 
     766                         uint8* dst_argb, 
     767                         const struct YuvConstants* yuvconstants, 
     768                         int width); 
     769void I422ToARGB4444Row_DSPR2(const uint8* src_y, 
     770                             const uint8* src_u, 
     771                             const uint8* src_v, 
     772                             uint8* dst_argb4444, 
     773                             const struct YuvConstants* yuvconstants, 
     774                             int width); 
     775void I422ToARGB1555Row_DSPR2(const uint8* src_y, 
     776                             const uint8* src_u, 
     777                             const uint8* src_v, 
     778                             uint8* dst_argb1555, 
     779                             const struct YuvConstants* yuvconstants, 
     780                             int width); 
     781void NV12ToARGBRow_DSPR2(const uint8* src_y, 
     782                         const uint8* src_uv, 
     783                         uint8* dst_argb, 
     784                         const struct YuvConstants* yuvconstants, 
     785                         int width); 
     786 
     787void I422ToARGBRow_MSA(const uint8* src_y, 
     788                       const uint8* src_u, 
     789                       const uint8* src_v, 
     790                       uint8* dst_argb, 
     791                       const struct YuvConstants* yuvconstants, 
     792                       int width); 
     793void I422ToRGBARow_MSA(const uint8* src_y, 
     794                       const uint8* src_u, 
     795                       const uint8* src_v, 
     796                       uint8* dst_rgba, 
     797                       const struct YuvConstants* yuvconstants, 
     798                       int width); 
     799void I422AlphaToARGBRow_MSA(const uint8* y_buf, 
     800                            const uint8* u_buf, 
     801                            const uint8* v_buf, 
     802                            const uint8* a_buf, 
     803                            uint8* dst_argb, 
     804                            const struct YuvConstants* yuvconstants, 
     805                            int width); 
     806void I422ToRGB24Row_MSA(const uint8* src_y, 
     807                        const uint8* src_u, 
     808                        const uint8* src_v, 
     809                        uint8* dst_rgb24, 
     810                        const struct YuvConstants* yuvconstants, 
     811                        int width); 
     812void I422ToRGB565Row_MSA(const uint8* src_y, 
     813                         const uint8* src_u, 
     814                         const uint8* src_v, 
     815                         uint8* dst_rgb565, 
     816                         const struct YuvConstants* yuvconstants, 
     817                         int width); 
     818void I422ToARGB4444Row_MSA(const uint8* src_y, 
     819                           const uint8* src_u, 
     820                           const uint8* src_v, 
     821                           uint8* dst_argb4444, 
     822                           const struct YuvConstants* yuvconstants, 
     823                           int width); 
     824void I422ToARGB1555Row_MSA(const uint8* src_y, 
     825                           const uint8* src_u, 
     826                           const uint8* src_v, 
     827                           uint8* dst_argb1555, 
     828                           const struct YuvConstants* yuvconstants, 
     829                           int width); 
     830void NV12ToARGBRow_MSA(const uint8* src_y, 
     831                       const uint8* src_uv, 
     832                       uint8* dst_argb, 
     833                       const struct YuvConstants* yuvconstants, 
     834                       int width); 
     835void NV12ToRGB565Row_MSA(const uint8* src_y, 
     836                         const uint8* src_uv, 
     837                         uint8* dst_rgb565, 
     838                         const struct YuvConstants* yuvconstants, 
     839                         int width); 
     840void NV21ToARGBRow_MSA(const uint8* src_y, 
     841                       const uint8* src_vu, 
     842                       uint8* dst_argb, 
     843                       const struct YuvConstants* yuvconstants, 
     844                       int width); 
     845void YUY2ToARGBRow_MSA(const uint8* src_yuy2, 
     846                       uint8* dst_argb, 
     847                       const struct YuvConstants* yuvconstants, 
     848                       int width); 
     849void UYVYToARGBRow_MSA(const uint8* src_uyvy, 
     850                       uint8* dst_argb, 
     851                       const struct YuvConstants* yuvconstants, 
     852                       int width); 
    642853 
    643854void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); 
     
    654865void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width); 
    655866void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width); 
    656 void ARGBToUV444Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 
    657                          int width); 
    658 void ARGBToUV411Row_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 
    659                          int width); 
    660 void ARGBToUVRow_NEON(const uint8* src_argb, int src_stride_argb, 
    661                       uint8* dst_u, uint8* dst_v, int width); 
    662 void ARGBToUVJRow_NEON(const uint8* src_argb, int src_stride_argb, 
    663                        uint8* dst_u, uint8* dst_v, int width); 
    664 void BGRAToUVRow_NEON(const uint8* src_bgra, int src_stride_bgra, 
    665                       uint8* dst_u, uint8* dst_v, int width); 
    666 void ABGRToUVRow_NEON(const uint8* src_abgr, int src_stride_abgr, 
    667                       uint8* dst_u, uint8* dst_v, int width); 
    668 void RGBAToUVRow_NEON(const uint8* src_rgba, int src_stride_rgba, 
    669                       uint8* dst_u, uint8* dst_v, int width); 
    670 void RGB24ToUVRow_NEON(const uint8* src_rgb24, int src_stride_rgb24, 
    671                        uint8* dst_u, uint8* dst_v, int width); 
    672 void RAWToUVRow_NEON(const uint8* src_raw, int src_stride_raw, 
    673                      uint8* dst_u, uint8* dst_v, int width); 
    674 void RGB565ToUVRow_NEON(const uint8* src_rgb565, int src_stride_rgb565, 
    675                         uint8* dst_u, uint8* dst_v, int width); 
    676 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, int src_stride_argb1555, 
    677                           uint8* dst_u, uint8* dst_v, int width); 
    678 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, int src_stride_argb4444, 
    679                           uint8* dst_u, uint8* dst_v, int width); 
     867void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width); 
     868void ARGBToYJRow_MSA(const uint8* src_argb, uint8* dst_y, int width); 
     869void ARGBToUV444Row_NEON(const uint8* src_argb, 
     870                         uint8* dst_u, 
     871                         uint8* dst_v, 
     872                         int width); 
     873void ARGBToUVRow_NEON(const uint8* src_argb, 
     874                      int src_stride_argb, 
     875                      uint8* dst_u, 
     876                      uint8* dst_v, 
     877                      int width); 
     878void ARGBToUV444Row_MSA(const uint8* src_argb, 
     879                        uint8* dst_u, 
     880                        uint8* dst_v, 
     881                        int width); 
     882void ARGBToUVRow_MSA(const uint8* src_argb, 
     883                     int src_stride_argb, 
     884                     uint8* dst_u, 
     885                     uint8* dst_v, 
     886                     int width); 
     887void ARGBToUVJRow_NEON(const uint8* src_argb, 
     888                       int src_stride_argb, 
     889                       uint8* dst_u, 
     890                       uint8* dst_v, 
     891                       int width); 
     892void BGRAToUVRow_NEON(const uint8* src_bgra, 
     893                      int src_stride_bgra, 
     894                      uint8* dst_u, 
     895                      uint8* dst_v, 
     896                      int width); 
     897void ABGRToUVRow_NEON(const uint8* src_abgr, 
     898                      int src_stride_abgr, 
     899                      uint8* dst_u, 
     900                      uint8* dst_v, 
     901                      int width); 
     902void RGBAToUVRow_NEON(const uint8* src_rgba, 
     903                      int src_stride_rgba, 
     904                      uint8* dst_u, 
     905                      uint8* dst_v, 
     906                      int width); 
     907void RGB24ToUVRow_NEON(const uint8* src_rgb24, 
     908                       int src_stride_rgb24, 
     909                       uint8* dst_u, 
     910                       uint8* dst_v, 
     911                       int width); 
     912void RAWToUVRow_NEON(const uint8* src_raw, 
     913                     int src_stride_raw, 
     914                     uint8* dst_u, 
     915                     uint8* dst_v, 
     916                     int width); 
     917void RGB565ToUVRow_NEON(const uint8* src_rgb565, 
     918                        int src_stride_rgb565, 
     919                        uint8* dst_u, 
     920                        uint8* dst_v, 
     921                        int width); 
     922void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, 
     923                          int src_stride_argb1555, 
     924                          uint8* dst_u, 
     925                          uint8* dst_v, 
     926                          int width); 
     927void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, 
     928                          int src_stride_argb4444, 
     929                          uint8* dst_u, 
     930                          uint8* dst_v, 
     931                          int width); 
     932void ARGBToUVJRow_MSA(const uint8* src_argb, 
     933                      int src_stride_argb, 
     934                      uint8* dst_u, 
     935                      uint8* dst_v, 
     936                      int width); 
     937void BGRAToUVRow_MSA(const uint8* src_bgra, 
     938                     int src_stride_bgra, 
     939                     uint8* dst_u, 
     940                     uint8* dst_v, 
     941                     int width); 
     942void ABGRToUVRow_MSA(const uint8* src_abgr, 
     943                     int src_stride_abgr, 
     944                     uint8* dst_u, 
     945                     uint8* dst_v, 
     946                     int width); 
     947void RGBAToUVRow_MSA(const uint8* src_rgba, 
     948                     int src_stride_rgba, 
     949                     uint8* dst_u, 
     950                     uint8* dst_v, 
     951                     int width); 
     952void RGB24ToUVRow_MSA(const uint8* src_rgb24, 
     953                      int src_stride_rgb24, 
     954                      uint8* dst_u, 
     955                      uint8* dst_v, 
     956                      int width); 
     957void RAWToUVRow_MSA(const uint8* src_raw, 
     958                    int src_stride_raw, 
     959                    uint8* dst_u, 
     960                    uint8* dst_v, 
     961                    int width); 
     962void RGB565ToUVRow_MSA(const uint8* src_rgb565, 
     963                       int src_stride_rgb565, 
     964                       uint8* dst_u, 
     965                       uint8* dst_v, 
     966                       int width); 
     967void ARGB1555ToUVRow_MSA(const uint8* src_argb1555, 
     968                         int src_stride_argb1555, 
     969                         uint8* dst_u, 
     970                         uint8* dst_v, 
     971                         int width); 
    680972void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); 
    681973void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); 
     
    686978void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); 
    687979void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); 
     980void BGRAToYRow_MSA(const uint8* src_bgra, uint8* dst_y, int width); 
     981void ABGRToYRow_MSA(const uint8* src_abgr, uint8* dst_y, int width); 
     982void RGBAToYRow_MSA(const uint8* src_rgba, uint8* dst_y, int width); 
     983void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width); 
     984void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width); 
     985void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width); 
     986void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width); 
     987void BGRAToUVRow_DSPR2(const uint8* src_bgra, 
     988                       int src_stride_bgra, 
     989                       uint8* dst_u, 
     990                       uint8* dst_v, 
     991                       int width); 
     992void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 
     993void ABGRToUVRow_DSPR2(const uint8* src_abgr, 
     994                       int src_stride_abgr, 
     995                       uint8* dst_u, 
     996                       uint8* dst_v, 
     997                       int width); 
     998void ARGBToYRow_DSPR2(const uint8* src_argb, uint8* dst_y, int width); 
     999void ABGRToYRow_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); 
     1000void RGBAToUVRow_DSPR2(const uint8* src_rgba, 
     1001                       int src_stride_rgba, 
     1002                       uint8* dst_u, 
     1003                       uint8* dst_v, 
     1004                       int width); 
     1005void RGBAToYRow_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); 
     1006void ARGBToUVRow_DSPR2(const uint8* src_argb, 
     1007                       int src_stride_argb, 
     1008                       uint8* dst_u, 
     1009                       uint8* dst_v, 
     1010                       int width); 
    6881011void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width); 
    6891012void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width); 
     
    7111034void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width); 
    7121035void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width); 
    713 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, uint8* dst_y, 
    714                              int width); 
    715 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, uint8* dst_y, 
    716                              int width); 
    717  
    718 void ARGBToUVRow_AVX2(const uint8* src_argb, int src_stride_argb, 
    719                       uint8* dst_u, uint8* dst_v, int width); 
    720 void ARGBToUVJRow_AVX2(const uint8* src_argb, int src_stride_argb, 
    721                        uint8* dst_u, uint8* dst_v, int width); 
    722 void ARGBToUVRow_SSSE3(const uint8* src_argb, int src_stride_argb, 
    723                        uint8* dst_u, uint8* dst_v, int width); 
    724 void ARGBToUVJRow_SSSE3(const uint8* src_argb, int src_stride_argb, 
    725                         uint8* dst_u, uint8* dst_v, int width); 
    726 void BGRAToUVRow_SSSE3(const uint8* src_bgra, int src_stride_bgra, 
    727                        uint8* dst_u, uint8* dst_v, int width); 
    728 void ABGRToUVRow_SSSE3(const uint8* src_abgr, int src_stride_abgr, 
    729                        uint8* dst_u, uint8* dst_v, int width); 
    730 void RGBAToUVRow_SSSE3(const uint8* src_rgba, int src_stride_rgba, 
    731                        uint8* dst_u, uint8* dst_v, int width); 
    732 void ARGBToUVRow_Any_AVX2(const uint8* src_argb, int src_stride_argb, 
    733                           uint8* dst_u, uint8* dst_v, int width); 
    734 void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, int src_stride_argb, 
    735                            uint8* dst_u, uint8* dst_v, int width); 
    736 void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb, 
    737                            uint8* dst_u, uint8* dst_v, int width); 
    738 void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, int src_stride_argb, 
    739                             uint8* dst_u, uint8* dst_v, int width); 
    740 void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, int src_stride_bgra, 
    741                            uint8* dst_u, uint8* dst_v, int width); 
    742 void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, int src_stride_abgr, 
    743                            uint8* dst_u, uint8* dst_v, int width); 
    744 void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, int src_stride_rgba, 
    745                            uint8* dst_u, uint8* dst_v, int width); 
    746 void ARGBToUV444Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 
    747                              int width); 
    748 void ARGBToUV411Row_Any_NEON(const uint8* src_argb, uint8* dst_u, uint8* dst_v, 
    749                              int width); 
    750 void ARGBToUVRow_Any_NEON(const uint8* src_argb, int src_stride_argb, 
    751                           uint8* dst_u, uint8* dst_v, int width); 
    752 void ARGBToUVJRow_Any_NEON(const uint8* src_argb, int src_stride_argb, 
    753                            uint8* dst_u, uint8* dst_v, int width); 
    754 void BGRAToUVRow_Any_NEON(const uint8* src_bgra, int src_stride_bgra, 
    755                           uint8* dst_u, uint8* dst_v, int width); 
    756 void ABGRToUVRow_Any_NEON(const uint8* src_abgr, int src_stride_abgr, 
    757                           uint8* dst_u, uint8* dst_v, int width); 
    758 void RGBAToUVRow_Any_NEON(const uint8* src_rgba, int src_stride_rgba, 
    759                           uint8* dst_u, uint8* dst_v, int width); 
    760 void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, int src_stride_rgb24, 
    761                            uint8* dst_u, uint8* dst_v, int width); 
    762 void RAWToUVRow_Any_NEON(const uint8* src_raw, int src_stride_raw, 
    763                          uint8* dst_u, uint8* dst_v, int width); 
    764 void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, int src_stride_rgb565, 
    765                             uint8* dst_u, uint8* dst_v, int width); 
     1036void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, 
     1037                             uint8* dst_y, 
     1038                             int width); 
     1039void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 
     1040void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width); 
     1041void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); 
     1042void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); 
     1043void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, 
     1044                             uint8* dst_y, 
     1045                             int width); 
     1046void BGRAToYRow_Any_MSA(const uint8* src_bgra, uint8* dst_y, int width); 
     1047void ABGRToYRow_Any_MSA(const uint8* src_abgr, uint8* dst_y, int width); 
     1048void RGBAToYRow_Any_MSA(const uint8* src_rgba, uint8* dst_y, int width); 
     1049void ARGBToYJRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); 
     1050void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); 
     1051void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width); 
     1052void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width); 
     1053void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width); 
     1054void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width); 
     1055 
     1056void ARGBToUVRow_AVX2(const uint8* src_argb, 
     1057                      int src_stride_argb, 
     1058                      uint8* dst_u, 
     1059                      uint8* dst_v, 
     1060                      int width); 
     1061void ARGBToUVJRow_AVX2(const uint8* src_argb, 
     1062                       int src_stride_argb, 
     1063                       uint8* dst_u, 
     1064                       uint8* dst_v, 
     1065                       int width); 
     1066void ARGBToUVRow_SSSE3(const uint8* src_argb, 
     1067                       int src_stride_argb, 
     1068                       uint8* dst_u, 
     1069                       uint8* dst_v, 
     1070                       int width); 
     1071void ARGBToUVJRow_SSSE3(const uint8* src_argb, 
     1072                        int src_stride_argb, 
     1073                        uint8* dst_u, 
     1074                        uint8* dst_v, 
     1075                        int width); 
     1076void BGRAToUVRow_SSSE3(const uint8* src_bgra, 
     1077                       int src_stride_bgra, 
     1078                       uint8* dst_u, 
     1079                       uint8* dst_v, 
     1080                       int width); 
     1081void ABGRToUVRow_SSSE3(const uint8* src_abgr, 
     1082                       int src_stride_abgr, 
     1083                       uint8* dst_u, 
     1084                       uint8* dst_v, 
     1085                       int width); 
     1086void RGBAToUVRow_SSSE3(const uint8* src_rgba, 
     1087                       int src_stride_rgba, 
     1088                       uint8* dst_u, 
     1089                       uint8* dst_v, 
     1090                       int width); 
     1091void ARGBToUVRow_Any_AVX2(const uint8* src_argb, 
     1092                          int src_stride_argb, 
     1093                          uint8* dst_u, 
     1094                          uint8* dst_v, 
     1095                          int width); 
     1096void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, 
     1097                           int src_stride_argb, 
     1098                           uint8* dst_u, 
     1099                           uint8* dst_v, 
     1100                           int width); 
     1101void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, 
     1102                           int src_stride_argb, 
     1103                           uint8* dst_u, 
     1104                           uint8* dst_v, 
     1105                           int width); 
     1106void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, 
     1107                            int src_stride_argb, 
     1108                            uint8* dst_u, 
     1109                            uint8* dst_v, 
     1110                            int width); 
     1111void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, 
     1112                           int src_stride_bgra, 
     1113                           uint8* dst_u, 
     1114                           uint8* dst_v, 
     1115                           int width); 
     1116void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, 
     1117                           int src_stride_abgr, 
     1118                           uint8* dst_u, 
     1119                           uint8* dst_v, 
     1120                           int width); 
     1121void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, 
     1122                           int src_stride_rgba, 
     1123                           uint8* dst_u, 
     1124                           uint8* dst_v, 
     1125                           int width); 
     1126void ARGBToUV444Row_Any_NEON(const uint8* src_argb, 
     1127                             uint8* dst_u, 
     1128                             uint8* dst_v, 
     1129                             int width); 
     1130void ARGBToUVRow_Any_NEON(const uint8* src_argb, 
     1131                          int src_stride_argb, 
     1132                          uint8* dst_u, 
     1133                          uint8* dst_v, 
     1134                          int width); 
     1135void ARGBToUV444Row_Any_MSA(const uint8* src_argb, 
     1136                            uint8* dst_u, 
     1137                            uint8* dst_v, 
     1138                            int width); 
     1139void ARGBToUVRow_Any_MSA(const uint8* src_argb, 
     1140                         int src_stride_argb, 
     1141                         uint8* dst_u, 
     1142                         uint8* dst_v, 
     1143                         int width); 
     1144void ARGBToUVJRow_Any_NEON(const uint8* src_argb, 
     1145                           int src_stride_argb, 
     1146                           uint8* dst_u, 
     1147                           uint8* dst_v, 
     1148                           int width); 
     1149void BGRAToUVRow_Any_NEON(const uint8* src_bgra, 
     1150                          int src_stride_bgra, 
     1151                          uint8* dst_u, 
     1152                          uint8* dst_v, 
     1153                          int width); 
     1154void ABGRToUVRow_Any_NEON(const uint8* src_abgr, 
     1155                          int src_stride_abgr, 
     1156                          uint8* dst_u, 
     1157                          uint8* dst_v, 
     1158                          int width); 
     1159void RGBAToUVRow_Any_NEON(const uint8* src_rgba, 
     1160                          int src_stride_rgba, 
     1161                          uint8* dst_u, 
     1162                          uint8* dst_v, 
     1163                          int width); 
     1164void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, 
     1165                           int src_stride_rgb24, 
     1166                           uint8* dst_u, 
     1167                           uint8* dst_v, 
     1168                           int width); 
     1169void RAWToUVRow_Any_NEON(const uint8* src_raw, 
     1170                         int src_stride_raw, 
     1171                         uint8* dst_u, 
     1172                         uint8* dst_v, 
     1173                         int width); 
     1174void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, 
     1175                            int src_stride_rgb565, 
     1176                            uint8* dst_u, 
     1177                            uint8* dst_v, 
     1178                            int width); 
    7661179void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, 
    7671180                              int src_stride_argb1555, 
    768                               uint8* dst_u, uint8* dst_v, int width); 
     1181                              uint8* dst_u, 
     1182                              uint8* dst_v, 
     1183                              int width); 
    7691184void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, 
    7701185                              int src_stride_argb4444, 
    771                               uint8* dst_u, uint8* dst_v, int width); 
    772 void ARGBToUVRow_C(const uint8* src_argb, int src_stride_argb, 
    773                    uint8* dst_u, uint8* dst_v, int width); 
    774 void ARGBToUVJRow_C(const uint8* src_argb, int src_stride_argb, 
    775                     uint8* dst_u, uint8* dst_v, int width); 
    776 void BGRAToUVRow_C(const uint8* src_bgra, int src_stride_bgra, 
    777                    uint8* dst_u, uint8* dst_v, int width); 
    778 void ABGRToUVRow_C(const uint8* src_abgr, int src_stride_abgr, 
    779                    uint8* dst_u, uint8* dst_v, int width); 
    780 void RGBAToUVRow_C(const uint8* src_rgba, int src_stride_rgba, 
    781                    uint8* dst_u, uint8* dst_v, int width); 
    782 void RGB24ToUVRow_C(const uint8* src_rgb24, int src_stride_rgb24, 
    783                     uint8* dst_u, uint8* dst_v, int width); 
    784 void RAWToUVRow_C(const uint8* src_raw, int src_stride_raw, 
    785                   uint8* dst_u, uint8* dst_v, int width); 
    786 void RGB565ToUVRow_C(const uint8* src_rgb565, int src_stride_rgb565, 
    787                      uint8* dst_u, uint8* dst_v, int width); 
    788 void ARGB1555ToUVRow_C(const uint8* src_argb1555, int src_stride_argb1555, 
    789                        uint8* dst_u, uint8* dst_v, int width); 
    790 void ARGB4444ToUVRow_C(const uint8* src_argb4444, int src_stride_argb4444, 
    791                        uint8* dst_u, uint8* dst_v, int width); 
     1186                              uint8* dst_u, 
     1187                              uint8* dst_v, 
     1188                              int width); 
     1189void ARGBToUVJRow_Any_MSA(const uint8* src_argb, 
     1190                          int src_stride_argb, 
     1191                          uint8* dst_u, 
     1192                          uint8* dst_v, 
     1193                          int width); 
     1194void BGRAToUVRow_Any_MSA(const uint8* src_bgra, 
     1195                         int src_stride_bgra, 
     1196                         uint8* dst_u, 
     1197                         uint8* dst_v, 
     1198                         int width); 
     1199void ABGRToUVRow_Any_MSA(const uint8* src_abgr, 
     1200                         int src_stride_abgr, 
     1201                         uint8* dst_u, 
     1202                         uint8* dst_v, 
     1203                         int width); 
     1204void RGBAToUVRow_Any_MSA(const uint8* src_rgba, 
     1205                         int src_stride_rgba, 
     1206                         uint8* dst_u, 
     1207                         uint8* dst_v, 
     1208                         int width); 
     1209void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24, 
     1210                          int src_stride_rgb24, 
     1211                          uint8* dst_u, 
     1212                          uint8* dst_v, 
     1213                          int width); 
     1214void RAWToUVRow_Any_MSA(const uint8* src_raw, 
     1215                        int src_stride_raw, 
     1216                        uint8* dst_u, 
     1217                        uint8* dst_v, 
     1218                        int width); 
     1219void RGB565ToUVRow_Any_MSA(const uint8* src_rgb565, 
     1220                           int src_stride_rgb565, 
     1221                           uint8* dst_u, 
     1222                           uint8* dst_v, 
     1223                           int width); 
     1224void ARGB1555ToUVRow_Any_MSA(const uint8* src_argb1555, 
     1225                             int src_stride_argb1555, 
     1226                             uint8* dst_u, 
     1227                             uint8* dst_v, 
     1228                             int width); 
     1229void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra, 
     1230                           int src_stride_bgra, 
     1231                           uint8* dst_u, 
     1232                           uint8* dst_v, 
     1233                           int width); 
     1234void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr, 
     1235                           int src_stride_abgr, 
     1236                           uint8* dst_u, 
     1237                           uint8* dst_v, 
     1238                           int width); 
     1239void RGBAToUVRow_Any_DSPR2(const uint8* src_rgba, 
     1240                           int src_stride_rgba, 
     1241                           uint8* dst_u, 
     1242                           uint8* dst_v, 
     1243                           int width); 
     1244void ARGBToUVRow_Any_DSPR2(const uint8* src_argb, 
     1245                           int src_stride_argb, 
     1246                           uint8* dst_u, 
     1247                           uint8* dst_v, 
     1248                           int width); 
     1249void ARGBToUVRow_C(const uint8* src_argb, 
     1250                   int src_stride_argb, 
     1251                   uint8* dst_u, 
     1252                   uint8* dst_v, 
     1253                   int width); 
     1254void ARGBToUVJRow_C(const uint8* src_argb, 
     1255                    int src_stride_argb, 
     1256                    uint8* dst_u, 
     1257                    uint8* dst_v, 
     1258                    int width); 
     1259void ARGBToUVRow_C(const uint8* src_argb, 
     1260                   int src_stride_argb, 
     1261                   uint8* dst_u, 
     1262                   uint8* dst_v, 
     1263                   int width); 
     1264void ARGBToUVJRow_C(const uint8* src_argb, 
     1265                    int src_stride_argb, 
     1266                    uint8* dst_u, 
     1267                    uint8* dst_v, 
     1268                    int width); 
     1269void BGRAToUVRow_C(const uint8* src_bgra, 
     1270                   int src_stride_bgra, 
     1271                   uint8* dst_u, 
     1272                   uint8* dst_v, 
     1273                   int width); 
     1274void ABGRToUVRow_C(const uint8* src_abgr, 
     1275                   int src_stride_abgr, 
     1276                   uint8* dst_u, 
     1277                   uint8* dst_v, 
     1278                   int width); 
     1279void RGBAToUVRow_C(const uint8* src_rgba, 
     1280                   int src_stride_rgba, 
     1281                   uint8* dst_u, 
     1282                   uint8* dst_v, 
     1283                   int width); 
     1284void RGB24ToUVRow_C(const uint8* src_rgb24, 
     1285                    int src_stride_rgb24, 
     1286                    uint8* dst_u, 
     1287                    uint8* dst_v, 
     1288                    int width); 
     1289void RAWToUVRow_C(const uint8* src_raw, 
     1290                  int src_stride_raw, 
     1291                  uint8* dst_u, 
     1292                  uint8* dst_v, 
     1293                  int width); 
     1294void RGB565ToUVRow_C(const uint8* src_rgb565, 
     1295                     int src_stride_rgb565, 
     1296                     uint8* dst_u, 
     1297                     uint8* dst_v, 
     1298                     int width); 
     1299void ARGB1555ToUVRow_C(const uint8* src_argb1555, 
     1300                       int src_stride_argb1555, 
     1301                       uint8* dst_u, 
     1302                       uint8* dst_v, 
     1303                       int width); 
     1304void ARGB4444ToUVRow_C(const uint8* src_argb4444, 
     1305                       int src_stride_argb4444, 
     1306                       uint8* dst_u, 
     1307                       uint8* dst_v, 
     1308                       int width); 
    7921309 
    7931310void ARGBToUV444Row_SSSE3(const uint8* src_argb, 
    794                           uint8* dst_u, uint8* dst_v, int width); 
     1311                          uint8* dst_u, 
     1312                          uint8* dst_v, 
     1313                          int width); 
    7951314void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb, 
    796                               uint8* dst_u, uint8* dst_v, int width); 
     1315                              uint8* dst_u, 
     1316                              uint8* dst_v, 
     1317                              int width); 
    7971318 
    7981319void ARGBToUV444Row_C(const uint8* src_argb, 
    799                       uint8* dst_u, uint8* dst_v, int width); 
    800 void ARGBToUV411Row_C(const uint8* src_argb, 
    801                       uint8* dst_u, uint8* dst_v, int width); 
     1320                      uint8* dst_u, 
     1321                      uint8* dst_v, 
     1322                      int width); 
    8021323 
    8031324void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); 
     
    8051326void MirrorRow_NEON(const uint8* src, uint8* dst, int width); 
    8061327void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width); 
     1328void MirrorRow_MSA(const uint8* src, uint8* dst, int width); 
    8071329void MirrorRow_C(const uint8* src, uint8* dst, int width); 
    8081330void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); 
     
    8101332void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); 
    8111333void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); 
    812  
    813 void MirrorUVRow_SSSE3(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
    814                        int width); 
    815 void MirrorUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
     1334void MirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); 
     1335 
     1336void MirrorUVRow_SSSE3(const uint8* src_uv, 
     1337                       uint8* dst_u, 
     1338                       uint8* dst_v, 
     1339                       int width); 
     1340void MirrorUVRow_NEON(const uint8* src_uv, 
     1341                      uint8* dst_u, 
     1342                      uint8* dst_v, 
    8161343                      int width); 
    817 void MirrorUVRow_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
     1344void MirrorUVRow_DSPR2(const uint8* src_uv, 
     1345                       uint8* dst_u, 
     1346                       uint8* dst_v, 
    8181347                       int width); 
    8191348void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); 
     
    8221351void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width); 
    8231352void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width); 
     1353void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width); 
    8241354void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width); 
    8251355void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); 
    8261356void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); 
    8271357void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); 
     1358void ARGBMirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); 
    8281359 
    8291360void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); 
    830 void SplitUVRow_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
     1361void SplitUVRow_SSE2(const uint8* src_uv, 
     1362                     uint8* dst_u, 
     1363                     uint8* dst_v, 
    8311364                     int width); 
    832 void SplitUVRow_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
     1365void SplitUVRow_AVX2(const uint8* src_uv, 
     1366                     uint8* dst_u, 
     1367                     uint8* dst_v, 
    8331368                     int width); 
    834 void SplitUVRow_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
     1369void SplitUVRow_NEON(const uint8* src_uv, 
     1370                     uint8* dst_u, 
     1371                     uint8* dst_v, 
    8351372                     int width); 
    836 void SplitUVRow_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
     1373void SplitUVRow_DSPR2(const uint8* src_uv, 
     1374                      uint8* dst_u, 
     1375                      uint8* dst_v, 
    8371376                      int width); 
    838 void SplitUVRow_Any_SSE2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
    839                          int width); 
    840 void SplitUVRow_Any_AVX2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
    841                          int width); 
    842 void SplitUVRow_Any_NEON(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
    843                          int width); 
    844 void SplitUVRow_Any_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v, 
    845                           int width); 
    846  
    847 void MergeUVRow_C(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
     1377void SplitUVRow_Any_SSE2(const uint8* src_uv, 
     1378                         uint8* dst_u, 
     1379                         uint8* dst_v, 
     1380                         int width); 
     1381void SplitUVRow_Any_AVX2(const uint8* src_uv, 
     1382                         uint8* dst_u, 
     1383                         uint8* dst_v, 
     1384                         int width); 
     1385void SplitUVRow_Any_NEON(const uint8* src_uv, 
     1386                         uint8* dst_u, 
     1387                         uint8* dst_v, 
     1388                         int width); 
     1389void SplitUVRow_Any_DSPR2(const uint8* src_uv, 
     1390                          uint8* dst_u, 
     1391                          uint8* dst_v, 
     1392                          int width); 
     1393 
     1394void MergeUVRow_C(const uint8* src_u, 
     1395                  const uint8* src_v, 
     1396                  uint8* dst_uv, 
    8481397                  int width); 
    849 void MergeUVRow_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
     1398void MergeUVRow_SSE2(const uint8* src_u, 
     1399                     const uint8* src_v, 
     1400                     uint8* dst_uv, 
    8501401                     int width); 
    851 void MergeUVRow_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
     1402void MergeUVRow_AVX2(const uint8* src_u, 
     1403                     const uint8* src_v, 
     1404                     uint8* dst_uv, 
    8521405                     int width); 
    853 void MergeUVRow_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
     1406void MergeUVRow_NEON(const uint8* src_u, 
     1407                     const uint8* src_v, 
     1408                     uint8* dst_uv, 
    8541409                     int width); 
    855 void MergeUVRow_Any_SSE2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
    856                          int width); 
    857 void MergeUVRow_Any_AVX2(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
    858                          int width); 
    859 void MergeUVRow_Any_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv, 
    860                          int width); 
     1410void MergeUVRow_MSA(const uint8* src_u, 
     1411                    const uint8* src_v, 
     1412                    uint8* dst_uv, 
     1413                    int width); 
     1414void MergeUVRow_Any_SSE2(const uint8* src_u, 
     1415                         const uint8* src_v, 
     1416                         uint8* dst_uv, 
     1417                         int width); 
     1418void MergeUVRow_Any_AVX2(const uint8* src_u, 
     1419                         const uint8* src_v, 
     1420                         uint8* dst_uv, 
     1421                         int width); 
     1422void MergeUVRow_Any_NEON(const uint8* src_u, 
     1423                         const uint8* src_v, 
     1424                         uint8* dst_uv, 
     1425                         int width); 
     1426void MergeUVRow_Any_MSA(const uint8* src_u, 
     1427                        const uint8* src_v, 
     1428                        uint8* dst_uv, 
     1429                        int width); 
    8611430 
    8621431void CopyRow_SSE2(const uint8* src, uint8* dst, int count); 
     
    8751444void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); 
    8761445void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); 
    877 void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, 
     1446void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, 
     1447                               uint8* dst_argb, 
    8781448                               int width); 
    879 void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, 
     1449void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, 
     1450                               uint8* dst_argb, 
    8801451                               int width); 
    8811452 
    8821453void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width); 
    8831454void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width); 
     1455void ARGBExtractAlphaRow_AVX2(const uint8* src_argb, uint8* dst_a, int width); 
    8841456void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width); 
    885 void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, uint8* dst_a, 
     1457void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, 
     1458                                  uint8* dst_a, 
    8861459                                  int width); 
    887 void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, uint8* dst_a, 
     1460void ARGBExtractAlphaRow_Any_AVX2(const uint8* src_argb, 
     1461                                  uint8* dst_a, 
     1462                                  int width); 
     1463void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, 
     1464                                  uint8* dst_a, 
    8881465                                  int width); 
    8891466 
     
    8911468void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); 
    8921469void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); 
    893 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, 
     1470void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, 
     1471                                  uint8* dst_argb, 
    8941472                                  int width); 
    895 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, 
     1473void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, 
     1474                                  uint8* dst_argb, 
    8961475                                  int width); 
    8971476 
     
    9071486void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count); 
    9081487void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count); 
     1488void ARGBSetRow_MSA(uint8* dst_argb, uint32 v32, int count); 
     1489void ARGBSetRow_Any_MSA(uint8* dst_argb, uint32 v32, int count); 
    9091490 
    9101491// ARGBShufflers for BGRAToARGB etc. 
    911 void ARGBShuffleRow_C(const uint8* src_argb, uint8* dst_argb, 
    912                       const uint8* shuffler, int width); 
    913 void ARGBShuffleRow_SSE2(const uint8* src_argb, uint8* dst_argb, 
    914                          const uint8* shuffler, int width); 
    915 void ARGBShuffleRow_SSSE3(const uint8* src_argb, uint8* dst_argb, 
    916                           const uint8* shuffler, int width); 
    917 void ARGBShuffleRow_AVX2(const uint8* src_argb, uint8* dst_argb, 
    918                          const uint8* shuffler, int width); 
    919 void ARGBShuffleRow_NEON(const uint8* src_argb, uint8* dst_argb, 
    920                          const uint8* shuffler, int width); 
    921 void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, uint8* dst_argb, 
    922                              const uint8* shuffler, int width); 
    923 void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, uint8* dst_argb, 
    924                               const uint8* shuffler, int width); 
    925 void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, uint8* dst_argb, 
    926                              const uint8* shuffler, int width); 
    927 void ARGBShuffleRow_Any_NEON(const uint8* src_argb, uint8* dst_argb, 
    928                              const uint8* shuffler, int width); 
     1492void ARGBShuffleRow_C(const uint8* src_argb, 
     1493                      uint8* dst_argb, 
     1494                      const uint8* shuffler, 
     1495                      int width); 
     1496void ARGBShuffleRow_SSE2(const uint8* src_argb, 
     1497                         uint8* dst_argb, 
     1498                         const uint8* shuffler, 
     1499                         int width); 
     1500void ARGBShuffleRow_SSSE3(const uint8* src_argb, 
     1501                          uint8* dst_argb, 
     1502                          const uint8* shuffler, 
     1503                          int width); 
     1504void ARGBShuffleRow_AVX2(const uint8* src_argb, 
     1505                         uint8* dst_argb, 
     1506                         const uint8* shuffler, 
     1507                         int width); 
     1508void ARGBShuffleRow_NEON(const uint8* src_argb, 
     1509                         uint8* dst_argb, 
     1510                         const uint8* shuffler, 
     1511                         int width); 
     1512void ARGBShuffleRow_MSA(const uint8* src_argb, 
     1513                        uint8* dst_argb, 
     1514                        const uint8* shuffler, 
     1515                        int width); 
     1516void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, 
     1517                             uint8* dst_argb, 
     1518                             const uint8* shuffler, 
     1519                             int width); 
     1520void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, 
     1521                              uint8* dst_argb, 
     1522                              const uint8* shuffler, 
     1523                              int width); 
     1524void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, 
     1525                             uint8* dst_argb, 
     1526                             const uint8* shuffler, 
     1527                             int width); 
     1528void ARGBShuffleRow_Any_NEON(const uint8* src_argb, 
     1529                             uint8* dst_argb, 
     1530                             const uint8* shuffler, 
     1531                             int width); 
     1532void ARGBShuffleRow_Any_MSA(const uint8* src_argb, 
     1533                            uint8* dst_argb, 
     1534                            const uint8* shuffler, 
     1535                            int width); 
    9291536 
    9301537void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width); 
     
    9321539void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); 
    9331540void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width); 
    934 void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, uint8* dst_argb, 
    935                             int width); 
    936 void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, uint8* dst_argb, 
     1541void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, 
     1542                            uint8* dst_argb, 
     1543                            int width); 
     1544void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, 
     1545                            uint8* dst_argb, 
    9371546                            int width); 
    9381547void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width); 
    939 void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, uint8* dst_argb, 
    940                             int width); 
    941 void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, uint8* dst_argb, 
     1548void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, 
     1549                            uint8* dst_argb, 
     1550                            int width); 
     1551void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, 
     1552                            uint8* dst_argb, 
    9421553                            int width); 
    9431554 
    9441555void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width); 
     1556void RGB24ToARGBRow_MSA(const uint8* src_rgb24, uint8* dst_argb, int width); 
    9451557void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width); 
     1558void RAWToARGBRow_MSA(const uint8* src_raw, uint8* dst_argb, int width); 
    9461559void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); 
     1560void RAWToRGB24Row_MSA(const uint8* src_raw, uint8* dst_rgb24, int width); 
    9471561void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width); 
    948 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, uint8* dst_argb, 
    949                             int width); 
    950 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, uint8* dst_argb, 
    951                             int width); 
     1562void RGB565ToARGBRow_MSA(const uint8* src_rgb565, uint8* dst_argb, int width); 
     1563void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, 
     1564                            uint8* dst_argb, 
     1565                            int width); 
     1566void ARGB1555ToARGBRow_MSA(const uint8* src_argb1555, 
     1567                           uint8* dst_argb, 
     1568                           int width); 
     1569void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, 
     1570                            uint8* dst_argb, 
     1571                            int width); 
     1572void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width); 
     1573void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width); 
     1574void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width); 
     1575void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555, 
     1576                             uint8* dst_argb, 
     1577                             int width); 
     1578void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444, 
     1579                             uint8* dst_argb, 
     1580                             int width); 
     1581void ARGB4444ToARGBRow_MSA(const uint8* src_argb4444, 
     1582                           uint8* dst_argb, 
     1583                           int width); 
    9521584void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width); 
    9531585void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width); 
     
    9561588void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); 
    9571589void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); 
    958 void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_argb, 
     1590void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, 
     1591                              uint8* dst_argb, 
    9591592                              int width); 
    9601593void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); 
    9611594void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); 
    9621595 
    963 void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, uint8* dst_argb, 
     1596void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, 
     1597                              uint8* dst_argb, 
    9641598                              int width); 
    965 void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, uint8* dst_argb, 
     1599void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, 
     1600                                uint8* dst_argb, 
    9661601                                int width); 
    967 void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, uint8* dst_argb, 
     1602void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, 
     1603                                uint8* dst_argb, 
    9681604                                int width); 
    969 void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, uint8* dst_argb, 
     1605void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, 
     1606                              uint8* dst_argb, 
    9701607                              int width); 
    971 void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, uint8* dst_argb, 
     1608void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, 
     1609                                uint8* dst_argb, 
    9721610                                int width); 
    973 void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, uint8* dst_argb, 
     1611void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, 
     1612                                uint8* dst_argb, 
    9741613                                int width); 
    9751614 
    976 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, uint8* dst_argb, 
    977                              int width); 
     1615void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, 
     1616                             uint8* dst_argb, 
     1617                             int width); 
     1618void RGB24ToARGBRow_Any_MSA(const uint8* src_rgb24, uint8* dst_argb, int width); 
    9781619void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width); 
     1620void RAWToARGBRow_Any_MSA(const uint8* src_raw, uint8* dst_argb, int width); 
    9791621void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); 
    980 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, uint8* dst_argb, 
     1622void RAWToRGB24Row_Any_MSA(const uint8* src_raw, uint8* dst_rgb24, int width); 
     1623void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, 
     1624                              uint8* dst_argb, 
    9811625                              int width); 
    982 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, uint8* dst_argb, 
     1626void RGB565ToARGBRow_Any_MSA(const uint8* src_rgb565, 
     1627                             uint8* dst_argb, 
     1628