[Ffmpeg-devel] Degraded G.726 quality with pops and clicks

Roman Shaposhnik rvs
Thu Mar 1 05:19:23 CET 2007


On Thu, 2007-03-01 at 11:08 +0800, Brain Lai wrote:
> After a series of experiments, I find out the problem results from the
> bitstream order.
> 
> According to RFC3551 4.5.4,  a example of the packing scheme for
> G.726-24codewords follows, where bit 7 is the least significant bit of
> the first
> octet, and bit A2 is the least significant bit of the first codeword:
> 
> 
>           0                   1                   2
>           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
>          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>          |C C|B B B|A A A|F|E E E|D D D|C|H H H|G G G|F F| ...
>          |1 2|0 1 2|0 1 2|2|0 1 2|0 1 2|0|0 1 2|0 1 2|0 1|
>          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> 
> This order is what Awave Studio assumes to play. However, ffmpeg seems to
> assume the opposite order as follows:
> 
>           0                   1                   2
>           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
>          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>          |A A A|B B B|C C|C|D D D|E E E|F|F F|G G G|H H H| ...
>          |0 1 2|0 1 2|0 1|2|0 1 2|0 1 2|0|1 2|0 1 2|0 1 2|
>          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> 
> Which order is standard?

  Now here's the deal -- I know of at least one hardware device that
agrees on the order that ffmpeg has. That is, in fact how the order
was determined. I don't have the ITU spec handy but I don't think that 
it actually defined a particular order. Just the coding principles.
I'll check it tmr. in the office, but so far all I can say is that
it might very well be the case that we would need 2 flavors of 
G726 to take the order into account.

Thanks,
Roman.

P.S. What's Awave Studio ?





More information about the ffmpeg-devel mailing list