Announcement

Collapse
No announcement yet.

Xv video output has purple tint instead of beeing black

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Xv video output has purple tint instead of beeing black

    Hi I've been searching for some solution for my particular problem but only found bug reports/solutions and talk about Nvidia and no mention off ATi in this regard off Xv video output having wrong/distorted colours. Or rather simple, black is dark purple and all colours are off a bit to the purple end whit that.

    X11 gives correct colors and black is real true black but I want to use Xv becouse it works better and gives less tearing and generally has better performance than the other ones.

    I'm using Ubuntu 8.04 64bit, Kernel 2.6.24-19 generic whit Gnome 2.22.3 and I use the ATi 8.7 fglrx drivers which work quite well except for some smaller problems.(video tearing and blinking video whit specific stuff) But those are not the concern in this matter. I'm looking for a solution to fix the Xv to show correct colours!

    My hardware is as follows:
    AMD Phenom 9750 2.4Ghz
    Gigabyte GA-MA78GM-S2H (780G+SB700, F4 bios)
    Corsair TWIN2X 6400C4DHX DDR2 4096MB 2x2Gb (can only use 3.4Gb thx to some bug in the bios whit linux over 4G memory mapping, everything gets graphics corrupted and eventually hangs...)

    Iv'e run xvattr and everything seems to be correct at default 0 values...

    I hope there is some help to be had into this matter.

    Edit: As no one had posted I started to do some more searching for myself and found this thread here at Phoronix
    http://www.phoronix.com/forums/showthread.php?t=10870
    It's exactly the same thing... As the thread died without a solution or proper investigation... well... I really would like to see if a bug report was made as it seems to be a bug... Some say the like the "washed out colors more" but I would rather have correct colours than incorrect! I don't like my black being dark purple >_>; or have the washed out colours "aka like my crt TV that can't show black but a gray instead" which is a piece of crap cheap TV....
    Bug is limited to the use of TexturedVideo it seems. The older VideoOverlay gives the correct colours in conjunction to Xv video playback according to them...
    I'm not entirely new to linux but I haven't really done all my homework so where do I go to check if this bug has been reported?
    Last edited by Nighthog; 08-12-2008, 03:17 PM.

  • #2
    Originally posted by Nighthog View Post
    Edit: As no one had posted I started to do some more searching for myself and found this thread here at Phoronix
    http://www.phoronix.com/forums/showthread.php?t=10870
    It's exactly the same thing...
    So do you see purple in the brighter/+gamma screen shots in that thread - I don't.

    As the thread died without a solution or proper investigation... well... I really would like to see if a bug report was made as it seems to be a bug... Some say the like the "washed out colors more" but I would rather have correct colours than incorrect! I don't like my black being dark purple >_>; or have the washed out colours "aka like my crt TV that can't show black but a gray instead" which is a piece of crap cheap TV....
    Bug is limited to the use of TexturedVideo it seems. The older VideoOverlay gives the correct colours in conjunction to Xv video playback according to them...
    I'm not entirely new to linux but I haven't really done all my homework so where do I go to check if this bug has been reported?
    There is certainly a difference with xv - although for me using a CRT monitor it doesn't matter as I often have to run with gamma up to see detail in dark scenes anyway. Perhaps LCDs already compensate so it looks much worse to you.

    If you want to turn gamma down you could try something like -

    xgamma -gamma 0.8

    or with mplayer in software with

    -vf eq2=0.8

    Of course your problem may be specific to your chipset/monitor WRT the purple tint, which I can't see even though I can clearly see the gamma is up for xv.

    Comment


    • #3
      My screen shows kinda purple when gamma goes up or colour profiles aren't fully correct in black but all what they reported and the pictures I could look at I have the same kind of colour distortion that their screen caps showed as well in all other colours. So the specific purple tint may be my actual LCD as I see that purple tint quite allot during boot up in the black but it goes correct once in windows or Ubuntu. (correct colour profiles loaded by then?)

      But Xv gives then the wrong colours. All the others give fully correct in line whit all other colours only Xv that gives the washed-out whit upped gamma/hue? black isn't 0 more like it starts at 16,16,16 or so in the 0-255 scale. (and then my LCD showing it as darkly purple?)
      I notice it and get irritated because black isn't black and clearly all colours are slightly different from normal. I have a 1920x1200 resolution 24" screen and any video always gives you those black border areas which are true black (in the sense as true as my LCD can manage to show black) but then the video has purple/gray instead and you see a clear line difference between the video black and the border blacks. As X11 manages to show video black and border black the same... but same video whit Xv has it black on my screen whit purple tint in contrast to the true black of the borders. It catches your eyes quite easily and you see easily that the black is to the purple colours.

      I have a LG L245WP-BN 24" widescreen LCD whit P-MVA panel.

      Those settings what will they set? System wide gamma or just Xv video playbacks settings?

      If I'm gonna change any settings its Xv specific settings as it's only when Xv is in use when colours aren't fully correct. Don't want to change anything else as they aren't wrong
      Last edited by Nighthog; 08-16-2008, 08:19 AM.

      Comment


      • #4
        Originally posted by Nighthog View Post
        My screen shows kinda purple when gamma goes up or colour profiles aren't fully correct in black but all what they reported and the pictures I could look at I have the same kind of colour distortion that their screen caps showed as well in all other colours. So the specific purple tint may be my actual LCD as I see that purple tint quite allot during boot up in the black but it goes correct once in windows or Ubuntu. (correct colour profiles loaded by then?)
        It may say in /var/log/Xorg.0.log what is happening.

        But Xv gives then the wrong colours. All the others give fully correct in line whit all other colours only Xv that gives the washed-out whit upped gamma/hue? black isn't 0 more like it starts at 16,16,16 or so in the 0-255 scale. (and then my LCD showing it as darkly purple?)
        I notice it and get irritated because black isn't black and clearly all colours are slightly different from normal. I have a 1920x1200 resolution 24" screen and any video always gives you those black border areas which are true black (in the sense as true as my LCD can manage to show black) but then the video has purple/gray instead and you see a clear line difference between the video black and the border blacks. As X11 manages to show video black and border black the same... but same video whit Xv has it black on my screen whit purple tint in contrast to the true black of the borders. It catches your eyes quite easily and you see easily that the black is to the purple colours.

        I have a LG L245WP-BN 24" widescreen LCD whit P-MVA panel.

        Those settings what will they set? System wide gamma or just Xv video playbacks settings?

        If I'm gonna change any settings its Xv specific settings as it's only when Xv is in use when colours aren't fully correct. Don't want to change anything else as they aren't wrong
        I don't know what's going on really - maybe whatever correction your monitor needs to stop black being purple doesn't get applied to xv and the extra gamma just makes things even worse on top of that.

        The xgamma settings are system wide, but if watching full screen you could just set them back to 1.0 after watching. The mplayer correction is just for the video and is done in software.

        In both cases there are variants of the examples I gave that let you tweak red, green and blue separately. So you may be able to find a combination that corrects things so they look OK for you.

        xgamma --help and

        man mplayer | grep "eq2\[" -A 26

        will give details.

        Comment


        • #5
          Yeah, I've had the same problem since some time ago (not the purple tint, I think that's because of your monitor). I deleted the image that showed the difference in that post, but it's basically the same as yours. Here are a couple of new ones:



          Notice the difference between the black-black in the first image (x11) vs the black-grey in the second (xv). If you take a color picker in the first image the black pixels are in the range #000000 and #030303-ish. In the second, however, the "black" pixels are always above #101010.

          In this one we can see the washed colors:



          Also, the subtitles are semi transparent (instead of white-solid) and with blurry borders with xv, which is quite annoying.

          I haven't found a solution yet.

          Comment


          • #6
            I've tried with -vf eq2=0.8 and it makes things more... tolerable:



            but blacks are not blacks yet (see the hair in the second image) and light colors are too dark:



            so maybe brighness/contrast/saturation are also wrong. That's great :-/

            Comment


            • #7
              I think I've found this same kind of problem on the Windows driver side as well... it's a bit old but it seems to describe the same problem in a sense somewhat.

              Here a link to avsforums: http://www.avsforum.com/avs-vb/showp...postcount=2121

              What it describes is that SD-video (standard definition video) uses the "non-expanded" colour levels or in other words "Video levels" which are colours between 16-235 instead off the full range of colours, which are the 0-255, or "expanded" "PC levels". which HD video uses.

              Our problem seems to be that whit Xv and TexturedVideo it uses the "Video levels" of colours for all videos. Instead off the "PC levels" that X11 and etc. seems to use.

              On the windows side this should be fixed in newer drivers, if not you could do some registry tweaks to fix it there. Or enable some thing that forces the "PC levels" onto SD video.

              So what we here seem need to do is force these "PC levels" if there now is a option for such a thing over here for all video.

              Anyone know where one might find such options?

              Edit: and Fran. The moon picture whit Xv. it shows that purple tint for me here. So seems the specific purple is just my monitor but I have the same effects otherwise.
              Last edited by Nighthog; 08-18-2008, 09:29 AM.

              Comment


              • #8
                It does seem like a color space issue - maybe with a bit of gamma in as well, but I tried a test pattern and you can see clearly that xv treats "video" black/white as grey and less than pure white. X11 and gl:yuv=x where x != 5 both convert video black and white to rgb black/white properly.

                It is possible to lower the black level (brightness) with keys 3 & 4 on mplayer and
                raise the white level (contrast) = keys 1 & 2 to get the test ramp I tried to look OK.

                When you change these settings they are remembered until you restart X - you can see them with xvinfo.

                The 1080*1920 stream I used is here -

                http://www.w6rz.net/ramp.zip

                the dotted lines mark IRE black and white.

                http://www.w6rz.net has other interesting patterns - there's a thread about them here -

                http://www.avsforum.com/avs-vb/showthread.php?t=570937

                Comment


                • #9
                  I tried a test pattern and you can see clearly that xv treats "video" black/white as grey and less than pure white
                  Good idea. I tried with a very simple pattern (the classic TV pure RGB color pattern, get it here, the first file) and this makes it clearer.



                  In the first image (rendered with x11) the colors are, in order

                  ffffff-fdfd00-00fefc-00fe00-fb00fd-fd0100-0000fe-000000

                  quite good, almost pure colors. In the second, however:

                  eceaed-ebeb11-10eaeb-10ea0f-ea10eb-eb0f0f-1010ec-110f12

                  the lowest value is 0x0f and the highest is only 0xed.

                  I'm going to ask in other forums and see if other people have this problem (if they have, I can't understand why nobody else has reported it or is trying to solve it, because it's been there for months. at least since I reported it in the gentoo forums 5 months ago).

                  Comment


                  • #10
                    Would be great if the AMD Linux guy that hangs around these forums could answer but I read some post that he was on vacation right now I think.

                    Kinda perfect timing >_>;

                    Good idea Fran. Ask at other forums as well, so we can see how spread this problem is actually. Seems most seem to just ignore it or something and why it has gone by not addressed.

                    Comment


                    • #11
                      I have an mobility X700, fglrx 8.8
                      I use XIne ( through kafeine ) with the xv driver.
                      use "videooverlay" in the xorg.conf wich is Adaptor #0: "ATI Radeon Video Overlay" with xvinfo . ( textured video crashes , this is the AVIVO adpator when you run xvinfo ).

                      I dont experience any color corruption on my screen , I ran the test image and it looks exactly as your screenshot of x11 .

                      Comment


                      • #12
                        Originally posted by flami View Post
                        I have an mobility X700, fglrx 8.8
                        I use XIne ( through kafeine ) with the xv driver.
                        use "videooverlay" in the xorg.conf wich is Adaptor #0: "ATI Radeon Video Overlay" with xvinfo . ( textured video crashes , this is the AVIVO adpator when you run xvinfo ).

                        I dont experience any color corruption on my screen , I ran the test image and it looks exactly as your screenshot of x11 .
                        If you read the thread more closely, you would have seen that the problem is whit TexturedVideo + Xv, and no other combo! Sure I can ignore the problem like you and use VideoOverlay... and leave this bug to hang around for how long more?

                        Besides the newer HD3xxx HD4xxx etc cards should use TexturedVideo instead of the VideoOverlay... the particular hardware that did VideoOverlay doesn't exist in these cards any more... so using VideoOverlay isn't gonna work like you expect.

                        And I need to use TexturedVideo otherwise video will blink like crazy and whatnot + give you a disco party effect maker instead of actual film.. >_>;

                        Whit VideoOverlay video will blink no matter what if you use compiz-fusion whit it. TexturedVideo at least stops blinking in full-screen. Sadly you get the distorted colour levels. Which seems to be a bug and should be addressed maybe?

                        Comment


                        • #13
                          Originally posted by Nighthog View Post
                          Which seems to be a bug and should be addressed maybe?
                          Yeah, probably. Other drivers work as they should. The only one with this color deviation is fglrx.

                          I've managed to get better colors with brightness=-7 and contrast=17 in mplayer, but still not as accurate as I'd like. I should modify saturation too, but playing with three variables is quite difficult. Well, at least it looks better than with default settings.

                          Comment


                          • #14
                            I took a look through the Bugzilla db and couldn't find a bug ticket for the "washed out colours" issue. I suspect it may have something to do with colour profiles and if so would probably be more noticeable on some displays than others, ie we may need to get a specific display in order to reproduce this in house.

                            Can someone pls file a big at http://ati.cchtml.com and include specifics of their display as well as the usual card, driver, OS info ?

                            Comment


                            • #15
                              Originally posted by bridgman View Post
                              I took a look through the Bugzilla db and couldn't find a bug ticket for the "washed out colours" issue. I suspect it may have something to do with colour profiles and if so would probably be more noticeable on some displays than others, ie we may need to get a specific display in order to reproduce this in house.

                              Can someone pls file a big at http://ati.cchtml.com and include specifics of their display as well as the usual card, driver, OS info ?
                              Maybe a specific display isn't needed, but at least a screen that produces colours all right or good at least. I think the difference in colours on the video will show on any screen that does produce colour good or OK at least. It isn't a screen issue per-see.

                              If you take a look at the screen captures, if you see a diffrence whit your current screens. well I don't see why then you would need to get any specific screen at all as you should be able to reproduce it whit just the graphics card (one using TexturedVideo) and use a mediaplayer that can output whit Xv on your current/any screen/monitor.

                              I'll take a look tomorrow and see what info I can collect together for the bug-report (if no one does it before me, in which case I can complement their bug-report instead)



                              EDIT:
                              Ok I took some time and did some reading over at AVSforums and read about those pc levels and video levels a bit more.
                              I've come to conclusion that the video level colours are in fact correct for several videos, but it's not for all videos. XV does give the accurate colours for most video whit black starting at 16 and white stopping at 235. DVD's and SD(standard definition video) like most PAL and NTSC source stuff use the 16-235 colour space, so if watching on a computer screen set to/calibrated for pc-level colours between 0-255 it's correct whit Xv video that black is gray and white isn't fully white eihter, so if video black starts at 16, it shows as 16 on your 0-255 range screen, which is correct.
                              X11 etc are actually in this case giving the wrong colours and expanding the 16-235 colour palette off the SD video's to the full range off pc-level colours between 0 to 255. But this isn't wrong either really. As on a PC-monitor whit pc-level colours 0-255. Many would like black to be black and white to be white in video so it expands as per settings standard for X11 etc I think.

                              But don't be writing this all away now yet. There still exists a bug, or lack off feature if one would put it in a another way, or someone just was lazy and implemented this thing in this way for now, or didn't have time to implement it fully correctly.

                              Let me say what I found out when playing several videos on the Windows XP side and tell you how the colours etc looked like there and how it seems to work. Then I'll compare to the Linux side.

                              As said dvd's and SD content most use the 16-235 colour range or "video colours", this shows as such in Windows. SD content and video's on the windows side all start whit black at 16 and white ending at 235. The video's are as they should and are exactly like they are here in linux now whit TexturedVideo combined whit Xv video output. i.e. if you have a 0-255 ranging screen 16 will show as 16 which is correct etc.
                              Their black starts at 16 and it shows as 16 there in windows as in Linux. But there is a diffrence in when this is applied or not. I said SD and dvd's used the 16-235 range, but HD and full-HD many use the full range off 0-255. This diffrence is applied in windows side.
                              Let me explain. HD content or rather all video off a resolution off 1280x720 (720p) and larger are treated and displayed whit their correct full-range 0-255 colour range when played and it's nice and colours are accurate in them if you watch them now on a 0-255 colour level screen, which is kinda any computer screen or HDTV, and all lower are set to use the 16-235 range. This is kinda nice and works quite nicely over in Windows XP.
                              (or some way like that, something decides that this one video uses the 16-235 range while this other should use the 0-255, it works quite nicely in XP as far as I can tell, above description is a bit faulty as I have some SD sized video that use the 0-255 levels and gets them as well correctly. So I don't know how it fully works but you get the idea right? (a algorithm?))

                              Now here in Linux/Ubuntu and the ati-drivers here. Standard seemed to have been that all video was expanded no matter what to use the 0-255 full range pc-levels no matter the output or source(dvd/SD,HD etc) you choose. Though there came an exception into the game which is TexturedVideo + Xv that gives you the 16-235 colour levels ALL THE TIME. Doesn't matter if it's a video that uses 0-255 colour range it is cramped together to use the 16-235 range also which is incorrect. All video I have end upp only getting the 16-235 colour range whit Xv. 1080p movies as well that should have 0-255 range.
                              A: This is either a bug, it's not working as it should.
                              B: It's not a bug. it's working the way it was coded. i.e. someone was lazy
                              C: as B. but all the features for this wasn't implemented. i.e. it's unfinished. Correct implementation to be added later?
                              the feature to automatically choose 0-255 range or 16-235 range or other isn't there so it default to use 16-235 as that's the most used one for videos?

                              Well the problem in short is TexturedVideo + Xv all the time uses the 16-235 or such colours range? Well at least I get this result.

                              so... what am I gonna make out of all this mess I might have figured out and wrote? is it a bug? a incomplete function? or something else?

                              What can I do?

                              What I want to do is able to choose the 0-255 range or 16-235 range for my videos manually when I play them or that it works automatically as in windows XP seemingly.

                              >_>;

                              and about getting best quality and correct colours for those 16-235 colour range videos. Well you should calibrate you screen whit brightness and contrast etc so black is black on 16 and white is white on 235 for best image and correct image. This isn't maybe the most easy way but will give best image for the video. The other way is like how all the other outputs work that they expand the 16-235 video into the 0-255 colour range that your screen is able and normally produces. You can read this kinda advanced stuff like buttloads over at AVSforums.
                              =_=;
                              Last edited by Nighthog; 08-23-2008, 12:44 PM.

                              Comment

                              Working...
                              X