Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
SkYUVMath.cpp File Reference
#include "src/core/SkYUVMath.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkM44.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include <cstring>

Go to the source code of this file.

Functions

void SkColorMatrix_RGB2YUV (SkYUVColorSpace cs, float m[20])
 
void SkColorMatrix_YUV2RGB (SkYUVColorSpace cs, float m[20])
 
static void colormatrix_to_matrix44 (const float src[20], SkM44 *dst)
 
static void matrix44_to_colormatrix (const SkM44 &src, float dst[20])
 
static void scale3 (float m[], float s)
 
static void make_rgb_to_yuv_matrix_ycbcr (float mx[20], const YUVCoeff &c)
 
static void make_rgb_to_yuv_matrix_ydzdx (float mx[20], Range range)
 
static void make_rgb_to_yuv_matrix_gbr (float mx[20], Range range)
 
static void make_rgb_to_yuv_matrix_ycgco (float mx[20], int bits, Range range)
 
static void make_rgb_to_yuv_matrix (float mx[20], SkYUVColorSpace cs)
 
static void dump (const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
 
void SkColorMatrix_DumpYUVMatrixTables ()
 

Variables

const float JPEG_full_rgb_to_yuv []
 
const float JPEG_full_yuv_to_rgb []
 
const float Rec601_limited_rgb_to_yuv []
 
const float Rec601_limited_yuv_to_rgb []
 
const float Rec709_full_rgb_to_yuv []
 
const float Rec709_full_yuv_to_rgb []
 
const float Rec709_limited_rgb_to_yuv []
 
const float Rec709_limited_yuv_to_rgb []
 
const float BT2020_8bit_full_rgb_to_yuv []
 
const float BT2020_8bit_full_yuv_to_rgb []
 
const float BT2020_8bit_limited_rgb_to_yuv []
 
const float BT2020_8bit_limited_yuv_to_rgb []
 
const float BT2020_10bit_full_rgb_to_yuv []
 
const float BT2020_10bit_full_yuv_to_rgb []
 
const float BT2020_10bit_limited_rgb_to_yuv []
 
const float BT2020_10bit_limited_yuv_to_rgb []
 
const float BT2020_12bit_full_rgb_to_yuv []
 
const float BT2020_12bit_full_yuv_to_rgb []
 
const float BT2020_12bit_limited_rgb_to_yuv []
 
const float BT2020_12bit_limited_yuv_to_rgb []
 
const float FCC_full_rgb_to_yuv []
 
const float FCC_full_yuv_to_rgb []
 
const float FCC_limited_rgb_to_yuv []
 
const float FCC_limited_yuv_to_rgb []
 
const float SMPTE240_full_rgb_to_yuv []
 
const float SMPTE240_full_yuv_to_rgb []
 
const float SMPTE240_limited_rgb_to_yuv []
 
const float SMPTE240_limited_yuv_to_rgb []
 
const float YDZDX_full_rgb_to_yuv []
 
const float YDZDX_full_yuv_to_rgb []
 
const float YDZDX_limited_rgb_to_yuv []
 
const float YDZDX_limited_yuv_to_rgb []
 
const float GBR_full_rgb_to_yuv []
 
const float GBR_full_yuv_to_rgb []
 
const float GBR_limited_rgb_to_yuv []
 
const float GBR_limited_yuv_to_rgb []
 
const float YCgCo_8bit_full_rgb_to_yuv []
 
const float YCgCo_8bit_full_yuv_to_rgb []
 
const float YCgCo_8bit_limited_rgb_to_yuv []
 
const float YCgCo_8bit_limited_yuv_to_rgb []
 
const float YCgCo_10bit_full_rgb_to_yuv []
 
const float YCgCo_10bit_full_yuv_to_rgb []
 
const float YCgCo_10bit_limited_rgb_to_yuv []
 
const float YCgCo_10bit_limited_yuv_to_rgb []
 
const float YCgCo_12bit_full_rgb_to_yuv []
 
const float YCgCo_12bit_full_yuv_to_rgb []
 
const float YCgCo_12bit_limited_rgb_to_yuv []
 
const float YCgCo_12bit_limited_yuv_to_rgb []
 
const float * yuv_to_rgb_array []
 
const float * rgb_to_yuv_array []
 
constexpr size_t kSizeOfColorMatrix = 20 * sizeof(float)
 

Function Documentation

◆ colormatrix_to_matrix44()

static void colormatrix_to_matrix44 ( const float  src[20],
SkM44 dst 
)
static

Definition at line 414 of file SkYUVMath.cpp.

414 {
415 *dst = SkM44(src[ 0], src[ 1], src[ 2], src[ 4],
416 src[ 5], src[ 6], src[ 7], src[ 9],
417 src[10], src[11], src[12], src[14],
418 0, 0, 0, 1);
419}
Definition SkM44.h:150
dst
Definition cp.py:12

◆ dump()

static void dump ( const float  m[20],
SkYUVColorSpace  cs,
bool  rgb2yuv 
)
static

Definition at line 629 of file SkYUVMath.cpp.

629 {
630 const char* names[] = {
631 "JPEG_full",
632 "Rec601_limited",
633 "Rec709_full",
634 "Rec709_limited",
635 "BT2020_8bit_full",
636 "BT2020_8bit_limited",
637 "BT2020_10bit_full",
638 "BT2020_10bit_limited",
639 "BT2020_12bit_full",
640 "BT2020_12bit_limited",
641 "FCC_full",
642 "FCC_limited",
643 "SMPTE240_full",
644 "SMPTE240_limited",
645 "YDZDX_full",
646 "YDZDX_limited",
647 "GBR_full",
648 "GBR_limited",
649 "YCgCo_8bit_full",
650 "YCgCo_8bit_limited",
651 "YCgCo_10bit_full",
652 "YCgCo_10bit_limited",
653 "YCgCo_12bit_full",
654 "YCgCo_12bit_limited",
655 };
656 const char* dirnames[] = {
657 "yuv_to_rgb", "rgb_to_yuv",
658 };
659 SkDebugf("const float %s_%s[] = {\n", names[cs], dirnames[rgb2yuv]);
660 for (int i = 0; i < 4; ++i) {
661 SkDebugf(" ");
662 for (int j = 0; j < 5; ++j) {
663 SkDebugf(" %9.6ff,", m[i * 5 + j]);
664 }
665 SkDebugf("\n");
666 }
667 SkDebugf("};\n");
668}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1

◆ make_rgb_to_yuv_matrix()

static void make_rgb_to_yuv_matrix ( float  mx[20],
SkYUVColorSpace  cs 
)
static

Definition at line 588 of file SkYUVMath.cpp.

588 {
589 switch (cs) {
605 return make_rgb_to_yuv_matrix_ycbcr(mx, gCoeff[(unsigned)cs]);
607 return make_rgb_to_yuv_matrix_ydzdx(mx, Range::kFull);
609 return make_rgb_to_yuv_matrix_ydzdx(mx, Range::kLimited);
611 return make_rgb_to_yuv_matrix_gbr(mx, Range::kFull);
613 return make_rgb_to_yuv_matrix_gbr(mx, Range::kLimited);
615 return make_rgb_to_yuv_matrix_ycgco(mx, /*bits=*/8, Range::kFull);
617 return make_rgb_to_yuv_matrix_ycgco(mx, /*bits=*/8, Range::kLimited);
619 return make_rgb_to_yuv_matrix_ycgco(mx, /*bits=*/10, Range::kFull);
621 return make_rgb_to_yuv_matrix_ycgco(mx, /*bits=*/10, Range::kLimited);
623 return make_rgb_to_yuv_matrix_ycgco(mx, /*bits=*/12, Range::kFull);
625 return make_rgb_to_yuv_matrix_ycgco(mx, /*bits=*/12, Range::kLimited);
626 }
627}
@ kRec709_Full_SkYUVColorSpace
describes HDTV range
Definition SkImageInfo.h:71
@ kYCgCo_10bit_Full_SkYUVColorSpace
Definition SkImageInfo.h:89
@ kYCgCo_12bit_Full_SkYUVColorSpace
Definition SkImageInfo.h:91
@ kYCgCo_12bit_Limited_SkYUVColorSpace
Definition SkImageInfo.h:92
@ kYCgCo_10bit_Limited_SkYUVColorSpace
Definition SkImageInfo.h:90
@ kGBR_Limited_SkYUVColorSpace
Definition SkImageInfo.h:86
@ kBT2020_8bit_Limited_SkYUVColorSpace
Definition SkImageInfo.h:74
@ kFCC_Full_SkYUVColorSpace
describes FCC range
Definition SkImageInfo.h:79
@ kYCgCo_8bit_Limited_SkYUVColorSpace
Definition SkImageInfo.h:88
@ kYDZDX_Full_SkYUVColorSpace
describes YDZDX range
Definition SkImageInfo.h:83
@ kFCC_Limited_SkYUVColorSpace
Definition SkImageInfo.h:80
@ kBT2020_12bit_Limited_SkYUVColorSpace
Definition SkImageInfo.h:78
@ kYCgCo_8bit_Full_SkYUVColorSpace
describes YCgCo matrix
Definition SkImageInfo.h:87
@ kBT2020_8bit_Full_SkYUVColorSpace
describes UHDTV range, non-constant-luminance
Definition SkImageInfo.h:73
@ kRec601_Limited_SkYUVColorSpace
describes SDTV range
Definition SkImageInfo.h:70
@ kRec709_Limited_SkYUVColorSpace
Definition SkImageInfo.h:72
@ kSMPTE240_Full_SkYUVColorSpace
describes SMPTE240M range
Definition SkImageInfo.h:81
@ kGBR_Full_SkYUVColorSpace
describes GBR range
Definition SkImageInfo.h:85
@ kSMPTE240_Limited_SkYUVColorSpace
Definition SkImageInfo.h:82
@ kBT2020_12bit_Full_SkYUVColorSpace
Definition SkImageInfo.h:77
@ kBT2020_10bit_Full_SkYUVColorSpace
Definition SkImageInfo.h:75
@ kIdentity_SkYUVColorSpace
maps Y->R, U->G, V->B
Definition SkImageInfo.h:93
@ kBT2020_10bit_Limited_SkYUVColorSpace
Definition SkImageInfo.h:76
@ kYDZDX_Limited_SkYUVColorSpace
Definition SkImageInfo.h:84
@ kJPEG_Full_SkYUVColorSpace
describes full range
Definition SkImageInfo.h:69
static void make_rgb_to_yuv_matrix_ycgco(float mx[20], int bits, Range range)
static void make_rgb_to_yuv_matrix_gbr(float mx[20], Range range)
static void make_rgb_to_yuv_matrix_ycbcr(float mx[20], const YUVCoeff &c)
static void make_rgb_to_yuv_matrix_ydzdx(float mx[20], Range range)

◆ make_rgb_to_yuv_matrix_gbr()

static void make_rgb_to_yuv_matrix_gbr ( float  mx[20],
Range  range 
)
static

Definition at line 539 of file SkYUVMath.cpp.

539 {
540 const int bits = 8;
541 const float denom = static_cast<float>((1 << bits) - 1);
542 float scaleY = 1.0f,
543 addY = 0.0f;
544
545 if (range == kLimited) {
546 scaleY = 219 / denom;
547 addY = 16 / denom;
548 }
549
550 // GBR applies range correction to RGB values similar to YCgCo.
551 float m[20] = {
552 0.0f, 1.0f, 0.0f, 0.0f, addY, // G
553 0.0f, 0.0f, 1.0f, 0.0f, addY, // B
554 1.0f, 0.0f, 0.0f, 0.0f, addY, // R
555 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
556 };
557 memcpy(mx, m, sizeof(m));
558 scale3(mx + 0, scaleY);
559 scale3(mx + 5, scaleY);
560 scale3(mx + 10, scaleY);
561}
static void scale3(float m[], float s)

◆ make_rgb_to_yuv_matrix_ycbcr()

static void make_rgb_to_yuv_matrix_ycbcr ( float  mx[20],
const YUVCoeff &  c 
)
static

Definition at line 478 of file SkYUVMath.cpp.

478 {
479 SkASSERT(c.bits >= 8);
480 const float Kr = c.Kr;
481 const float Kb = c.Kb;
482 const float Kg = 1.0f - Kr - Kb;
483 const float Cr = 0.5f / (1.0f - Kb);
484 const float Cb = 0.5f / (1.0f - Kr);
485
486 const int shift = c.bits - 8;
487
488 const float denom = static_cast<float>((1 << c.bits) - 1);
489 float scaleY = 1.0f,
490 addY = 0.0f,
491 scaleUV = 1.0f,
492 addUV = (128 << shift) / denom;
493
494 if (c.range == kLimited) {
495 scaleY = (219 << shift) / denom;
496 addY = ( 16 << shift) / denom;
497 scaleUV = (224 << shift) / denom;
498 }
499
500 float m[20] = {
501 Kr, Kg, Kb, 0, addY,
502 -Kr, -Kg, 1-Kb, 0, addUV,
503 1-Kr, -Kg, -Kb, 0, addUV,
504 0, 0, 0, 1, 0,
505 };
506 memcpy(mx, m, sizeof(m));
507 scale3(mx + 0, scaleY );
508 scale3(mx + 5, Cr * scaleUV);
509 scale3(mx + 10, Cb * scaleUV);
510}
#define SkASSERT(cond)
Definition SkAssert.h:116

◆ make_rgb_to_yuv_matrix_ycgco()

static void make_rgb_to_yuv_matrix_ycgco ( float  mx[20],
int  bits,
Range  range 
)
static

Definition at line 563 of file SkYUVMath.cpp.

563 {
564 SkASSERT(bits >= 8);
565 const int shift = bits - 8;
566 const float denom = static_cast<float>((1 << bits) - 1);
567 float scaleY = 1.0f,
568 addY = 0.0f,
569 chroma05 = static_cast<float>(1 << (bits - 1)) / denom;
570
571 if (range == kLimited) {
572 scaleY = (219 << shift) / denom;
573 addY = ( 16 << shift) / denom;
574 }
575
576 float m[20] = {
577 0.25f, 0.5f, 0.25f, 0.0f, addY,
578 -0.25f, 0.5f, -0.25f, 0.0f, chroma05,
579 0.5f, 0.0f, -0.5f, 0.0f, chroma05,
580 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
581 };
582 memcpy(mx, m, sizeof(m));
583 scale3(mx + 0, scaleY);
584 scale3(mx + 5, scaleY);
585 scale3(mx + 10, scaleY);
586}

◆ make_rgb_to_yuv_matrix_ydzdx()

static void make_rgb_to_yuv_matrix_ydzdx ( float  mx[20],
Range  range 
)
static

Definition at line 512 of file SkYUVMath.cpp.

512 {
513 const int bits = 8;
514 const float denom = static_cast<float>((1 << bits) - 1);
515 float scaleY = 1.0f,
516 addY = 0.0f,
517 scaleUV = 1.0f,
518 addUV = 128 / denom;
519
520 if (range == kLimited) {
521 scaleY = 219 / denom;
522 addY = 16 / denom;
523 scaleUV = 224 / denom;
524 }
525
526 // YDZDX applies range correction to YUV values similar to YCbCr.
527 float m[20] = {
528 0.0f, 1.0f, 0.0f, 0.0f, addY, // Y
529 0.0f, -0.5f, 0.986566f / 2.0f, 0.0f, addUV, // DX or DZ
530 0.5f, -0.991902f / 2.0f, 0.0f, 0.0f, addUV, // DZ or DX
531 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
532 };
533 memcpy(mx, m, sizeof(m));
534 scale3(mx + 0, scaleY );
535 scale3(mx + 5, scaleUV);
536 scale3(mx + 10, scaleUV);
537}

◆ matrix44_to_colormatrix()

static void matrix44_to_colormatrix ( const SkM44 src,
float  dst[20] 
)
static

Definition at line 423 of file SkYUVMath.cpp.

423 {
424 dst[0] = src.rc(0,0);
425 dst[1] = src.rc(0,1);
426 dst[2] = src.rc(0,2);
427 dst[3] = 0;
428 dst[4] = src.rc(0,3); // tx
429
430 dst[5] = src.rc(1,0);
431 dst[6] = src.rc(1,1);
432 dst[7] = src.rc(1,2);
433 dst[8] = 0;
434 dst[9] = src.rc(1,3); // ty
435
436 dst[10] = src.rc(2,0);
437 dst[11] = src.rc(2,1);
438 dst[12] = src.rc(2,2);
439 dst[13] = 0;
440 dst[14] = src.rc(2,3); // tz
441
442 dst[15] = dst[16] = dst[17] = dst[19] = 0;
443 dst[18] = 1;
444}

◆ scale3()

static void scale3 ( float  m[],
float  s 
)
static

Definition at line 446 of file SkYUVMath.cpp.

446 {
447 for (int i = 0; i < 3; ++i) {
448 m[i] *= s;
449 }
450}
struct MyStruct s

◆ SkColorMatrix_DumpYUVMatrixTables()

void SkColorMatrix_DumpYUVMatrixTables ( )

Definition at line 672 of file SkYUVMath.cpp.

672 {
673 for (int i = 0; i < kLastEnum_SkYUVColorSpace; ++i) {
674 SkYUVColorSpace cs = static_cast<SkYUVColorSpace>(i);
675 float m[20];
677 dump(m, cs, true);
678 SkM44 m44, im44;
680 float im[20];
681#ifdef SK_DEBUG
682 // be sure our coversion between matrix44 and colormatrix is perfect
684 SkASSERT(memcmp(m, im, sizeof(im)) == 0);
685#endif
686 SkAssertResult(m44.invert(&im44));
687 matrix44_to_colormatrix(im44, im);
688 dump(im, cs, false);
689 }
690}
#define SkAssertResult(cond)
Definition SkAssert.h:123
SkYUVColorSpace
Definition SkImageInfo.h:68
@ kLastEnum_SkYUVColorSpace
last valid value
Definition SkImageInfo.h:95
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
static void make_rgb_to_yuv_matrix(float mx[20], SkYUVColorSpace cs)
static void matrix44_to_colormatrix(const SkM44 &src, float dst[20])
static void colormatrix_to_matrix44(const float src[20], SkM44 *dst)
bool invert(SkM44 *inverse) const
Definition SkM44.cpp:247

◆ SkColorMatrix_RGB2YUV()

void SkColorMatrix_RGB2YUV ( SkYUVColorSpace  cs,
float  m[20] 
)

Definition at line 389 of file SkYUVMath.cpp.

389 {
390 if ((unsigned)cs < (unsigned)kIdentity_SkYUVColorSpace) {
391 memcpy(m, rgb_to_yuv_array[(unsigned)cs], kSizeOfColorMatrix);
392 } else {
393 memset(m, 0, kSizeOfColorMatrix);
394 m[0] = m[6] = m[12] = m[18] = 1;
395 }
396}
constexpr size_t kSizeOfColorMatrix
const float * rgb_to_yuv_array[]

◆ SkColorMatrix_YUV2RGB()

void SkColorMatrix_YUV2RGB ( SkYUVColorSpace  cs,
float  m[20] 
)

Definition at line 398 of file SkYUVMath.cpp.

398 {
399 if ((unsigned)cs < (unsigned)kIdentity_SkYUVColorSpace) {
400 memcpy(m, yuv_to_rgb_array[(unsigned)cs], kSizeOfColorMatrix);
401 } else {
402 memset(m, 0, kSizeOfColorMatrix);
403 m[0] = m[6] = m[12] = m[18] = 1;
404 }
405}
const float * yuv_to_rgb_array[]

Variable Documentation

◆ BT2020_10bit_full_rgb_to_yuv

const float BT2020_10bit_full_rgb_to_yuv[]
Initial value:
= {
0.262700f, 0.678000f, 0.059300f, 0.000000f, 0.000000f,
-0.139630f, -0.360370f, 0.500000f, 0.000000f, 0.500489f,
0.500000f, -0.459786f, -0.040214f, 0.000000f, 0.500489f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 91 of file SkYUVMath.cpp.

91 {
92 0.262700f, 0.678000f, 0.059300f, 0.000000f, 0.000000f,
93 -0.139630f, -0.360370f, 0.500000f, 0.000000f, 0.500489f,
94 0.500000f, -0.459786f, -0.040214f, 0.000000f, 0.500489f,
95 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
96};

◆ BT2020_10bit_full_yuv_to_rgb

const float BT2020_10bit_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -0.000000f, 1.474600f, 0.000000f, -0.738021f,
1.000000f, -0.164553f, -0.571353f, 0.000000f, 0.368313f,
1.000000f, 1.881400f, -0.000000f, 0.000000f, -0.941620f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 97 of file SkYUVMath.cpp.

97 {
98 1.000000f, -0.000000f, 1.474600f, 0.000000f, -0.738021f,
99 1.000000f, -0.164553f, -0.571353f, 0.000000f, 0.368313f,
100 1.000000f, 1.881400f, -0.000000f, 0.000000f, -0.941620f,
101 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
102};

◆ BT2020_10bit_limited_rgb_to_yuv

const float BT2020_10bit_limited_rgb_to_yuv[]
Initial value:
= {
0.224951f, 0.580575f, 0.050779f, 0.000000f, 0.062561f,
-0.122296f, -0.315632f, 0.437928f, 0.000000f, 0.500489f,
0.437928f, -0.402706f, -0.035222f, 0.000000f, 0.500489f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 103 of file SkYUVMath.cpp.

103 {
104 0.224951f, 0.580575f, 0.050779f, 0.000000f, 0.062561f,
105 -0.122296f, -0.315632f, 0.437928f, 0.000000f, 0.500489f,
106 0.437928f, -0.402706f, -0.035222f, 0.000000f, 0.500489f,
107 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
108};

◆ BT2020_10bit_limited_yuv_to_rgb

const float BT2020_10bit_limited_yuv_to_rgb[]
Initial value:
= {
1.167808f, -0.000000f, 1.683611f, 0.000000f, -0.915688f,
1.167808f, -0.187877f, -0.652337f, 0.000000f, 0.347458f,
1.167808f, 2.148072f, -0.000000f, 0.000000f, -1.148145f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 109 of file SkYUVMath.cpp.

109 {
110 1.167808f, -0.000000f, 1.683611f, 0.000000f, -0.915688f,
111 1.167808f, -0.187877f, -0.652337f, 0.000000f, 0.347458f,
112 1.167808f, 2.148072f, -0.000000f, 0.000000f, -1.148145f,
113 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
114};

◆ BT2020_12bit_full_rgb_to_yuv

const float BT2020_12bit_full_rgb_to_yuv[]
Initial value:
= {
0.262700f, 0.678000f, 0.059300f, 0.000000f, 0.000000f,
-0.139630f, -0.360370f, 0.500000f, 0.000000f, 0.500122f,
0.500000f, -0.459786f, -0.040214f, 0.000000f, 0.500122f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 115 of file SkYUVMath.cpp.

115 {
116 0.262700f, 0.678000f, 0.059300f, 0.000000f, 0.000000f,
117 -0.139630f, -0.360370f, 0.500000f, 0.000000f, 0.500122f,
118 0.500000f, -0.459786f, -0.040214f, 0.000000f, 0.500122f,
119 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
120};

◆ BT2020_12bit_full_yuv_to_rgb

const float BT2020_12bit_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -0.000000f, 1.474600f, 0.000000f, -0.737480f,
1.000000f, -0.164553f, -0.571353f, 0.000000f, 0.368043f,
1.000000f, 1.881400f, -0.000000f, 0.000000f, -0.940930f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 121 of file SkYUVMath.cpp.

121 {
122 1.000000f, -0.000000f, 1.474600f, 0.000000f, -0.737480f,
123 1.000000f, -0.164553f, -0.571353f, 0.000000f, 0.368043f,
124 1.000000f, 1.881400f, -0.000000f, 0.000000f, -0.940930f,
125 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
126};

◆ BT2020_12bit_limited_rgb_to_yuv

const float BT2020_12bit_limited_rgb_to_yuv[]
Initial value:
= {
0.224787f, 0.580149f, 0.050742f, 0.000000f, 0.062515f,
-0.122206f, -0.315401f, 0.437607f, 0.000000f, 0.500122f,
0.437607f, -0.402411f, -0.035196f, 0.000000f, 0.500122f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 127 of file SkYUVMath.cpp.

127 {
128 0.224787f, 0.580149f, 0.050742f, 0.000000f, 0.062515f,
129 -0.122206f, -0.315401f, 0.437607f, 0.000000f, 0.500122f,
130 0.437607f, -0.402411f, -0.035196f, 0.000000f, 0.500122f,
131 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
132};

◆ BT2020_12bit_limited_yuv_to_rgb

const float BT2020_12bit_limited_yuv_to_rgb[]
Initial value:
= {
1.168664f, -0.000000f, 1.684846f, 0.000000f, -0.915688f,
1.168664f, -0.188015f, -0.652816f, 0.000000f, 0.347458f,
1.168664f, 2.149647f, -0.000000f, 0.000000f, -1.148145f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 133 of file SkYUVMath.cpp.

133 {
134 1.168664f, -0.000000f, 1.684846f, 0.000000f, -0.915688f,
135 1.168664f, -0.188015f, -0.652816f, 0.000000f, 0.347458f,
136 1.168664f, 2.149647f, -0.000000f, 0.000000f, -1.148145f,
137 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
138};

◆ BT2020_8bit_full_rgb_to_yuv

const float BT2020_8bit_full_rgb_to_yuv[]
Initial value:
= {
0.262700f, 0.678000f, 0.059300f, 0.000000f, 0.000000f,
-0.139630f, -0.360370f, 0.500000f, 0.000000f, 0.501961f,
0.500000f, -0.459786f, -0.040214f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 67 of file SkYUVMath.cpp.

67 {
68 0.262700f, 0.678000f, 0.059300f, 0.000000f, 0.000000f,
69 -0.139630f, -0.360370f, 0.500000f, 0.000000f, 0.501961f,
70 0.500000f, -0.459786f, -0.040214f, 0.000000f, 0.501961f,
71 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
72};

◆ BT2020_8bit_full_yuv_to_rgb

const float BT2020_8bit_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -0.000000f, 1.474600f, 0.000000f, -0.740191f,
1.000000f, -0.164553f, -0.571353f, 0.000000f, 0.369396f,
1.000000f, 1.881400f, -0.000000f, 0.000000f, -0.944389f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 73 of file SkYUVMath.cpp.

73 {
74 1.000000f, -0.000000f, 1.474600f, 0.000000f, -0.740191f,
75 1.000000f, -0.164553f, -0.571353f, 0.000000f, 0.369396f,
76 1.000000f, 1.881400f, -0.000000f, 0.000000f, -0.944389f,
77 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
78};

◆ BT2020_8bit_limited_rgb_to_yuv

const float BT2020_8bit_limited_rgb_to_yuv[]
Initial value:
= {
0.225613f, 0.582282f, 0.050928f, 0.000000f, 0.062745f,
-0.122655f, -0.316560f, 0.439216f, 0.000000f, 0.501961f,
0.439216f, -0.403890f, -0.035326f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 79 of file SkYUVMath.cpp.

79 {
80 0.225613f, 0.582282f, 0.050928f, 0.000000f, 0.062745f,
81 -0.122655f, -0.316560f, 0.439216f, 0.000000f, 0.501961f,
82 0.439216f, -0.403890f, -0.035326f, 0.000000f, 0.501961f,
83 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
84};

◆ BT2020_8bit_limited_yuv_to_rgb

const float BT2020_8bit_limited_yuv_to_rgb[]
Initial value:
= {
1.164384f, -0.000000f, 1.678674f, 0.000000f, -0.915688f,
1.164384f, -0.187326f, -0.650424f, 0.000000f, 0.347458f,
1.164384f, 2.141772f, -0.000000f, 0.000000f, -1.148145f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 85 of file SkYUVMath.cpp.

85 {
86 1.164384f, -0.000000f, 1.678674f, 0.000000f, -0.915688f,
87 1.164384f, -0.187326f, -0.650424f, 0.000000f, 0.347458f,
88 1.164384f, 2.141772f, -0.000000f, 0.000000f, -1.148145f,
89 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
90};

◆ FCC_full_rgb_to_yuv

const float FCC_full_rgb_to_yuv[]
Initial value:
= {
0.300000f, 0.590000f, 0.110000f, 0.000000f, 0.000000f,
-0.168539f, -0.331461f, 0.500000f, 0.000000f, 0.501961f,
0.500000f, -0.421429f, -0.078571f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 139 of file SkYUVMath.cpp.

139 {
140 0.300000f, 0.590000f, 0.110000f, 0.000000f, 0.000000f,
141 -0.168539f, -0.331461f, 0.500000f, 0.000000f, 0.501961f,
142 0.500000f, -0.421429f, -0.078571f, 0.000000f, 0.501961f,
143 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
144};

◆ FCC_full_yuv_to_rgb

const float FCC_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, 0.000000f, 1.400000f, 0.000000f, -0.702745f,
1.000000f, -0.331864f, -0.711864f, 0.000000f, 0.523911f,
1.000000f, 1.780000f, 0.000000f, 0.000000f, -0.893490f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 145 of file SkYUVMath.cpp.

145 {
146 1.000000f, 0.000000f, 1.400000f, 0.000000f, -0.702745f,
147 1.000000f, -0.331864f, -0.711864f, 0.000000f, 0.523911f,
148 1.000000f, 1.780000f, 0.000000f, 0.000000f, -0.893490f,
149 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
150};

◆ FCC_limited_rgb_to_yuv

const float FCC_limited_rgb_to_yuv[]
Initial value:
= {
0.257647f, 0.506706f, 0.094471f, 0.000000f, 0.062745f,
-0.148050f, -0.291165f, 0.439216f, 0.000000f, 0.501961f,
0.439216f, -0.370196f, -0.069020f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 151 of file SkYUVMath.cpp.

151 {
152 0.257647f, 0.506706f, 0.094471f, 0.000000f, 0.062745f,
153 -0.148050f, -0.291165f, 0.439216f, 0.000000f, 0.501961f,
154 0.439216f, -0.370196f, -0.069020f, 0.000000f, 0.501961f,
155 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
156};

◆ FCC_limited_yuv_to_rgb

const float FCC_limited_yuv_to_rgb[]
Initial value:
= {
1.164384f, -0.000000f, 1.593750f, 0.000000f, -0.873059f,
1.164384f, -0.377792f, -0.810381f, 0.000000f, 0.523357f,
1.164384f, 2.026339f, 0.000000f, 0.000000f, -1.090202f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 157 of file SkYUVMath.cpp.

157 {
158 1.164384f, -0.000000f, 1.593750f, 0.000000f, -0.873059f,
159 1.164384f, -0.377792f, -0.810381f, 0.000000f, 0.523357f,
160 1.164384f, 2.026339f, 0.000000f, 0.000000f, -1.090202f,
161 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
162};

◆ GBR_full_rgb_to_yuv

const float GBR_full_rgb_to_yuv[]
Initial value:
= {
0.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f,
0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f,
1.000000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 211 of file SkYUVMath.cpp.

211 {
212 0.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f,
213 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f,
214 1.000000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f,
215 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
216};

◆ GBR_full_yuv_to_rgb

const float GBR_full_yuv_to_rgb[]
Initial value:
= {
0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f,
1.000000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f,
0.000000f, 1.000000f, 0.000000f, 0.000000f, -0.000000f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 217 of file SkYUVMath.cpp.

217 {
218 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f,
219 1.000000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f,
220 0.000000f, 1.000000f, 0.000000f, 0.000000f, -0.000000f,
221 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
222};

◆ GBR_limited_rgb_to_yuv

const float GBR_limited_rgb_to_yuv[]
Initial value:
= {
0.000000f, 0.858824f, 0.000000f, 0.000000f, 0.062745f,
0.000000f, 0.000000f, 0.858824f, 0.000000f, 0.062745f,
0.858824f, 0.000000f, 0.000000f, 0.000000f, 0.062745f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 223 of file SkYUVMath.cpp.

223 {
224 0.000000f, 0.858824f, 0.000000f, 0.000000f, 0.062745f,
225 0.000000f, 0.000000f, 0.858824f, 0.000000f, 0.062745f,
226 0.858824f, 0.000000f, 0.000000f, 0.000000f, 0.062745f,
227 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
228};

◆ GBR_limited_yuv_to_rgb

const float GBR_limited_yuv_to_rgb[]
Initial value:
= {
0.000000f, 0.000000f, 1.164384f, 0.000000f, -0.073059f,
1.164384f, 0.000000f, 0.000000f, 0.000000f, -0.073059f,
0.000000f, 1.164384f, 0.000000f, 0.000000f, -0.073059f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 229 of file SkYUVMath.cpp.

229 {
230 0.000000f, 0.000000f, 1.164384f, 0.000000f, -0.073059f,
231 1.164384f, 0.000000f, 0.000000f, 0.000000f, -0.073059f,
232 0.000000f, 1.164384f, 0.000000f, 0.000000f, -0.073059f,
233 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
234};

◆ JPEG_full_rgb_to_yuv

const float JPEG_full_rgb_to_yuv[]
Initial value:
= {
0.299000f, 0.587000f, 0.114000f, 0.000000f, 0.000000f,
-0.168736f, -0.331264f, 0.500000f, 0.000000f, 0.501961f,
0.500000f, -0.418688f, -0.081312f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 19 of file SkYUVMath.cpp.

19 {
20 0.299000f, 0.587000f, 0.114000f, 0.000000f, 0.000000f,
21 -0.168736f, -0.331264f, 0.500000f, 0.000000f, 0.501961f,
22 0.500000f, -0.418688f, -0.081312f, 0.000000f, 0.501961f,
23 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
24};

◆ JPEG_full_yuv_to_rgb

const float JPEG_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -0.000000f, 1.402000f, 0.000000f, -0.703749f,
1.000000f, -0.344136f, -0.714136f, 0.000000f, 0.531211f,
1.000000f, 1.772000f, 0.000000f, 0.000000f, -0.889475f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 25 of file SkYUVMath.cpp.

25 {
26 1.000000f, -0.000000f, 1.402000f, 0.000000f, -0.703749f,
27 1.000000f, -0.344136f, -0.714136f, 0.000000f, 0.531211f,
28 1.000000f, 1.772000f, 0.000000f, 0.000000f, -0.889475f,
29 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
30};

◆ kSizeOfColorMatrix

constexpr size_t kSizeOfColorMatrix = 20 * sizeof(float)
constexpr

Definition at line 387 of file SkYUVMath.cpp.

◆ Rec601_limited_rgb_to_yuv

const float Rec601_limited_rgb_to_yuv[]
Initial value:
= {
0.256788f, 0.504129f, 0.097906f, 0.000000f, 0.062745f,
-0.148223f, -0.290993f, 0.439216f, 0.000000f, 0.501961f,
0.439216f, -0.367788f, -0.071427f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 31 of file SkYUVMath.cpp.

31 {
32 0.256788f, 0.504129f, 0.097906f, 0.000000f, 0.062745f,
33 -0.148223f, -0.290993f, 0.439216f, 0.000000f, 0.501961f,
34 0.439216f, -0.367788f, -0.071427f, 0.000000f, 0.501961f,
35 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
36};

◆ Rec601_limited_yuv_to_rgb

const float Rec601_limited_yuv_to_rgb[]
Initial value:
= {
1.164384f, -0.000000f, 1.596027f, 0.000000f, -0.874202f,
1.164384f, -0.391762f, -0.812968f, 0.000000f, 0.531668f,
1.164384f, 2.017232f, 0.000000f, 0.000000f, -1.085631f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 37 of file SkYUVMath.cpp.

37 {
38 1.164384f, -0.000000f, 1.596027f, 0.000000f, -0.874202f,
39 1.164384f, -0.391762f, -0.812968f, 0.000000f, 0.531668f,
40 1.164384f, 2.017232f, 0.000000f, 0.000000f, -1.085631f,
41 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
42};

◆ Rec709_full_rgb_to_yuv

const float Rec709_full_rgb_to_yuv[]
Initial value:
= {
0.212600f, 0.715200f, 0.072200f, 0.000000f, 0.000000f,
-0.114572f, -0.385428f, 0.500000f, 0.000000f, 0.501961f,
0.500000f, -0.454153f, -0.045847f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 43 of file SkYUVMath.cpp.

43 {
44 0.212600f, 0.715200f, 0.072200f, 0.000000f, 0.000000f,
45 -0.114572f, -0.385428f, 0.500000f, 0.000000f, 0.501961f,
46 0.500000f, -0.454153f, -0.045847f, 0.000000f, 0.501961f,
47 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
48};

◆ Rec709_full_yuv_to_rgb

const float Rec709_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -0.000000f, 1.574800f, 0.000000f, -0.790488f,
1.000000f, -0.187324f, -0.468124f, 0.000000f, 0.329010f,
1.000000f, 1.855600f, -0.000000f, 0.000000f, -0.931439f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 49 of file SkYUVMath.cpp.

49 {
50 1.000000f, -0.000000f, 1.574800f, 0.000000f, -0.790488f,
51 1.000000f, -0.187324f, -0.468124f, 0.000000f, 0.329010f,
52 1.000000f, 1.855600f, -0.000000f, 0.000000f, -0.931439f,
53 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
54};

◆ Rec709_limited_rgb_to_yuv

const float Rec709_limited_rgb_to_yuv[]
Initial value:
= {
0.182586f, 0.614231f, 0.062007f, 0.000000f, 0.062745f,
-0.100644f, -0.338572f, 0.439216f, 0.000000f, 0.501961f,
0.439216f, -0.398942f, -0.040274f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 55 of file SkYUVMath.cpp.

55 {
56 0.182586f, 0.614231f, 0.062007f, 0.000000f, 0.062745f,
57 -0.100644f, -0.338572f, 0.439216f, 0.000000f, 0.501961f,
58 0.439216f, -0.398942f, -0.040274f, 0.000000f, 0.501961f,
59 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
60};

◆ Rec709_limited_yuv_to_rgb

const float Rec709_limited_yuv_to_rgb[]
Initial value:
= {
1.164384f, -0.000000f, 1.792741f, 0.000000f, -0.972945f,
1.164384f, -0.213249f, -0.532909f, 0.000000f, 0.301483f,
1.164384f, 2.112402f, -0.000000f, 0.000000f, -1.133402f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 61 of file SkYUVMath.cpp.

61 {
62 1.164384f, -0.000000f, 1.792741f, 0.000000f, -0.972945f,
63 1.164384f, -0.213249f, -0.532909f, 0.000000f, 0.301483f,
64 1.164384f, 2.112402f, -0.000000f, 0.000000f, -1.133402f,
65 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
66};

◆ rgb_to_yuv_array

const float* rgb_to_yuv_array[]
Initial value:
= {
}
const float GBR_full_rgb_to_yuv[]
const float BT2020_10bit_limited_rgb_to_yuv[]
const float Rec601_limited_rgb_to_yuv[]
Definition SkYUVMath.cpp:31
const float SMPTE240_full_rgb_to_yuv[]
const float Rec709_full_rgb_to_yuv[]
Definition SkYUVMath.cpp:43
const float BT2020_8bit_limited_rgb_to_yuv[]
Definition SkYUVMath.cpp:79
const float JPEG_full_rgb_to_yuv[]
Definition SkYUVMath.cpp:19
const float YCgCo_8bit_full_rgb_to_yuv[]
const float YCgCo_10bit_full_rgb_to_yuv[]
const float BT2020_10bit_full_rgb_to_yuv[]
Definition SkYUVMath.cpp:91
const float FCC_full_rgb_to_yuv[]
const float FCC_limited_rgb_to_yuv[]
const float YCgCo_10bit_limited_rgb_to_yuv[]
const float Rec709_limited_rgb_to_yuv[]
Definition SkYUVMath.cpp:55
const float BT2020_12bit_full_rgb_to_yuv[]
const float YCgCo_12bit_limited_rgb_to_yuv[]
const float YDZDX_limited_rgb_to_yuv[]
const float YCgCo_12bit_full_rgb_to_yuv[]
const float SMPTE240_limited_rgb_to_yuv[]
const float YDZDX_full_rgb_to_yuv[]
const float BT2020_12bit_limited_rgb_to_yuv[]
const float YCgCo_8bit_limited_rgb_to_yuv[]
const float GBR_limited_rgb_to_yuv[]
const float BT2020_8bit_full_rgb_to_yuv[]
Definition SkYUVMath.cpp:67

Definition at line 360 of file SkYUVMath.cpp.

◆ SMPTE240_full_rgb_to_yuv

const float SMPTE240_full_rgb_to_yuv[]
Initial value:
= {
0.212000f, 0.701000f, 0.087000f, 0.000000f, 0.000000f,
-0.116101f, -0.383899f, 0.500000f, 0.000000f, 0.501961f,
0.500000f, -0.444797f, -0.055203f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 163 of file SkYUVMath.cpp.

163 {
164 0.212000f, 0.701000f, 0.087000f, 0.000000f, 0.000000f,
165 -0.116101f, -0.383899f, 0.500000f, 0.000000f, 0.501961f,
166 0.500000f, -0.444797f, -0.055203f, 0.000000f, 0.501961f,
167 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
168};

◆ SMPTE240_full_yuv_to_rgb

const float SMPTE240_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, 0.000000f, 1.576000f, 0.000000f, -0.791090f,
1.000000f, -0.226622f, -0.476622f, 0.000000f, 0.353001f,
1.000000f, 1.826000f, 0.000000f, 0.000000f, -0.916580f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 169 of file SkYUVMath.cpp.

169 {
170 1.000000f, 0.000000f, 1.576000f, 0.000000f, -0.791090f,
171 1.000000f, -0.226622f, -0.476622f, 0.000000f, 0.353001f,
172 1.000000f, 1.826000f, 0.000000f, 0.000000f, -0.916580f,
173 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
174};

◆ SMPTE240_limited_rgb_to_yuv

const float SMPTE240_limited_rgb_to_yuv[]
Initial value:
= {
0.182071f, 0.602035f, 0.074718f, 0.000000f, 0.062745f,
-0.101987f, -0.337229f, 0.439216f, 0.000000f, 0.501961f,
0.439216f, -0.390724f, -0.048492f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 175 of file SkYUVMath.cpp.

175 {
176 0.182071f, 0.602035f, 0.074718f, 0.000000f, 0.062745f,
177 -0.101987f, -0.337229f, 0.439216f, 0.000000f, 0.501961f,
178 0.439216f, -0.390724f, -0.048492f, 0.000000f, 0.501961f,
179 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
180};

◆ SMPTE240_limited_yuv_to_rgb

const float SMPTE240_limited_yuv_to_rgb[]
Initial value:
= {
1.164384f, -0.000000f, 1.794107f, 0.000000f, -0.973631f,
1.164384f, -0.257985f, -0.542583f, 0.000000f, 0.328794f,
1.164384f, 2.078705f, 0.000000f, 0.000000f, -1.116488f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 181 of file SkYUVMath.cpp.

181 {
182 1.164384f, -0.000000f, 1.794107f, 0.000000f, -0.973631f,
183 1.164384f, -0.257985f, -0.542583f, 0.000000f, 0.328794f,
184 1.164384f, 2.078705f, 0.000000f, 0.000000f, -1.116488f,
185 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
186};

◆ YCgCo_10bit_full_rgb_to_yuv

const float YCgCo_10bit_full_rgb_to_yuv[]
Initial value:
= {
0.250000f, 0.500000f, 0.250000f, 0.000000f, 0.000000f,
-0.250000f, 0.500000f, -0.250000f, 0.000000f, 0.500489f,
0.500000f, 0.000000f, -0.500000f, 0.000000f, 0.500489f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 259 of file SkYUVMath.cpp.

259 {
260 0.250000f, 0.500000f, 0.250000f, 0.000000f, 0.000000f,
261 -0.250000f, 0.500000f, -0.250000f, 0.000000f, 0.500489f,
262 0.500000f, 0.000000f, -0.500000f, 0.000000f, 0.500489f,
263 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
264};

◆ YCgCo_10bit_full_yuv_to_rgb

const float YCgCo_10bit_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -1.000000f, 1.000000f, 0.000000f, 0.000000f,
1.000000f, 1.000000f, 0.000000f, 0.000000f, -0.500489f,
1.000000f, -1.000000f, -1.000000f, 0.000000f, 1.000978f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 265 of file SkYUVMath.cpp.

265 {
266 1.000000f, -1.000000f, 1.000000f, 0.000000f, 0.000000f,
267 1.000000f, 1.000000f, 0.000000f, 0.000000f, -0.500489f,
268 1.000000f, -1.000000f, -1.000000f, 0.000000f, 1.000978f,
269 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
270};

◆ YCgCo_10bit_limited_rgb_to_yuv

const float YCgCo_10bit_limited_rgb_to_yuv[]
Initial value:
= {
0.214076f, 0.428153f, 0.214076f, 0.000000f, 0.062561f,
-0.214076f, 0.428153f, -0.214076f, 0.000000f, 0.500489f,
0.428153f, 0.000000f, -0.428153f, 0.000000f, 0.500489f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 271 of file SkYUVMath.cpp.

271 {
272 0.214076f, 0.428153f, 0.214076f, 0.000000f, 0.062561f,
273 -0.214076f, 0.428153f, -0.214076f, 0.000000f, 0.500489f,
274 0.428153f, 0.000000f, -0.428153f, 0.000000f, 0.500489f,
275 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
276};

◆ YCgCo_10bit_limited_yuv_to_rgb

const float YCgCo_10bit_limited_yuv_to_rgb[]
Initial value:
= {
1.167808f, -1.167808f, 1.167808f, 0.000000f, -0.073059f,
1.167808f, 1.167808f, 0.000000f, 0.000000f, -0.657534f,
1.167808f, -1.167808f, -1.167808f, 0.000000f, 1.095890f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 277 of file SkYUVMath.cpp.

277 {
278 1.167808f, -1.167808f, 1.167808f, 0.000000f, -0.073059f,
279 1.167808f, 1.167808f, 0.000000f, 0.000000f, -0.657534f,
280 1.167808f, -1.167808f, -1.167808f, 0.000000f, 1.095890f,
281 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
282};

◆ YCgCo_12bit_full_rgb_to_yuv

const float YCgCo_12bit_full_rgb_to_yuv[]
Initial value:
= {
0.250000f, 0.500000f, 0.250000f, 0.000000f, 0.000000f,
-0.250000f, 0.500000f, -0.250000f, 0.000000f, 0.500122f,
0.500000f, 0.000000f, -0.500000f, 0.000000f, 0.500122f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 283 of file SkYUVMath.cpp.

283 {
284 0.250000f, 0.500000f, 0.250000f, 0.000000f, 0.000000f,
285 -0.250000f, 0.500000f, -0.250000f, 0.000000f, 0.500122f,
286 0.500000f, 0.000000f, -0.500000f, 0.000000f, 0.500122f,
287 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
288};

◆ YCgCo_12bit_full_yuv_to_rgb

const float YCgCo_12bit_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -1.000000f, 1.000000f, 0.000000f, 0.000000f,
1.000000f, 1.000000f, 0.000000f, 0.000000f, -0.500122f,
1.000000f, -1.000000f, -1.000000f, 0.000000f, 1.000244f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 289 of file SkYUVMath.cpp.

289 {
290 1.000000f, -1.000000f, 1.000000f, 0.000000f, 0.000000f,
291 1.000000f, 1.000000f, 0.000000f, 0.000000f, -0.500122f,
292 1.000000f, -1.000000f, -1.000000f, 0.000000f, 1.000244f,
293 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
294};

◆ YCgCo_12bit_limited_rgb_to_yuv

const float YCgCo_12bit_limited_rgb_to_yuv[]
Initial value:
= {
0.213919f, 0.427839f, 0.213919f, 0.000000f, 0.062515f,
-0.213919f, 0.427839f, -0.213919f, 0.000000f, 0.500122f,
0.427839f, 0.000000f, -0.427839f, 0.000000f, 0.500122f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 295 of file SkYUVMath.cpp.

295 {
296 0.213919f, 0.427839f, 0.213919f, 0.000000f, 0.062515f,
297 -0.213919f, 0.427839f, -0.213919f, 0.000000f, 0.500122f,
298 0.427839f, 0.000000f, -0.427839f, 0.000000f, 0.500122f,
299 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
300};

◆ YCgCo_12bit_limited_yuv_to_rgb

const float YCgCo_12bit_limited_yuv_to_rgb[]
Initial value:
= {
1.168664f, -1.168664f, 1.168664f, 0.000000f, -0.073059f,
1.168664f, 1.168664f, 0.000000f, 0.000000f, -0.657534f,
1.168664f, -1.168664f, -1.168664f, 0.000000f, 1.095891f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 301 of file SkYUVMath.cpp.

301 {
302 1.168664f, -1.168664f, 1.168664f, 0.000000f, -0.073059f,
303 1.168664f, 1.168664f, 0.000000f, 0.000000f, -0.657534f,
304 1.168664f, -1.168664f, -1.168664f, 0.000000f, 1.095891f,
305 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
306};

◆ YCgCo_8bit_full_rgb_to_yuv

const float YCgCo_8bit_full_rgb_to_yuv[]
Initial value:
= {
0.250000f, 0.500000f, 0.250000f, 0.000000f, 0.000000f,
-0.250000f, 0.500000f, -0.250000f, 0.000000f, 0.501961f,
0.500000f, 0.000000f, -0.500000f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 235 of file SkYUVMath.cpp.

235 {
236 0.250000f, 0.500000f, 0.250000f, 0.000000f, 0.000000f,
237 -0.250000f, 0.500000f, -0.250000f, 0.000000f, 0.501961f,
238 0.500000f, 0.000000f, -0.500000f, 0.000000f, 0.501961f,
239 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
240};

◆ YCgCo_8bit_full_yuv_to_rgb

const float YCgCo_8bit_full_yuv_to_rgb[]
Initial value:
= {
1.000000f, -1.000000f, 1.000000f, 0.000000f, 0.000000f,
1.000000f, 1.000000f, 0.000000f, 0.000000f, -0.501961f,
1.000000f, -1.000000f, -1.000000f, 0.000000f, 1.003922f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 241 of file SkYUVMath.cpp.

241 {
242 1.000000f, -1.000000f, 1.000000f, 0.000000f, 0.000000f,
243 1.000000f, 1.000000f, 0.000000f, 0.000000f, -0.501961f,
244 1.000000f, -1.000000f, -1.000000f, 0.000000f, 1.003922f,
245 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
246};

◆ YCgCo_8bit_limited_rgb_to_yuv

const float YCgCo_8bit_limited_rgb_to_yuv[]
Initial value:
= {
0.214706f, 0.429412f, 0.214706f, 0.000000f, 0.062745f,
-0.214706f, 0.429412f, -0.214706f, 0.000000f, 0.501961f,
0.429412f, 0.000000f, -0.429412f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 247 of file SkYUVMath.cpp.

247 {
248 0.214706f, 0.429412f, 0.214706f, 0.000000f, 0.062745f,
249 -0.214706f, 0.429412f, -0.214706f, 0.000000f, 0.501961f,
250 0.429412f, 0.000000f, -0.429412f, 0.000000f, 0.501961f,
251 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
252};

◆ YCgCo_8bit_limited_yuv_to_rgb

const float YCgCo_8bit_limited_yuv_to_rgb[]
Initial value:
= {
1.164384f, -1.164384f, 1.164384f, 0.000000f, -0.073059f,
1.164384f, 1.164384f, 0.000000f, 0.000000f, -0.657534f,
1.164384f, -1.164384f, -1.164384f, 0.000000f, 1.095891f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 253 of file SkYUVMath.cpp.

253 {
254 1.164384f, -1.164384f, 1.164384f, 0.000000f, -0.073059f,
255 1.164384f, 1.164384f, 0.000000f, 0.000000f, -0.657534f,
256 1.164384f, -1.164384f, -1.164384f, 0.000000f, 1.095891f,
257 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
258};

◆ YDZDX_full_rgb_to_yuv

const float YDZDX_full_rgb_to_yuv[]
Initial value:
= {
0.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f,
0.000000f, -0.500000f, 0.493283f, 0.000000f, 0.501961f,
0.500000f, -0.495951f, 0.000000f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 187 of file SkYUVMath.cpp.

187 {
188 0.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f,
189 0.000000f, -0.500000f, 0.493283f, 0.000000f, 0.501961f,
190 0.500000f, -0.495951f, 0.000000f, 0.000000f, 0.501961f,
191 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
192};

◆ YDZDX_full_yuv_to_rgb

const float YDZDX_full_yuv_to_rgb[]
Initial value:
= {
0.991902f, -0.000000f, 2.000000f, 0.000000f, -1.003922f,
1.000000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f,
1.013617f, 2.027234f, 0.000000f, 0.000000f, -1.017592f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 193 of file SkYUVMath.cpp.

193 {
194 0.991902f, -0.000000f, 2.000000f, 0.000000f, -1.003922f,
195 1.000000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f,
196 1.013617f, 2.027234f, 0.000000f, 0.000000f, -1.017592f,
197 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
198};

◆ YDZDX_limited_rgb_to_yuv

const float YDZDX_limited_rgb_to_yuv[]
Initial value:
= {
0.000000f, 0.858824f, 0.000000f, 0.000000f, 0.062745f,
0.000000f, -0.439216f, 0.433315f, 0.000000f, 0.501961f,
0.439216f, -0.435659f, 0.000000f, 0.000000f, 0.501961f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 199 of file SkYUVMath.cpp.

199 {
200 0.000000f, 0.858824f, 0.000000f, 0.000000f, 0.062745f,
201 0.000000f, -0.439216f, 0.433315f, 0.000000f, 0.501961f,
202 0.439216f, -0.435659f, 0.000000f, 0.000000f, 0.501961f,
203 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
204};

◆ YDZDX_limited_yuv_to_rgb

const float YDZDX_limited_yuv_to_rgb[]
Initial value:
= {
1.154954f, -0.000000f, 2.276786f, 0.000000f, -1.215325f,
1.164384f, 0.000000f, 0.000000f, 0.000000f, -0.073059f,
1.180239f, 2.307788f, 0.000000f, 0.000000f, -1.232474f,
0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
}

Definition at line 205 of file SkYUVMath.cpp.

205 {
206 1.154954f, -0.000000f, 2.276786f, 0.000000f, -1.215325f,
207 1.164384f, 0.000000f, 0.000000f, 0.000000f, -0.073059f,
208 1.180239f, 2.307788f, 0.000000f, 0.000000f, -1.232474f,
209 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f,
210};

◆ yuv_to_rgb_array

const float* yuv_to_rgb_array[]
Initial value:
= {
}
const float YCgCo_10bit_full_yuv_to_rgb[]
const float YCgCo_10bit_limited_yuv_to_rgb[]
const float Rec709_full_yuv_to_rgb[]
Definition SkYUVMath.cpp:49
const float YCgCo_12bit_full_yuv_to_rgb[]
const float SMPTE240_limited_yuv_to_rgb[]
const float YCgCo_12bit_limited_yuv_to_rgb[]
const float YDZDX_limited_yuv_to_rgb[]
const float FCC_full_yuv_to_rgb[]
const float GBR_limited_yuv_to_rgb[]
const float YCgCo_8bit_limited_yuv_to_rgb[]
const float GBR_full_yuv_to_rgb[]
const float Rec709_limited_yuv_to_rgb[]
Definition SkYUVMath.cpp:61
const float BT2020_10bit_limited_yuv_to_rgb[]
const float BT2020_8bit_full_yuv_to_rgb[]
Definition SkYUVMath.cpp:73
const float JPEG_full_yuv_to_rgb[]
Definition SkYUVMath.cpp:25
const float BT2020_12bit_limited_yuv_to_rgb[]
const float BT2020_8bit_limited_yuv_to_rgb[]
Definition SkYUVMath.cpp:85
const float FCC_limited_yuv_to_rgb[]
const float Rec601_limited_yuv_to_rgb[]
Definition SkYUVMath.cpp:37
const float SMPTE240_full_yuv_to_rgb[]
const float YDZDX_full_yuv_to_rgb[]
const float BT2020_12bit_full_yuv_to_rgb[]
const float BT2020_10bit_full_yuv_to_rgb[]
Definition SkYUVMath.cpp:97
const float YCgCo_8bit_full_yuv_to_rgb[]

Definition at line 333 of file SkYUVMath.cpp.