- frag_shader = output_glsl_mat3("PREFIX(inv_ycbcr_matrix)", ycbcr_to_rgb);
- frag_shader += output_glsl_vec3("PREFIX(offset)", offset[0], offset[1], offset[2]);
-
- float cb_offset_x = compute_chroma_offset(
- ycbcr_format.cb_x_position, ycbcr_format.chroma_subsampling_x, widths[1]);
- float cb_offset_y = compute_chroma_offset(
- ycbcr_format.cb_y_position, ycbcr_format.chroma_subsampling_y, heights[1]);
- frag_shader += output_glsl_vec2("PREFIX(cb_offset)", cb_offset_x, cb_offset_y);
-
- float cr_offset_x = compute_chroma_offset(
- ycbcr_format.cr_x_position, ycbcr_format.chroma_subsampling_x, widths[2]);
- float cr_offset_y = compute_chroma_offset(
- ycbcr_format.cr_y_position, ycbcr_format.chroma_subsampling_y, heights[2]);
- frag_shader += output_glsl_vec2("PREFIX(cr_offset)", cr_offset_x, cr_offset_y);
-