tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

loadimage.h (37714B)


      1 //
      2 // Copyright 2013 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // loadimage.h: Defines image loading functions
      8 
      9 #ifndef IMAGEUTIL_LOADIMAGE_H_
     10 #define IMAGEUTIL_LOADIMAGE_H_
     11 
     12 #include <stddef.h>
     13 #include <stdint.h>
     14 
     15 namespace angle
     16 {
     17 
     18 void LoadA8ToRGBA8(size_t width,
     19                   size_t height,
     20                   size_t depth,
     21                   const uint8_t *input,
     22                   size_t inputRowPitch,
     23                   size_t inputDepthPitch,
     24                   uint8_t *output,
     25                   size_t outputRowPitch,
     26                   size_t outputDepthPitch);
     27 
     28 void LoadA8ToBGRA8(size_t width,
     29                   size_t height,
     30                   size_t depth,
     31                   const uint8_t *input,
     32                   size_t inputRowPitch,
     33                   size_t inputDepthPitch,
     34                   uint8_t *output,
     35                   size_t outputRowPitch,
     36                   size_t outputDepthPitch);
     37 
     38 void LoadA32FToRGBA32F(size_t width,
     39                       size_t height,
     40                       size_t depth,
     41                       const uint8_t *input,
     42                       size_t inputRowPitch,
     43                       size_t inputDepthPitch,
     44                       uint8_t *output,
     45                       size_t outputRowPitch,
     46                       size_t outputDepthPitch);
     47 
     48 void LoadA16FToRGBA16F(size_t width,
     49                       size_t height,
     50                       size_t depth,
     51                       const uint8_t *input,
     52                       size_t inputRowPitch,
     53                       size_t inputDepthPitch,
     54                       uint8_t *output,
     55                       size_t outputRowPitch,
     56                       size_t outputDepthPitch);
     57 
     58 void LoadL8ToRGBA8(size_t width,
     59                   size_t height,
     60                   size_t depth,
     61                   const uint8_t *input,
     62                   size_t inputRowPitch,
     63                   size_t inputDepthPitch,
     64                   uint8_t *output,
     65                   size_t outputRowPitch,
     66                   size_t outputDepthPitch);
     67 
     68 void LoadL8ToBGRA8(size_t width,
     69                   size_t height,
     70                   size_t depth,
     71                   const uint8_t *input,
     72                   size_t inputRowPitch,
     73                   size_t inputDepthPitch,
     74                   uint8_t *output,
     75                   size_t outputRowPitch,
     76                   size_t outputDepthPitch);
     77 
     78 void LoadL32FToRGBA32F(size_t width,
     79                       size_t height,
     80                       size_t depth,
     81                       const uint8_t *input,
     82                       size_t inputRowPitch,
     83                       size_t inputDepthPitch,
     84                       uint8_t *output,
     85                       size_t outputRowPitch,
     86                       size_t outputDepthPitch);
     87 
     88 void LoadL16FToRGBA16F(size_t width,
     89                       size_t height,
     90                       size_t depth,
     91                       const uint8_t *input,
     92                       size_t inputRowPitch,
     93                       size_t inputDepthPitch,
     94                       uint8_t *output,
     95                       size_t outputRowPitch,
     96                       size_t outputDepthPitch);
     97 
     98 void LoadLA8ToRGBA8(size_t width,
     99                    size_t height,
    100                    size_t depth,
    101                    const uint8_t *input,
    102                    size_t inputRowPitch,
    103                    size_t inputDepthPitch,
    104                    uint8_t *output,
    105                    size_t outputRowPitch,
    106                    size_t outputDepthPitch);
    107 
    108 void LoadLA8ToBGRA8(size_t width,
    109                    size_t height,
    110                    size_t depth,
    111                    const uint8_t *input,
    112                    size_t inputRowPitch,
    113                    size_t inputDepthPitch,
    114                    uint8_t *output,
    115                    size_t outputRowPitch,
    116                    size_t outputDepthPitch);
    117 
    118 void LoadLA32FToRGBA32F(size_t width,
    119                        size_t height,
    120                        size_t depth,
    121                        const uint8_t *input,
    122                        size_t inputRowPitch,
    123                        size_t inputDepthPitch,
    124                        uint8_t *output,
    125                        size_t outputRowPitch,
    126                        size_t outputDepthPitch);
    127 
    128 void LoadLA16FToRGBA16F(size_t width,
    129                        size_t height,
    130                        size_t depth,
    131                        const uint8_t *input,
    132                        size_t inputRowPitch,
    133                        size_t inputDepthPitch,
    134                        uint8_t *output,
    135                        size_t outputRowPitch,
    136                        size_t outputDepthPitch);
    137 
    138 void LoadRGB8ToBGR565(size_t width,
    139                      size_t height,
    140                      size_t depth,
    141                      const uint8_t *input,
    142                      size_t inputRowPitch,
    143                      size_t inputDepthPitch,
    144                      uint8_t *output,
    145                      size_t outputRowPitch,
    146                      size_t outputDepthPitch);
    147 
    148 void LoadRGB565ToBGR565(size_t width,
    149                        size_t height,
    150                        size_t depth,
    151                        const uint8_t *input,
    152                        size_t inputRowPitch,
    153                        size_t inputDepthPitch,
    154                        uint8_t *output,
    155                        size_t outputRowPitch,
    156                        size_t outputDepthPitch);
    157 
    158 void LoadRGB8ToBGRX8(size_t width,
    159                     size_t height,
    160                     size_t depth,
    161                     const uint8_t *input,
    162                     size_t inputRowPitch,
    163                     size_t inputDepthPitch,
    164                     uint8_t *output,
    165                     size_t outputRowPitch,
    166                     size_t outputDepthPitch);
    167 
    168 void LoadRG8ToBGRX8(size_t width,
    169                    size_t height,
    170                    size_t depth,
    171                    const uint8_t *input,
    172                    size_t inputRowPitch,
    173                    size_t inputDepthPitch,
    174                    uint8_t *output,
    175                    size_t outputRowPitch,
    176                    size_t outputDepthPitch);
    177 
    178 void LoadR8ToBGRX8(size_t width,
    179                   size_t height,
    180                   size_t depth,
    181                   const uint8_t *input,
    182                   size_t inputRowPitch,
    183                   size_t inputDepthPitch,
    184                   uint8_t *output,
    185                   size_t outputRowPitch,
    186                   size_t outputDepthPitch);
    187 
    188 void LoadR5G6B5ToBGRA8(size_t width,
    189                       size_t height,
    190                       size_t depth,
    191                       const uint8_t *input,
    192                       size_t inputRowPitch,
    193                       size_t inputDepthPitch,
    194                       uint8_t *output,
    195                       size_t outputRowPitch,
    196                       size_t outputDepthPitch);
    197 
    198 void LoadR5G6B5ToRGBA8(size_t width,
    199                       size_t height,
    200                       size_t depth,
    201                       const uint8_t *input,
    202                       size_t inputRowPitch,
    203                       size_t inputDepthPitch,
    204                       uint8_t *output,
    205                       size_t outputRowPitch,
    206                       size_t outputDepthPitch);
    207 
    208 void LoadRGBA8ToBGRA8(size_t width,
    209                      size_t height,
    210                      size_t depth,
    211                      const uint8_t *input,
    212                      size_t inputRowPitch,
    213                      size_t inputDepthPitch,
    214                      uint8_t *output,
    215                      size_t outputRowPitch,
    216                      size_t outputDepthPitch);
    217 
    218 void LoadRGBA8ToBGRA4(size_t width,
    219                      size_t height,
    220                      size_t depth,
    221                      const uint8_t *input,
    222                      size_t inputRowPitch,
    223                      size_t inputDepthPitch,
    224                      uint8_t *output,
    225                      size_t outputRowPitch,
    226                      size_t outputDepthPitch);
    227 
    228 void LoadRGBA8ToRGBA4(size_t width,
    229                      size_t height,
    230                      size_t depth,
    231                      const uint8_t *input,
    232                      size_t inputRowPitch,
    233                      size_t inputDepthPitch,
    234                      uint8_t *output,
    235                      size_t outputRowPitch,
    236                      size_t outputDepthPitch);
    237 
    238 void LoadRGBA4ToARGB4(size_t width,
    239                      size_t height,
    240                      size_t depth,
    241                      const uint8_t *input,
    242                      size_t inputRowPitch,
    243                      size_t inputDepthPitch,
    244                      uint8_t *output,
    245                      size_t outputRowPitch,
    246                      size_t outputDepthPitch);
    247 
    248 void LoadRGBA4ToRGBA4(size_t width,
    249                      size_t height,
    250                      size_t depth,
    251                      const uint8_t *input,
    252                      size_t inputRowPitch,
    253                      size_t inputDepthPitch,
    254                      uint8_t *output,
    255                      size_t outputRowPitch,
    256                      size_t outputDepthPitch);
    257 
    258 void LoadRGBA4ToBGRA8(size_t width,
    259                      size_t height,
    260                      size_t depth,
    261                      const uint8_t *input,
    262                      size_t inputRowPitch,
    263                      size_t inputDepthPitch,
    264                      uint8_t *output,
    265                      size_t outputRowPitch,
    266                      size_t outputDepthPitch);
    267 
    268 void LoadRGBA4ToRGBA8(size_t width,
    269                      size_t height,
    270                      size_t depth,
    271                      const uint8_t *input,
    272                      size_t inputRowPitch,
    273                      size_t inputDepthPitch,
    274                      uint8_t *output,
    275                      size_t outputRowPitch,
    276                      size_t outputDepthPitch);
    277 
    278 void LoadBGRA4ToBGRA8(size_t width,
    279                      size_t height,
    280                      size_t depth,
    281                      const uint8_t *input,
    282                      size_t inputRowPitch,
    283                      size_t inputDepthPitch,
    284                      uint8_t *output,
    285                      size_t outputRowPitch,
    286                      size_t outputDepthPitch);
    287 
    288 void LoadRGBA8ToBGR5A1(size_t width,
    289                       size_t height,
    290                       size_t depth,
    291                       const uint8_t *input,
    292                       size_t inputRowPitch,
    293                       size_t inputDepthPitch,
    294                       uint8_t *output,
    295                       size_t outputRowPitch,
    296                       size_t outputDepthPitch);
    297 
    298 void LoadRGBA8ToRGB5A1(size_t width,
    299                       size_t height,
    300                       size_t depth,
    301                       const uint8_t *input,
    302                       size_t inputRowPitch,
    303                       size_t inputDepthPitch,
    304                       uint8_t *output,
    305                       size_t outputRowPitch,
    306                       size_t outputDepthPitch);
    307 
    308 void LoadRGB10A2ToBGR5A1(size_t width,
    309                         size_t height,
    310                         size_t depth,
    311                         const uint8_t *input,
    312                         size_t inputRowPitch,
    313                         size_t inputDepthPitch,
    314                         uint8_t *output,
    315                         size_t outputRowPitch,
    316                         size_t outputDepthPitch);
    317 
    318 void LoadRGB10A2ToRGB5A1(size_t width,
    319                         size_t height,
    320                         size_t depth,
    321                         const uint8_t *input,
    322                         size_t inputRowPitch,
    323                         size_t inputDepthPitch,
    324                         uint8_t *output,
    325                         size_t outputRowPitch,
    326                         size_t outputDepthPitch);
    327 
    328 void LoadRGB5A1ToRGB5A1(size_t width,
    329                        size_t height,
    330                        size_t depth,
    331                        const uint8_t *input,
    332                        size_t inputRowPitch,
    333                        size_t inputDepthPitch,
    334                        uint8_t *output,
    335                        size_t outputRowPitch,
    336                        size_t outputDepthPitch);
    337 
    338 void LoadRGB5A1ToBGR5A1(size_t width,
    339                        size_t height,
    340                        size_t depth,
    341                        const uint8_t *input,
    342                        size_t inputRowPitch,
    343                        size_t inputDepthPitch,
    344                        uint8_t *output,
    345                        size_t outputRowPitch,
    346                        size_t outputDepthPitch);
    347 
    348 void LoadRGB5A1ToA1RGB5(size_t width,
    349                        size_t height,
    350                        size_t depth,
    351                        const uint8_t *input,
    352                        size_t inputRowPitch,
    353                        size_t inputDepthPitch,
    354                        uint8_t *output,
    355                        size_t outputRowPitch,
    356                        size_t outputDepthPitch);
    357 
    358 void LoadRGB5A1ToBGRA8(size_t width,
    359                       size_t height,
    360                       size_t depth,
    361                       const uint8_t *input,
    362                       size_t inputRowPitch,
    363                       size_t inputDepthPitch,
    364                       uint8_t *output,
    365                       size_t outputRowPitch,
    366                       size_t outputDepthPitch);
    367 
    368 void LoadRGB5A1ToRGBA8(size_t width,
    369                       size_t height,
    370                       size_t depth,
    371                       const uint8_t *input,
    372                       size_t inputRowPitch,
    373                       size_t inputDepthPitch,
    374                       uint8_t *output,
    375                       size_t outputRowPitch,
    376                       size_t outputDepthPitch);
    377 
    378 void LoadBGR5A1ToBGRA8(size_t width,
    379                       size_t height,
    380                       size_t depth,
    381                       const uint8_t *input,
    382                       size_t inputRowPitch,
    383                       size_t inputDepthPitch,
    384                       uint8_t *output,
    385                       size_t outputRowPitch,
    386                       size_t outputDepthPitch);
    387 
    388 void LoadRGB10A2ToRGBA8(size_t width,
    389                        size_t height,
    390                        size_t depth,
    391                        const uint8_t *input,
    392                        size_t inputRowPitch,
    393                        size_t inputDepthPitch,
    394                        uint8_t *output,
    395                        size_t outputRowPitch,
    396                        size_t outputDepthPitch);
    397 
    398 void LoadRGB10A2ToRGB10X2(size_t width,
    399                          size_t height,
    400                          size_t depth,
    401                          const uint8_t *input,
    402                          size_t inputRowPitch,
    403                          size_t inputDepthPitch,
    404                          uint8_t *output,
    405                          size_t outputRowPitch,
    406                          size_t outputDepthPitch);
    407 
    408 void LoadRGB16FToRGB9E5(size_t width,
    409                        size_t height,
    410                        size_t depth,
    411                        const uint8_t *input,
    412                        size_t inputRowPitch,
    413                        size_t inputDepthPitch,
    414                        uint8_t *output,
    415                        size_t outputRowPitch,
    416                        size_t outputDepthPitch);
    417 
    418 void LoadRGB32FToRGB9E5(size_t width,
    419                        size_t height,
    420                        size_t depth,
    421                        const uint8_t *input,
    422                        size_t inputRowPitch,
    423                        size_t inputDepthPitch,
    424                        uint8_t *output,
    425                        size_t outputRowPitch,
    426                        size_t outputDepthPitch);
    427 
    428 void LoadRGB16FToRG11B10F(size_t width,
    429                          size_t height,
    430                          size_t depth,
    431                          const uint8_t *input,
    432                          size_t inputRowPitch,
    433                          size_t inputDepthPitch,
    434                          uint8_t *output,
    435                          size_t outputRowPitch,
    436                          size_t outputDepthPitch);
    437 
    438 void LoadRGB32FToRG11B10F(size_t width,
    439                          size_t height,
    440                          size_t depth,
    441                          const uint8_t *input,
    442                          size_t inputRowPitch,
    443                          size_t inputDepthPitch,
    444                          uint8_t *output,
    445                          size_t outputRowPitch,
    446                          size_t outputDepthPitch);
    447 
    448 void LoadG8R24ToR24G8(size_t width,
    449                      size_t height,
    450                      size_t depth,
    451                      const uint8_t *input,
    452                      size_t inputRowPitch,
    453                      size_t inputDepthPitch,
    454                      uint8_t *output,
    455                      size_t outputRowPitch,
    456                      size_t outputDepthPitch);
    457 
    458 void LoadD24S8ToD32FS8X24(size_t width,
    459                          size_t height,
    460                          size_t depth,
    461                          const uint8_t *input,
    462                          size_t inputRowPitch,
    463                          size_t inputDepthPitch,
    464                          uint8_t *output,
    465                          size_t outputRowPitch,
    466                          size_t outputDepthPitch);
    467 
    468 void LoadD24S8ToD32F(size_t width,
    469                     size_t height,
    470                     size_t depth,
    471                     const uint8_t *input,
    472                     size_t inputRowPitch,
    473                     size_t inputDepthPitch,
    474                     uint8_t *output,
    475                     size_t outputRowPitch,
    476                     size_t outputDepthPitch);
    477 
    478 void LoadD32ToD32FX32(size_t width,
    479                      size_t height,
    480                      size_t depth,
    481                      const uint8_t *input,
    482                      size_t inputRowPitch,
    483                      size_t inputDepthPitch,
    484                      uint8_t *output,
    485                      size_t outputRowPitch,
    486                      size_t outputDepthPitch);
    487 
    488 void LoadD32ToD32F(size_t width,
    489                   size_t height,
    490                   size_t depth,
    491                   const uint8_t *input,
    492                   size_t inputRowPitch,
    493                   size_t inputDepthPitch,
    494                   uint8_t *output,
    495                   size_t outputRowPitch,
    496                   size_t outputDepthPitch);
    497 
    498 void LoadD32FToD32F(size_t width,
    499                    size_t height,
    500                    size_t depth,
    501                    const uint8_t *input,
    502                    size_t inputRowPitch,
    503                    size_t inputDepthPitch,
    504                    uint8_t *output,
    505                    size_t outputRowPitch,
    506                    size_t outputDepthPitch);
    507 
    508 void LoadD32FS8X24ToD24S8(size_t width,
    509                          size_t height,
    510                          size_t depth,
    511                          const uint8_t *input,
    512                          size_t inputRowPitch,
    513                          size_t inputDepthPitch,
    514                          uint8_t *output,
    515                          size_t outputRowPitch,
    516                          size_t outputDepthPitch);
    517 
    518 void LoadX24S8ToS8(size_t width,
    519                   size_t height,
    520                   size_t depth,
    521                   const uint8_t *input,
    522                   size_t inputRowPitch,
    523                   size_t inputDepthPitch,
    524                   uint8_t *output,
    525                   size_t outputRowPitch,
    526                   size_t outputDepthPitch);
    527 
    528 void LoadX32S8ToS8(size_t width,
    529                   size_t height,
    530                   size_t depth,
    531                   const uint8_t *input,
    532                   size_t inputRowPitch,
    533                   size_t inputDepthPitch,
    534                   uint8_t *output,
    535                   size_t outputRowPitch,
    536                   size_t outputDepthPitch);
    537 
    538 void LoadD32FS8X24ToD32F(size_t width,
    539                         size_t height,
    540                         size_t depth,
    541                         const uint8_t *input,
    542                         size_t inputRowPitch,
    543                         size_t inputDepthPitch,
    544                         uint8_t *output,
    545                         size_t outputRowPitch,
    546                         size_t outputDepthPitch);
    547 
    548 void LoadD32FS8X24ToD32FS8X24(size_t width,
    549                              size_t height,
    550                              size_t depth,
    551                              const uint8_t *input,
    552                              size_t inputRowPitch,
    553                              size_t inputDepthPitch,
    554                              uint8_t *output,
    555                              size_t outputRowPitch,
    556                              size_t outputDepthPitch);
    557 
    558 template <typename type, size_t componentCount>
    559 inline void LoadToNative(size_t width,
    560                         size_t height,
    561                         size_t depth,
    562                         const uint8_t *input,
    563                         size_t inputRowPitch,
    564                         size_t inputDepthPitch,
    565                         uint8_t *output,
    566                         size_t outputRowPitch,
    567                         size_t outputDepthPitch);
    568 
    569 template <typename type, uint32_t fourthComponentBits>
    570 inline void LoadToNative3To4(size_t width,
    571                             size_t height,
    572                             size_t depth,
    573                             const uint8_t *input,
    574                             size_t inputRowPitch,
    575                             size_t inputDepthPitch,
    576                             uint8_t *output,
    577                             size_t outputRowPitch,
    578                             size_t outputDepthPitch);
    579 
    580 template <size_t componentCount>
    581 inline void Load32FTo16F(size_t width,
    582                         size_t height,
    583                         size_t depth,
    584                         const uint8_t *input,
    585                         size_t inputRowPitch,
    586                         size_t inputDepthPitch,
    587                         uint8_t *output,
    588                         size_t outputRowPitch,
    589                         size_t outputDepthPitch);
    590 
    591 void LoadUNorm16To32F(size_t width,
    592                      size_t height,
    593                      size_t depth,
    594                      const uint8_t *input,
    595                      size_t inputRowPitch,
    596                      size_t inputDepthPitch,
    597                      uint8_t *output,
    598                      size_t outputRowPitch,
    599                      size_t outputDepthPitch);
    600 
    601 void LoadUNorm32To32F(size_t width,
    602                      size_t height,
    603                      size_t depth,
    604                      const uint8_t *input,
    605                      size_t inputRowPitch,
    606                      size_t inputDepthPitch,
    607                      uint8_t *output,
    608                      size_t outputRowPitch,
    609                      size_t outputDepthPitch);
    610 
    611 void LoadRGB32FToRGBA16F(size_t width,
    612                         size_t height,
    613                         size_t depth,
    614                         const uint8_t *input,
    615                         size_t inputRowPitch,
    616                         size_t inputDepthPitch,
    617                         uint8_t *output,
    618                         size_t outputRowPitch,
    619                         size_t outputDepthPitch);
    620 
    621 void LoadRGB32FToRGB16F(size_t width,
    622                        size_t height,
    623                        size_t depth,
    624                        const uint8_t *input,
    625                        size_t inputRowPitch,
    626                        size_t inputDepthPitch,
    627                        uint8_t *output,
    628                        size_t outputRowPitch,
    629                        size_t outputDepthPitch);
    630 
    631 template <size_t blockWidth, size_t blockHeight, size_t blockDepth, size_t blockSize>
    632 inline void LoadCompressedToNative(size_t width,
    633                                   size_t height,
    634                                   size_t depth,
    635                                   const uint8_t *input,
    636                                   size_t inputRowPitch,
    637                                   size_t inputDepthPitch,
    638                                   uint8_t *output,
    639                                   size_t outputRowPitch,
    640                                   size_t outputDepthPitch);
    641 
    642 void LoadR32ToR16(size_t width,
    643                  size_t height,
    644                  size_t depth,
    645                  const uint8_t *input,
    646                  size_t inputRowPitch,
    647                  size_t inputDepthPitch,
    648                  uint8_t *output,
    649                  size_t outputRowPitch,
    650                  size_t outputDepthPitch);
    651 
    652 template <typename type,
    653          uint32_t firstBits,
    654          uint32_t secondBits,
    655          uint32_t thirdBits,
    656          uint32_t fourthBits>
    657 inline void Initialize4ComponentData(size_t width,
    658                                     size_t height,
    659                                     size_t depth,
    660                                     uint8_t *output,
    661                                     size_t outputRowPitch,
    662                                     size_t outputDepthPitch);
    663 
    664 void LoadR32ToR24G8(size_t width,
    665                    size_t height,
    666                    size_t depth,
    667                    const uint8_t *input,
    668                    size_t inputRowPitch,
    669                    size_t inputDepthPitch,
    670                    uint8_t *output,
    671                    size_t outputRowPitch,
    672                    size_t outputDepthPitch);
    673 
    674 void LoadETC1RGB8ToRGBA8(size_t width,
    675                         size_t height,
    676                         size_t depth,
    677                         const uint8_t *input,
    678                         size_t inputRowPitch,
    679                         size_t inputDepthPitch,
    680                         uint8_t *output,
    681                         size_t outputRowPitch,
    682                         size_t outputDepthPitch);
    683 
    684 void LoadASTCToRGBA8Inner(size_t width,
    685                          size_t height,
    686                          size_t depth,
    687                          uint32_t blockWidth,
    688                          uint32_t blockHeight,
    689                          const uint8_t *input,
    690                          size_t inputRowPitch,
    691                          size_t inputDepthPitch,
    692                          uint8_t *output,
    693                          size_t outputRowPitch,
    694                          size_t outputDepthPitch);
    695 
    696 template <size_t blockWidth, size_t blockHeight>
    697 inline void LoadASTCToRGBA8(size_t width,
    698                            size_t height,
    699                            size_t depth,
    700                            const uint8_t *input,
    701                            size_t inputRowPitch,
    702                            size_t inputDepthPitch,
    703                            uint8_t *output,
    704                            size_t outputRowPitch,
    705                            size_t outputDepthPitch);
    706 
    707 void LoadETC1RGB8ToBC1(size_t width,
    708                       size_t height,
    709                       size_t depth,
    710                       const uint8_t *input,
    711                       size_t inputRowPitch,
    712                       size_t inputDepthPitch,
    713                       uint8_t *output,
    714                       size_t outputRowPitch,
    715                       size_t outputDepthPitch);
    716 
    717 void LoadEACR11ToR8(size_t width,
    718                    size_t height,
    719                    size_t depth,
    720                    const uint8_t *input,
    721                    size_t inputRowPitch,
    722                    size_t inputDepthPitch,
    723                    uint8_t *output,
    724                    size_t outputRowPitch,
    725                    size_t outputDepthPitch);
    726 
    727 void LoadEACR11SToR8(size_t width,
    728                     size_t height,
    729                     size_t depth,
    730                     const uint8_t *input,
    731                     size_t inputRowPitch,
    732                     size_t inputDepthPitch,
    733                     uint8_t *output,
    734                     size_t outputRowPitch,
    735                     size_t outputDepthPitch);
    736 
    737 void LoadEACRG11ToRG8(size_t width,
    738                      size_t height,
    739                      size_t depth,
    740                      const uint8_t *input,
    741                      size_t inputRowPitch,
    742                      size_t inputDepthPitch,
    743                      uint8_t *output,
    744                      size_t outputRowPitch,
    745                      size_t outputDepthPitch);
    746 
    747 void LoadEACRG11SToRG8(size_t width,
    748                       size_t height,
    749                       size_t depth,
    750                       const uint8_t *input,
    751                       size_t inputRowPitch,
    752                       size_t inputDepthPitch,
    753                       uint8_t *output,
    754                       size_t outputRowPitch,
    755                       size_t outputDepthPitch);
    756 
    757 void LoadEACR11ToR16(size_t width,
    758                     size_t height,
    759                     size_t depth,
    760                     const uint8_t *input,
    761                     size_t inputRowPitch,
    762                     size_t inputDepthPitch,
    763                     uint8_t *output,
    764                     size_t outputRowPitch,
    765                     size_t outputDepthPitch);
    766 
    767 void LoadEACR11SToR16(size_t width,
    768                      size_t height,
    769                      size_t depth,
    770                      const uint8_t *input,
    771                      size_t inputRowPitch,
    772                      size_t inputDepthPitch,
    773                      uint8_t *output,
    774                      size_t outputRowPitch,
    775                      size_t outputDepthPitch);
    776 
    777 void LoadEACRG11ToRG16(size_t width,
    778                       size_t height,
    779                       size_t depth,
    780                       const uint8_t *input,
    781                       size_t inputRowPitch,
    782                       size_t inputDepthPitch,
    783                       uint8_t *output,
    784                       size_t outputRowPitch,
    785                       size_t outputDepthPitch);
    786 
    787 void LoadEACRG11SToRG16(size_t width,
    788                        size_t height,
    789                        size_t depth,
    790                        const uint8_t *input,
    791                        size_t inputRowPitch,
    792                        size_t inputDepthPitch,
    793                        uint8_t *output,
    794                        size_t outputRowPitch,
    795                        size_t outputDepthPitch);
    796 
    797 void LoadEACR11ToR16F(size_t width,
    798                      size_t height,
    799                      size_t depth,
    800                      const uint8_t *input,
    801                      size_t inputRowPitch,
    802                      size_t inputDepthPitch,
    803                      uint8_t *output,
    804                      size_t outputRowPitch,
    805                      size_t outputDepthPitch);
    806 
    807 void LoadEACR11SToR16F(size_t width,
    808                       size_t height,
    809                       size_t depth,
    810                       const uint8_t *input,
    811                       size_t inputRowPitch,
    812                       size_t inputDepthPitch,
    813                       uint8_t *output,
    814                       size_t outputRowPitch,
    815                       size_t outputDepthPitch);
    816 
    817 void LoadEACRG11ToRG16F(size_t width,
    818                        size_t height,
    819                        size_t depth,
    820                        const uint8_t *input,
    821                        size_t inputRowPitch,
    822                        size_t inputDepthPitch,
    823                        uint8_t *output,
    824                        size_t outputRowPitch,
    825                        size_t outputDepthPitch);
    826 
    827 void LoadEACRG11SToRG16F(size_t width,
    828                         size_t height,
    829                         size_t depth,
    830                         const uint8_t *input,
    831                         size_t inputRowPitch,
    832                         size_t inputDepthPitch,
    833                         uint8_t *output,
    834                         size_t outputRowPitch,
    835                         size_t outputDepthPitch);
    836 
    837 void LoadETC2RGB8ToRGBA8(size_t width,
    838                         size_t height,
    839                         size_t depth,
    840                         const uint8_t *input,
    841                         size_t inputRowPitch,
    842                         size_t inputDepthPitch,
    843                         uint8_t *output,
    844                         size_t outputRowPitch,
    845                         size_t outputDepthPitch);
    846 
    847 void LoadETC2RGB8ToBC1(size_t width,
    848                       size_t height,
    849                       size_t depth,
    850                       const uint8_t *input,
    851                       size_t inputRowPitch,
    852                       size_t inputDepthPitch,
    853                       uint8_t *output,
    854                       size_t outputRowPitch,
    855                       size_t outputDepthPitch);
    856 
    857 void LoadETC2SRGB8ToRGBA8(size_t width,
    858                          size_t height,
    859                          size_t depth,
    860                          const uint8_t *input,
    861                          size_t inputRowPitch,
    862                          size_t inputDepthPitch,
    863                          uint8_t *output,
    864                          size_t outputRowPitch,
    865                          size_t outputDepthPitch);
    866 
    867 void LoadETC2SRGB8ToBC1(size_t width,
    868                        size_t height,
    869                        size_t depth,
    870                        const uint8_t *input,
    871                        size_t inputRowPitch,
    872                        size_t inputDepthPitch,
    873                        uint8_t *output,
    874                        size_t outputRowPitch,
    875                        size_t outputDepthPitch);
    876 
    877 void LoadETC2RGB8A1ToRGBA8(size_t width,
    878                           size_t height,
    879                           size_t depth,
    880                           const uint8_t *input,
    881                           size_t inputRowPitch,
    882                           size_t inputDepthPitch,
    883                           uint8_t *output,
    884                           size_t outputRowPitch,
    885                           size_t outputDepthPitch);
    886 
    887 void LoadETC2RGB8A1ToBC1(size_t width,
    888                         size_t height,
    889                         size_t depth,
    890                         const uint8_t *input,
    891                         size_t inputRowPitch,
    892                         size_t inputDepthPitch,
    893                         uint8_t *output,
    894                         size_t outputRowPitch,
    895                         size_t outputDepthPitch);
    896 
    897 void LoadETC2SRGB8A1ToRGBA8(size_t width,
    898                            size_t height,
    899                            size_t depth,
    900                            const uint8_t *input,
    901                            size_t inputRowPitch,
    902                            size_t inputDepthPitch,
    903                            uint8_t *output,
    904                            size_t outputRowPitch,
    905                            size_t outputDepthPitch);
    906 
    907 void LoadETC2SRGB8A1ToBC1(size_t width,
    908                          size_t height,
    909                          size_t depth,
    910                          const uint8_t *input,
    911                          size_t inputRowPitch,
    912                          size_t inputDepthPitch,
    913                          uint8_t *output,
    914                          size_t outputRowPitch,
    915                          size_t outputDepthPitch);
    916 
    917 void LoadETC2RGBA8ToRGBA8(size_t width,
    918                          size_t height,
    919                          size_t depth,
    920                          const uint8_t *input,
    921                          size_t inputRowPitch,
    922                          size_t inputDepthPitch,
    923                          uint8_t *output,
    924                          size_t outputRowPitch,
    925                          size_t outputDepthPitch);
    926 
    927 void LoadETC2SRGBA8ToSRGBA8(size_t width,
    928                            size_t height,
    929                            size_t depth,
    930                            const uint8_t *input,
    931                            size_t inputRowPitch,
    932                            size_t inputDepthPitch,
    933                            uint8_t *output,
    934                            size_t outputRowPitch,
    935                            size_t outputDepthPitch);
    936 
    937 void LoadYuvToNative(size_t width,
    938                     size_t height,
    939                     size_t depth,
    940                     const uint8_t *input,
    941                     size_t inputRowPitch,
    942                     size_t inputDepthPitch,
    943                     uint8_t *output,
    944                     size_t outputRowPitch,
    945                     size_t outputDepthPitch);
    946 
    947 void LoadPalettedToRGBA8Impl(size_t width,
    948                             size_t height,
    949                             size_t depth,
    950                             uint32_t indexBits,
    951                             uint32_t redBlueBits,
    952                             uint32_t greenBits,
    953                             uint32_t alphaBits,
    954                             const uint8_t *input,
    955                             size_t inputRowPitch,
    956                             size_t inputDepthPitch,
    957                             uint8_t *output,
    958                             size_t outputRowPitch,
    959                             size_t outputDepthPitch);
    960 
    961 template <uint32_t indexBits, uint32_t redBlueBits, uint32_t greenBits, uint32_t alphaBits>
    962 inline void LoadPalettedToRGBA8(size_t width,
    963                                size_t height,
    964                                size_t depth,
    965                                const uint8_t *input,
    966                                size_t inputRowPitch,
    967                                size_t inputDepthPitch,
    968                                uint8_t *output,
    969                                size_t outputRowPitch,
    970                                size_t outputDepthPitch);
    971 
    972 }  // namespace angle
    973 
    974 #include "loadimage.inc"
    975 
    976 #endif  // IMAGEUTIL_LOADIMAGE_H_