1/* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. 18 19/* 20 * rs_convert.rsh: Conversion Functions 21 * 22 * The functions below convert from a numerical vector type to another, or from one color 23 * representation to another. 24 */ 25 26#ifndef RENDERSCRIPT_RS_CONVERT_RSH 27#define RENDERSCRIPT_RS_CONVERT_RSH 28 29/* 30 * convert: Convert numerical vectors 31 * 32 * Converts a vector from one numerical type to another. The conversion are done entry per entry. 33 * 34 * E.g calling a = convert_short3(b); is equivalent to doing 35 * a.x = (short)b.x; a.y = (short)b.y; a.z = (short)b.z;. 36 * 37 * Converting floating point values to integer types truncates. 38 * 39 * Converting numbers too large to fit the destination type yields undefined results. 40 * For example, converting a float that contains 1.0e18 to a short is undefined. 41 * Use clamp() to avoid this. 42 */ 43extern float2 __attribute__((const, overloadable)) 44 convert_float2(float2 v); 45 46extern float3 __attribute__((const, overloadable)) 47 convert_float3(float3 v); 48 49extern float4 __attribute__((const, overloadable)) 50 convert_float4(float4 v); 51 52extern float2 __attribute__((const, overloadable)) 53 convert_float2(char2 v); 54 55extern float3 __attribute__((const, overloadable)) 56 convert_float3(char3 v); 57 58extern float4 __attribute__((const, overloadable)) 59 convert_float4(char4 v); 60 61extern float2 __attribute__((const, overloadable)) 62 convert_float2(uchar2 v); 63 64extern float3 __attribute__((const, overloadable)) 65 convert_float3(uchar3 v); 66 67extern float4 __attribute__((const, overloadable)) 68 convert_float4(uchar4 v); 69 70extern float2 __attribute__((const, overloadable)) 71 convert_float2(short2 v); 72 73extern float3 __attribute__((const, overloadable)) 74 convert_float3(short3 v); 75 76extern float4 __attribute__((const, overloadable)) 77 convert_float4(short4 v); 78 79extern float2 __attribute__((const, overloadable)) 80 convert_float2(ushort2 v); 81 82extern float3 __attribute__((const, overloadable)) 83 convert_float3(ushort3 v); 84 85extern float4 __attribute__((const, overloadable)) 86 convert_float4(ushort4 v); 87 88extern float2 __attribute__((const, overloadable)) 89 convert_float2(int2 v); 90 91extern float3 __attribute__((const, overloadable)) 92 convert_float3(int3 v); 93 94extern float4 __attribute__((const, overloadable)) 95 convert_float4(int4 v); 96 97extern float2 __attribute__((const, overloadable)) 98 convert_float2(uint2 v); 99 100extern float3 __attribute__((const, overloadable)) 101 convert_float3(uint3 v); 102 103extern float4 __attribute__((const, overloadable)) 104 convert_float4(uint4 v); 105 106extern char2 __attribute__((const, overloadable)) 107 convert_char2(float2 v); 108 109extern char3 __attribute__((const, overloadable)) 110 convert_char3(float3 v); 111 112extern char4 __attribute__((const, overloadable)) 113 convert_char4(float4 v); 114 115extern char2 __attribute__((const, overloadable)) 116 convert_char2(char2 v); 117 118extern char3 __attribute__((const, overloadable)) 119 convert_char3(char3 v); 120 121extern char4 __attribute__((const, overloadable)) 122 convert_char4(char4 v); 123 124extern char2 __attribute__((const, overloadable)) 125 convert_char2(uchar2 v); 126 127extern char3 __attribute__((const, overloadable)) 128 convert_char3(uchar3 v); 129 130extern char4 __attribute__((const, overloadable)) 131 convert_char4(uchar4 v); 132 133extern char2 __attribute__((const, overloadable)) 134 convert_char2(short2 v); 135 136extern char3 __attribute__((const, overloadable)) 137 convert_char3(short3 v); 138 139extern char4 __attribute__((const, overloadable)) 140 convert_char4(short4 v); 141 142extern char2 __attribute__((const, overloadable)) 143 convert_char2(ushort2 v); 144 145extern char3 __attribute__((const, overloadable)) 146 convert_char3(ushort3 v); 147 148extern char4 __attribute__((const, overloadable)) 149 convert_char4(ushort4 v); 150 151extern char2 __attribute__((const, overloadable)) 152 convert_char2(int2 v); 153 154extern char3 __attribute__((const, overloadable)) 155 convert_char3(int3 v); 156 157extern char4 __attribute__((const, overloadable)) 158 convert_char4(int4 v); 159 160extern char2 __attribute__((const, overloadable)) 161 convert_char2(uint2 v); 162 163extern char3 __attribute__((const, overloadable)) 164 convert_char3(uint3 v); 165 166extern char4 __attribute__((const, overloadable)) 167 convert_char4(uint4 v); 168 169extern uchar2 __attribute__((const, overloadable)) 170 convert_uchar2(float2 v); 171 172extern uchar3 __attribute__((const, overloadable)) 173 convert_uchar3(float3 v); 174 175extern uchar4 __attribute__((const, overloadable)) 176 convert_uchar4(float4 v); 177 178extern uchar2 __attribute__((const, overloadable)) 179 convert_uchar2(char2 v); 180 181extern uchar3 __attribute__((const, overloadable)) 182 convert_uchar3(char3 v); 183 184extern uchar4 __attribute__((const, overloadable)) 185 convert_uchar4(char4 v); 186 187extern uchar2 __attribute__((const, overloadable)) 188 convert_uchar2(uchar2 v); 189 190extern uchar3 __attribute__((const, overloadable)) 191 convert_uchar3(uchar3 v); 192 193extern uchar4 __attribute__((const, overloadable)) 194 convert_uchar4(uchar4 v); 195 196extern uchar2 __attribute__((const, overloadable)) 197 convert_uchar2(short2 v); 198 199extern uchar3 __attribute__((const, overloadable)) 200 convert_uchar3(short3 v); 201 202extern uchar4 __attribute__((const, overloadable)) 203 convert_uchar4(short4 v); 204 205extern uchar2 __attribute__((const, overloadable)) 206 convert_uchar2(ushort2 v); 207 208extern uchar3 __attribute__((const, overloadable)) 209 convert_uchar3(ushort3 v); 210 211extern uchar4 __attribute__((const, overloadable)) 212 convert_uchar4(ushort4 v); 213 214extern uchar2 __attribute__((const, overloadable)) 215 convert_uchar2(int2 v); 216 217extern uchar3 __attribute__((const, overloadable)) 218 convert_uchar3(int3 v); 219 220extern uchar4 __attribute__((const, overloadable)) 221 convert_uchar4(int4 v); 222 223extern uchar2 __attribute__((const, overloadable)) 224 convert_uchar2(uint2 v); 225 226extern uchar3 __attribute__((const, overloadable)) 227 convert_uchar3(uint3 v); 228 229extern uchar4 __attribute__((const, overloadable)) 230 convert_uchar4(uint4 v); 231 232extern short2 __attribute__((const, overloadable)) 233 convert_short2(float2 v); 234 235extern short3 __attribute__((const, overloadable)) 236 convert_short3(float3 v); 237 238extern short4 __attribute__((const, overloadable)) 239 convert_short4(float4 v); 240 241extern short2 __attribute__((const, overloadable)) 242 convert_short2(char2 v); 243 244extern short3 __attribute__((const, overloadable)) 245 convert_short3(char3 v); 246 247extern short4 __attribute__((const, overloadable)) 248 convert_short4(char4 v); 249 250extern short2 __attribute__((const, overloadable)) 251 convert_short2(uchar2 v); 252 253extern short3 __attribute__((const, overloadable)) 254 convert_short3(uchar3 v); 255 256extern short4 __attribute__((const, overloadable)) 257 convert_short4(uchar4 v); 258 259extern short2 __attribute__((const, overloadable)) 260 convert_short2(short2 v); 261 262extern short3 __attribute__((const, overloadable)) 263 convert_short3(short3 v); 264 265extern short4 __attribute__((const, overloadable)) 266 convert_short4(short4 v); 267 268extern short2 __attribute__((const, overloadable)) 269 convert_short2(ushort2 v); 270 271extern short3 __attribute__((const, overloadable)) 272 convert_short3(ushort3 v); 273 274extern short4 __attribute__((const, overloadable)) 275 convert_short4(ushort4 v); 276 277extern short2 __attribute__((const, overloadable)) 278 convert_short2(int2 v); 279 280extern short3 __attribute__((const, overloadable)) 281 convert_short3(int3 v); 282 283extern short4 __attribute__((const, overloadable)) 284 convert_short4(int4 v); 285 286extern short2 __attribute__((const, overloadable)) 287 convert_short2(uint2 v); 288 289extern short3 __attribute__((const, overloadable)) 290 convert_short3(uint3 v); 291 292extern short4 __attribute__((const, overloadable)) 293 convert_short4(uint4 v); 294 295extern ushort2 __attribute__((const, overloadable)) 296 convert_ushort2(float2 v); 297 298extern ushort3 __attribute__((const, overloadable)) 299 convert_ushort3(float3 v); 300 301extern ushort4 __attribute__((const, overloadable)) 302 convert_ushort4(float4 v); 303 304extern ushort2 __attribute__((const, overloadable)) 305 convert_ushort2(char2 v); 306 307extern ushort3 __attribute__((const, overloadable)) 308 convert_ushort3(char3 v); 309 310extern ushort4 __attribute__((const, overloadable)) 311 convert_ushort4(char4 v); 312 313extern ushort2 __attribute__((const, overloadable)) 314 convert_ushort2(uchar2 v); 315 316extern ushort3 __attribute__((const, overloadable)) 317 convert_ushort3(uchar3 v); 318 319extern ushort4 __attribute__((const, overloadable)) 320 convert_ushort4(uchar4 v); 321 322extern ushort2 __attribute__((const, overloadable)) 323 convert_ushort2(short2 v); 324 325extern ushort3 __attribute__((const, overloadable)) 326 convert_ushort3(short3 v); 327 328extern ushort4 __attribute__((const, overloadable)) 329 convert_ushort4(short4 v); 330 331extern ushort2 __attribute__((const, overloadable)) 332 convert_ushort2(ushort2 v); 333 334extern ushort3 __attribute__((const, overloadable)) 335 convert_ushort3(ushort3 v); 336 337extern ushort4 __attribute__((const, overloadable)) 338 convert_ushort4(ushort4 v); 339 340extern ushort2 __attribute__((const, overloadable)) 341 convert_ushort2(int2 v); 342 343extern ushort3 __attribute__((const, overloadable)) 344 convert_ushort3(int3 v); 345 346extern ushort4 __attribute__((const, overloadable)) 347 convert_ushort4(int4 v); 348 349extern ushort2 __attribute__((const, overloadable)) 350 convert_ushort2(uint2 v); 351 352extern ushort3 __attribute__((const, overloadable)) 353 convert_ushort3(uint3 v); 354 355extern ushort4 __attribute__((const, overloadable)) 356 convert_ushort4(uint4 v); 357 358extern int2 __attribute__((const, overloadable)) 359 convert_int2(float2 v); 360 361extern int3 __attribute__((const, overloadable)) 362 convert_int3(float3 v); 363 364extern int4 __attribute__((const, overloadable)) 365 convert_int4(float4 v); 366 367extern int2 __attribute__((const, overloadable)) 368 convert_int2(char2 v); 369 370extern int3 __attribute__((const, overloadable)) 371 convert_int3(char3 v); 372 373extern int4 __attribute__((const, overloadable)) 374 convert_int4(char4 v); 375 376extern int2 __attribute__((const, overloadable)) 377 convert_int2(uchar2 v); 378 379extern int3 __attribute__((const, overloadable)) 380 convert_int3(uchar3 v); 381 382extern int4 __attribute__((const, overloadable)) 383 convert_int4(uchar4 v); 384 385extern int2 __attribute__((const, overloadable)) 386 convert_int2(short2 v); 387 388extern int3 __attribute__((const, overloadable)) 389 convert_int3(short3 v); 390 391extern int4 __attribute__((const, overloadable)) 392 convert_int4(short4 v); 393 394extern int2 __attribute__((const, overloadable)) 395 convert_int2(ushort2 v); 396 397extern int3 __attribute__((const, overloadable)) 398 convert_int3(ushort3 v); 399 400extern int4 __attribute__((const, overloadable)) 401 convert_int4(ushort4 v); 402 403extern int2 __attribute__((const, overloadable)) 404 convert_int2(int2 v); 405 406extern int3 __attribute__((const, overloadable)) 407 convert_int3(int3 v); 408 409extern int4 __attribute__((const, overloadable)) 410 convert_int4(int4 v); 411 412extern int2 __attribute__((const, overloadable)) 413 convert_int2(uint2 v); 414 415extern int3 __attribute__((const, overloadable)) 416 convert_int3(uint3 v); 417 418extern int4 __attribute__((const, overloadable)) 419 convert_int4(uint4 v); 420 421extern uint2 __attribute__((const, overloadable)) 422 convert_uint2(float2 v); 423 424extern uint3 __attribute__((const, overloadable)) 425 convert_uint3(float3 v); 426 427extern uint4 __attribute__((const, overloadable)) 428 convert_uint4(float4 v); 429 430extern uint2 __attribute__((const, overloadable)) 431 convert_uint2(char2 v); 432 433extern uint3 __attribute__((const, overloadable)) 434 convert_uint3(char3 v); 435 436extern uint4 __attribute__((const, overloadable)) 437 convert_uint4(char4 v); 438 439extern uint2 __attribute__((const, overloadable)) 440 convert_uint2(uchar2 v); 441 442extern uint3 __attribute__((const, overloadable)) 443 convert_uint3(uchar3 v); 444 445extern uint4 __attribute__((const, overloadable)) 446 convert_uint4(uchar4 v); 447 448extern uint2 __attribute__((const, overloadable)) 449 convert_uint2(short2 v); 450 451extern uint3 __attribute__((const, overloadable)) 452 convert_uint3(short3 v); 453 454extern uint4 __attribute__((const, overloadable)) 455 convert_uint4(short4 v); 456 457extern uint2 __attribute__((const, overloadable)) 458 convert_uint2(ushort2 v); 459 460extern uint3 __attribute__((const, overloadable)) 461 convert_uint3(ushort3 v); 462 463extern uint4 __attribute__((const, overloadable)) 464 convert_uint4(ushort4 v); 465 466extern uint2 __attribute__((const, overloadable)) 467 convert_uint2(int2 v); 468 469extern uint3 __attribute__((const, overloadable)) 470 convert_uint3(int3 v); 471 472extern uint4 __attribute__((const, overloadable)) 473 convert_uint4(int4 v); 474 475extern uint2 __attribute__((const, overloadable)) 476 convert_uint2(uint2 v); 477 478extern uint3 __attribute__((const, overloadable)) 479 convert_uint3(uint3 v); 480 481extern uint4 __attribute__((const, overloadable)) 482 convert_uint4(uint4 v); 483 484#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 485extern double2 __attribute__((const, overloadable)) 486 convert_double2(double2 v); 487#endif 488 489#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 490extern double3 __attribute__((const, overloadable)) 491 convert_double3(double3 v); 492#endif 493 494#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 495extern double4 __attribute__((const, overloadable)) 496 convert_double4(double4 v); 497#endif 498 499#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 500extern double2 __attribute__((const, overloadable)) 501 convert_double2(long2 v); 502#endif 503 504#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 505extern double3 __attribute__((const, overloadable)) 506 convert_double3(long3 v); 507#endif 508 509#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 510extern double4 __attribute__((const, overloadable)) 511 convert_double4(long4 v); 512#endif 513 514#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 515extern double2 __attribute__((const, overloadable)) 516 convert_double2(ulong2 v); 517#endif 518 519#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 520extern double3 __attribute__((const, overloadable)) 521 convert_double3(ulong3 v); 522#endif 523 524#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 525extern double4 __attribute__((const, overloadable)) 526 convert_double4(ulong4 v); 527#endif 528 529#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 530extern long2 __attribute__((const, overloadable)) 531 convert_long2(double2 v); 532#endif 533 534#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 535extern long3 __attribute__((const, overloadable)) 536 convert_long3(double3 v); 537#endif 538 539#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 540extern long4 __attribute__((const, overloadable)) 541 convert_long4(double4 v); 542#endif 543 544#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 545extern long2 __attribute__((const, overloadable)) 546 convert_long2(long2 v); 547#endif 548 549#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 550extern long3 __attribute__((const, overloadable)) 551 convert_long3(long3 v); 552#endif 553 554#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 555extern long4 __attribute__((const, overloadable)) 556 convert_long4(long4 v); 557#endif 558 559#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 560extern long2 __attribute__((const, overloadable)) 561 convert_long2(ulong2 v); 562#endif 563 564#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 565extern long3 __attribute__((const, overloadable)) 566 convert_long3(ulong3 v); 567#endif 568 569#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 570extern long4 __attribute__((const, overloadable)) 571 convert_long4(ulong4 v); 572#endif 573 574#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 575extern ulong2 __attribute__((const, overloadable)) 576 convert_ulong2(double2 v); 577#endif 578 579#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 580extern ulong3 __attribute__((const, overloadable)) 581 convert_ulong3(double3 v); 582#endif 583 584#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 585extern ulong4 __attribute__((const, overloadable)) 586 convert_ulong4(double4 v); 587#endif 588 589#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 590extern ulong2 __attribute__((const, overloadable)) 591 convert_ulong2(long2 v); 592#endif 593 594#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 595extern ulong3 __attribute__((const, overloadable)) 596 convert_ulong3(long3 v); 597#endif 598 599#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 600extern ulong4 __attribute__((const, overloadable)) 601 convert_ulong4(long4 v); 602#endif 603 604#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 605extern ulong2 __attribute__((const, overloadable)) 606 convert_ulong2(ulong2 v); 607#endif 608 609#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 610extern ulong3 __attribute__((const, overloadable)) 611 convert_ulong3(ulong3 v); 612#endif 613 614#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 615extern ulong4 __attribute__((const, overloadable)) 616 convert_ulong4(ulong4 v); 617#endif 618 619#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 620extern float2 __attribute__((const, overloadable)) 621 convert_float2(double2 v); 622#endif 623 624#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 625extern float3 __attribute__((const, overloadable)) 626 convert_float3(double3 v); 627#endif 628 629#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 630extern float4 __attribute__((const, overloadable)) 631 convert_float4(double4 v); 632#endif 633 634#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 635extern float2 __attribute__((const, overloadable)) 636 convert_float2(long2 v); 637#endif 638 639#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 640extern float3 __attribute__((const, overloadable)) 641 convert_float3(long3 v); 642#endif 643 644#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 645extern float4 __attribute__((const, overloadable)) 646 convert_float4(long4 v); 647#endif 648 649#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 650extern float2 __attribute__((const, overloadable)) 651 convert_float2(ulong2 v); 652#endif 653 654#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 655extern float3 __attribute__((const, overloadable)) 656 convert_float3(ulong3 v); 657#endif 658 659#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 660extern float4 __attribute__((const, overloadable)) 661 convert_float4(ulong4 v); 662#endif 663 664#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 665extern char2 __attribute__((const, overloadable)) 666 convert_char2(double2 v); 667#endif 668 669#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 670extern char3 __attribute__((const, overloadable)) 671 convert_char3(double3 v); 672#endif 673 674#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 675extern char4 __attribute__((const, overloadable)) 676 convert_char4(double4 v); 677#endif 678 679#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 680extern char2 __attribute__((const, overloadable)) 681 convert_char2(long2 v); 682#endif 683 684#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 685extern char3 __attribute__((const, overloadable)) 686 convert_char3(long3 v); 687#endif 688 689#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 690extern char4 __attribute__((const, overloadable)) 691 convert_char4(long4 v); 692#endif 693 694#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 695extern char2 __attribute__((const, overloadable)) 696 convert_char2(ulong2 v); 697#endif 698 699#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 700extern char3 __attribute__((const, overloadable)) 701 convert_char3(ulong3 v); 702#endif 703 704#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 705extern char4 __attribute__((const, overloadable)) 706 convert_char4(ulong4 v); 707#endif 708 709#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 710extern uchar2 __attribute__((const, overloadable)) 711 convert_uchar2(double2 v); 712#endif 713 714#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 715extern uchar3 __attribute__((const, overloadable)) 716 convert_uchar3(double3 v); 717#endif 718 719#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 720extern uchar4 __attribute__((const, overloadable)) 721 convert_uchar4(double4 v); 722#endif 723 724#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 725extern uchar2 __attribute__((const, overloadable)) 726 convert_uchar2(long2 v); 727#endif 728 729#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 730extern uchar3 __attribute__((const, overloadable)) 731 convert_uchar3(long3 v); 732#endif 733 734#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 735extern uchar4 __attribute__((const, overloadable)) 736 convert_uchar4(long4 v); 737#endif 738 739#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 740extern uchar2 __attribute__((const, overloadable)) 741 convert_uchar2(ulong2 v); 742#endif 743 744#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 745extern uchar3 __attribute__((const, overloadable)) 746 convert_uchar3(ulong3 v); 747#endif 748 749#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 750extern uchar4 __attribute__((const, overloadable)) 751 convert_uchar4(ulong4 v); 752#endif 753 754#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 755extern short2 __attribute__((const, overloadable)) 756 convert_short2(double2 v); 757#endif 758 759#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 760extern short3 __attribute__((const, overloadable)) 761 convert_short3(double3 v); 762#endif 763 764#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 765extern short4 __attribute__((const, overloadable)) 766 convert_short4(double4 v); 767#endif 768 769#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 770extern short2 __attribute__((const, overloadable)) 771 convert_short2(long2 v); 772#endif 773 774#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 775extern short3 __attribute__((const, overloadable)) 776 convert_short3(long3 v); 777#endif 778 779#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 780extern short4 __attribute__((const, overloadable)) 781 convert_short4(long4 v); 782#endif 783 784#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 785extern short2 __attribute__((const, overloadable)) 786 convert_short2(ulong2 v); 787#endif 788 789#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 790extern short3 __attribute__((const, overloadable)) 791 convert_short3(ulong3 v); 792#endif 793 794#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 795extern short4 __attribute__((const, overloadable)) 796 convert_short4(ulong4 v); 797#endif 798 799#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 800extern ushort2 __attribute__((const, overloadable)) 801 convert_ushort2(double2 v); 802#endif 803 804#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 805extern ushort3 __attribute__((const, overloadable)) 806 convert_ushort3(double3 v); 807#endif 808 809#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 810extern ushort4 __attribute__((const, overloadable)) 811 convert_ushort4(double4 v); 812#endif 813 814#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 815extern ushort2 __attribute__((const, overloadable)) 816 convert_ushort2(long2 v); 817#endif 818 819#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 820extern ushort3 __attribute__((const, overloadable)) 821 convert_ushort3(long3 v); 822#endif 823 824#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 825extern ushort4 __attribute__((const, overloadable)) 826 convert_ushort4(long4 v); 827#endif 828 829#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 830extern ushort2 __attribute__((const, overloadable)) 831 convert_ushort2(ulong2 v); 832#endif 833 834#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 835extern ushort3 __attribute__((const, overloadable)) 836 convert_ushort3(ulong3 v); 837#endif 838 839#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 840extern ushort4 __attribute__((const, overloadable)) 841 convert_ushort4(ulong4 v); 842#endif 843 844#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 845extern int2 __attribute__((const, overloadable)) 846 convert_int2(double2 v); 847#endif 848 849#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 850extern int3 __attribute__((const, overloadable)) 851 convert_int3(double3 v); 852#endif 853 854#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 855extern int4 __attribute__((const, overloadable)) 856 convert_int4(double4 v); 857#endif 858 859#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 860extern int2 __attribute__((const, overloadable)) 861 convert_int2(long2 v); 862#endif 863 864#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 865extern int3 __attribute__((const, overloadable)) 866 convert_int3(long3 v); 867#endif 868 869#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 870extern int4 __attribute__((const, overloadable)) 871 convert_int4(long4 v); 872#endif 873 874#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 875extern int2 __attribute__((const, overloadable)) 876 convert_int2(ulong2 v); 877#endif 878 879#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 880extern int3 __attribute__((const, overloadable)) 881 convert_int3(ulong3 v); 882#endif 883 884#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 885extern int4 __attribute__((const, overloadable)) 886 convert_int4(ulong4 v); 887#endif 888 889#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 890extern uint2 __attribute__((const, overloadable)) 891 convert_uint2(double2 v); 892#endif 893 894#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 895extern uint3 __attribute__((const, overloadable)) 896 convert_uint3(double3 v); 897#endif 898 899#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 900extern uint4 __attribute__((const, overloadable)) 901 convert_uint4(double4 v); 902#endif 903 904#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 905extern uint2 __attribute__((const, overloadable)) 906 convert_uint2(long2 v); 907#endif 908 909#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 910extern uint3 __attribute__((const, overloadable)) 911 convert_uint3(long3 v); 912#endif 913 914#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 915extern uint4 __attribute__((const, overloadable)) 916 convert_uint4(long4 v); 917#endif 918 919#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 920extern uint2 __attribute__((const, overloadable)) 921 convert_uint2(ulong2 v); 922#endif 923 924#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 925extern uint3 __attribute__((const, overloadable)) 926 convert_uint3(ulong3 v); 927#endif 928 929#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 930extern uint4 __attribute__((const, overloadable)) 931 convert_uint4(ulong4 v); 932#endif 933 934#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 935extern double2 __attribute__((const, overloadable)) 936 convert_double2(float2 v); 937#endif 938 939#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 940extern double3 __attribute__((const, overloadable)) 941 convert_double3(float3 v); 942#endif 943 944#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 945extern double4 __attribute__((const, overloadable)) 946 convert_double4(float4 v); 947#endif 948 949#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 950extern double2 __attribute__((const, overloadable)) 951 convert_double2(char2 v); 952#endif 953 954#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 955extern double3 __attribute__((const, overloadable)) 956 convert_double3(char3 v); 957#endif 958 959#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 960extern double4 __attribute__((const, overloadable)) 961 convert_double4(char4 v); 962#endif 963 964#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 965extern double2 __attribute__((const, overloadable)) 966 convert_double2(uchar2 v); 967#endif 968 969#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 970extern double3 __attribute__((const, overloadable)) 971 convert_double3(uchar3 v); 972#endif 973 974#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 975extern double4 __attribute__((const, overloadable)) 976 convert_double4(uchar4 v); 977#endif 978 979#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 980extern double2 __attribute__((const, overloadable)) 981 convert_double2(short2 v); 982#endif 983 984#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 985extern double3 __attribute__((const, overloadable)) 986 convert_double3(short3 v); 987#endif 988 989#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 990extern double4 __attribute__((const, overloadable)) 991 convert_double4(short4 v); 992#endif 993 994#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 995extern double2 __attribute__((const, overloadable)) 996 convert_double2(ushort2 v); 997#endif 998 999#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1000extern double3 __attribute__((const, overloadable)) 1001 convert_double3(ushort3 v); 1002#endif 1003 1004#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1005extern double4 __attribute__((const, overloadable)) 1006 convert_double4(ushort4 v); 1007#endif 1008 1009#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1010extern double2 __attribute__((const, overloadable)) 1011 convert_double2(int2 v); 1012#endif 1013 1014#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1015extern double3 __attribute__((const, overloadable)) 1016 convert_double3(int3 v); 1017#endif 1018 1019#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1020extern double4 __attribute__((const, overloadable)) 1021 convert_double4(int4 v); 1022#endif 1023 1024#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1025extern double2 __attribute__((const, overloadable)) 1026 convert_double2(uint2 v); 1027#endif 1028 1029#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1030extern double3 __attribute__((const, overloadable)) 1031 convert_double3(uint3 v); 1032#endif 1033 1034#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1035extern double4 __attribute__((const, overloadable)) 1036 convert_double4(uint4 v); 1037#endif 1038 1039#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1040extern long2 __attribute__((const, overloadable)) 1041 convert_long2(float2 v); 1042#endif 1043 1044#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1045extern long3 __attribute__((const, overloadable)) 1046 convert_long3(float3 v); 1047#endif 1048 1049#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1050extern long4 __attribute__((const, overloadable)) 1051 convert_long4(float4 v); 1052#endif 1053 1054#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1055extern long2 __attribute__((const, overloadable)) 1056 convert_long2(char2 v); 1057#endif 1058 1059#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1060extern long3 __attribute__((const, overloadable)) 1061 convert_long3(char3 v); 1062#endif 1063 1064#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1065extern long4 __attribute__((const, overloadable)) 1066 convert_long4(char4 v); 1067#endif 1068 1069#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1070extern long2 __attribute__((const, overloadable)) 1071 convert_long2(uchar2 v); 1072#endif 1073 1074#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1075extern long3 __attribute__((const, overloadable)) 1076 convert_long3(uchar3 v); 1077#endif 1078 1079#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1080extern long4 __attribute__((const, overloadable)) 1081 convert_long4(uchar4 v); 1082#endif 1083 1084#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1085extern long2 __attribute__((const, overloadable)) 1086 convert_long2(short2 v); 1087#endif 1088 1089#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1090extern long3 __attribute__((const, overloadable)) 1091 convert_long3(short3 v); 1092#endif 1093 1094#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1095extern long4 __attribute__((const, overloadable)) 1096 convert_long4(short4 v); 1097#endif 1098 1099#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1100extern long2 __attribute__((const, overloadable)) 1101 convert_long2(ushort2 v); 1102#endif 1103 1104#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1105extern long3 __attribute__((const, overloadable)) 1106 convert_long3(ushort3 v); 1107#endif 1108 1109#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1110extern long4 __attribute__((const, overloadable)) 1111 convert_long4(ushort4 v); 1112#endif 1113 1114#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1115extern long2 __attribute__((const, overloadable)) 1116 convert_long2(int2 v); 1117#endif 1118 1119#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1120extern long3 __attribute__((const, overloadable)) 1121 convert_long3(int3 v); 1122#endif 1123 1124#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1125extern long4 __attribute__((const, overloadable)) 1126 convert_long4(int4 v); 1127#endif 1128 1129#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1130extern long2 __attribute__((const, overloadable)) 1131 convert_long2(uint2 v); 1132#endif 1133 1134#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1135extern long3 __attribute__((const, overloadable)) 1136 convert_long3(uint3 v); 1137#endif 1138 1139#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1140extern long4 __attribute__((const, overloadable)) 1141 convert_long4(uint4 v); 1142#endif 1143 1144#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1145extern ulong2 __attribute__((const, overloadable)) 1146 convert_ulong2(float2 v); 1147#endif 1148 1149#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1150extern ulong3 __attribute__((const, overloadable)) 1151 convert_ulong3(float3 v); 1152#endif 1153 1154#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1155extern ulong4 __attribute__((const, overloadable)) 1156 convert_ulong4(float4 v); 1157#endif 1158 1159#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1160extern ulong2 __attribute__((const, overloadable)) 1161 convert_ulong2(char2 v); 1162#endif 1163 1164#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1165extern ulong3 __attribute__((const, overloadable)) 1166 convert_ulong3(char3 v); 1167#endif 1168 1169#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1170extern ulong4 __attribute__((const, overloadable)) 1171 convert_ulong4(char4 v); 1172#endif 1173 1174#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1175extern ulong2 __attribute__((const, overloadable)) 1176 convert_ulong2(uchar2 v); 1177#endif 1178 1179#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1180extern ulong3 __attribute__((const, overloadable)) 1181 convert_ulong3(uchar3 v); 1182#endif 1183 1184#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1185extern ulong4 __attribute__((const, overloadable)) 1186 convert_ulong4(uchar4 v); 1187#endif 1188 1189#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1190extern ulong2 __attribute__((const, overloadable)) 1191 convert_ulong2(short2 v); 1192#endif 1193 1194#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1195extern ulong3 __attribute__((const, overloadable)) 1196 convert_ulong3(short3 v); 1197#endif 1198 1199#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1200extern ulong4 __attribute__((const, overloadable)) 1201 convert_ulong4(short4 v); 1202#endif 1203 1204#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1205extern ulong2 __attribute__((const, overloadable)) 1206 convert_ulong2(ushort2 v); 1207#endif 1208 1209#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1210extern ulong3 __attribute__((const, overloadable)) 1211 convert_ulong3(ushort3 v); 1212#endif 1213 1214#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1215extern ulong4 __attribute__((const, overloadable)) 1216 convert_ulong4(ushort4 v); 1217#endif 1218 1219#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1220extern ulong2 __attribute__((const, overloadable)) 1221 convert_ulong2(int2 v); 1222#endif 1223 1224#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1225extern ulong3 __attribute__((const, overloadable)) 1226 convert_ulong3(int3 v); 1227#endif 1228 1229#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1230extern ulong4 __attribute__((const, overloadable)) 1231 convert_ulong4(int4 v); 1232#endif 1233 1234#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1235extern ulong2 __attribute__((const, overloadable)) 1236 convert_ulong2(uint2 v); 1237#endif 1238 1239#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1240extern ulong3 __attribute__((const, overloadable)) 1241 convert_ulong3(uint3 v); 1242#endif 1243 1244#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 1245extern ulong4 __attribute__((const, overloadable)) 1246 convert_ulong4(uint4 v); 1247#endif 1248 1249#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1250extern half2 __attribute__((const, overloadable)) 1251 convert_half2(half2 v); 1252#endif 1253 1254#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1255extern half3 __attribute__((const, overloadable)) 1256 convert_half3(half3 v); 1257#endif 1258 1259#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1260extern half4 __attribute__((const, overloadable)) 1261 convert_half4(half4 v); 1262#endif 1263 1264#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1265extern float2 __attribute__((const, overloadable)) 1266 convert_float2(half2 v); 1267#endif 1268 1269#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1270extern float3 __attribute__((const, overloadable)) 1271 convert_float3(half3 v); 1272#endif 1273 1274#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1275extern float4 __attribute__((const, overloadable)) 1276 convert_float4(half4 v); 1277#endif 1278 1279#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1280extern double2 __attribute__((const, overloadable)) 1281 convert_double2(half2 v); 1282#endif 1283 1284#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1285extern double3 __attribute__((const, overloadable)) 1286 convert_double3(half3 v); 1287#endif 1288 1289#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1290extern double4 __attribute__((const, overloadable)) 1291 convert_double4(half4 v); 1292#endif 1293 1294#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1295extern char2 __attribute__((const, overloadable)) 1296 convert_char2(half2 v); 1297#endif 1298 1299#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1300extern char3 __attribute__((const, overloadable)) 1301 convert_char3(half3 v); 1302#endif 1303 1304#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1305extern char4 __attribute__((const, overloadable)) 1306 convert_char4(half4 v); 1307#endif 1308 1309#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1310extern uchar2 __attribute__((const, overloadable)) 1311 convert_uchar2(half2 v); 1312#endif 1313 1314#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1315extern uchar3 __attribute__((const, overloadable)) 1316 convert_uchar3(half3 v); 1317#endif 1318 1319#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1320extern uchar4 __attribute__((const, overloadable)) 1321 convert_uchar4(half4 v); 1322#endif 1323 1324#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1325extern short2 __attribute__((const, overloadable)) 1326 convert_short2(half2 v); 1327#endif 1328 1329#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1330extern short3 __attribute__((const, overloadable)) 1331 convert_short3(half3 v); 1332#endif 1333 1334#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1335extern short4 __attribute__((const, overloadable)) 1336 convert_short4(half4 v); 1337#endif 1338 1339#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1340extern ushort2 __attribute__((const, overloadable)) 1341 convert_ushort2(half2 v); 1342#endif 1343 1344#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1345extern ushort3 __attribute__((const, overloadable)) 1346 convert_ushort3(half3 v); 1347#endif 1348 1349#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1350extern ushort4 __attribute__((const, overloadable)) 1351 convert_ushort4(half4 v); 1352#endif 1353 1354#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1355extern int2 __attribute__((const, overloadable)) 1356 convert_int2(half2 v); 1357#endif 1358 1359#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1360extern int3 __attribute__((const, overloadable)) 1361 convert_int3(half3 v); 1362#endif 1363 1364#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1365extern int4 __attribute__((const, overloadable)) 1366 convert_int4(half4 v); 1367#endif 1368 1369#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1370extern uint2 __attribute__((const, overloadable)) 1371 convert_uint2(half2 v); 1372#endif 1373 1374#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1375extern uint3 __attribute__((const, overloadable)) 1376 convert_uint3(half3 v); 1377#endif 1378 1379#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1380extern uint4 __attribute__((const, overloadable)) 1381 convert_uint4(half4 v); 1382#endif 1383 1384#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1385extern long2 __attribute__((const, overloadable)) 1386 convert_long2(half2 v); 1387#endif 1388 1389#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1390extern long3 __attribute__((const, overloadable)) 1391 convert_long3(half3 v); 1392#endif 1393 1394#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1395extern long4 __attribute__((const, overloadable)) 1396 convert_long4(half4 v); 1397#endif 1398 1399#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1400extern ulong2 __attribute__((const, overloadable)) 1401 convert_ulong2(half2 v); 1402#endif 1403 1404#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1405extern ulong3 __attribute__((const, overloadable)) 1406 convert_ulong3(half3 v); 1407#endif 1408 1409#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1410extern ulong4 __attribute__((const, overloadable)) 1411 convert_ulong4(half4 v); 1412#endif 1413 1414#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1415extern half2 __attribute__((const, overloadable)) 1416 convert_half2(float2 v); 1417#endif 1418 1419#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1420extern half3 __attribute__((const, overloadable)) 1421 convert_half3(float3 v); 1422#endif 1423 1424#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1425extern half4 __attribute__((const, overloadable)) 1426 convert_half4(float4 v); 1427#endif 1428 1429#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1430extern half2 __attribute__((const, overloadable)) 1431 convert_half2(double2 v); 1432#endif 1433 1434#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1435extern half3 __attribute__((const, overloadable)) 1436 convert_half3(double3 v); 1437#endif 1438 1439#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1440extern half4 __attribute__((const, overloadable)) 1441 convert_half4(double4 v); 1442#endif 1443 1444#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1445extern half2 __attribute__((const, overloadable)) 1446 convert_half2(char2 v); 1447#endif 1448 1449#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1450extern half3 __attribute__((const, overloadable)) 1451 convert_half3(char3 v); 1452#endif 1453 1454#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1455extern half4 __attribute__((const, overloadable)) 1456 convert_half4(char4 v); 1457#endif 1458 1459#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1460extern half2 __attribute__((const, overloadable)) 1461 convert_half2(uchar2 v); 1462#endif 1463 1464#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1465extern half3 __attribute__((const, overloadable)) 1466 convert_half3(uchar3 v); 1467#endif 1468 1469#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1470extern half4 __attribute__((const, overloadable)) 1471 convert_half4(uchar4 v); 1472#endif 1473 1474#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1475extern half2 __attribute__((const, overloadable)) 1476 convert_half2(short2 v); 1477#endif 1478 1479#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1480extern half3 __attribute__((const, overloadable)) 1481 convert_half3(short3 v); 1482#endif 1483 1484#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1485extern half4 __attribute__((const, overloadable)) 1486 convert_half4(short4 v); 1487#endif 1488 1489#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1490extern half2 __attribute__((const, overloadable)) 1491 convert_half2(ushort2 v); 1492#endif 1493 1494#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1495extern half3 __attribute__((const, overloadable)) 1496 convert_half3(ushort3 v); 1497#endif 1498 1499#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1500extern half4 __attribute__((const, overloadable)) 1501 convert_half4(ushort4 v); 1502#endif 1503 1504#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1505extern half2 __attribute__((const, overloadable)) 1506 convert_half2(int2 v); 1507#endif 1508 1509#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1510extern half3 __attribute__((const, overloadable)) 1511 convert_half3(int3 v); 1512#endif 1513 1514#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1515extern half4 __attribute__((const, overloadable)) 1516 convert_half4(int4 v); 1517#endif 1518 1519#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1520extern half2 __attribute__((const, overloadable)) 1521 convert_half2(uint2 v); 1522#endif 1523 1524#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1525extern half3 __attribute__((const, overloadable)) 1526 convert_half3(uint3 v); 1527#endif 1528 1529#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1530extern half4 __attribute__((const, overloadable)) 1531 convert_half4(uint4 v); 1532#endif 1533 1534#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1535extern half2 __attribute__((const, overloadable)) 1536 convert_half2(long2 v); 1537#endif 1538 1539#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1540extern half3 __attribute__((const, overloadable)) 1541 convert_half3(long3 v); 1542#endif 1543 1544#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1545extern half4 __attribute__((const, overloadable)) 1546 convert_half4(long4 v); 1547#endif 1548 1549#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1550extern half2 __attribute__((const, overloadable)) 1551 convert_half2(ulong2 v); 1552#endif 1553 1554#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1555extern half3 __attribute__((const, overloadable)) 1556 convert_half3(ulong3 v); 1557#endif 1558 1559#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1560extern half4 __attribute__((const, overloadable)) 1561 convert_half4(ulong4 v); 1562#endif 1563 1564/* 1565 * rsPackColorTo8888: Create a uchar4 RGBA from floats 1566 * 1567 * Packs three or four floating point RGBA values into a uchar4. 1568 * 1569 * The input values are typically between 0.0f and 1.0f inclusive. For input values outside 1570 * of this range, the resulting outputs will be clamped to be between 0 and 255. As this 1571 * clamping may be done after the input is multiplied by 255.f and converted to an integer, 1572 * input numbers greater than INT_MAX/255.f or less than INT_MIN/255.f result in 1573 * undefined behavior. 1574 * 1575 * If the alpha component is not specified, it is assumed to be 1.0, i.e. the result will 1576 * have an alpha set to 255. 1577 * 1578 * Parameters: 1579 * r: Red component. 1580 * g: Green component. 1581 * b: Blue component. 1582 * a: Alpha component. 1583 * color: Vector of 3 or 4 floats containing the R, G, B, and A values. 1584 */ 1585extern uchar4 __attribute__((const, overloadable)) 1586 rsPackColorTo8888(float r, float g, float b); 1587 1588extern uchar4 __attribute__((const, overloadable)) 1589 rsPackColorTo8888(float r, float g, float b, float a); 1590 1591extern uchar4 __attribute__((const, overloadable)) 1592 rsPackColorTo8888(float3 color); 1593 1594extern uchar4 __attribute__((const, overloadable)) 1595 rsPackColorTo8888(float4 color); 1596 1597/* 1598 * rsUnpackColor8888: Create a float4 RGBA from uchar4 1599 * 1600 * Unpacks a uchar4 color to float4. The resulting floats will be between 0.0 and 1.0 inclusive. 1601 */ 1602extern float4 __attribute__((const)) 1603 rsUnpackColor8888(uchar4 c); 1604 1605/* 1606 * rsYuvToRGBA: Convert a YUV value to RGBA 1607 * 1608 * Converts a color from a YUV representation to RGBA. 1609 * 1610 * We currently don't provide a function to do the reverse conversion. 1611 * 1612 * Parameters: 1613 * y: Luminance component. 1614 * u: U chrominance component. 1615 * v: V chrominance component. 1616 */ 1617extern float4 __attribute__((const, overloadable)) 1618 rsYuvToRGBA_float4(uchar y, uchar u, uchar v); 1619 1620extern uchar4 __attribute__((const, overloadable)) 1621 rsYuvToRGBA_uchar4(uchar y, uchar u, uchar v); 1622 1623#endif // RENDERSCRIPT_RS_CONVERT_RSH 1624