[MPlayer-dev-eng] [PATCH] vda support for mplayer
Xidorn Quan
quanxunzhen at gmail.com
Fri Aug 17 04:00:15 CEST 2012
Hi!
The patch attached add VDA (Video Decode Acceleration) support
for MPlayer. To use this patch, just add `-vc ffh264vda` to
command line options.
Though this patch mainly focuses on `libvo/vo_corevideo.m` and
`libmpcodecs/vd_ffmpeg.c`, it also slightly modifies code in
`libmpcodecs/vd.c` and `libmpcodecs/vf_scale.c`, and I'd like to
explain for these modifications.
It seems that other hardware accelerations supported in MPlayer
cannot cooperate with video filters because (from comments in them
I guess that) they only provide compressed data directly from decoder
to video out. VDA is different from them. The data VDA provided is
just wrapped raw image data, so I hacked vf_scale and forced it to
recognize VDA data as normal image data. It works fine for me.
I tested ass, mirror, screenshot and noise, they all works perfectly.
The code modified in vo_corevideo in fact is not very useful since
vf_scale may convert all VDA-format data to raw image data, but when
no vf is applied and shared_buffer is not enabled, the image can be
draw directly from vd to vo with no unnecessery copying.
At the end, I'd like to point out that there is still a problem that
it will fall into endless loop instead of falling back to alternative
codec if the video inputed is not supported by VDA (e.g. 10bit,
in TS container, etc.) or VDA cannot be initialized successfuly for
other reason. I cannot figure out how to resolve this problem.
Does anyone here have an idea?
Thanks
Xidorn Quan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_vda_mplayer_new.patch
Type: application/octet-stream
Size: 13915 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120817/15d9175e/attachment-0001.obj>
More information about the MPlayer-dev-eng
mailing list