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

Brain Lai brainlai
Thu Mar 1 04:08:59 CET 2007


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?

Regards
Brain Lai




More information about the ffmpeg-devel mailing list