[MPlayer-dev-eng] [PATCH] bigendian fix for hwac3

elupus elupus at ecce.se
Sat Sep 15 16:51:33 CEST 2007


> "Reimar Döffinger" <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote in 
> message news:20070915081600.GB4535 at 1und1.de...
> Hello,
> On Sat, Sep 15, 2007 at 08:17:28AM +0800, Ulion wrote:
> [...]
> I made a patch according to your sample code, here it is.
>
> I already did this yesterday, but I lack information if the same is
> necessary for AC3. And I am actually surprised that odd size is allowed
> at all since both AC3 and DTS are formats based on 16bit samples AFAICT.
> Btw.: the comment still didn't apply anymore, since the last byte was
> copied with the code as is, it just wasn't copied the right way.



Actually it does still apply, as you copy it to the wrong location. If I 
remember correctly your fix isn't enough, you have to pretend as if the 
source was appended by a zero byte. when that is swabbed you end up with a 
zero in secondlast byte and the last byte after that. Right now you just 
added the last byte to the end of the swabbed structure. In essence the 
result is one byte longer than the source.

My guess is that it's some stupid encoder that drops this trailing byte when 
it's zero. I was never able to track it down since I only have one source.

Joakim 





More information about the MPlayer-dev-eng mailing list