|
|
#1 | |
|
Registered User
Join Date: Dec 2008
Posts: 173
|
Hi, i'm trying to do colors control but can't get it to work. I wonder what i'm doing wrong.
This code gives really wrong colors. Contrast and Hue seems to work as expected, but Brightness seems to have no effect and Saturation gives wrong colors, from black&white (as expected) to pure magenta. Any idea? Code:
static void vdpau_update_csc( vdpau_driver_t *this_gen )
{
float hue = this_gen->hue/100.0;
float saturation = this_gen->saturation/100.0;
float contrast = this_gen->contrast/100.0;
float brightness = this_gen->brightness/100.0;
printf( "vo_vdpau: vdpau_update_csc: hue=%f, saturation=%f, contrast=%f, brightness=%f\n", hue, saturation, contrast, brightness );
VdpCSCMatrix matrix;
VdpProcamp procamp = { VDP_PROCAMP_VERSION, brightness, contrast, saturation, hue };
VdpStatus st = vdp_generate_csc_matrix( &procamp, VDP_COLOR_STANDARD_ITUR_BT_601, &matrix );
if ( st != VDP_STATUS_OK ) {
printf( "vo_vdpau: error, can't generate csc matrix !!\n" );
return;
}
VdpVideoMixerAttribute attributes [] = { VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX };
void* attribute_values[] = { &matrix };
st = vdp_video_mixer_set_attribute_values( this_gen->video_mixer, 1, attributes, attribute_values );
if ( st != VDP_STATUS_OK )
printf( "vo_vdpau: error, can't set csc matrix !!\n" );
}
|
|
|
|
|
|
|
#2 | |
|
Moderator
Join Date: Aug 2005
Posts: 1,327
|
That's a bug. A fix has been created, and will be in a future driver release. Thanks.
|
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| xorg locks-up with newest nvidia drivers w/ vdpau. | theroot | NVIDIA Linux | 1 | 06-24-12 11:04 AM |
| NVIDIA VDPAU Reference Benchmarks | News | Latest Tech And Game Headlines | 0 | 06-11-12 05:30 AM |