}
static void
-compute_matrix_to_YUV (GstVideoConverter * convert, MatrixData * data)
+compute_matrix_to_YUV (GstVideoConverter * convert, MatrixData * data,
+ gboolean force)
{
GstVideoInfo *info;
gdouble Kr = 0, Kb = 0;
- if (!convert->pack_rgb && !CHECK_MATRIX_NONE (convert)) {
+ if (force || (!convert->pack_rgb && !CHECK_MATRIX_NONE (convert))) {
if (CHECK_MATRIX_INPUT (convert))
info = &convert->in_info;
else
color_matrix_debug (&convert->convert_matrix);
GST_DEBUG ("to YUV matrix");
- compute_matrix_to_YUV (convert, &convert->convert_matrix);
+ compute_matrix_to_YUV (convert, &convert->convert_matrix, FALSE);
GST_DEBUG ("current matrix");
color_matrix_debug (&convert->convert_matrix);
if (convert->in_bits > convert->out_bits) {
if (!convert->pack_rgb) {
color_matrix_set_identity (&convert->to_YUV_matrix);
- compute_matrix_to_YUV (convert, &convert->to_YUV_matrix);
+ compute_matrix_to_YUV (convert, &convert->to_YUV_matrix, FALSE);
/* matrix is in 0..255 range, scale to pack bits */
GST_DEBUG ("chain YUV convert");
/* Get Color matrix. */
color_matrix_set_identity (&cm);
- compute_matrix_to_YUV (convert, &cm);
+ compute_matrix_to_YUV (convert, &cm, TRUE);
color_matrix_convert (&cm);
border_val = GINT32_FROM_BE (convert->border_argb);
color_matrix_set_identity (dst);
compute_matrix_to_RGB (convert, dst);
- compute_matrix_to_YUV (convert, dst);
+ compute_matrix_to_YUV (convert, dst, FALSE);
convert->current_bits = 8;
prepare_matrix (convert, dst);