xbmc-imx6 / xbmc

XBMC Main Repository
http://xbmc.org
Other
32 stars 5 forks source link

Revert to sw decoding for AVC hi10 profile and divX3 codecs #43

Closed wolfgar closed 10 years ago

wolfgar commented 10 years ago

VPU is unable to decode AVC hi10 profile. divX3 codec should be OK but it is not so revert to software decoding by the time we find the correct settings...

koying commented 10 years ago

Looking at the vpu wrapper sources, it looks like those are defined:

    VPU_V_DIVX3,
    VPU_V_DIVX4,
    VPU_V_DIVX56,

But you commented them. Do you remember the story?

wolfgar commented 10 years ago

Yes I remember : while trying to get divx5 movies properly decoded, I had to switch to VPU_V_XVID to get something out of the VPU...

A few additional details : All these codecs are handled by the same VPU decoder (the same program for the DSP in the VPU), normaly you have to set a register called MP4_ASP_CLASS and referred by the mp4class field in the VPU API documentation (found in L3.0.35_4.1.0_LINUX_DOCS from https://community.freescale.com/docs/DOC-95560) to select the MPEG4 class. The library libfslvpuwrap invokes the libvpu library that configures in fine the VPU register. For some reason if you state a divx codec (value 1 or 5 for this register), you won't get any decoded frames out of the VPU, if you set the xvid class (2) it will just work even if you feed the VPU with a divx bitstream... I am unsure of the reason of this behavior : these are only empirical results out of my testing...

For divx3, I tried to set explicitly pictures dimensions before opening the vpu (because it seems to be required for divx3) and to set inData.sCodecData.nSize to 0xFFFFFFFF (as it is done that way in the vpu wrapper library instance) but without success (both with VPU_V_DIVX3 and VPU_V_XVID). Another additional/different configuration is likely required...

emveepee commented 10 years ago

There was also this vpu suggestion for mpeg1 http://hg.openbricks.org/openbricks?cmd=changeset;node=9ab641cb1583 to consider.

wolfgar commented 10 years ago

ho yes it has been on my private branch for a while... New PR for that one : #45

wolfgar commented 10 years ago

If no objection, could a peer merge this one ?