1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-07 03:56:28 +02:00

Fixed extract video filter when requesting black color.

It closes #4695.
This commit is contained in:
Laurent Aimar 2011-09-05 21:00:07 +02:00
parent 37f89f6544
commit a362875665

View File

@ -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 blue = ((double)( 0x0000FF & color ))/255.;
double norm = sqrt( red*red + green*green + blue*blue );
red /= norm;
green /= norm;
blue /= norm;
if( norm > 0 )
{
red /= norm;
green /= norm;
blue /= norm;
}
/* XXX: We might still need to norm the rgb_matrix */
double rgb_matrix[9] =
{ red*red, red*green, red*blue,