\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)
(%i1) fpprec: 16 $
(%i2) fpprintprec: 7 $

According To SDTV BT.601 :

(%i5) Kb: 0.114 $
Kr: 0.299 $
Kg: 0.587 $

According To HDTV BT.709 :

--> /* Kb: 0.0722 $
  Kr: 0.2126 $
  Kg: 1 - Kb - Kr */;

According to Android Y'UV420sp (NV21) :

(%i7) Umax: 0.5114155 $
Vmax: 0.5114155 $

Difference between Y'UV and Y'CbCr !

--> /* Umax: 1/2 $
Vmax: 1/2 */$

Multipliers for Pb and Pr :

(%i8) cPb: Umax / ( 1 - Kb ) ;
\[\tag{cPb}\label{cPb}0.5772184\]
(%i9) cPr: Vmax / ( 1 - Kr ) ;
\[\tag{cPr}\label{cPr}0.7295514\]


( Y' );
U ~ ( B - Y' );
V ~ ( R - Y' );

(%i10) Encode: matrix([ Kr, Kg, Kb ],
   [ cPb*(-Kr), cPb*(-Kg), cPb*(1-Kb) ],
   [ cPr*(1-Kr), cPr*(-Kg), cPr*(-Kb) ]);
\[\tag{Encode}\label{Encode}\begin{pmatrix}0.299 & 0.587 & 0.114\\ -0.1725883 & -0.3388272 & 0.5114155\\ 0.5114155 & -0.4282466 & -0.08316886\end{pmatrix}\]
(%i11) Decode: 10^-8 * (float(round(
           10^8 * invert(Encode) )));
\[\tag{Decode}\label{Decode}\begin{pmatrix}1.0 & 0.0 & 1.370705\\ 1.0 & -0.3364547 & -0.6981957\\ 1.0 & 1.732446 & 0.0\end{pmatrix}\]

Y'PbPr For full Red

(%i12) Encode . [ 1, 0, 0 ];
\[\tag{\%{}o12}\label{o12} \begin{pmatrix}0.299\\ -0.1725883\\ 0.5114155\end{pmatrix}\]

Y'PbPr For full Green

(%i13) Encode . [ 0, 1, 0 ];
\[\tag{\%{}o13}\label{o13} \begin{pmatrix}0.587\\ -0.3388272\\ -0.4282466\end{pmatrix}\]

Y'PbPr For full Blue

(%i14) Encode . [ 0, 0, 1 ];
\[\tag{\%{}o14}\label{o14} \begin{pmatrix}0.114\\ 0.5114155\\ -0.08316886\end{pmatrix}\]
Created with wxMaxima.