Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need XV extension support for sunxi hardware #4

Closed
ssvb opened this issue Mar 5, 2013 · 11 comments
Closed

Need XV extension support for sunxi hardware #4

ssvb opened this issue Mar 5, 2013 · 11 comments

Comments

@ssvb
Copy link
Owner

ssvb commented Mar 5, 2013

Would be a quite useful improvement over xf86-video-fbdev

@pkendall64
Copy link

The following repo has an implementation of the XVideo extension although it's for the RK3066 chip it may help provide a basis.
https://github.com/olegk0/xf86-video-fbdev

@ssvb
Copy link
Owner Author

ssvb commented Jul 9, 2013

Thanks. It is not like implementing XV is really difficult. Plenty of different drivers can be used as a reference (RK3066 is not special). And there is also documentation here: http://www.x.org/releases/X11R7.7/doc/xorg-server/ddxDesign.html#id2596539

Basically, this just needs to be done, no interesting technical challenges expected :) But thanks again for bumping this issue, it shows that some people really want this resolved.

@ssvb
Copy link
Owner Author

ssvb commented Jul 16, 2013

I have just pushed an initial implementation, which is still buggy in some corner cases (simultaneous video playback and OpenGL ES usage, composited desktop environments). But additional testing is also welcome.

@pkendall64
Copy link

Wow, that works a treat! I have compiled mythtv and am running a frontend. Before the XV extension I would get about 1 frame a second and you could see it scan down the screen. Now it's much better. I am now working on the hardware video decode to see if it's actually usable.

@ssvb
Copy link
Owner Author

ssvb commented Jul 16, 2013

XV is designed to work with software decoding and should provide reasonably smooth fullscreen scaled playback for SD resolution videos using the processor from Allwinner A10 (assuming that libav/ffmpeg is correctly compiled with NEON support).

Hardware accelerated decoding to get 1080p videos support is a different thing and we need something like VDPAU wrapper for CedarX. Unfortunately none of the XV code is directly reusable for it. The same disp ioctl wrappers still could be handy though.

@pkendall64
Copy link

Yes, I know that for 1080p I need to provide decoding and overlay support
directly in mythtv and will be working toward this, but in the short term
thought that getting hardware decode with XV support for display would be a
good start.

Thanks for your work on the driver BTW. If you are interested, I'll keep
you posted on my progress.

On Wed, Jul 17, 2013 at 7:59 AM, Siarhei Siamashka <[email protected]

wrote:

XV is designed to work with software decoding and should provide
reasonably smooth fullscreen scaled playback for SD resolution videos using
the processor from Allwinner A10 (assuming that libav/ffmpeg is correctly
compiled with NEON support).

Hardware accelerated decoding to get 1080p videos support is a different
thing and we need something like VDPAU wrapper for CedarX. Unfortunately
none of the XV code is directly reusable for it. The same disp ioctl
wrappers still could be handy though.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21069128
.

@rzk
Copy link

rzk commented Jul 16, 2013

should provide reasonably smooth fullscreen scaled playback for SD resolution videos using the processor from Allwinner A10 (assuming that libav/ffmpeg is correctly compiled with NEON support).

What about some benchmarks using Xv enabled video driver and right-way compiled ffmpeg? What is the realistic possible limit - like 480P resolution video of codec X, bitrate Y and etc. ?
It would be great to see the difference between A10 and A20 in this aspect, considering A20 with different VFP version and three times better linpack performance.

@ssvb
Copy link
Owner Author

ssvb commented Jul 16, 2013

in the short term thought that getting hardware decode with XV support for display would be a good start.

CedarX is using physically contiguous memory and the display controller is also using physically contiguous memory. But XV relies on SHM to share buffers between the X server and the client application. SHM memory is not physically contiguous (at least as far as I know, and Linaro people seem to agree [1]). Using SHM as an intermediate buffer for the only purpose of passing data between CedarX and the display controller would be extremely inefficient (need CPU copy crawling through non-cached memory).

  1. https://wiki.linaro.org/WorkingGroups/Middleware/Multimedia/Specs/1105/ConsolidateZeroCopyMultimediaPlayback#Xvideo

@ssvb
Copy link
Owner Author

ssvb commented Jul 16, 2013

What about some benchmarks using Xv enabled video driver and right-way compiled ffmpeg?
What is the realistic possible limit - like 480P resolution video of codec X, bitrate Y and etc. ?

In my limited tests with H.264 encoded videos, I could watch 480p media files just fine (especially if frame dropping is enabled and can be tolerated on motion heavy scenes). For the lightweight codecs such as mpeg2 or xvid, larger resolutions may be also fine. I also watched a VOB from a DVD as a test without any problems.

It would be great to see the difference between A10 and A20 in this aspect,

MPlayer can be easily used for benchmarking (it conveniently has -benchmark option). But first it would be great to successfully run the XV enabled driver on A20 :)

considering A20 with different VFP version and three times better linpack performance.

VFP has no use for video decoding. And the audio decoders, which rely on floating point calculations, should be already optimized with NEON.

@ssvb
Copy link
Owner Author

ssvb commented Jul 16, 2013

If you are interested, I'll keep you posted on my progress.

Thanks! The reports about any possible crashes or performance issues in this driver blocking your progress are very much welcome.

@ssvb
Copy link
Owner Author

ssvb commented Aug 31, 2013

Created separate bugs for the remaining XV issues (#16 #17 #18). This one can be closed now.

@ssvb ssvb closed this as completed Aug 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants