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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/yuv/include/libyuv/planar_functions.h

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