Announcement

Collapse
No announcement yet.

Videos tearing

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

  • Videos tearing

    Hi all !

    I have just bought an ATI radeon HD3850. I have installed the driver who seems to be loaded correctly.

    But when I play videos, I haven't got vsync although I output on gl and have vsync acvtivated in cccle.

    Moreover, although fglxinfo tells me I have openGL 2.1, amdcccle says it is openGL 1.2 (1.5 Mesa 6.2.1)

    Help would be highly appreciated

    Thanks

    EDIT : videos are ok when i play on gl or gl2 driver. But HD videos are slow when using these drivers. How to solve this ?
    Last edited by Guilo; 08-06-2008, 09:37 AM.

  • #2
    Xv currently has no vsync with fglrx, so there is no other way than using opengl as output.

    Comment


    • #3
      Originally posted by Guilo View Post
      Hi all !

      I have just bought an ATI radeon HD3850. I have installed the driver who seems to be loaded correctly.

      But when I play videos, I haven't got vsync although I output on gl and have vsync acvtivated in cccle.
      It doesn't work with compiz, which also has it's own vsync but that doesn't work either and using both amdcccle vsync + ccsm vsync + ccsm unredirect fullscreean windows crashed 2/3 times I tried it.

      You should get vsync using opengl with mplayer.

      Moreover, although fglxinfo tells me I have openGL 2.1, amdcccle says it is openGL 1.2 (1.5 Mesa 6.2.1)
      strange I see 1.4 (2.1.7769) with compiz/aiglx and just 2.1.7769 with direct rendering. Not a problem if everything works though.

      EDIT : videos are ok when i play on gl or gl2 driver. But HD videos are slow when using these drivers. How to solve this ?
      mplayer -vo gl or gl2 does not do yuv>rgb in hardware - just tested on my HD3850 and it's useless - slower than doing it in sw.

      mplayer -vo gl:yuv=5,lscale=1

      however is only a few percent Cpu usage more than xv.

      Comment


      • #4
        Thanks for your replies.

        Xv currently has no vsync with fglrx, so there is no other way than using opengl as output
        Is AMD planning such a support ?

        mplayer -vo gl:yuv=5,lscale=1
        still plays slow HD videos.

        My CPU is P4 3.2 Ghz. Isn't it possible to use the card capabilities to decode the video ?

        Thanks

        Comment


        • #5
          Originally posted by Guilo View Post
          Is AMD planning such a support ?
          AMD claims the support is already there and has been for a long time now. Maybe AMD's devs are blind or something

          Comment


          • #6
            Originally posted by Guilo View Post
            My CPU is P4 3.2 Ghz. Isn't it possible to use the card capabilities to decode the video ?
            No, under Linux there is currently no way to utilize the graphic card for video decoding. That is: With the available acceleration it is just able to handle image scaling but not decoding the video stream. No support for UVD so far, no implementation in CUDA or the like to speed up video decoding. So ATM (might change in some months, who knows...) video decoding is completely done by the CPU.

            Comment


            • #7
              Originally posted by RealNC View Post
              AMD claims the support is already there and has been for a long time now. Maybe AMD's devs are blind or something

              There is (for my cards at least) no tearing with VideoOverlay + Xine, even if it tends to crash every now and then. My cards using TexturedVideo have horrible tearing, not to mention being unusable with Xine.

              Comment


              • #8
                I searched the ubuntu forum and found a solution I will try as soon as I can restart my X :

                Ive found the solution to the first problem (XVideo).

                As Jim say in his great post http://forum.compiz-fusion.org/showthread.php?t=6794

                The problem is that new ATI drivers set the AVIVO XVideo Render (3D engine) as "default" in Xorg config, instead of older and classic 2D engine XVideo render.
                Maybe the avivo (or TexturedVideo) could be better in modern ATI cards (specially to make compiz+videorender compatible), but not seems to has good quality for video in a Xpress 200M. Maybe someone can post some xorg options that solve the "sync problems" specially in movement scenes.

                There aren`t aticonfig command to disable this AVIVO config, called "TexturedVideo" option in xorg.conf, so you need to edit /etc/X11/xorg.conf

                Option "TexturedVideo" "off"
                Option "VideoOverlay" "on"
                Option "OpenGLOverlay" "off"

                save, and restart de computer, and then test with "xvinfo" and see classic videorender adaptor instead of AVIVO.

                Moreover, I would like to quote phoronix :

                . Avivo under Linux allows accelerated video playback using the GPU's 3D engine rather than 2D. Any Linux software that uses the X-Video extension can utilize this 3D accelerated playback. This accelerated playback can be extended to non-X1000 graphics cards by enabling TexturedVideo.
                So, isn't it possible to use the GPU to decode videos ?

                Thanks

                Comment


                • #9
                  There are two parts to video acceleration, typically called "decode" and "render". You can think of decode as being the first part of the playback pipeline and render being the second part, sort of like vertex and pixel processing in 3D.

                  Render acceleration (scaling, colour conversion, de-interlacing, post-processing) is usually the most CPU-intensive part of the pipeline and is therefore the first thing that gets accelerated. In the X world (Linux, Solaris, FreeBSD etc..) the Xv interface is the most common API for video render acceleration.

                  You can also use OpenGL to perform most of the processing by passing textures in YUV format and sending an OpenGL command to draw a rectangle (or two triangles) using that texture. OpenGL usually has a bit more CPU overhead and doesn't do any post-processing but sometimes there are other benefits.

                  On older ATI/AMD parts (up to R4xx) the overlay block included dedicated video processing hardware which performed most of the render acceleration, but starting with R5xx we removed the dedicated overlay hardware and now use the 3D engine to perform the same function. This is why TexturedVideo is now the preferred approach for 5xx GPUs and up -- the hardware used by VideoOverlay is simply not there any more.

                  Decode acceleration comes before render acceleration, so usually a video decode API (like XvMC) will build on a render API (like Xv). There are a number of projects underway to implement video decode acceleration on the GPU (I think Intel added some code for this to one of their drivers recently) but decode accel is nowhere near as common as render accel today.

                  Comment


                  • #10
                    Originally posted by Guilo View Post
                    Thanks for your replies.

                    still plays slow HD videos.

                    My CPU is P4 3.2 Ghz. Isn't it possible to use the card capabilities to decode the video ?
                    Typical - I tested gl with a 1080 mpeg2 tests sream and as I said it's close to xv for CPU.

                    Unfortunately it looks like there is a problem with mplayer + ffmpeg h264 + gl output which makes the VO stage eat way too much CPU. I just tried with svn and it's still broken :-(

                    I don't think a P4 3.2 will quite do 1080 h264 (with a 2.1 GHz AMD I can only get 1/2 framerate on broadcast HD) it should be fine for 720.

                    AMD won't say yes or no to whether fglrx will ever get uvd support, there are other projects underway to do MC with GPUs.

                    Comment


                    • #11
                      I'm sorry but I don't understand what uvd and MC are.

                      What projects are you talking about ?

                      I don't think a P4 3.2 will quite do 1080 h264 (with a 2.1 GHz AMD I can only get 1/2 framerate on broadcast HD) it should be fine for 720.
                      My CPU played 1080p fine when I had my nVIDIA card...

                      Thanks
                      Last edited by Guilo; 08-07-2008, 04:23 PM.

                      Comment


                      • #12
                        Originally posted by Guilo View Post
                        I'm sorry but I don't understand what uvd and MC are.

                        What projects are you talking about ?



                        My CPU played 1080p fine when I had my nVIDIA card...

                        Thanks
                        UVD is the unified video decoder that is built in to recent radeon cards. It can releive the CPU of alot of work -

                        http://en.wikipedia.org/wiki/UVD

                        MC is motion compensation - a part of decoding mpeg video.

                        http://www.bitblit.org/gsoc/g3dvl/index.shtml

                        Fair enough if you could play 1080p, though 1080p may not be a good way to describe how much work your processor needs to do. It depends on the bitrate of the video as well.

                        Comment


                        • #13
                          Thanks for your explanations.

                          The only 1080p movie I ever played was Big Buck Bunny and it was running fast when played with xv but quite slowly with gl

                          Comment


                          • #14
                            Solution, at last

                            Hi all !

                            I just wanted to tell that I had found a solution while reading mplayer doc :

                            (no)force−pbo

                            Always uses PBOs to transfer textures even if this involves an extra copy. Currently this gives a little extra speed with NVidia drivers and a lot more speed with ATI drivers. May need −noslices and the ati−hack suboption to work correctly.
                            so :

                            mplayer -vo gl:force-pbo
                            works great : no tearing and fast decoding.

                            Hope it can help

                            Comment


                            • #15
                              Originally posted by Guilo View Post
                              Hi all !

                              mplayer -vo gl:force-pbo

                              works great : no tearing and fast decoding.
                              Hope it can help
                              Cool glad you found a solution.

                              I tried it and using a recent mplayer couldn't get it to take the command without doing -

                              mplayer -vo gl:ati-hack,force_pbo

                              Unfortunately it still didn't stop ffmpeg h264 + -vo gl* eating pointless amounts of CPU in vo for me.

                              Comment

                              Working...
                              X