Home | History | Annotate | Download | only in libyuv
      1 /*
      2  *  Copyright 2011 The LibYuv Project Authors. All rights reserved.
      3  *
      4  *  Use of this source code is governed by a BSD-style license
      5  *  that can be found in the LICENSE file in the root of the source
      6  *  tree. An additional intellectual property rights grant can be found
      7  *  in the file PATENTS. All contributing project authors may
      8  *  be found in the AUTHORS file in the root of the source tree.
      9  */
     10 
     11 #ifndef INCLUDE_LIBYUV_ROW_H_
     12 #define INCLUDE_LIBYUV_ROW_H_
     13 
     14 #include <stdlib.h>  // For malloc.
     15 
     16 #include "libyuv/basic_types.h"
     17 
     18 #ifdef __cplusplus
     19 namespace libyuv {
     20 extern "C" {
     21 #endif
     22 
     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 */
     28 
     29 #define free_aligned_buffer_64(var) \
     30   free(var##_mem);                  \
     31   var = 0
     32 
     33 #if defined(__pnacl__) || defined(__CLR_VER) || \
     34     (defined(__i386__) && !defined(__SSE2__))
     35 #define LIBYUV_DISABLE_X86
     36 #endif
     37 // MemorySanitizer does not support assembly code yet. http://crbug.com/344505
     38 #if defined(__has_feature)
     39 #if __has_feature(memory_sanitizer)
     40 #define LIBYUV_DISABLE_X86
     41 #endif
     42 #endif
     43 // True if compiling for SSSE3 as a requirement.
     44 #if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3))
     45 #define LIBYUV_SSSE3_ONLY
     46 #endif
     47 
     48 #if defined(__native_client__)
     49 #define LIBYUV_DISABLE_NEON
     50 #endif
     51 // clang >= 3.5.0 required for Arm64.
     52 #if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
     53 #if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
     54 #define LIBYUV_DISABLE_NEON
     55 #endif  // clang >= 3.5
     56 #endif  // __clang__
     57 
     58 // GCC >= 4.7.0 required for AVX2.
     59 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
     60 #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
     61 #define GCC_HAS_AVX2 1
     62 #endif  // GNUC >= 4.7
     63 #endif  // __GNUC__
     64 
     65 // clang >= 3.4.0 required for AVX2.
     66 #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
     67 #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
     68 #define CLANG_HAS_AVX2 1
     69 #endif  // clang >= 3.4
     70 #endif  // __clang__
     71 
     72 // Visual C 2012 required for AVX2.
     73 #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \
     74     _MSC_VER >= 1700
     75 #define VISUALC_HAS_AVX2 1
     76 #endif  // VisualStudio >= 2012
     77 
     78 // The following are available on all x86 platforms:
     79 #if !defined(LIBYUV_DISABLE_X86) && \
     80     (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
     81 // Conversions:
     82 #define HAS_ABGRTOUVROW_SSSE3
     83 #define HAS_ABGRTOYROW_SSSE3
     84 #define HAS_ARGB1555TOARGBROW_SSE2
     85 #define HAS_ARGB4444TOARGBROW_SSE2
     86 #define HAS_ARGBEXTRACTALPHAROW_SSE2
     87 #define HAS_ARGBSETROW_X86
     88 #define HAS_ARGBSHUFFLEROW_SSE2
     89 #define HAS_ARGBSHUFFLEROW_SSSE3
     90 #define HAS_ARGBTOARGB1555ROW_SSE2
     91 #define HAS_ARGBTOARGB4444ROW_SSE2
     92 #define HAS_ARGBTORAWROW_SSSE3
     93 #define HAS_ARGBTORGB24ROW_SSSE3
     94 #define HAS_ARGBTORGB565DITHERROW_SSE2
     95 #define HAS_ARGBTORGB565ROW_SSE2
     96 #define HAS_ARGBTOUV444ROW_SSSE3
     97 #define HAS_ARGBTOUVJROW_SSSE3
     98 #define HAS_ARGBTOUVROW_SSSE3
     99 #define HAS_ARGBTOYJROW_SSSE3
    100 #define HAS_ARGBTOYROW_SSSE3
    101 #define HAS_BGRATOUVROW_SSSE3
    102 #define HAS_BGRATOYROW_SSSE3
    103 #define HAS_COPYROW_ERMS
    104 #define HAS_COPYROW_SSE2
    105 #define HAS_H422TOARGBROW_SSSE3
    106 #define HAS_HALFFLOATROW_SSE2
    107 #define HAS_I400TOARGBROW_SSE2
    108 #define HAS_I422TOARGB1555ROW_SSSE3
    109 #define HAS_I422TOARGB4444ROW_SSSE3
    110 #define HAS_I422TOARGBROW_SSSE3
    111 #define HAS_I422TORGB24ROW_SSSE3
    112 #define HAS_I422TORGB565ROW_SSSE3
    113 #define HAS_I422TORGBAROW_SSSE3
    114 #define HAS_I422TOUYVYROW_SSE2
    115 #define HAS_I422TOYUY2ROW_SSE2
    116 #define HAS_I444TOARGBROW_SSSE3
    117 #define HAS_J400TOARGBROW_SSE2
    118 #define HAS_J422TOARGBROW_SSSE3
    119 #define HAS_MERGEUVROW_SSE2
    120 #define HAS_MIRRORROW_SSSE3
    121 #define HAS_MIRRORUVROW_SSSE3
    122 #define HAS_NV12TOARGBROW_SSSE3
    123 #define HAS_NV12TORGB565ROW_SSSE3
    124 #define HAS_NV21TOARGBROW_SSSE3
    125 #define HAS_RAWTOARGBROW_SSSE3
    126 #define HAS_RAWTORGB24ROW_SSSE3
    127 #define HAS_RAWTOYROW_SSSE3
    128 #define HAS_RGB24TOARGBROW_SSSE3
    129 #define HAS_RGB24TOYROW_SSSE3
    130 #define HAS_RGB565TOARGBROW_SSE2
    131 #define HAS_RGBATOUVROW_SSSE3
    132 #define HAS_RGBATOYROW_SSSE3
    133 #define HAS_SETROW_ERMS
    134 #define HAS_SETROW_X86
    135 #define HAS_SPLITUVROW_SSE2
    136 #define HAS_UYVYTOARGBROW_SSSE3
    137 #define HAS_UYVYTOUV422ROW_SSE2
    138 #define HAS_UYVYTOUVROW_SSE2
    139 #define HAS_UYVYTOYROW_SSE2
    140 #define HAS_YUY2TOARGBROW_SSSE3
    141 #define HAS_YUY2TOUV422ROW_SSE2
    142 #define HAS_YUY2TOUVROW_SSE2
    143 #define HAS_YUY2TOYROW_SSE2
    144 
    145 // Effects:
    146 #define HAS_ARGBADDROW_SSE2
    147 #define HAS_ARGBAFFINEROW_SSE2
    148 #define HAS_ARGBATTENUATEROW_SSSE3
    149 #define HAS_ARGBBLENDROW_SSSE3
    150 #define HAS_ARGBCOLORMATRIXROW_SSSE3
    151 #define HAS_ARGBCOLORTABLEROW_X86
    152 #define HAS_ARGBCOPYALPHAROW_SSE2
    153 #define HAS_ARGBCOPYYTOALPHAROW_SSE2
    154 #define HAS_ARGBGRAYROW_SSSE3
    155 #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
    156 #define HAS_ARGBMIRRORROW_SSE2
    157 #define HAS_ARGBMULTIPLYROW_SSE2
    158 #define HAS_ARGBPOLYNOMIALROW_SSE2
    159 #define HAS_ARGBQUANTIZEROW_SSE2
    160 #define HAS_ARGBSEPIAROW_SSSE3
    161 #define HAS_ARGBSHADEROW_SSE2
    162 #define HAS_ARGBSUBTRACTROW_SSE2
    163 #define HAS_ARGBUNATTENUATEROW_SSE2
    164 #define HAS_BLENDPLANEROW_SSSE3
    165 #define HAS_COMPUTECUMULATIVESUMROW_SSE2
    166 #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
    167 #define HAS_INTERPOLATEROW_SSSE3
    168 #define HAS_RGBCOLORTABLEROW_X86
    169 #define HAS_SOBELROW_SSE2
    170 #define HAS_SOBELTOPLANEROW_SSE2
    171 #define HAS_SOBELXROW_SSE2
    172 #define HAS_SOBELXYROW_SSE2
    173 #define HAS_SOBELYROW_SSE2
    174 
    175 // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
    176 // caveat: clangcl uses row_win.cc which works.
    177 #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
    178     defined(_MSC_VER)
    179 // TODO(fbarchard): fix build error on android_full_debug=1
    180 // https://code.google.com/p/libyuv/issues/detail?id=517
    181 #define HAS_I422ALPHATOARGBROW_SSSE3
    182 #endif
    183 #endif
    184 
    185 // The following are available on all x86 platforms, but
    186 // require VS2012, clang 3.4 or gcc 4.7.
    187 // The code supports NaCL but requires a new compiler and validator.
    188 #if !defined(LIBYUV_DISABLE_X86) &&                          \
    189     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
    190      defined(GCC_HAS_AVX2))
    191 #define HAS_ARGBCOPYALPHAROW_AVX2
    192 #define HAS_ARGBCOPYYTOALPHAROW_AVX2
    193 #define HAS_ARGBEXTRACTALPHAROW_AVX2
    194 #define HAS_ARGBMIRRORROW_AVX2
    195 #define HAS_ARGBPOLYNOMIALROW_AVX2
    196 #define HAS_ARGBSHUFFLEROW_AVX2
    197 #define HAS_ARGBTORGB565DITHERROW_AVX2
    198 #define HAS_ARGBTOUVJROW_AVX2
    199 #define HAS_ARGBTOUVROW_AVX2
    200 #define HAS_ARGBTOYJROW_AVX2
    201 #define HAS_ARGBTOYROW_AVX2
    202 #define HAS_COPYROW_AVX
    203 #define HAS_H422TOARGBROW_AVX2
    204 #define HAS_HALFFLOATROW_AVX2
    205 //  #define HAS_HALFFLOATROW_F16C  // Enable to test halffloat cast
    206 #define HAS_I400TOARGBROW_AVX2
    207 #define HAS_I422TOARGB1555ROW_AVX2
    208 #define HAS_I422TOARGB4444ROW_AVX2
    209 #define HAS_I422TOARGBROW_AVX2
    210 #define HAS_I422TORGB24ROW_AVX2
    211 #define HAS_I422TORGB565ROW_AVX2
    212 #define HAS_I422TORGBAROW_AVX2
    213 #define HAS_I444TOARGBROW_AVX2
    214 #define HAS_INTERPOLATEROW_AVX2
    215 #define HAS_J422TOARGBROW_AVX2
    216 #define HAS_MERGEUVROW_AVX2
    217 #define HAS_MIRRORROW_AVX2
    218 #define HAS_NV12TOARGBROW_AVX2
    219 #define HAS_NV12TORGB565ROW_AVX2
    220 #define HAS_NV21TOARGBROW_AVX2
    221 #define HAS_SPLITUVROW_AVX2
    222 #define HAS_UYVYTOARGBROW_AVX2
    223 #define HAS_UYVYTOUV422ROW_AVX2
    224 #define HAS_UYVYTOUVROW_AVX2
    225 #define HAS_UYVYTOYROW_AVX2
    226 #define HAS_YUY2TOARGBROW_AVX2
    227 #define HAS_YUY2TOUV422ROW_AVX2
    228 #define HAS_YUY2TOUVROW_AVX2
    229 #define HAS_YUY2TOYROW_AVX2
    230 
    231 // Effects:
    232 #define HAS_ARGBADDROW_AVX2
    233 #define HAS_ARGBATTENUATEROW_AVX2
    234 #define HAS_ARGBMULTIPLYROW_AVX2
    235 #define HAS_ARGBSUBTRACTROW_AVX2
    236 #define HAS_ARGBUNATTENUATEROW_AVX2
    237 #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
    245 #endif
    246 
    247 // The following are available for AVX2 Visual C and clangcl 32 bit:
    248 // TODO(fbarchard): Port to gcc.
    249 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
    250     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
    251 #define HAS_ARGB1555TOARGBROW_AVX2
    252 #define HAS_ARGB4444TOARGBROW_AVX2
    253 #define HAS_ARGBTOARGB1555ROW_AVX2
    254 #define HAS_ARGBTOARGB4444ROW_AVX2
    255 #define HAS_ARGBTORGB565ROW_AVX2
    256 #define HAS_J400TOARGBROW_AVX2
    257 #define HAS_RGB565TOARGBROW_AVX2
    258 #endif
    259 
    260 // The following are also available on x64 Visual C.
    261 #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \
    262     (!defined(__clang__) || defined(__SSSE3__))
    263 #define HAS_I422ALPHATOARGBROW_SSSE3
    264 #define HAS_I422TOARGBROW_SSSE3
    265 #endif
    266 
    267 // The following are available on Neon platforms:
    268 #if !defined(LIBYUV_DISABLE_NEON) && \
    269     (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON))
    270 #define HAS_ABGRTOUVROW_NEON
    271 #define HAS_ABGRTOYROW_NEON
    272 #define HAS_ARGB1555TOARGBROW_NEON
    273 #define HAS_ARGB1555TOUVROW_NEON
    274 #define HAS_ARGB1555TOYROW_NEON
    275 #define HAS_ARGB4444TOARGBROW_NEON
    276 #define HAS_ARGB4444TOUVROW_NEON
    277 #define HAS_ARGB4444TOYROW_NEON
    278 #define HAS_ARGBEXTRACTALPHAROW_NEON
    279 #define HAS_ARGBSETROW_NEON
    280 #define HAS_ARGBTOARGB1555ROW_NEON
    281 #define HAS_ARGBTOARGB4444ROW_NEON
    282 #define HAS_ARGBTORAWROW_NEON
    283 #define HAS_ARGBTORGB24ROW_NEON
    284 #define HAS_ARGBTORGB565DITHERROW_NEON
    285 #define HAS_ARGBTORGB565ROW_NEON
    286 #define HAS_ARGBTOUV444ROW_NEON
    287 #define HAS_ARGBTOUVJROW_NEON
    288 #define HAS_ARGBTOUVROW_NEON
    289 #define HAS_ARGBTOYJROW_NEON
    290 #define HAS_ARGBTOYROW_NEON
    291 #define HAS_BGRATOUVROW_NEON
    292 #define HAS_BGRATOYROW_NEON
    293 #define HAS_COPYROW_NEON
    294 #define HAS_HALFFLOATROW_NEON
    295 #define HAS_I400TOARGBROW_NEON
    296 #define HAS_I422ALPHATOARGBROW_NEON
    297 #define HAS_I422TOARGB1555ROW_NEON
    298 #define HAS_I422TOARGB4444ROW_NEON
    299 #define HAS_I422TOARGBROW_NEON
    300 #define HAS_I422TORGB24ROW_NEON
    301 #define HAS_I422TORGB565ROW_NEON
    302 #define HAS_I422TORGBAROW_NEON
    303 #define HAS_I422TOUYVYROW_NEON
    304 #define HAS_I422TOYUY2ROW_NEON
    305 #define HAS_I444TOARGBROW_NEON
    306 #define HAS_J400TOARGBROW_NEON
    307 #define HAS_MERGEUVROW_NEON
    308 #define HAS_MIRRORROW_NEON
    309 #define HAS_MIRRORUVROW_NEON
    310 #define HAS_NV12TOARGBROW_NEON
    311 #define HAS_NV12TORGB565ROW_NEON
    312 #define HAS_NV21TOARGBROW_NEON
    313 #define HAS_RAWTOARGBROW_NEON
    314 #define HAS_RAWTORGB24ROW_NEON
    315 #define HAS_RAWTOUVROW_NEON
    316 #define HAS_RAWTOYROW_NEON
    317 #define HAS_RGB24TOARGBROW_NEON
    318 #define HAS_RGB24TOUVROW_NEON
    319 #define HAS_RGB24TOYROW_NEON
    320 #define HAS_RGB565TOARGBROW_NEON
    321 #define HAS_RGB565TOUVROW_NEON
    322 #define HAS_RGB565TOYROW_NEON
    323 #define HAS_RGBATOUVROW_NEON
    324 #define HAS_RGBATOYROW_NEON
    325 #define HAS_SETROW_NEON
    326 #define HAS_SPLITUVROW_NEON
    327 #define HAS_UYVYTOARGBROW_NEON
    328 #define HAS_UYVYTOUV422ROW_NEON
    329 #define HAS_UYVYTOUVROW_NEON
    330 #define HAS_UYVYTOYROW_NEON
    331 #define HAS_YUY2TOARGBROW_NEON
    332 #define HAS_YUY2TOUV422ROW_NEON
    333 #define HAS_YUY2TOUVROW_NEON
    334 #define HAS_YUY2TOYROW_NEON
    335 
    336 // Effects:
    337 #define HAS_ARGBADDROW_NEON
    338 #define HAS_ARGBATTENUATEROW_NEON
    339 #define HAS_ARGBBLENDROW_NEON
    340 #define HAS_ARGBCOLORMATRIXROW_NEON
    341 #define HAS_ARGBGRAYROW_NEON
    342 #define HAS_ARGBMIRRORROW_NEON
    343 #define HAS_ARGBMULTIPLYROW_NEON
    344 #define HAS_ARGBQUANTIZEROW_NEON
    345 #define HAS_ARGBSEPIAROW_NEON
    346 #define HAS_ARGBSHADEROW_NEON
    347 #define HAS_ARGBSHUFFLEROW_NEON
    348 #define HAS_ARGBSUBTRACTROW_NEON
    349 #define HAS_INTERPOLATEROW_NEON
    350 #define HAS_SOBELROW_NEON
    351 #define HAS_SOBELTOPLANEROW_NEON
    352 #define HAS_SOBELXROW_NEON
    353 #define HAS_SOBELXYROW_NEON
    354 #define HAS_SOBELYROW_NEON
    355 #endif
    356 
    357 // The following are available on Mips platforms:
    358 #if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips__) && \
    359     (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6)
    360 #define HAS_COPYROW_MIPS
    361 #if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
    362 #define HAS_I422TOARGBROW_DSPR2
    363 #define HAS_INTERPOLATEROW_DSPR2
    364 #define HAS_MIRRORROW_DSPR2
    365 #define HAS_MIRRORUVROW_DSPR2
    366 #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
    384 #endif
    385 #endif
    386 
    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
    460 #define SIMD_ALIGNED(var) __declspec(align(16)) var
    461 #endif
    462 typedef __declspec(align(16)) int16 vec16[8];
    463 typedef __declspec(align(16)) int32 vec32[4];
    464 typedef __declspec(align(16)) int8 vec8[16];
    465 typedef __declspec(align(16)) uint16 uvec16[8];
    466 typedef __declspec(align(16)) uint32 uvec32[4];
    467 typedef __declspec(align(16)) uint8 uvec8[16];
    468 typedef __declspec(align(32)) int16 lvec16[16];
    469 typedef __declspec(align(32)) int32 lvec32[8];
    470 typedef __declspec(align(32)) int8 lvec8[32];
    471 typedef __declspec(align(32)) uint16 ulvec16[16];
    472 typedef __declspec(align(32)) uint32 ulvec32[8];
    473 typedef __declspec(align(32)) uint8 ulvec8[32];
    474 #elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__))
    475 // 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
    479 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
    480 #endif
    481 typedef int16 __attribute__((vector_size(16))) vec16;
    482 typedef int32 __attribute__((vector_size(16))) vec32;
    483 typedef int8 __attribute__((vector_size(16))) vec8;
    484 typedef uint16 __attribute__((vector_size(16))) uvec16;
    485 typedef uint32 __attribute__((vector_size(16))) uvec32;
    486 typedef uint8 __attribute__((vector_size(16))) uvec8;
    487 typedef int16 __attribute__((vector_size(32))) lvec16;
    488 typedef int32 __attribute__((vector_size(32))) lvec32;
    489 typedef int8 __attribute__((vector_size(32))) lvec8;
    490 typedef uint16 __attribute__((vector_size(32))) ulvec16;
    491 typedef uint32 __attribute__((vector_size(32))) ulvec32;
    492 typedef uint8 __attribute__((vector_size(32))) ulvec8;
    493 #else
    494 #define SIMD_ALIGNED(var) var
    495 typedef int16 vec16[8];
    496 typedef int32 vec32[4];
    497 typedef int8 vec8[16];
    498 typedef uint16 uvec16[8];
    499 typedef uint32 uvec32[4];
    500 typedef uint8 uvec8[16];
    501 typedef int16 lvec16[16];
    502 typedef int32 lvec32[8];
    503 typedef int8 lvec8[32];
    504 typedef uint16 ulvec16[16];
    505 typedef uint32 ulvec32[8];
    506 typedef uint8 ulvec8[32];
    507 #endif
    508 
    509 #if defined(__aarch64__)
    510 // This struct is for Arm64 color conversion.
    511 struct YuvConstants {
    512   uvec16 kUVToRB;
    513   uvec16 kUVToRB2;
    514   uvec16 kUVToG;
    515   uvec16 kUVToG2;
    516   vec16 kUVBiasBGR;
    517   vec32 kYToRgb;
    518 };
    519 #elif defined(__arm__)
    520 // This struct is for ArmV7 color conversion.
    521 struct YuvConstants {
    522   uvec8 kUVToRB;
    523   uvec8 kUVToG;
    524   vec16 kUVBiasBGR;
    525   vec32 kYToRgb;
    526 };
    527 #else
    528 // This struct is for Intel color conversion.
    529 struct YuvConstants {
    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];
    537 };
    538 
    539 // Offsets into YuvConstants structure
    540 #define KUVTOB 0
    541 #define KUVTOG 32
    542 #define KUVTOR 64
    543 #define KUVBIASB 96
    544 #define KUVBIASG 128
    545 #define KUVBIASR 160
    546 #define KYTORGB 192
    547 #endif
    548 
    549 // Conversion matrix for YUV to RGB
    550 extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants);  // BT.601
    551 extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants);  // JPeg
    552 extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants);  // BT.709
    553 
    554 // Conversion matrix for YVU to BGR
    555 extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants);  // BT.601
    556 extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants);  // JPeg
    557 extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants);  // BT.709
    558 
    559 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
    560 #define OMITFP
    561 #else
    562 #define OMITFP __attribute__((optimize("omit-frame-pointer")))
    563 #endif
    564 
    565 // NaCL macros for GCC x86 and x64.
    566 #if defined(__native_client__)
    567 #define LABELALIGN ".p2align 5\n"
    568 #else
    569 #define LABELALIGN
    570 #endif
    571 #if defined(__native_client__) && defined(__x86_64__)
    572 // r14 is used for MEMOP macros.
    573 #define NACL_R14 "r14",
    574 #define BUNDLELOCK ".bundle_lock\n"
    575 #define BUNDLEUNLOCK ".bundle_unlock\n"
    576 #define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")"
    577 #define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")"
    578 #define MEMLEA(offset, base) #offset "(%q" #base ")"
    579 #define MEMLEA3(offset, index, scale) #offset "(,%q" #index "," #scale ")"
    580 #define MEMLEA4(offset, base, index, scale) \
    581   #offset "(%q" #base ",%q" #index "," #scale ")"
    582 #define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15"
    583 #define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15"
    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
    604 #else  // defined(__native_client__) && defined(__x86_64__)
    605 #define NACL_R14
    606 #define BUNDLEALIGN
    607 #define MEMACCESS(base) "(%" #base ")"
    608 #define MEMACCESS2(offset, base) #offset "(%" #base ")"
    609 #define MEMLEA(offset, base) #offset "(%" #base ")"
    610 #define MEMLEA3(offset, index, scale) #offset "(,%" #index "," #scale ")"
    611 #define MEMLEA4(offset, base, index, scale) \
    612   #offset "(%" #base ",%" #index "," #scale ")"
    613 #define MEMMOVESTRING(s, d)
    614 #define MEMSTORESTRING(reg, d)
    615 #define MEMOPREG(opcode, offset, base, index, scale, reg) \
    616   #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n"
    617 #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
    618   #opcode " %%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n"
    619 #define MEMOPARG(opcode, offset, base, index, scale, arg) \
    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"
    624 #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \
    625   #op " $" #sel ",%%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n"
    626 #endif  // defined(__native_client__) && defined(__x86_64__)
    627 
    628 #if defined(__arm__) || defined(__aarch64__)
    629 #undef MEMACCESS
    630 #if defined(__native_client__)
    631 #define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n"
    632 #else
    633 #define MEMACCESS(base)
    634 #endif
    635 #endif
    636 
    637 // Intel Code Analizer markers.  Insert IACA_START IACA_END around code to be
    638 // measured and then run with iaca -64 libyuv_unittest.
    639 // IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within
    640 // inline assembly blocks.
    641 // example of iaca:
    642 // ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest
    643 
    644 #if defined(__x86_64__) || defined(__i386__)
    645 
    646 #define IACA_ASM_START  \
    647   ".byte 0x0F, 0x0B\n"  \
    648   " movl $111, %%ebx\n" \
    649   ".byte 0x64, 0x67, 0x90\n"
    650 
    651 #define IACA_ASM_END         \
    652   " movl $222, %%ebx\n"      \
    653   ".byte 0x64, 0x67, 0x90\n" \
    654   ".byte 0x0F, 0x0B\n"
    655 
    656 #define IACA_SSC_MARK(MARK_ID)                        \
    657   __asm__ __volatile__("\n\t  movl $" #MARK_ID        \
    658                        ", %%ebx"                      \
    659                        "\n\t  .byte 0x64, 0x67, 0x90" \
    660                        :                              \
    661                        :                              \
    662                        : "memory");
    663 
    664 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B");
    665 
    666 #else /* Visual C */
    667 #define IACA_UD_BYTES \
    668   { __asm _emit 0x0F __asm _emit 0x0B }
    669 
    670 #define IACA_SSC_MARK(x) \
    671   { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 }
    672 
    673 #define IACA_VC64_START __writegsbyte(111, 111);
    674 #define IACA_VC64_END __writegsbyte(222, 222);
    675 #endif
    676 
    677 #define IACA_START     \
    678   {                    \
    679     IACA_UD_BYTES      \
    680     IACA_SSC_MARK(111) \
    681   }
    682 #define IACA_END       \
    683   {                    \
    684     IACA_SSC_MARK(222) \
    685     IACA_UD_BYTES      \
    686   }
    687 
    688 void I444ToARGBRow_NEON(const uint8* src_y,
    689                         const uint8* src_u,
    690                         const uint8* src_v,
    691                         uint8* dst_argb,
    692                         const struct YuvConstants* yuvconstants,
    693                         int width);
    694 void I422ToARGBRow_NEON(const uint8* src_y,
    695                         const uint8* src_u,
    696                         const uint8* src_v,
    697                         uint8* dst_argb,
    698                         const struct YuvConstants* yuvconstants,
    699                         int width);
    700 void I422AlphaToARGBRow_NEON(const uint8* y_buf,
    701                              const uint8* u_buf,
    702                              const uint8* v_buf,
    703                              const uint8* a_buf,
    704                              uint8* dst_argb,
    705                              const struct YuvConstants* yuvconstants,
    706                              int width);
    707 void I422ToARGBRow_NEON(const uint8* src_y,
    708                         const uint8* src_u,
    709                         const uint8* src_v,
    710                         uint8* dst_argb,
    711                         const struct YuvConstants* yuvconstants,
    712                         int width);
    713 void I422ToRGBARow_NEON(const uint8* src_y,
    714                         const uint8* src_u,
    715                         const uint8* src_v,
    716                         uint8* dst_rgba,
    717                         const struct YuvConstants* yuvconstants,
    718                         int width);
    719 void I422ToRGB24Row_NEON(const uint8* src_y,
    720                          const uint8* src_u,
    721                          const uint8* src_v,
    722                          uint8* dst_rgb24,
    723                          const struct YuvConstants* yuvconstants,
    724                          int width);
    725 void I422ToRGB565Row_NEON(const uint8* src_y,
    726                           const uint8* src_u,
    727                           const uint8* src_v,
    728                           uint8* dst_rgb565,
    729                           const struct YuvConstants* yuvconstants,
    730                           int width);
    731 void I422ToARGB1555Row_NEON(const uint8* src_y,
    732                             const uint8* src_u,
    733                             const uint8* src_v,
    734                             uint8* dst_argb1555,
    735                             const struct YuvConstants* yuvconstants,
    736                             int width);
    737 void I422ToARGB4444Row_NEON(const uint8* src_y,
    738                             const uint8* src_u,
    739                             const uint8* src_v,
    740                             uint8* dst_argb4444,
    741                             const struct YuvConstants* yuvconstants,
    742                             int width);
    743 void NV12ToARGBRow_NEON(const uint8* src_y,
    744                         const uint8* src_uv,
    745                         uint8* dst_argb,
    746                         const struct YuvConstants* yuvconstants,
    747                         int width);
    748 void NV12ToRGB565Row_NEON(const uint8* src_y,
    749                           const uint8* src_uv,
    750                           uint8* dst_rgb565,
    751                           const struct YuvConstants* yuvconstants,
    752                           int width);
    753 void NV21ToARGBRow_NEON(const uint8* src_y,
    754                         const uint8* src_vu,
    755                         uint8* dst_argb,
    756                         const struct YuvConstants* yuvconstants,
    757                         int width);
    758 void YUY2ToARGBRow_NEON(const uint8* src_yuy2,
    759                         uint8* dst_argb,
    760                         const struct YuvConstants* yuvconstants,
    761                         int width);
    762 void UYVYToARGBRow_NEON(const uint8* src_uyvy,
    763                         uint8* dst_argb,
    764                         const struct YuvConstants* yuvconstants,
    765                         int width);
    766 void I444ToARGBRow_MSA(const uint8* src_y,
    767                        const uint8* src_u,
    768                        const uint8* src_v,
    769                        uint8* dst_argb,
    770                        const struct YuvConstants* yuvconstants,
    771                        int width);
    772 void I444ToARGBRow_DSPR2(const uint8* src_y,
    773                          const uint8* src_u,
    774                          const uint8* src_v,
    775                          uint8* dst_argb,
    776                          const struct YuvConstants* yuvconstants,
    777                          int width);
    778 void I422ToARGB4444Row_DSPR2(const uint8* src_y,
    779                              const uint8* src_u,
    780                              const uint8* src_v,
    781                              uint8* dst_argb4444,
    782                              const struct YuvConstants* yuvconstants,
    783                              int width);
    784 void I422ToARGB1555Row_DSPR2(const uint8* src_y,
    785                              const uint8* src_u,
    786                              const uint8* src_v,
    787                              uint8* dst_argb1555,
    788                              const struct YuvConstants* yuvconstants,
    789                              int width);
    790 void NV12ToARGBRow_DSPR2(const uint8* src_y,
    791                          const uint8* src_uv,
    792                          uint8* dst_argb,
    793                          const struct YuvConstants* yuvconstants,
    794                          int width);
    795 
    796 void I422ToARGBRow_MSA(const uint8* src_y,
    797                        const uint8* src_u,
    798                        const uint8* src_v,
    799                        uint8* dst_argb,
    800                        const struct YuvConstants* yuvconstants,
    801                        int width);
    802 void I422ToRGBARow_MSA(const uint8* src_y,
    803                        const uint8* src_u,
    804                        const uint8* src_v,
    805                        uint8* dst_rgba,
    806                        const struct YuvConstants* yuvconstants,
    807                        int width);
    808 void I422AlphaToARGBRow_MSA(const uint8* y_buf,
    809                             const uint8* u_buf,
    810                             const uint8* v_buf,
    811                             const uint8* a_buf,
    812                             uint8* dst_argb,
    813                             const struct YuvConstants* yuvconstants,
    814                             int width);
    815 void I422ToRGB24Row_MSA(const uint8* src_y,
    816                         const uint8* src_u,
    817                         const uint8* src_v,
    818                         uint8* dst_rgb24,
    819                         const struct YuvConstants* yuvconstants,
    820                         int width);
    821 void I422ToRGB565Row_MSA(const uint8* src_y,
    822                          const uint8* src_u,
    823                          const uint8* src_v,
    824                          uint8* dst_rgb565,
    825                          const struct YuvConstants* yuvconstants,
    826                          int width);
    827 void I422ToARGB4444Row_MSA(const uint8* src_y,
    828                            const uint8* src_u,
    829                            const uint8* src_v,
    830                            uint8* dst_argb4444,
    831                            const struct YuvConstants* yuvconstants,
    832                            int width);
    833 void I422ToARGB1555Row_MSA(const uint8* src_y,
    834                            const uint8* src_u,
    835                            const uint8* src_v,
    836                            uint8* dst_argb1555,
    837                            const struct YuvConstants* yuvconstants,
    838                            int width);
    839 void NV12ToARGBRow_MSA(const uint8* src_y,
    840                        const uint8* src_uv,
    841                        uint8* dst_argb,
    842                        const struct YuvConstants* yuvconstants,
    843                        int width);
    844 void NV12ToRGB565Row_MSA(const uint8* src_y,
    845                          const uint8* src_uv,
    846                          uint8* dst_rgb565,
    847                          const struct YuvConstants* yuvconstants,
    848                          int width);
    849 void NV21ToARGBRow_MSA(const uint8* src_y,
    850                        const uint8* src_vu,
    851                        uint8* dst_argb,
    852                        const struct YuvConstants* yuvconstants,
    853                        int width);
    854 void YUY2ToARGBRow_MSA(const uint8* src_yuy2,
    855                        uint8* dst_argb,
    856                        const struct YuvConstants* yuvconstants,
    857                        int width);
    858 void UYVYToARGBRow_MSA(const uint8* src_uyvy,
    859                        uint8* dst_argb,
    860                        const struct YuvConstants* yuvconstants,
    861                        int width);
    862 
    863 void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width);
    864 void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width);
    865 void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
    866 void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int width);
    867 void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width);
    868 void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
    869 void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width);
    870 void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width);
    871 void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width);
    872 void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width);
    873 void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width);
    874 void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width);
    875 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width);
    876 void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width);
    877 void ARGBToYJRow_MSA(const uint8* src_argb, uint8* dst_y, int width);
    878 void ARGBToUV444Row_NEON(const uint8* src_argb,
    879                          uint8* dst_u,
    880                          uint8* dst_v,
    881                          int width);
    882 void ARGBToUVRow_NEON(const uint8* src_argb,
    883                       int src_stride_argb,
    884                       uint8* dst_u,
    885                       uint8* dst_v,
    886                       int width);
    887 void ARGBToUV444Row_MSA(const uint8* src_argb,
    888                         uint8* dst_u,
    889                         uint8* dst_v,
    890                         int width);
    891 void ARGBToUVRow_MSA(const uint8* src_argb,
    892                      int src_stride_argb,
    893                      uint8* dst_u,
    894                      uint8* dst_v,
    895                      int width);
    896 void ARGBToUVJRow_NEON(const uint8* src_argb,
    897                        int src_stride_argb,
    898                        uint8* dst_u,
    899                        uint8* dst_v,
    900                        int width);
    901 void BGRAToUVRow_NEON(const uint8* src_bgra,
    902                       int src_stride_bgra,
    903                       uint8* dst_u,
    904                       uint8* dst_v,
    905                       int width);
    906 void ABGRToUVRow_NEON(const uint8* src_abgr,
    907                       int src_stride_abgr,
    908                       uint8* dst_u,
    909                       uint8* dst_v,
    910                       int width);
    911 void RGBAToUVRow_NEON(const uint8* src_rgba,
    912                       int src_stride_rgba,
    913                       uint8* dst_u,
    914                       uint8* dst_v,
    915                       int width);
    916 void RGB24ToUVRow_NEON(const uint8* src_rgb24,
    917                        int src_stride_rgb24,
    918                        uint8* dst_u,
    919                        uint8* dst_v,
    920                        int width);
    921 void RAWToUVRow_NEON(const uint8* src_raw,
    922                      int src_stride_raw,
    923                      uint8* dst_u,
    924                      uint8* dst_v,
    925                      int width);
    926 void RGB565ToUVRow_NEON(const uint8* src_rgb565,
    927                         int src_stride_rgb565,
    928                         uint8* dst_u,
    929                         uint8* dst_v,
    930                         int width);
    931 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555,
    932                           int src_stride_argb1555,
    933                           uint8* dst_u,
    934                           uint8* dst_v,
    935                           int width);
    936 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444,
    937                           int src_stride_argb4444,
    938                           uint8* dst_u,
    939                           uint8* dst_v,
    940                           int width);
    941 void ARGBToUVJRow_MSA(const uint8* src_argb,
    942                       int src_stride_argb,
    943                       uint8* dst_u,
    944                       uint8* dst_v,
    945                       int width);
    946 void BGRAToUVRow_MSA(const uint8* src_bgra,
    947                      int src_stride_bgra,
    948                      uint8* dst_u,
    949                      uint8* dst_v,
    950                      int width);
    951 void ABGRToUVRow_MSA(const uint8* src_abgr,
    952                      int src_stride_abgr,
    953                      uint8* dst_u,
    954                      uint8* dst_v,
    955                      int width);
    956 void RGBAToUVRow_MSA(const uint8* src_rgba,
    957                      int src_stride_rgba,
    958                      uint8* dst_u,
    959                      uint8* dst_v,
    960                      int width);
    961 void RGB24ToUVRow_MSA(const uint8* src_rgb24,
    962                       int src_stride_rgb24,
    963                       uint8* dst_u,
    964                       uint8* dst_v,
    965                       int width);
    966 void RAWToUVRow_MSA(const uint8* src_raw,
    967                     int src_stride_raw,
    968                     uint8* dst_u,
    969                     uint8* dst_v,
    970                     int width);
    971 void RGB565ToUVRow_MSA(const uint8* src_rgb565,
    972                        int src_stride_rgb565,
    973                        uint8* dst_u,
    974                        uint8* dst_v,
    975                        int width);
    976 void ARGB1555ToUVRow_MSA(const uint8* src_argb1555,
    977                          int src_stride_argb1555,
    978                          uint8* dst_u,
    979                          uint8* dst_v,
    980                          int width);
    981 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width);
    982 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width);
    983 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width);
    984 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width);
    985 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width);
    986 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width);
    987 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width);
    988 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width);
    989 void BGRAToYRow_MSA(const uint8* src_bgra, uint8* dst_y, int width);
    990 void ABGRToYRow_MSA(const uint8* src_abgr, uint8* dst_y, int width);
    991 void RGBAToYRow_MSA(const uint8* src_rgba, uint8* dst_y, int width);
    992 void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
    993 void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width);
    994 void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
    995 void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
    996 void BGRAToUVRow_DSPR2(const uint8* src_bgra,
    997                        int src_stride_bgra,
    998                        uint8* dst_u,
    999                        uint8* dst_v,
   1000                        int width);
   1001 void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
   1002 void ABGRToUVRow_DSPR2(const uint8* src_abgr,
   1003                        int src_stride_abgr,
   1004                        uint8* dst_u,
   1005                        uint8* dst_v,
   1006                        int width);
   1007 void ARGBToYRow_DSPR2(const uint8* src_argb, uint8* dst_y, int width);
   1008 void ABGRToYRow_DSPR2(const uint8* src_abgr, uint8* dst_y, int width);
   1009 void RGBAToUVRow_DSPR2(const uint8* src_rgba,
   1010                        int src_stride_rgba,
   1011                        uint8* dst_u,
   1012                        uint8* dst_v,
   1013                        int width);
   1014 void RGBAToYRow_DSPR2(const uint8* src_rgba, uint8* dst_y, int width);
   1015 void ARGBToUVRow_DSPR2(const uint8* src_argb,
   1016                        int src_stride_argb,
   1017                        uint8* dst_u,
   1018                        uint8* dst_v,
   1019                        int width);
   1020 void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width);
   1021 void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width);
   1022 void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int width);
   1023 void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int width);
   1024 void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int width);
   1025 void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int width);
   1026 void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int width);
   1027 void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int width);
   1028 void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int width);
   1029 void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int width);
   1030 void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
   1031 void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
   1032 void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int width);
   1033 void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int width);
   1034 void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int width);
   1035 void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width);
   1036 void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int width);
   1037 void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width);
   1038 void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width);
   1039 void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int width);
   1040 void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int width);
   1041 void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int width);
   1042 void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int width);
   1043 void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width);
   1044 void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width);
   1045 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555,
   1046                              uint8* dst_y,
   1047                              int width);
   1048 void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
   1049 void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width);
   1050 void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width);
   1051 void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width);
   1052 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444,
   1053                              uint8* dst_y,
   1054                              int width);
   1055 void BGRAToYRow_Any_MSA(const uint8* src_bgra, uint8* dst_y, int width);
   1056 void ABGRToYRow_Any_MSA(const uint8* src_abgr, uint8* dst_y, int width);
   1057 void RGBAToYRow_Any_MSA(const uint8* src_rgba, uint8* dst_y, int width);
   1058 void ARGBToYJRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
   1059 void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
   1060 void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
   1061 void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width);
   1062 void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
   1063 void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
   1064 
   1065 void ARGBToUVRow_AVX2(const uint8* src_argb,
   1066                       int src_stride_argb,
   1067                       uint8* dst_u,
   1068                       uint8* dst_v,
   1069                       int width);
   1070 void ARGBToUVJRow_AVX2(const uint8* src_argb,
   1071                        int src_stride_argb,
   1072                        uint8* dst_u,
   1073                        uint8* dst_v,
   1074                        int width);
   1075 void ARGBToUVRow_SSSE3(const uint8* src_argb,
   1076                        int src_stride_argb,
   1077                        uint8* dst_u,
   1078                        uint8* dst_v,
   1079                        int width);
   1080 void ARGBToUVJRow_SSSE3(const uint8* src_argb,
   1081                         int src_stride_argb,
   1082                         uint8* dst_u,
   1083                         uint8* dst_v,
   1084                         int width);
   1085 void BGRAToUVRow_SSSE3(const uint8* src_bgra,
   1086                        int src_stride_bgra,
   1087                        uint8* dst_u,
   1088                        uint8* dst_v,
   1089                        int width);
   1090 void ABGRToUVRow_SSSE3(const uint8* src_abgr,
   1091                        int src_stride_abgr,
   1092                        uint8* dst_u,
   1093                        uint8* dst_v,
   1094                        int width);
   1095 void RGBAToUVRow_SSSE3(const uint8* src_rgba,
   1096                        int src_stride_rgba,
   1097                        uint8* dst_u,
   1098                        uint8* dst_v,
   1099                        int width);
   1100 void ARGBToUVRow_Any_AVX2(const uint8* src_argb,
   1101                           int src_stride_argb,
   1102                           uint8* dst_u,
   1103                           uint8* dst_v,
   1104                           int width);
   1105 void ARGBToUVJRow_Any_AVX2(const uint8* src_argb,
   1106                            int src_stride_argb,
   1107                            uint8* dst_u,
   1108                            uint8* dst_v,
   1109                            int width);
   1110 void ARGBToUVRow_Any_SSSE3(const uint8* src_argb,
   1111                            int src_stride_argb,
   1112                            uint8* dst_u,
   1113                            uint8* dst_v,
   1114                            int width);
   1115 void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb,
   1116                             int src_stride_argb,
   1117                             uint8* dst_u,
   1118                             uint8* dst_v,
   1119                             int width);
   1120 void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra,
   1121                            int src_stride_bgra,
   1122                            uint8* dst_u,
   1123                            uint8* dst_v,
   1124                            int width);
   1125 void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr,
   1126                            int src_stride_abgr,
   1127                            uint8* dst_u,
   1128                            uint8* dst_v,
   1129                            int width);
   1130 void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba,
   1131                            int src_stride_rgba,
   1132                            uint8* dst_u,
   1133                            uint8* dst_v,
   1134                            int width);
   1135 void ARGBToUV444Row_Any_NEON(const uint8* src_argb,
   1136                              uint8* dst_u,
   1137                              uint8* dst_v,
   1138                              int width);
   1139 void ARGBToUVRow_Any_NEON(const uint8* src_argb,
   1140                           int src_stride_argb,
   1141                           uint8* dst_u,
   1142                           uint8* dst_v,
   1143                           int width);
   1144 void ARGBToUV444Row_Any_MSA(const uint8* src_argb,
   1145                             uint8* dst_u,
   1146                             uint8* dst_v,
   1147                             int width);
   1148 void ARGBToUVRow_Any_MSA(const uint8* src_argb,
   1149                          int src_stride_argb,
   1150                          uint8* dst_u,
   1151                          uint8* dst_v,
   1152                          int width);
   1153 void ARGBToUVJRow_Any_NEON(const uint8* src_argb,
   1154                            int src_stride_argb,
   1155                            uint8* dst_u,
   1156                            uint8* dst_v,
   1157                            int width);
   1158 void BGRAToUVRow_Any_NEON(const uint8* src_bgra,
   1159                           int src_stride_bgra,
   1160                           uint8* dst_u,
   1161                           uint8* dst_v,
   1162                           int width);
   1163 void ABGRToUVRow_Any_NEON(const uint8* src_abgr,
   1164                           int src_stride_abgr,
   1165                           uint8* dst_u,
   1166                           uint8* dst_v,
   1167                           int width);
   1168 void RGBAToUVRow_Any_NEON(const uint8* src_rgba,
   1169                           int src_stride_rgba,
   1170                           uint8* dst_u,
   1171                           uint8* dst_v,
   1172                           int width);
   1173 void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24,
   1174                            int src_stride_rgb24,
   1175                            uint8* dst_u,
   1176                            uint8* dst_v,
   1177                            int width);
   1178 void RAWToUVRow_Any_NEON(const uint8* src_raw,
   1179                          int src_stride_raw,
   1180                          uint8* dst_u,
   1181                          uint8* dst_v,
   1182                          int width);
   1183 void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565,
   1184                             int src_stride_rgb565,
   1185                             uint8* dst_u,
   1186                             uint8* dst_v,
   1187                             int width);
   1188 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
   1189                               int src_stride_argb1555,
   1190                               uint8* dst_u,
   1191                               uint8* dst_v,
   1192                               int width);
   1193 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
   1194                               int src_stride_argb4444,
   1195                               uint8* dst_u,
   1196                               uint8* dst_v,
   1197                               int width);
   1198 void ARGBToUVJRow_Any_MSA(const uint8* src_argb,
   1199                           int src_stride_argb,
   1200                           uint8* dst_u,
   1201                           uint8* dst_v,
   1202                           int width);
   1203 void BGRAToUVRow_Any_MSA(const uint8* src_bgra,
   1204                          int src_stride_bgra,
   1205                          uint8* dst_u,
   1206                          uint8* dst_v,
   1207                          int width);
   1208 void ABGRToUVRow_Any_MSA(const uint8* src_abgr,
   1209                          int src_stride_abgr,
   1210                          uint8* dst_u,
   1211                          uint8* dst_v,
   1212                          int width);
   1213 void RGBAToUVRow_Any_MSA(const uint8* src_rgba,
   1214                          int src_stride_rgba,
   1215                          uint8* dst_u,
   1216                          uint8* dst_v,
   1217                          int width);
   1218 void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24,
   1219                           int src_stride_rgb24,
   1220                           uint8* dst_u,
   1221                           uint8* dst_v,
   1222                           int width);
   1223 void RAWToUVRow_Any_MSA(const uint8* src_raw,
   1224                         int src_stride_raw,
   1225                         uint8* dst_u,
   1226                         uint8* dst_v,
   1227                         int width);
   1228 void RGB565ToUVRow_Any_MSA(const uint8* src_rgb565,
   1229                            int src_stride_rgb565,
   1230                            uint8* dst_u,
   1231                            uint8* dst_v,
   1232                            int width);
   1233 void ARGB1555ToUVRow_Any_MSA(const uint8* src_argb1555,
   1234                              int src_stride_argb1555,
   1235                              uint8* dst_u,
   1236                              uint8* dst_v,
   1237                              int width);
   1238 void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra,
   1239                            int src_stride_bgra,
   1240                            uint8* dst_u,
   1241                            uint8* dst_v,
   1242                            int width);
   1243 void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr,
   1244                            int src_stride_abgr,
   1245                            uint8* dst_u,
   1246                            uint8* dst_v,
   1247                            int width);
   1248 void RGBAToUVRow_Any_DSPR2(const uint8* src_rgba,
   1249                            int src_stride_rgba,
   1250                            uint8* dst_u,
   1251                            uint8* dst_v,
   1252                            int width);
   1253 void ARGBToUVRow_Any_DSPR2(const uint8* src_argb,
   1254                            int src_stride_argb,
   1255                            uint8* dst_u,
   1256                            uint8* dst_v,
   1257                            int width);
   1258 void ARGBToUVRow_C(const uint8* src_argb,
   1259                    int src_stride_argb,
   1260                    uint8* dst_u,
   1261                    uint8* dst_v,
   1262                    int width);
   1263 void ARGBToUVJRow_C(const uint8* src_argb,
   1264                     int src_stride_argb,
   1265                     uint8* dst_u,
   1266                     uint8* dst_v,
   1267                     int width);
   1268 void ARGBToUVRow_C(const uint8* src_argb,
   1269                    int src_stride_argb,
   1270                    uint8* dst_u,
   1271                    uint8* dst_v,
   1272                    int width);
   1273 void ARGBToUVJRow_C(const uint8* src_argb,
   1274                     int src_stride_argb,
   1275                     uint8* dst_u,
   1276                     uint8* dst_v,
   1277                     int width);
   1278 void BGRAToUVRow_C(const uint8* src_bgra,
   1279                    int src_stride_bgra,
   1280                    uint8* dst_u,
   1281                    uint8* dst_v,
   1282                    int width);
   1283 void ABGRToUVRow_C(const uint8* src_abgr,
   1284                    int src_stride_abgr,
   1285                    uint8* dst_u,
   1286                    uint8* dst_v,
   1287                    int width);
   1288 void RGBAToUVRow_C(const uint8* src_rgba,
   1289                    int src_stride_rgba,
   1290                    uint8* dst_u,
   1291                    uint8* dst_v,
   1292                    int width);
   1293 void RGB24ToUVRow_C(const uint8* src_rgb24,
   1294                     int src_stride_rgb24,
   1295                     uint8* dst_u,
   1296                     uint8* dst_v,
   1297                     int width);
   1298 void RAWToUVRow_C(const uint8* src_raw,
   1299                   int src_stride_raw,
   1300                   uint8* dst_u,
   1301                   uint8* dst_v,
   1302                   int width);
   1303 void RGB565ToUVRow_C(const uint8* src_rgb565,
   1304                      int src_stride_rgb565,
   1305                      uint8* dst_u,
   1306                      uint8* dst_v,
   1307                      int width);
   1308 void ARGB1555ToUVRow_C(const uint8* src_argb1555,
   1309                        int src_stride_argb1555,
   1310                        uint8* dst_u,
   1311                        uint8* dst_v,
   1312                        int width);
   1313 void ARGB4444ToUVRow_C(const uint8* src_argb4444,
   1314                        int src_stride_argb4444,
   1315                        uint8* dst_u,
   1316                        uint8* dst_v,
   1317                        int width);
   1318 
   1319 void ARGBToUV444Row_SSSE3(const uint8* src_argb,
   1320                           uint8* dst_u,
   1321                           uint8* dst_v,
   1322                           int width);
   1323 void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb,
   1324                               uint8* dst_u,
   1325                               uint8* dst_v,
   1326                               int width);
   1327 
   1328 void ARGBToUV444Row_C(const uint8* src_argb,
   1329                       uint8* dst_u,
   1330                       uint8* dst_v,
   1331                       int width);
   1332 
   1333 void MirrorRow_AVX2(const uint8* src, uint8* dst, int width);
   1334 void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
   1335 void MirrorRow_NEON(const uint8* src, uint8* dst, int width);
   1336 void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width);
   1337 void MirrorRow_MSA(const uint8* src, uint8* dst, int width);
   1338 void MirrorRow_C(const uint8* src, uint8* dst, int width);
   1339 void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width);
   1340 void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width);
   1341 void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width);
   1342 void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width);
   1343 void MirrorRow_Any_MSA(const uint8* src, uint8* dst, int width);
   1344 
   1345 void MirrorUVRow_SSSE3(const uint8* src_uv,
   1346                        uint8* dst_u,
   1347                        uint8* dst_v,
   1348                        int width);
   1349 void MirrorUVRow_NEON(const uint8* src_uv,
   1350                       uint8* dst_u,
   1351                       uint8* dst_v,
   1352                       int width);
   1353 void MirrorUVRow_DSPR2(const uint8* src_uv,
   1354                        uint8* dst_u,
   1355                        uint8* dst_v,
   1356                        int width);
   1357 void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width);
   1358 
   1359 void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width);
   1360 void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width);
   1361 void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width);
   1362 void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width);
   1363 void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width);
   1364 void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width);
   1365 void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width);
   1366 void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width);
   1367 void ARGBMirrorRow_Any_MSA(const uint8* src, uint8* dst, int width);
   1368 
   1369 void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width);
   1370 void SplitUVRow_SSE2(const uint8* src_uv,
   1371                      uint8* dst_u,
   1372                      uint8* dst_v,
   1373                      int width);
   1374 void SplitUVRow_AVX2(const uint8* src_uv,
   1375                      uint8* dst_u,
   1376                      uint8* dst_v,
   1377                      int width);
   1378 void SplitUVRow_NEON(const uint8* src_uv,
   1379                      uint8* dst_u,
   1380                      uint8* dst_v,
   1381                      int width);
   1382 void SplitUVRow_DSPR2(const uint8* src_uv,
   1383                       uint8* dst_u,
   1384                       uint8* dst_v,
   1385                       int width);
   1386 void SplitUVRow_Any_SSE2(const uint8* src_uv,
   1387                          uint8* dst_u,
   1388                          uint8* dst_v,
   1389                          int width);
   1390 void SplitUVRow_Any_AVX2(const uint8* src_uv,
   1391                          uint8* dst_u,
   1392                          uint8* dst_v,
   1393                          int width);
   1394 void SplitUVRow_Any_NEON(const uint8* src_uv,
   1395                          uint8* dst_u,
   1396                          uint8* dst_v,
   1397                          int width);
   1398 void SplitUVRow_Any_DSPR2(const uint8* src_uv,
   1399                           uint8* dst_u,
   1400                           uint8* dst_v,
   1401                           int width);
   1402 
   1403 void MergeUVRow_C(const uint8* src_u,
   1404                   const uint8* src_v,
   1405                   uint8* dst_uv,
   1406                   int width);
   1407 void MergeUVRow_SSE2(const uint8* src_u,
   1408                      const uint8* src_v,
   1409                      uint8* dst_uv,
   1410                      int width);
   1411 void MergeUVRow_AVX2(const uint8* src_u,
   1412                      const uint8* src_v,
   1413                      uint8* dst_uv,
   1414                      int width);
   1415 void MergeUVRow_NEON(const uint8* src_u,
   1416                      const uint8* src_v,
   1417                      uint8* dst_uv,
   1418                      int width);
   1419 void MergeUVRow_MSA(const uint8* src_u,
   1420                     const uint8* src_v,
   1421                     uint8* dst_uv,
   1422                     int width);
   1423 void MergeUVRow_Any_SSE2(const uint8* src_u,
   1424                          const uint8* src_v,
   1425                          uint8* dst_uv,
   1426                          int width);
   1427 void MergeUVRow_Any_AVX2(const uint8* src_u,
   1428                          const uint8* src_v,
   1429                          uint8* dst_uv,
   1430                          int width);
   1431 void MergeUVRow_Any_NEON(const uint8* src_u,
   1432                          const uint8* src_v,
   1433                          uint8* dst_uv,
   1434                          int width);
   1435 void MergeUVRow_Any_MSA(const uint8* src_u,
   1436                         const uint8* src_v,
   1437                         uint8* dst_uv,
   1438                         int width);
   1439 
   1440 void CopyRow_SSE2(const uint8* src, uint8* dst, int count);
   1441 void CopyRow_AVX(const uint8* src, uint8* dst, int count);
   1442 void CopyRow_ERMS(const uint8* src, uint8* dst, int count);
   1443 void CopyRow_NEON(const uint8* src, uint8* dst, int count);
   1444 void CopyRow_MIPS(const uint8* src, uint8* dst, int count);
   1445 void CopyRow_C(const uint8* src, uint8* dst, int count);
   1446 void CopyRow_Any_SSE2(const uint8* src, uint8* dst, int count);
   1447 void CopyRow_Any_AVX(const uint8* src, uint8* dst, int count);
   1448 void CopyRow_Any_NEON(const uint8* src, uint8* dst, int count);
   1449 
   1450 void CopyRow_16_C(const uint16* src, uint16* dst, int count);
   1451 
   1452 void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width);
   1453 void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
   1454 void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
   1455 void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb,
   1456                                uint8* dst_argb,
   1457                                int width);
   1458 void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb,
   1459                                uint8* dst_argb,
   1460                                int width);
   1461 
   1462 void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width);
   1463 void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width);
   1464 void ARGBExtractAlphaRow_AVX2(const uint8* src_argb, uint8* dst_a, int width);
   1465 void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width);
   1466 void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb,
   1467                                   uint8* dst_a,
   1468                                   int width);
   1469 void ARGBExtractAlphaRow_Any_AVX2(const uint8* src_argb,
   1470                                   uint8* dst_a,
   1471                                   int width);
   1472 void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb,
   1473                                   uint8* dst_a,
   1474                                   int width);
   1475 
   1476 void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width);
   1477 void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
   1478 void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
   1479 void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y,
   1480                                   uint8* dst_argb,
   1481                                   int width);
   1482 void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y,
   1483                                   uint8* dst_argb,
   1484                                   int width);
   1485 
   1486 void SetRow_C(uint8* dst, uint8 v8, int count);
   1487 void SetRow_X86(uint8* dst, uint8 v8, int count);
   1488 void SetRow_ERMS(uint8* dst, uint8 v8, int count);
   1489 void SetRow_NEON(uint8* dst, uint8 v8, int count);
   1490 void SetRow_Any_X86(uint8* dst, uint8 v8, int count);
   1491 void SetRow_Any_NEON(uint8* dst, uint8 v8, int count);
   1492 
   1493 void ARGBSetRow_C(uint8* dst_argb, uint32 v32, int count);
   1494 void ARGBSetRow_X86(uint8* dst_argb, uint32 v32, int count);
   1495 void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count);
   1496 void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count);
   1497 void ARGBSetRow_MSA(uint8* dst_argb, uint32 v32, int count);
   1498 void ARGBSetRow_Any_MSA(uint8* dst_argb, uint32 v32, int count);
   1499 
   1500 // ARGBShufflers for BGRAToARGB etc.
   1501 void ARGBShuffleRow_C(const uint8* src_argb,
   1502                       uint8* dst_argb,
   1503                       const uint8* shuffler,
   1504                       int width);
   1505 void ARGBShuffleRow_SSE2(const uint8* src_argb,
   1506                          uint8* dst_argb,
   1507                          const uint8* shuffler,
   1508                          int width);
   1509 void ARGBShuffleRow_SSSE3(const uint8* src_argb,
   1510                           uint8* dst_argb,
   1511                           const uint8* shuffler,
   1512                           int width);
   1513 void ARGBShuffleRow_AVX2(const uint8* src_argb,
   1514                          uint8* dst_argb,
   1515                          const uint8* shuffler,
   1516                          int width);
   1517 void ARGBShuffleRow_NEON(const uint8* src_argb,
   1518                          uint8* dst_argb,
   1519                          const uint8* shuffler,
   1520                          int width);
   1521 void ARGBShuffleRow_MSA(const uint8* src_argb,
   1522                         uint8* dst_argb,
   1523                         const uint8* shuffler,
   1524                         int width);
   1525 void ARGBShuffleRow_Any_SSE2(const uint8* src_argb,
   1526                              uint8* dst_argb,
   1527                              const uint8* shuffler,
   1528                              int width);
   1529 void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb,
   1530                               uint8* dst_argb,
   1531                               const uint8* shuffler,
   1532                               int width);
   1533 void ARGBShuffleRow_Any_AVX2(const uint8* src_argb,
   1534                              uint8* dst_argb,
   1535                              const uint8* shuffler,
   1536                              int width);
   1537 void ARGBShuffleRow_Any_NEON(const uint8* src_argb,
   1538                              uint8* dst_argb,
   1539                              const uint8* shuffler,
   1540                              int width);
   1541 void ARGBShuffleRow_Any_MSA(const uint8* src_argb,
   1542                             uint8* dst_argb,
   1543                             const uint8* shuffler,
   1544                             int width);
   1545 
   1546 void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width);
   1547 void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int width);
   1548 void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width);
   1549 void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width);
   1550 void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555,
   1551                             uint8* dst_argb,
   1552                             int width);
   1553 void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444,
   1554                             uint8* dst_argb,
   1555                             int width);
   1556 void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width);
   1557 void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555,
   1558                             uint8* dst_argb,
   1559                             int width);
   1560 void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444,
   1561                             uint8* dst_argb,
   1562                             int width);
   1563 
   1564 void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width);
   1565 void RGB24ToARGBRow_MSA(const uint8* src_rgb24, uint8* dst_argb, int width);
   1566 void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width);
   1567 void RAWToARGBRow_MSA(const uint8* src_raw, uint8* dst_argb, int width);
   1568 void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width);
   1569 void RAWToRGB24Row_MSA(const uint8* src_raw, uint8* dst_rgb24, int width);
   1570 void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width);
   1571 void RGB565ToARGBRow_MSA(const uint8* src_rgb565, uint8* dst_argb, int width);
   1572 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555,
   1573                             uint8* dst_argb,
   1574                             int width);
   1575 void ARGB1555ToARGBRow_MSA(const uint8* src_argb1555,
   1576                            uint8* dst_argb,
   1577                            int width);
   1578 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444,
   1579                             uint8* dst_argb,
   1580                             int width);
   1581 void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width);
   1582 void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width);
   1583 void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width);
   1584 void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555,
   1585                              uint8* dst_argb,
   1586                              int width);
   1587 void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444,
   1588                              uint8* dst_argb,
   1589                              int width);
   1590 void ARGB4444ToARGBRow_MSA(const uint8* src_argb4444,
   1591                            uint8* dst_argb,
   1592                            int width);
   1593 void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width);
   1594 void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width);
   1595 void RAWToRGB24Row_C(const uint8* src_raw, uint8* dst_rgb24, int width);
   1596 void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int width);
   1597 void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width);
   1598 void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width);
   1599 void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24,
   1600                               uint8* dst_argb,
   1601                               int width);
   1602 void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width);
   1603 void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width);
   1604 
   1605 void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565,
   1606                               uint8* dst_argb,
   1607                               int width);
   1608 void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555,
   1609                                 uint8* dst_argb,
   1610                                 int width);
   1611 void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444,
   1612                                 uint8* dst_argb,
   1613                                 int width);
   1614 void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565,
   1615                               uint8* dst_argb,
   1616                               int width);
   1617 void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555,
   1618                                 uint8* dst_argb,
   1619                                 int width);
   1620 void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444,
   1621                                 uint8* dst_argb,
   1622                                 int width);
   1623 
   1624 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24,
   1625                              uint8* dst_argb,
   1626                              int width);
   1627 void RGB24ToARGBRow_Any_MSA(const uint8* src_rgb24, uint8* dst_argb, int width);
   1628 void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width);
   1629 void RAWToARGBRow_Any_MSA(const uint8* src_raw, uint8* dst_argb, int width);
   1630 void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width);
   1631 void RAWToRGB24Row_Any_MSA(const uint8* src_raw, uint8* dst_rgb24, int width);
   1632 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565,
   1633                               uint8* dst_argb,
   1634                               int width);
   1635 void RGB565ToARGBRow_Any_MSA(const uint8* src_rgb565,
   1636                              uint8* dst_argb,
   1637                              int width);
   1638 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555,
   1639                                 uint8* dst_argb,
   1640                                 int width);
   1641 void ARGB1555ToARGBRow_Any_MSA(const uint8* src_argb1555,
   1642                                uint8* dst_argb,
   1643                                int width);
   1644 void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444,
   1645                                 uint8* dst_argb,
   1646                                 int width);
   1647 void RGB24ToARGBRow_Any_DSPR2(const uint8* src_rgb24,
   1648                               uint8* dst_argb,
   1649                               int width);
   1650 void RAWToARGBRow_Any_DSPR2(const uint8* src_raw, uint8* dst_argb, int width);
   1651 void RGB565ToARGBRow_Any_DSPR2(const uint8* src_rgb565,
   1652                                uint8* dst_argb,
   1653                                int width);
   1654 void ARGB1555ToARGBRow_Any_DSPR2(const uint8* src_argb1555,
   1655                                  uint8* dst_argb,
   1656                                  int width);
   1657 void ARGB4444ToARGBRow_Any_DSPR2(const uint8* src_argb4444,
   1658                                  uint8* dst_argb,
   1659                                  int width);
   1660 
   1661 void ARGB4444ToARGBRow_Any_MSA(const uint8* src_argb4444,
   1662                                uint8* dst_argb,
   1663                                int width);
   1664 
   1665 void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
   1666 void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
   1667 void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
   1668 void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
   1669 void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
   1670 
   1671 void ARGBToRGB565DitherRow_C(const uint8* src_argb,
   1672                              uint8* dst_rgb,
   1673                              const uint32 dither4,
   1674                              int width);
   1675 void ARGBToRGB565DitherRow_SSE2(const uint8* src_argb,
   1676                                 uint8* dst_rgb,
   1677                                 const uint32 dither4,
   1678                                 int width);
   1679 void ARGBToRGB565DitherRow_AVX2(const uint8* src_argb,
   1680                                 uint8* dst_rgb,
   1681                                 const uint32 dither4,
   1682                                 int width);
   1683 
   1684 void ARGBToRGB565Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
   1685 void ARGBToARGB1555Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
   1686 void ARGBToARGB4444Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
   1687 
   1688 void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   1689 void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   1690 void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   1691 void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   1692 void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   1693 void ARGBToRGB565DitherRow_NEON(const uint8* src_argb,
   1694                                 uint8* dst_rgb,
   1695                                 const uint32 dither4,
   1696                                 int width);
   1697 void ARGBToRGB24Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   1698 void ARGBToRAWRow_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   1699 void ARGBToRGB565Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   1700 void ARGBToARGB1555Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   1701 void ARGBToARGB4444Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   1702 void ARGBToRGB565DitherRow_MSA(const uint8* src_argb,
   1703                                uint8* dst_rgb,
   1704                                const uint32 dither4,
   1705                                int width);
   1706 
   1707 void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int width);
   1708 void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
   1709 void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int width);
   1710 void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
   1711 void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
   1712 void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
   1713 
   1714 void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
   1715 void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
   1716 void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width);
   1717 void J400ToARGBRow_MSA(const uint8* src_y, uint8* dst_argb, int width);
   1718 void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width);
   1719 void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width);
   1720 void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width);
   1721 void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width);
   1722 void J400ToARGBRow_Any_MSA(const uint8* src_y, uint8* dst_argb, int width);
   1723 
   1724 void I444ToARGBRow_C(const uint8* src_y,
   1725                      const uint8* src_u,
   1726                      const uint8* src_v,
   1727                      uint8* dst_argb,
   1728                      const struct YuvConstants* yuvconstants,
   1729                      int width);
   1730 void I422ToARGBRow_C(const uint8* src_y,
   1731                      const uint8* src_u,
   1732                      const uint8* src_v,
   1733                      uint8* dst_argb,
   1734                      const struct YuvConstants* yuvconstants,
   1735                      int width);
   1736 void I422ToARGBRow_C(const uint8* src_y,
   1737                      const uint8* src_u,
   1738                      const uint8* src_v,
   1739                      uint8* dst_argb,
   1740                      const struct YuvConstants* yuvconstants,
   1741                      int width);
   1742 void I422AlphaToARGBRow_C(const uint8* y_buf,
   1743                           const uint8* u_buf,
   1744                           const uint8* v_buf,
   1745                           const uint8* a_buf,
   1746                           uint8* dst_argb,
   1747                           const struct YuvConstants* yuvconstants,
   1748                           int width);
   1749 void NV12ToARGBRow_C(const uint8* src_y,
   1750                      const uint8* src_uv,
   1751                      uint8* dst_argb,
   1752                      const struct YuvConstants* yuvconstants,
   1753                      int width);
   1754 void NV12ToRGB565Row_C(const uint8* src_y,
   1755                        const uint8* src_uv,
   1756                        uint8* dst_argb,
   1757                        const struct YuvConstants* yuvconstants,
   1758                        int width);
   1759 void NV21ToARGBRow_C(const uint8* src_y,
   1760                      const uint8* src_uv,
   1761                      uint8* dst_argb,
   1762                      const struct YuvConstants* yuvconstants,
   1763                      int width);
   1764 void YUY2ToARGBRow_C(const uint8* src_yuy2,
   1765                      uint8* dst_argb,
   1766                      const struct YuvConstants* yuvconstants,
   1767                      int width);
   1768 void UYVYToARGBRow_C(const uint8* src_uyvy,
   1769                      uint8* dst_argb,
   1770                      const struct YuvConstants* yuvconstants,
   1771                      int width);
   1772 void I422ToRGBARow_C(const uint8* src_y,
   1773                      const uint8* src_u,
   1774                      const uint8* src_v,
   1775                      uint8* dst_rgba,
   1776                      const struct YuvConstants* yuvconstants,
   1777                      int width);
   1778 void I422ToRGB24Row_C(const uint8* src_y,
   1779                       const uint8* src_u,
   1780                       const uint8* src_v,
   1781                       uint8* dst_rgb24,
   1782                       const struct YuvConstants* yuvconstants,
   1783                       int width);
   1784 void I422ToARGB4444Row_C(const uint8* src_y,
   1785                          const uint8* src_u,
   1786                          const uint8* src_v,
   1787                          uint8* dst_argb4444,
   1788                          const struct YuvConstants* yuvconstants,
   1789                          int width);
   1790 void I422ToARGB1555Row_C(const uint8* src_y,
   1791                          const uint8* src_u,
   1792                          const uint8* src_v,
   1793                          uint8* dst_argb4444,
   1794                          const struct YuvConstants* yuvconstants,
   1795                          int width);
   1796 void I422ToRGB565Row_C(const uint8* src_y,
   1797                        const uint8* src_u,
   1798                        const uint8* src_v,
   1799                        uint8* dst_rgb565,
   1800                        const struct YuvConstants* yuvconstants,
   1801                        int width);
   1802 void I422ToARGBRow_AVX2(const uint8* src_y,
   1803                         const uint8* src_u,
   1804                         const uint8* src_v,
   1805                         uint8* dst_argb,
   1806                         const struct YuvConstants* yuvconstants,
   1807                         int width);
   1808 void I422ToARGBRow_AVX2(const uint8* src_y,
   1809                         const uint8* src_u,
   1810                         const uint8* src_v,
   1811                         uint8* dst_argb,
   1812                         const struct YuvConstants* yuvconstants,
   1813                         int width);
   1814 void I422ToRGBARow_AVX2(const uint8* src_y,
   1815                         const uint8* src_u,
   1816                         const uint8* src_v,
   1817                         uint8* dst_argb,
   1818                         const struct YuvConstants* yuvconstants,
   1819                         int width);
   1820 void I444ToARGBRow_SSSE3(const uint8* src_y,
   1821                          const uint8* src_u,
   1822                          const uint8* src_v,
   1823                          uint8* dst_argb,
   1824                          const struct YuvConstants* yuvconstants,
   1825                          int width);
   1826 void I444ToARGBRow_AVX2(const uint8* src_y,
   1827                         const uint8* src_u,
   1828                         const uint8* src_v,
   1829                         uint8* dst_argb,
   1830                         const struct YuvConstants* yuvconstants,
   1831                         int width);
   1832 void I444ToARGBRow_SSSE3(const uint8* src_y,
   1833                          const uint8* src_u,
   1834                          const uint8* src_v,
   1835                          uint8* dst_argb,
   1836                          const struct YuvConstants* yuvconstants,
   1837                          int width);
   1838 void I444ToARGBRow_AVX2(const uint8* src_y,
   1839                         const uint8* src_u,
   1840                         const uint8* src_v,
   1841                         uint8* dst_argb,
   1842                         const struct YuvConstants* yuvconstants,
   1843                         int width);
   1844 void I422ToARGBRow_SSSE3(const uint8* src_y,
   1845                          const uint8* src_u,
   1846                          const uint8* src_v,
   1847                          uint8* dst_argb,
   1848                          const struct YuvConstants* yuvconstants,
   1849                          int width);
   1850 void I422AlphaToARGBRow_SSSE3(const uint8* y_buf,
   1851                               const uint8* u_buf,
   1852                               const uint8* v_buf,
   1853                               const uint8* a_buf,
   1854                               uint8* dst_argb,
   1855                               const struct YuvConstants* yuvconstants,
   1856                               int width);
   1857 void I422AlphaToARGBRow_AVX2(const uint8* y_buf,
   1858                              const uint8* u_buf,
   1859                              const uint8* v_buf,
   1860                              const uint8* a_buf,
   1861                              uint8* dst_argb,
   1862                              const struct YuvConstants* yuvconstants,
   1863                              int width);
   1864 void I422ToARGBRow_SSSE3(const uint8* src_y,
   1865                          const uint8* src_u,
   1866                          const uint8* src_v,
   1867                          uint8* dst_argb,
   1868                          const struct YuvConstants* yuvconstants,
   1869                          int width);
   1870 void NV12ToARGBRow_SSSE3(const uint8* src_y,
   1871                          const uint8* src_uv,
   1872                          uint8* dst_argb,
   1873                          const struct YuvConstants* yuvconstants,
   1874                          int width);
   1875 void NV12ToARGBRow_AVX2(const uint8* src_y,
   1876                         const uint8* src_uv,
   1877                         uint8* dst_argb,
   1878                         const struct YuvConstants* yuvconstants,
   1879                         int width);
   1880 void NV12ToRGB565Row_SSSE3(const uint8* src_y,
   1881                            const uint8* src_uv,
   1882                            uint8* dst_argb,
   1883                            const struct YuvConstants* yuvconstants,
   1884                            int width);
   1885 void NV12ToRGB565Row_AVX2(const uint8* src_y,
   1886                           const uint8* src_uv,
   1887                           uint8* dst_argb,
   1888                           const struct YuvConstants* yuvconstants,
   1889                           int width);
   1890 void NV21ToARGBRow_SSSE3(const uint8* src_y,
   1891                          const uint8* src_uv,
   1892                          uint8* dst_argb,
   1893                          const struct YuvConstants* yuvconstants,
   1894                          int width);
   1895 void NV21ToARGBRow_AVX2(const uint8* src_y,
   1896                         const uint8* src_uv,
   1897                         uint8* dst_argb,
   1898                         const struct YuvConstants* yuvconstants,
   1899                         int width);
   1900 void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2,
   1901                          uint8* dst_argb,
   1902                          const struct YuvConstants* yuvconstants,
   1903                          int width);
   1904 void UYVYToARGBRow_SSSE3(const uint8* src_uyvy,
   1905                          uint8* dst_argb,
   1906                          const struct YuvConstants* yuvconstants,
   1907                          int width);
   1908 void YUY2ToARGBRow_AVX2(const uint8* src_yuy2,
   1909                         uint8* dst_argb,
   1910                         const struct YuvConstants* yuvconstants,
   1911                         int width);
   1912 void UYVYToARGBRow_AVX2(const uint8* src_uyvy,
   1913                         uint8* dst_argb,
   1914                         const struct YuvConstants* yuvconstants,
   1915                         int width);
   1916 void I422ToRGBARow_SSSE3(const uint8* src_y,
   1917                          const uint8* src_u,
   1918                          const uint8* src_v,
   1919                          uint8* dst_rgba,
   1920                          const struct YuvConstants* yuvconstants,
   1921                          int width);
   1922 void I422ToARGB4444Row_SSSE3(const uint8* src_y,
   1923                              const uint8* src_u,
   1924                              const uint8* src_v,
   1925                              uint8* dst_argb,
   1926                              const struct YuvConstants* yuvconstants,
   1927                              int width);
   1928 void I422ToARGB4444Row_AVX2(const uint8* src_y,
   1929                             const uint8* src_u,
   1930                             const uint8* src_v,
   1931                             uint8* dst_argb,
   1932                             const struct YuvConstants* yuvconstants,
   1933                             int width);
   1934 void I422ToARGB1555Row_SSSE3(const uint8* src_y,
   1935                              const uint8* src_u,
   1936                              const uint8* src_v,
   1937                              uint8* dst_argb,
   1938                              const struct YuvConstants* yuvconstants,
   1939                              int width);
   1940 void I422ToARGB1555Row_AVX2(const uint8* src_y,
   1941                             const uint8* src_u,
   1942                             const uint8* src_v,
   1943                             uint8* dst_argb,
   1944                             const struct YuvConstants* yuvconstants,
   1945                             int width);
   1946 void I422ToRGB565Row_SSSE3(const uint8* src_y,
   1947                            const uint8* src_u,
   1948                            const uint8* src_v,
   1949                            uint8* dst_argb,
   1950                            const struct YuvConstants* yuvconstants,
   1951                            int width);
   1952 void I422ToRGB565Row_AVX2(const uint8* src_y,
   1953                           const uint8* src_u,
   1954                           const uint8* src_v,
   1955                           uint8* dst_argb,
   1956                           const struct YuvConstants* yuvconstants,
   1957                           int width);
   1958 void I422ToRGB24Row_SSSE3(const uint8* src_y,
   1959                           const uint8* src_u,
   1960                           const uint8* src_v,
   1961                           uint8* dst_rgb24,
   1962                           const struct YuvConstants* yuvconstants,
   1963                           int width);
   1964 void I422ToRGB24Row_AVX2(const uint8* src_y,
   1965                          const uint8* src_u,
   1966                          const uint8* src_v,
   1967                          uint8* dst_rgb24,
   1968                          const struct YuvConstants* yuvconstants,
   1969                          int width);
   1970 void I422ToARGBRow_Any_AVX2(const uint8* src_y,
   1971                             const uint8* src_u,
   1972                             const uint8* src_v,
   1973                             uint8* dst_argb,
   1974                             const struct YuvConstants* yuvconstants,
   1975                             int width);
   1976 void I422ToRGBARow_Any_AVX2(const uint8* src_y,
   1977                             const uint8* src_u,
   1978                             const uint8* src_v,
   1979                             uint8* dst_argb,
   1980                             const struct YuvConstants* yuvconstants,
   1981                             int width);
   1982 void I444ToARGBRow_Any_SSSE3(const uint8* src_y,
   1983                              const uint8* src_u,
   1984                              const uint8* src_v,
   1985                              uint8* dst_argb,
   1986                              const struct YuvConstants* yuvconstants,
   1987                              int width);
   1988 void I444ToARGBRow_Any_AVX2(const uint8* src_y,
   1989                             const uint8* src_u,
   1990                             const uint8* src_v,
   1991                             uint8* dst_argb,
   1992                             const struct YuvConstants* yuvconstants,
   1993                             int width);
   1994 void I422ToARGBRow_Any_SSSE3(const uint8* src_y,
   1995                              const uint8* src_u,
   1996                              const uint8* src_v,
   1997                              uint8* dst_argb,
   1998                              const struct YuvConstants* yuvconstants,
   1999                              int width);
   2000 void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf,
   2001                                   const uint8* u_buf,
   2002                                   const uint8* v_buf,
   2003                                   const uint8* a_buf,
   2004                                   uint8* dst_argb,
   2005                                   const struct YuvConstants* yuvconstants,
   2006                                   int width);
   2007 void I422AlphaToARGBRow_Any_AVX2(const uint8* y_buf,
   2008                                  const uint8* u_buf,
   2009                                  const uint8* v_buf,
   2010                                  const uint8* a_buf,
   2011                                  uint8* dst_argb,
   2012                                  const struct YuvConstants* yuvconstants,
   2013                                  int width);
   2014 void NV12ToARGBRow_Any_SSSE3(const uint8* src_y,
   2015                              const uint8* src_uv,
   2016                              uint8* dst_argb,
   2017                              const struct YuvConstants* yuvconstants,
   2018                              int width);
   2019 void NV12ToARGBRow_Any_AVX2(const uint8* src_y,
   2020                             const uint8* src_uv,
   2021                             uint8* dst_argb,
   2022                             const struct YuvConstants* yuvconstants,
   2023                             int width);
   2024 void NV21ToARGBRow_Any_SSSE3(const uint8* src_y,
   2025                              const uint8* src_vu,
   2026                              uint8* dst_argb,
   2027                              const struct YuvConstants* yuvconstants,
   2028                              int width);
   2029 void NV21ToARGBRow_Any_AVX2(const uint8* src_y,
   2030                             const uint8* src_vu,
   2031                             uint8* dst_argb,
   2032                             const struct YuvConstants* yuvconstants,
   2033                             int width);
   2034 void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y,
   2035                                const uint8* src_uv,
   2036                                uint8* dst_argb,
   2037                                const struct YuvConstants* yuvconstants,
   2038                                int width);
   2039 void NV12ToRGB565Row_Any_AVX2(const uint8* src_y,
   2040                               const uint8* src_uv,
   2041                               uint8* dst_argb,
   2042                               const struct YuvConstants* yuvconstants,
   2043                               int width);
   2044 void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2,
   2045                              uint8* dst_argb,
   2046                              const struct YuvConstants* yuvconstants,
   2047                              int width);
   2048 void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy,
   2049                              uint8* dst_argb,
   2050                              const struct YuvConstants* yuvconstants,
   2051                              int width);
   2052 void YUY2ToARGBRow_Any_AVX2(const uint8* src_yuy2,
   2053                             uint8* dst_argb,
   2054                             const struct YuvConstants* yuvconstants,
   2055                             int width);
   2056 void UYVYToARGBRow_Any_AVX2(const uint8* src_uyvy,
   2057                             uint8* dst_argb,
   2058                             const struct YuvConstants* yuvconstants,
   2059                             int width);
   2060 void I422ToRGBARow_Any_SSSE3(const uint8* src_y,
   2061                              const uint8* src_u,
   2062                              const uint8* src_v,
   2063                              uint8* dst_rgba,
   2064                              const struct YuvConstants* yuvconstants,
   2065                              int width);
   2066 void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y,
   2067                                  const uint8* src_u,
   2068                                  const uint8* src_v,
   2069                                  uint8* dst_rgba,
   2070                                  const struct YuvConstants* yuvconstants,
   2071                                  int width);
   2072 void I422ToARGB4444Row_Any_AVX2(const uint8* src_y,
   2073                                 const uint8* src_u,
   2074                                 const uint8* src_v,
   2075                                 uint8* dst_rgba,
   2076                                 const struct YuvConstants* yuvconstants,
   2077                                 int width);
   2078 void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y,
   2079                                  const uint8* src_u,
   2080                                  const uint8* src_v,
   2081                                  uint8* dst_rgba,
   2082                                  const struct YuvConstants* yuvconstants,
   2083                                  int width);
   2084 void I422ToARGB1555Row_Any_AVX2(const uint8* src_y,
   2085                                 const uint8* src_u,
   2086                                 const uint8* src_v,
   2087                                 uint8* dst_rgba,
   2088                                 const struct YuvConstants* yuvconstants,
   2089                                 int width);
   2090 void I422ToRGB565Row_Any_SSSE3(const uint8* src_y,
   2091                                const uint8* src_u,
   2092                                const uint8* src_v,
   2093                                uint8* dst_rgba,
   2094                                const struct YuvConstants* yuvconstants,
   2095                                int width);
   2096 void I422ToRGB565Row_Any_AVX2(const uint8* src_y,
   2097                               const uint8* src_u,
   2098                               const uint8* src_v,
   2099                               uint8* dst_rgba,
   2100                               const struct YuvConstants* yuvconstants,
   2101                               int width);
   2102 void I422ToRGB24Row_Any_SSSE3(const uint8* src_y,
   2103                               const uint8* src_u,
   2104                               const uint8* src_v,
   2105                               uint8* dst_argb,
   2106                               const struct YuvConstants* yuvconstants,
   2107                               int width);
   2108 void I422ToRGB24Row_Any_AVX2(const uint8* src_y,
   2109                              const uint8* src_u,
   2110                              const uint8* src_v,
   2111                              uint8* dst_argb,
   2112                              const struct YuvConstants* yuvconstants,
   2113                              int width);
   2114 
   2115 void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width);
   2116 void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
   2117 void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
   2118 void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width);
   2119 void I400ToARGBRow_MSA(const uint8* src_y, uint8* dst_argb, int width);
   2120 void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width);
   2121 void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width);
   2122 void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width);
   2123 void I400ToARGBRow_Any_MSA(const uint8* src_y, uint8* dst_argb, int width);
   2124 
   2125 // ARGB preattenuated alpha blend.
   2126 void ARGBBlendRow_SSSE3(const uint8* src_argb,
   2127                         const uint8* src_argb1,
   2128                         uint8* dst_argb,
   2129                         int width);
   2130 void ARGBBlendRow_NEON(const uint8* src_argb,
   2131                        const uint8* src_argb1,
   2132                        uint8* dst_argb,
   2133                        int width);
   2134 void ARGBBlendRow_C(const uint8* src_argb,
   2135                     const uint8* src_argb1,
   2136                     uint8* dst_argb,
   2137                     int width);
   2138 
   2139 // Unattenuated planar alpha blend.
   2140 void BlendPlaneRow_SSSE3(const uint8* src0,
   2141                          const uint8* src1,
   2142                          const uint8* alpha,
   2143                          uint8* dst,
   2144                          int width);
   2145 void BlendPlaneRow_Any_SSSE3(const uint8* src0,
   2146                              const uint8* src1,
   2147                              const uint8* alpha,
   2148                              uint8* dst,
   2149                              int width);
   2150 void BlendPlaneRow_AVX2(const uint8* src0,
   2151                         const uint8* src1,
   2152                         const uint8* alpha,
   2153                         uint8* dst,
   2154                         int width);
   2155 void BlendPlaneRow_Any_AVX2(const uint8* src0,
   2156                             const uint8* src1,
   2157                             const uint8* alpha,
   2158                             uint8* dst,
   2159                             int width);
   2160 void BlendPlaneRow_C(const uint8* src0,
   2161                      const uint8* src1,
   2162                      const uint8* alpha,
   2163                      uint8* dst,
   2164                      int width);
   2165 
   2166 // ARGB multiply images. Same API as Blend, but these require
   2167 // pointer and width alignment for SSE2.
   2168 void ARGBMultiplyRow_C(const uint8* src_argb,
   2169                        const uint8* src_argb1,
   2170                        uint8* dst_argb,
   2171                        int width);
   2172 void ARGBMultiplyRow_SSE2(const uint8* src_argb,
   2173                           const uint8* src_argb1,
   2174                           uint8* dst_argb,
   2175                           int width);
   2176 void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb,
   2177                               const uint8* src_argb1,
   2178                               uint8* dst_argb,
   2179                               int width);
   2180 void ARGBMultiplyRow_AVX2(const uint8* src_argb,
   2181                           const uint8* src_argb1,
   2182                           uint8* dst_argb,
   2183                           int width);
   2184 void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb,
   2185                               const uint8* src_argb1,
   2186                               uint8* dst_argb,
   2187                               int width);
   2188 void ARGBMultiplyRow_NEON(const uint8* src_argb,
   2189                           const uint8* src_argb1,
   2190                           uint8* dst_argb,
   2191                           int width);
   2192 void ARGBMultiplyRow_Any_NEON(const uint8* src_argb,
   2193                               const uint8* src_argb1,
   2194                               uint8* dst_argb,
   2195                               int width);
   2196 void ARGBMultiplyRow_MSA(const uint8* src_argb,
   2197                          const uint8* src_argb1,
   2198                          uint8* dst_argb,
   2199                          int width);
   2200 void ARGBMultiplyRow_Any_MSA(const uint8* src_argb,
   2201                              const uint8* src_argb1,
   2202                              uint8* dst_argb,
   2203                              int width);
   2204 
   2205 // ARGB add images.
   2206 void ARGBAddRow_C(const uint8* src_argb,
   2207                   const uint8* src_argb1,
   2208                   uint8* dst_argb,
   2209                   int width);
   2210 void ARGBAddRow_SSE2(const uint8* src_argb,
   2211                      const uint8* src_argb1,
   2212                      uint8* dst_argb,
   2213                      int width);
   2214 void ARGBAddRow_Any_SSE2(const uint8* src_argb,
   2215                          const uint8* src_argb1,
   2216                          uint8* dst_argb,
   2217                          int width);
   2218 void ARGBAddRow_AVX2(const uint8* src_argb,
   2219                      const uint8* src_argb1,
   2220                      uint8* dst_argb,
   2221                      int width);
   2222 void ARGBAddRow_Any_AVX2(const uint8* src_argb,
   2223                          const uint8* src_argb1,
   2224                          uint8* dst_argb,
   2225                          int width);
   2226 void ARGBAddRow_NEON(const uint8* src_argb,
   2227                      const uint8* src_argb1,
   2228                      uint8* dst_argb,
   2229                      int width);
   2230 void ARGBAddRow_Any_NEON(const uint8* src_argb,
   2231                          const uint8* src_argb1,
   2232                          uint8* dst_argb,
   2233                          int width);
   2234 void ARGBAddRow_MSA(const uint8* src_argb,
   2235                     const uint8* src_argb1,
   2236                     uint8* dst_argb,
   2237                     int width);
   2238 void ARGBAddRow_Any_MSA(const uint8* src_argb,
   2239                         const uint8* src_argb1,
   2240                         uint8* dst_argb,
   2241                         int width);
   2242 
   2243 // ARGB subtract images. Same API as Blend, but these require
   2244 // pointer and width alignment for SSE2.
   2245 void ARGBSubtractRow_C(const uint8* src_argb,
   2246                        const uint8* src_argb1,
   2247                        uint8* dst_argb,
   2248                        int width);
   2249 void ARGBSubtractRow_SSE2(const uint8* src_argb,
   2250                           const uint8* src_argb1,
   2251                           uint8* dst_argb,
   2252                           int width);
   2253 void ARGBSubtractRow_Any_SSE2(const uint8* src_argb,
   2254                               const uint8* src_argb1,
   2255                               uint8* dst_argb,
   2256                               int width);
   2257 void ARGBSubtractRow_AVX2(const uint8* src_argb,
   2258                           const uint8* src_argb1,
   2259                           uint8* dst_argb,
   2260                           int width);
   2261 void ARGBSubtractRow_Any_AVX2(const uint8* src_argb,
   2262                               const uint8* src_argb1,
   2263                               uint8* dst_argb,
   2264                               int width);
   2265 void ARGBSubtractRow_NEON(const uint8* src_argb,
   2266                           const uint8* src_argb1,
   2267                           uint8* dst_argb,
   2268                           int width);
   2269 void ARGBSubtractRow_Any_NEON(const uint8* src_argb,
   2270                               const uint8* src_argb1,
   2271                               uint8* dst_argb,
   2272                               int width);
   2273 void ARGBSubtractRow_MSA(const uint8* src_argb,
   2274                          const uint8* src_argb1,
   2275                          uint8* dst_argb,
   2276                          int width);
   2277 void ARGBSubtractRow_Any_MSA(const uint8* src_argb,
   2278                              const uint8* src_argb1,
   2279                              uint8* dst_argb,
   2280                              int width);
   2281 
   2282 void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
   2283 void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
   2284 void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
   2285 void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb,
   2286                                 uint8* dst_rgb,
   2287                                 int width);
   2288 void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb,
   2289                                 uint8* dst_rgb,
   2290                                 int width);
   2291 
   2292 void ARGBToRGB565DitherRow_Any_SSE2(const uint8* src_argb,
   2293                                     uint8* dst_rgb,
   2294                                     const uint32 dither4,
   2295                                     int width);
   2296 void ARGBToRGB565DitherRow_Any_AVX2(const uint8* src_argb,
   2297                                     uint8* dst_rgb,
   2298                                     const uint32 dither4,
   2299                                     int width);
   2300 
   2301 void ARGBToRGB565Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
   2302 void ARGBToARGB1555Row_Any_AVX2(const uint8* src_argb,
   2303                                 uint8* dst_rgb,
   2304                                 int width);
   2305 void ARGBToARGB4444Row_Any_AVX2(const uint8* src_argb,
   2306                                 uint8* dst_rgb,
   2307                                 int width);
   2308 
   2309 void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   2310 void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   2311 void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
   2312 void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb,
   2313                                 uint8* dst_rgb,
   2314                                 int width);
   2315 void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb,
   2316                                 uint8* dst_rgb,
   2317                                 int width);
   2318 void ARGBToRGB565DitherRow_Any_NEON(const uint8* src_argb,
   2319                                     uint8* dst_rgb,
   2320                                     const uint32 dither4,
   2321                                     int width);
   2322 void ARGBToRGB24Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   2323 void ARGBToRAWRow_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   2324 void ARGBToRGB565Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
   2325 void ARGBToARGB1555Row_Any_MSA(const uint8* src_argb,
   2326                                uint8* dst_rgb,
   2327                                int width);
   2328 void ARGBToARGB4444Row_Any_MSA(const uint8* src_argb,
   2329                                uint8* dst_rgb,
   2330                                int width);
   2331 void ARGBToRGB565DitherRow_Any_MSA(const uint8* src_argb,
   2332                                    uint8* dst_rgb,
   2333                                    const uint32 dither4,
   2334                                    int width);
   2335 
   2336 void I444ToARGBRow_Any_NEON(const uint8* src_y,
   2337                             const uint8* src_u,
   2338                             const uint8* src_v,
   2339                             uint8* dst_argb,
   2340                             const struct YuvConstants* yuvconstants,
   2341                             int width);
   2342 void I422ToARGBRow_Any_NEON(const uint8* src_y,
   2343                             const uint8* src_u,
   2344                             const uint8* src_v,
   2345                             uint8* dst_argb,
   2346                             const struct YuvConstants* yuvconstants,
   2347                             int width);
   2348 void I422AlphaToARGBRow_Any_NEON(const uint8* src_y,
   2349                                  const uint8* src_u,
   2350                                  const uint8* src_v,
   2351                                  const uint8* src_a,
   2352                                  uint8* dst_argb,
   2353                                  const struct YuvConstants* yuvconstants,
   2354                                  int width);
   2355 void I422ToRGBARow_Any_NEON(const uint8* src_y,
   2356                             const uint8* src_u,
   2357                             const uint8* src_v,
   2358                             uint8* dst_argb,
   2359                             const struct YuvConstants* yuvconstants,
   2360                             int width);
   2361 void I422ToRGB24Row_Any_NEON(const uint8* src_y,
   2362                              const uint8* src_u,
   2363                              const uint8* src_v,
   2364                              uint8* dst_argb,
   2365                              const struct YuvConstants* yuvconstants,
   2366                              int width);
   2367 void I422ToARGB4444Row_Any_NEON(const uint8* src_y,
   2368                                 const uint8* src_u,
   2369                                 const uint8* src_v,
   2370                                 uint8* dst_argb,
   2371                                 const struct YuvConstants* yuvconstants,
   2372                                 int width);
   2373 void I422ToARGB1555Row_Any_NEON(const uint8* src_y,
   2374                                 const uint8* src_u,
   2375                                 const uint8* src_v,
   2376                                 uint8* dst_argb,
   2377                                 const struct YuvConstants* yuvconstants,
   2378                                 int width);
   2379 void I422ToRGB565Row_Any_NEON(const uint8* src_y,
   2380                               const uint8* src_u,
   2381                               const uint8* src_v,
   2382                               uint8* dst_argb,
   2383                               const struct YuvConstants* yuvconstants,
   2384                               int width);
   2385 void NV12ToARGBRow_Any_NEON(const uint8* src_y,
   2386                             const uint8* src_uv,
   2387                             uint8* dst_argb,
   2388                             const struct YuvConstants* yuvconstants,
   2389                             int width);
   2390 void NV21ToARGBRow_Any_NEON(const uint8* src_y,
   2391                             const uint8* src_vu,
   2392                             uint8* dst_argb,
   2393                             const struct YuvConstants* yuvconstants,
   2394                             int width);
   2395 void NV12ToRGB565Row_Any_NEON(const uint8* src_y,
   2396                               const uint8* src_uv,
   2397                               uint8* dst_argb,
   2398                               const struct YuvConstants* yuvconstants,
   2399                               int width);
   2400 void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2,
   2401                             uint8* dst_argb,
   2402                             const struct YuvConstants* yuvconstants,
   2403                             int width);
   2404 void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy,
   2405                             uint8* dst_argb,
   2406                             const struct YuvConstants* yuvconstants,
   2407                             int width);
   2408 void I444ToARGBRow_Any_DSPR2(const uint8* src_y,
   2409                              const uint8* src_u,
   2410                              const uint8* src_v,
   2411                              uint8* dst_argb,
   2412                              const struct YuvConstants* yuvconstants,
   2413                              int width);
   2414 void I422ToARGB4444Row_Any_DSPR2(const uint8* src_y,
   2415                                  const uint8* src_u,
   2416                                  const uint8* src_v,
   2417                                  uint8* dst_argb,
   2418                                  const struct YuvConstants* yuvconstants,
   2419                                  int width);
   2420 void I422ToARGBRow_Any_DSPR2(const uint8* src_y,
   2421                              const uint8* src_u,
   2422                              const uint8* src_v,
   2423                              uint8* dst_argb,
   2424                              const struct YuvConstants* yuvconstants,
   2425                              int width);
   2426 void I422ToARGBRow_DSPR2(const uint8* src_y,
   2427                          const uint8* src_u,
   2428                          const uint8* src_v,
   2429                          uint8* dst_argb,
   2430                          const struct YuvConstants* yuvconstants,
   2431                          int width);
   2432 void I422ToARGB1555Row_Any_DSPR2(const uint8* src_y,
   2433                                  const uint8* src_u,
   2434                                  const uint8* src_v,
   2435                                  uint8* dst_argb,
   2436                                  const struct YuvConstants* yuvconstants,
   2437                                  int width);
   2438 void I411ToARGBRow_Any_DSPR2(const uint8* src_y,
   2439                              const uint8* src_u,
   2440                              const uint8* src_v,
   2441                              uint8* dst_argb,
   2442                              const struct YuvConstants* yuvconstants,
   2443                              int width);
   2444 void NV12ToARGBRow_Any_DSPR2(const uint8* src_y,
   2445                              const uint8* src_uv,
   2446                              uint8* dst_argb,
   2447                              const struct YuvConstants* yuvconstants,
   2448                              int width);
   2449 void I422ToARGBRow_DSPR2(const uint8* src_y,
   2450                          const uint8* src_u,
   2451                          const uint8* src_v,
   2452                          uint8* dst_argb,
   2453                          const struct YuvConstants* yuvconstants,
   2454                          int width);
   2455 void I444ToARGBRow_Any_MSA(const uint8* src_y,
   2456                            const uint8* src_u,
   2457                            const uint8* src_v,
   2458                            uint8* dst_argb,
   2459                            const struct YuvConstants* yuvconstants,
   2460                            int width);
   2461 void I422ToARGBRow_Any_MSA(const uint8* src_y,
   2462                            const uint8* src_u,
   2463                            const uint8* src_v,
   2464                            uint8* dst_argb,
   2465                            const struct YuvConstants* yuvconstants,
   2466                            int width);
   2467 void I422ToRGBARow_Any_MSA(const uint8* src_y,
   2468                            const uint8* src_u,
   2469                            const uint8* src_v,
   2470                            uint8* dst_argb,
   2471                            const struct YuvConstants* yuvconstants,
   2472                            int width);
   2473 void I422AlphaToARGBRow_Any_MSA(const uint8* src_y,
   2474                                 const uint8* src_u,
   2475                                 const uint8* src_v,
   2476                                 const uint8* src_a,
   2477                                 uint8* dst_argb,
   2478                                 const struct YuvConstants* yuvconstants,
   2479                                 int width);
   2480 void I422ToRGB24Row_Any_MSA(const uint8* src_y,
   2481                             const uint8* src_u,
   2482                             const uint8* src_v,
   2483                             uint8* dst_rgb24,
   2484                             const struct YuvConstants* yuvconstants,
   2485                             int width);
   2486 void I422ToRGB565Row_Any_MSA(const uint8* src_y,
   2487                              const uint8* src_u,
   2488                              const uint8* src_v,
   2489                              uint8* dst_rgb565,
   2490                              const struct YuvConstants* yuvconstants,
   2491                              int width);
   2492 void I422ToARGB4444Row_Any_MSA(const uint8* src_y,
   2493                                const uint8* src_u,
   2494                                const uint8* src_v,
   2495                                uint8* dst_argb4444,
   2496                                const struct YuvConstants* yuvconstants,
   2497                                int width);
   2498 void I422ToARGB1555Row_Any_MSA(const uint8* src_y,
   2499                                const uint8* src_u,
   2500                                const uint8* src_v,
   2501                                uint8* dst_argb1555,
   2502                                const struct YuvConstants* yuvconstants,
   2503                                int width);
   2504 void NV12ToARGBRow_Any_MSA(const uint8* src_y,
   2505                            const uint8* src_uv,
   2506                            uint8* dst_argb,
   2507                            const struct YuvConstants* yuvconstants,
   2508                            int width);
   2509 void NV12ToRGB565Row_Any_MSA(const uint8* src_y,
   2510                              const uint8* src_uv,
   2511                              uint8* dst_argb,
   2512                              const struct YuvConstants* yuvconstants,
   2513                              int width);
   2514 void NV21ToARGBRow_Any_MSA(const uint8* src_y,
   2515                            const uint8* src_vu,
   2516                            uint8* dst_argb,
   2517                            const struct YuvConstants* yuvconstants,
   2518                            int width);
   2519 void YUY2ToARGBRow_Any_MSA(const uint8* src_yuy2,
   2520                            uint8* dst_argb,
   2521                            const struct YuvConstants* yuvconstants,
   2522                            int width);
   2523 void UYVYToARGBRow_Any_MSA(const uint8* src_uyvy,
   2524                            uint8* dst_argb,
   2525                            const struct YuvConstants* yuvconstants,
   2526                            int width);
   2527 
   2528 void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int width);
   2529 void YUY2ToUVRow_AVX2(const uint8* src_yuy2,
   2530                       int stride_yuy2,
   2531                       uint8* dst_u,
   2532                       uint8* dst_v,
   2533                       int width);
   2534 void YUY2ToUV422Row_AVX2(const uint8* src_yuy2,
   2535                          uint8* dst_u,
   2536                          uint8* dst_v,
   2537                          int width);
   2538 void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int width);
   2539 void YUY2ToUVRow_SSE2(const uint8* src_yuy2,
   2540                       int stride_yuy2,
   2541                       uint8* dst_u,
   2542                       uint8* dst_v,
   2543                       int width);
   2544 void YUY2ToUV422Row_SSE2(const uint8* src_yuy2,
   2545                          uint8* dst_u,
   2546                          uint8* dst_v,
   2547                          int width);
   2548 void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int width);
   2549 void YUY2ToUVRow_NEON(const uint8* src_yuy2,
   2550                       int stride_yuy2,
   2551                       uint8* dst_u,
   2552                       uint8* dst_v,
   2553                       int width);
   2554 void YUY2ToUV422Row_NEON(const uint8* src_yuy2,
   2555                          uint8* dst_u,
   2556                          uint8* dst_v,
   2557                          int width);
   2558 void YUY2ToYRow_MSA(const uint8* src_yuy2, uint8* dst_y, int width);
   2559 void YUY2ToUVRow_MSA(const uint8* src_yuy2,
   2560                      int stride_yuy2,
   2561                      uint8* dst_u,
   2562                      uint8* dst_v,
   2563                      int width);
   2564 void YUY2ToUV422Row_MSA(const uint8* src_yuy2,
   2565                         uint8* dst_u,
   2566                         uint8* dst_v,
   2567                         int width);
   2568 void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int width);
   2569 void YUY2ToUVRow_C(const uint8* src_yuy2,
   2570                    int stride_yuy2,
   2571                    uint8* dst_u,
   2572                    uint8* dst_v,
   2573                    int width);
   2574 void YUY2ToUV422Row_C(const uint8* src_yuy2,
   2575                       uint8* dst_u,
   2576                       uint8* dst_v,
   2577                       int width);
   2578 void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int width);
   2579 void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2,
   2580                           int stride_yuy2,
   2581                           uint8* dst_u,
   2582                           uint8* dst_v,
   2583                           int width);
   2584 void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2,
   2585                              uint8* dst_u,
   2586                              uint8* dst_v,
   2587                              int width);
   2588 void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int width);
   2589 void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2,
   2590                           int stride_yuy2,
   2591                           uint8* dst_u,
   2592                           uint8* dst_v,
   2593                           int width);
   2594 void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2,
   2595                              uint8* dst_u,
   2596                              uint8* dst_v,
   2597                              int width);
   2598 void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int width);
   2599 void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2,
   2600                           int stride_yuy2,
   2601                           uint8* dst_u,
   2602                           uint8* dst_v,
   2603                           int width);
   2604 void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2,
   2605                              uint8* dst_u,
   2606                              uint8* dst_v,
   2607                              int width);
   2608 void YUY2ToYRow_Any_MSA(const uint8* src_yuy2, uint8* dst_y, int width);
   2609 void YUY2ToUVRow_Any_MSA(const uint8* src_yuy2,
   2610                          int stride_yuy2,
   2611                          uint8* dst_u,
   2612                          uint8* dst_v,
   2613                          int width);
   2614 void YUY2ToUV422Row_Any_MSA(const uint8* src_yuy2,
   2615                             uint8* dst_u,
   2616                             uint8* dst_v,
   2617                             int width);
   2618 void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width);
   2619 void UYVYToUVRow_AVX2(const uint8* src_uyvy,
   2620                       int stride_uyvy,
   2621                       uint8* dst_u,
   2622                       uint8* dst_v,
   2623                       int width);
   2624 void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
   2625                          uint8* dst_u,
   2626                          uint8* dst_v,
   2627                          int width);
   2628 void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int width);
   2629 void UYVYToUVRow_SSE2(const uint8* src_uyvy,
   2630                       int stride_uyvy,
   2631                       uint8* dst_u,
   2632                       uint8* dst_v,
   2633                       int width);
   2634 void UYVYToUV422Row_SSE2(const uint8* src_uyvy,
   2635                          uint8* dst_u,
   2636                          uint8* dst_v,
   2637                          int width);
   2638 void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width);
   2639 void UYVYToUVRow_AVX2(const uint8* src_uyvy,
   2640                       int stride_uyvy,
   2641                       uint8* dst_u,
   2642                       uint8* dst_v,
   2643                       int width);
   2644 void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
   2645                          uint8* dst_u,
   2646                          uint8* dst_v,
   2647                          int width);
   2648 void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int width);
   2649 void UYVYToUVRow_NEON(const uint8* src_uyvy,
   2650                       int stride_uyvy,
   2651                       uint8* dst_u,
   2652                       uint8* dst_v,
   2653                       int width);
   2654 void UYVYToUV422Row_NEON(const uint8* src_uyvy,
   2655                          uint8* dst_u,
   2656                          uint8* dst_v,
   2657                          int width);
   2658 void UYVYToYRow_MSA(const uint8* src_uyvy, uint8* dst_y, int width);
   2659 void UYVYToUVRow_MSA(const uint8* src_uyvy,
   2660                      int stride_uyvy,
   2661                      uint8* dst_u,
   2662                      uint8* dst_v,
   2663                      int width);
   2664 void UYVYToUV422Row_MSA(const uint8* src_uyvy,
   2665                         uint8* dst_u,
   2666                         uint8* dst_v,
   2667                         int width);
   2668 
   2669 void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int width);
   2670 void UYVYToUVRow_C(const uint8* src_uyvy,
   2671                    int stride_uyvy,
   2672                    uint8* dst_u,
   2673                    uint8* dst_v,
   2674                    int width);
   2675 void UYVYToUV422Row_C(const uint8* src_uyvy,
   2676                       uint8* dst_u,
   2677                       uint8* dst_v,
   2678                       int width);
   2679 void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int width);
   2680 void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy,
   2681                           int stride_uyvy,
   2682                           uint8* dst_u,
   2683                           uint8* dst_v,
   2684                           int width);
   2685 void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy,
   2686                              uint8* dst_u,
   2687                              uint8* dst_v,
   2688                              int width);
   2689 void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int width);
   2690 void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy,
   2691                           int stride_uyvy,
   2692                           uint8* dst_u,
   2693                           uint8* dst_v,
   2694                           int width);
   2695 void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy,
   2696                              uint8* dst_u,
   2697                              uint8* dst_v,
   2698                              int width);
   2699 void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int width);
   2700 void UYVYToUVRow_Any_NEON(const uint8* src_uyvy,
   2701                           int stride_uyvy,
   2702                           uint8* dst_u,
   2703                           uint8* dst_v,
   2704                           int width);
   2705 void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy,
   2706                              uint8* dst_u,
   2707                              uint8* dst_v,
   2708                              int width);
   2709 void UYVYToYRow_Any_MSA(const uint8* src_uyvy, uint8* dst_y, int width);
   2710 void UYVYToUVRow_Any_MSA(const uint8* src_uyvy,
   2711                          int stride_uyvy,
   2712                          uint8* dst_u,
   2713                          uint8* dst_v,
   2714                          int width);
   2715 void UYVYToUV422Row_Any_MSA(const uint8* src_uyvy,
   2716                             uint8* dst_u,
   2717                             uint8* dst_v,
   2718                             int width);
   2719 
   2720 void I422ToYUY2Row_C(const uint8* src_y,
   2721                      const uint8* src_u,
   2722                      const uint8* src_v,
   2723                      uint8* dst_yuy2,
   2724                      int width);
   2725 void I422ToUYVYRow_C(const uint8* src_y,
   2726                      const uint8* src_u,
   2727                      const uint8* src_v,
   2728                      uint8* dst_uyvy,
   2729                      int width);
   2730 void I422ToYUY2Row_SSE2(const uint8* src_y,
   2731                         const uint8* src_u,
   2732                         const uint8* src_v,
   2733                         uint8* dst_yuy2,
   2734                         int width);
   2735 void I422ToUYVYRow_SSE2(const uint8* src_y,
   2736                         const uint8* src_u,
   2737                         const uint8* src_v,
   2738                         uint8* dst_uyvy,
   2739                         int width);
   2740 void I422ToYUY2Row_Any_SSE2(const uint8* src_y,
   2741                             const uint8* src_u,
   2742                             const uint8* src_v,
   2743                             uint8* dst_yuy2,
   2744                             int width);
   2745 void I422ToUYVYRow_Any_SSE2(const uint8* src_y,
   2746                             const uint8* src_u,
   2747                             const uint8* src_v,
   2748                             uint8* dst_uyvy,
   2749                             int width);
   2750 void I422ToYUY2Row_NEON(const uint8* src_y,
   2751                         const uint8* src_u,
   2752                         const uint8* src_v,
   2753                         uint8* dst_yuy2,
   2754                         int width);
   2755 void I422ToUYVYRow_NEON(const uint8* src_y,
   2756                         const uint8* src_u,
   2757                         const uint8* src_v,
   2758                         uint8* dst_uyvy,
   2759                         int width);
   2760 void I422ToYUY2Row_Any_NEON(const uint8* src_y,
   2761                             const uint8* src_u,
   2762                             const uint8* src_v,
   2763                             uint8* dst_yuy2,
   2764                             int width);
   2765 void I422ToUYVYRow_Any_NEON(const uint8* src_y,
   2766                             const uint8* src_u,
   2767                             const uint8* src_v,
   2768                             uint8* dst_uyvy,
   2769                             int width);
   2770 void I422ToYUY2Row_MSA(const uint8* src_y,
   2771                        const uint8* src_u,
   2772                        const uint8* src_v,
   2773                        uint8* dst_yuy2,
   2774                        int width);
   2775 void I422ToUYVYRow_MSA(const uint8* src_y,
   2776                        const uint8* src_u,
   2777                        const uint8* src_v,
   2778                        uint8* dst_uyvy,
   2779                        int width);
   2780 void I422ToYUY2Row_Any_MSA(const uint8* src_y,
   2781                            const uint8* src_u,
   2782                            const uint8* src_v,
   2783                            uint8* dst_yuy2,
   2784                            int width);
   2785 void I422ToUYVYRow_Any_MSA(const uint8* src_y,
   2786                            const uint8* src_u,
   2787                            const uint8* src_v,
   2788                            uint8* dst_uyvy,
   2789                            int width);
   2790 
   2791 // Effects related row functions.
   2792 void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
   2793 void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
   2794 void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
   2795 void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
   2796 void ARGBAttenuateRow_MSA(const uint8* src_argb, uint8* dst_argb, int width);
   2797 void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb,
   2798                                uint8* dst_argb,
   2799                                int width);
   2800 void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb,
   2801                                 uint8* dst_argb,
   2802                                 int width);
   2803 void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb,
   2804                                uint8* dst_argb,
   2805                                int width);
   2806 void ARGBAttenuateRow_Any_NEON(const uint8* src_argb,
   2807                                uint8* dst_argb,
   2808                                int width);
   2809 void ARGBAttenuateRow_Any_MSA(const uint8* src_argb,
   2810                               uint8* dst_argb,
   2811                               int width);
   2812 
   2813 // Inverse table for unattenuate, shared by C and SSE2.
   2814 extern const uint32 fixed_invtbl8[256];
   2815 void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
   2816 void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
   2817 void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
   2818 void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb,
   2819                                  uint8* dst_argb,
   2820                                  int width);
   2821 void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb,
   2822                                  uint8* dst_argb,
   2823                                  int width);
   2824 
   2825 void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width);
   2826 void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
   2827 void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
   2828 void ARGBGrayRow_MSA(const uint8* src_argb, uint8* dst_argb, int width);
   2829 
   2830 void ARGBSepiaRow_C(uint8* dst_argb, int width);
   2831 void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width);
   2832 void ARGBSepiaRow_NEON(uint8* dst_argb, int width);
   2833 void ARGBSepiaRow_MSA(uint8* dst_argb, int width);
   2834 
   2835 void ARGBColorMatrixRow_C(const uint8* src_argb,
   2836                           uint8* dst_argb,
   2837                           const int8* matrix_argb,
   2838                           int width);
   2839 void ARGBColorMatrixRow_SSSE3(const uint8* src_argb,
   2840                               uint8* dst_argb,
   2841                               const int8* matrix_argb,
   2842                               int width);
   2843 void ARGBColorMatrixRow_NEON(const uint8* src_argb,
   2844                              uint8* dst_argb,
   2845                              const int8* matrix_argb,
   2846                              int width);
   2847 
   2848 void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
   2849 void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
   2850 
   2851 void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
   2852 void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
   2853 
   2854 void ARGBQuantizeRow_C(uint8* dst_argb,
   2855                        int scale,
   2856                        int interval_size,
   2857                        int interval_offset,
   2858                        int width);
   2859 void ARGBQuantizeRow_SSE2(uint8* dst_argb,
   2860                           int scale,
   2861                           int interval_size,
   2862                           int interval_offset,
   2863                           int width);
   2864 void ARGBQuantizeRow_NEON(uint8* dst_argb,
   2865                           int scale,
   2866                           int interval_size,
   2867                           int interval_offset,
   2868                           int width);
   2869 
   2870 void ARGBShadeRow_C(const uint8* src_argb,
   2871                     uint8* dst_argb,
   2872                     int width,
   2873                     uint32 value);
   2874 void ARGBShadeRow_SSE2(const uint8* src_argb,
   2875                        uint8* dst_argb,
   2876                        int width,
   2877                        uint32 value);
   2878 void ARGBShadeRow_NEON(const uint8* src_argb,
   2879                        uint8* dst_argb,
   2880                        int width,
   2881                        uint32 value);
   2882 void ARGBShadeRow_MSA(const uint8* src_argb,
   2883                       uint8* dst_argb,
   2884                       int width,
   2885                       uint32 value);
   2886 
   2887 // Used for blur.
   2888 void CumulativeSumToAverageRow_SSE2(const int32* topleft,
   2889                                     const int32* botleft,
   2890                                     int width,
   2891                                     int area,
   2892                                     uint8* dst,
   2893                                     int count);
   2894 void ComputeCumulativeSumRow_SSE2(const uint8* row,
   2895                                   int32* cumsum,
   2896                                   const int32* previous_cumsum,
   2897                                   int width);
   2898 
   2899 void CumulativeSumToAverageRow_C(const int32* topleft,
   2900                                  const int32* botleft,
   2901                                  int width,
   2902                                  int area,
   2903                                  uint8* dst,
   2904                                  int count);
   2905 void ComputeCumulativeSumRow_C(const uint8* row,
   2906                                int32* cumsum,
   2907                                const int32* previous_cumsum,
   2908                                int width);
   2909 
   2910 LIBYUV_API
   2911 void ARGBAffineRow_C(const uint8* src_argb,
   2912                      int src_argb_stride,
   2913                      uint8* dst_argb,
   2914                      const float* uv_dudv,
   2915                      int width);
   2916 LIBYUV_API
   2917 void ARGBAffineRow_SSE2(const uint8* src_argb,
   2918                         int src_argb_stride,
   2919                         uint8* dst_argb,
   2920                         const float* uv_dudv,
   2921                         int width);
   2922 
   2923 // Used for I420Scale, ARGBScale, and ARGBInterpolate.
   2924 void InterpolateRow_C(uint8* dst_ptr,
   2925                       const uint8* src_ptr,
   2926                       ptrdiff_t src_stride_ptr,
   2927                       int width,
   2928                       int source_y_fraction);
   2929 void InterpolateRow_SSSE3(uint8* dst_ptr,
   2930                           const uint8* src_ptr,
   2931                           ptrdiff_t src_stride_ptr,
   2932                           int width,
   2933                           int source_y_fraction);
   2934 void InterpolateRow_AVX2(uint8* dst_ptr,
   2935                          const uint8* src_ptr,
   2936                          ptrdiff_t src_stride_ptr,
   2937                          int width,
   2938                          int source_y_fraction);
   2939 void InterpolateRow_NEON(uint8* dst_ptr,
   2940                          const uint8* src_ptr,
   2941                          ptrdiff_t src_stride_ptr,
   2942                          int width,
   2943                          int source_y_fraction);
   2944 void InterpolateRow_DSPR2(uint8* dst_ptr,
   2945                           const uint8* src_ptr,
   2946                           ptrdiff_t src_stride_ptr,
   2947                           int width,
   2948                           int source_y_fraction);
   2949 void InterpolateRow_MSA(uint8* dst_ptr,
   2950                         const uint8* src_ptr,
   2951                         ptrdiff_t src_stride_ptr,
   2952                         int width,
   2953                         int source_y_fraction);
   2954 void InterpolateRow_Any_NEON(uint8* dst_ptr,
   2955                              const uint8* src_ptr,
   2956                              ptrdiff_t src_stride_ptr,
   2957                              int width,
   2958                              int source_y_fraction);
   2959 void InterpolateRow_Any_SSSE3(uint8* dst_ptr,
   2960                               const uint8* src_ptr,
   2961                               ptrdiff_t src_stride_ptr,
   2962                               int width,
   2963                               int source_y_fraction);
   2964 void InterpolateRow_Any_AVX2(uint8* dst_ptr,
   2965                              const uint8* src_ptr,
   2966                              ptrdiff_t src_stride_ptr,
   2967                              int width,
   2968                              int source_y_fraction);
   2969 void InterpolateRow_Any_DSPR2(uint8* dst_ptr,
   2970                               const uint8* src_ptr,
   2971                               ptrdiff_t src_stride_ptr,
   2972                               int width,
   2973                               int source_y_fraction);
   2974 void InterpolateRow_Any_MSA(uint8* dst_ptr,
   2975                             const uint8* src_ptr,
   2976                             ptrdiff_t src_stride_ptr,
   2977                             int width,
   2978                             int source_y_fraction);
   2979 
   2980 void InterpolateRow_16_C(uint16* dst_ptr,
   2981                          const uint16* src_ptr,
   2982                          ptrdiff_t src_stride_ptr,
   2983                          int width,
   2984                          int source_y_fraction);
   2985 
   2986 // Sobel images.
   2987 void SobelXRow_C(const uint8* src_y0,
   2988                  const uint8* src_y1,
   2989                  const uint8* src_y2,
   2990                  uint8* dst_sobelx,
   2991                  int width);
   2992 void SobelXRow_SSE2(const uint8* src_y0,
   2993                     const uint8* src_y1,
   2994                     const uint8* src_y2,
   2995                     uint8* dst_sobelx,
   2996                     int width);
   2997 void SobelXRow_NEON(const uint8* src_y0,
   2998                     const uint8* src_y1,
   2999                     const uint8* src_y2,
   3000                     uint8* dst_sobelx,
   3001                     int width);
   3002 void SobelYRow_C(const uint8* src_y0,
   3003                  const uint8* src_y1,
   3004                  uint8* dst_sobely,
   3005                  int width);
   3006 void SobelYRow_SSE2(const uint8* src_y0,
   3007                     const uint8* src_y1,
   3008                     uint8* dst_sobely,
   3009                     int width);
   3010 void SobelYRow_NEON(const uint8* src_y0,
   3011                     const uint8* src_y1,
   3012                     uint8* dst_sobely,
   3013                     int width);
   3014 void SobelRow_C(const uint8* src_sobelx,
   3015                 const uint8* src_sobely,
   3016                 uint8* dst_argb,
   3017                 int width);
   3018 void SobelRow_SSE2(const uint8* src_sobelx,
   3019                    const uint8* src_sobely,
   3020                    uint8* dst_argb,
   3021                    int width);
   3022 void SobelRow_NEON(const uint8* src_sobelx,
   3023                    const uint8* src_sobely,
   3024                    uint8* dst_argb,
   3025                    int width);
   3026 void SobelRow_MSA(const uint8* src_sobelx,
   3027                   const uint8* src_sobely,
   3028                   uint8* dst_argb,
   3029                   int width);
   3030 void SobelToPlaneRow_C(const uint8* src_sobelx,
   3031                        const uint8* src_sobely,
   3032                        uint8* dst_y,
   3033                        int width);
   3034 void SobelToPlaneRow_SSE2(const uint8* src_sobelx,
   3035                           const uint8* src_sobely,
   3036                           uint8* dst_y,
   3037                           int width);
   3038 void SobelToPlaneRow_NEON(const uint8* src_sobelx,
   3039                           const uint8* src_sobely,
   3040                           uint8* dst_y,
   3041                           int width);
   3042 void SobelToPlaneRow_MSA(const uint8* src_sobelx,
   3043                          const uint8* src_sobely,
   3044                          uint8* dst_y,
   3045                          int width);
   3046 void SobelXYRow_C(const uint8* src_sobelx,
   3047                   const uint8* src_sobely,
   3048                   uint8* dst_argb,
   3049                   int width);
   3050 void SobelXYRow_SSE2(const uint8* src_sobelx,
   3051                      const uint8* src_sobely,
   3052                      uint8* dst_argb,
   3053                      int width);
   3054 void SobelXYRow_NEON(const uint8* src_sobelx,
   3055                      const uint8* src_sobely,
   3056                      uint8* dst_argb,
   3057                      int width);
   3058 void SobelXYRow_MSA(const uint8* src_sobelx,
   3059                     const uint8* src_sobely,
   3060                     uint8* dst_argb,
   3061                     int width);
   3062 void SobelRow_Any_SSE2(const uint8* src_sobelx,
   3063                        const uint8* src_sobely,
   3064                        uint8* dst_argb,
   3065                        int width);
   3066 void SobelRow_Any_NEON(const uint8* src_sobelx,
   3067                        const uint8* src_sobely,
   3068                        uint8* dst_argb,
   3069                        int width);
   3070 void SobelRow_Any_MSA(const uint8* src_sobelx,
   3071                       const uint8* src_sobely,
   3072                       uint8* dst_argb,
   3073                       int width);
   3074 void SobelToPlaneRow_Any_SSE2(const uint8* src_sobelx,
   3075                               const uint8* src_sobely,
   3076                               uint8* dst_y,
   3077                               int width);
   3078 void SobelToPlaneRow_Any_NEON(const uint8* src_sobelx,
   3079                               const uint8* src_sobely,
   3080                               uint8* dst_y,
   3081                               int width);
   3082 void SobelToPlaneRow_Any_MSA(const uint8* src_sobelx,
   3083                              const uint8* src_sobely,
   3084                              uint8* dst_y,
   3085                              int width);
   3086 void SobelXYRow_Any_SSE2(const uint8* src_sobelx,
   3087                          const uint8* src_sobely,
   3088                          uint8* dst_argb,
   3089                          int width);
   3090 void SobelXYRow_Any_NEON(const uint8* src_sobelx,
   3091                          const uint8* src_sobely,
   3092                          uint8* dst_argb,
   3093                          int width);
   3094 void SobelXYRow_Any_MSA(const uint8* src_sobelx,
   3095                         const uint8* src_sobely,
   3096                         uint8* dst_argb,
   3097                         int width);
   3098 
   3099 void ARGBPolynomialRow_C(const uint8* src_argb,
   3100                          uint8* dst_argb,
   3101                          const float* poly,
   3102                          int width);
   3103 void ARGBPolynomialRow_SSE2(const uint8* src_argb,
   3104                             uint8* dst_argb,
   3105                             const float* poly,
   3106                             int width);
   3107 void ARGBPolynomialRow_AVX2(const uint8* src_argb,
   3108                             uint8* dst_argb,
   3109                             const float* poly,
   3110                             int width);
   3111 
   3112 // Scale and convert to half float.
   3113 void HalfFloatRow_C(const uint16* src, uint16* dst, float scale, int width);
   3114 void HalfFloatRow_SSE2(const uint16* src, uint16* dst, float scale, int width);
   3115 void HalfFloatRow_Any_SSE2(const uint16* src,
   3116                            uint16* dst,
   3117                            float scale,
   3118                            int width);
   3119 void HalfFloatRow_AVX2(const uint16* src, uint16* dst, float scale, int width);
   3120 void HalfFloatRow_Any_AVX2(const uint16* src,
   3121                            uint16* dst,
   3122                            float scale,
   3123                            int width);
   3124 void HalfFloatRow_F16C(const uint16* src, uint16* dst, float scale, int width);
   3125 void HalfFloatRow_Any_F16C(const uint16* src,
   3126                            uint16* dst,
   3127                            float scale,
   3128                            int width);
   3129 void HalfFloat1Row_F16C(const uint16* src, uint16* dst, float scale, int width);
   3130 void HalfFloat1Row_Any_F16C(const uint16* src,
   3131                             uint16* dst,
   3132                             float scale,
   3133                             int width);
   3134 void HalfFloatRow_NEON(const uint16* src, uint16* dst, float scale, int width);
   3135 void HalfFloatRow_Any_NEON(const uint16* src,
   3136                            uint16* dst,
   3137                            float scale,
   3138                            int width);
   3139 void HalfFloat1Row_NEON(const uint16* src, uint16* dst, float scale, int width);
   3140 void HalfFloat1Row_Any_NEON(const uint16* src,
   3141                             uint16* dst,
   3142                             float scale,
   3143                             int width);
   3144 
   3145 void ARGBLumaColorTableRow_C(const uint8* src_argb,
   3146                              uint8* dst_argb,
   3147                              int width,
   3148                              const uint8* luma,
   3149                              uint32 lumacoeff);
   3150 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb,
   3151                                  uint8* dst_argb,
   3152                                  int width,
   3153                                  const uint8* luma,
   3154                                  uint32 lumacoeff);
   3155 
   3156 #ifdef __cplusplus
   3157 }  // extern "C"
   3158 }  // namespace libyuv
   3159 #endif
   3160 
   3161 #endif  // INCLUDE_LIBYUV_ROW_H_
   3162