Function

GstVideo-1.0GstVideovideo_color_matrix_get_Kr_KbSince 1.6

  • Get the coefficients used to convert between Y'PbPr and R'G'B' using matrix.

    When:

      0.0 <= [Y',R',G',B'] <= 1.0)
    (-0.5 <= [Pb,Pr] <= 0.5)

    the general conversion is given by:

      Y' = Kr*R' + (1-Kr-Kb)*G' + Kb*B'
    Pb = (B'-Y')/(2*(1-Kb))
    Pr = (R'-Y')/(2*(1-Kr))

    and the other way around:

      R' = Y' + Cr*2*(1-Kr)
    G' = Y' - Cb*2*(1-Kb)*Kb/(1-Kr-Kb) - Cr*2*(1-Kr)*Kr/(1-Kr-Kb)
    B' = Y' + Cb*2*(1-Kb)

    Returns [boolean, number, number]

    TRUE if matrix was a YUV color format and Kr and Kb contain valid values.

    1.6