Commit a3628756 authored by Laurent Aimar's avatar Laurent Aimar

Fixed extract video filter when requesting black color.

It closes #4695.
parent 37f89f65
...@@ -291,9 +291,12 @@ static void make_projection_matrix( filter_t *p_filter, int color, int *matrix ) ...@@ -291,9 +291,12 @@ static void make_projection_matrix( filter_t *p_filter, int color, int *matrix )
double green = ((double)(( 0x00FF00 & color )>>8))/255.; double green = ((double)(( 0x00FF00 & color )>>8))/255.;
double blue = ((double)( 0x0000FF & color ))/255.; double blue = ((double)( 0x0000FF & color ))/255.;
double norm = sqrt( red*red + green*green + blue*blue ); double norm = sqrt( red*red + green*green + blue*blue );
red /= norm; if( norm > 0 )
green /= norm; {
blue /= norm; red /= norm;
green /= norm;
blue /= norm;
}
/* XXX: We might still need to norm the rgb_matrix */ /* XXX: We might still need to norm the rgb_matrix */
double rgb_matrix[9] = double rgb_matrix[9] =
{ red*red, red*green, red*blue, { red*red, red*green, red*blue,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment