Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 01-05-09, 01:09 PM   #1
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default VDPAU: csc matrices

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" );
}
crisalide is offline   Reply With Quote
Old 01-05-09, 03:07 PM   #2
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU: csc matrices

That's a bug. A fix has been created, and will be in a future driver release. Thanks.
Stephen Warren is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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 Archived News Items 0 06-11-12 05:30 AM

All times are GMT -5. The time now is 07:57 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.