- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think, i've stumbled on buf in AMR-WB codec in IPP V5.0
In the funciongetBitstreamSize in the file uscamrwb.c
The function calculates the wron number of bytes per AMR frame:
it contains following line:
nbytes = ((BitsLenTbl[usedRate] + 14) / 15) * sizeof(short);
I believe it should be:
a)
nbytes = ((BitsLenTbl[usedRate] + 15) / 16) * sizeof(short);
Or maybe:
b)
nbytes = ((BitsLenTbl[usedRate] + 7) / 8) * sizeof(short);
the b) is equivqlent to what is done in gsmamr (amr narrowband) module.
In the funciongetBitstreamSize in the file uscamrwb.c
The function calculates the wron number of bytes per AMR frame:
it contains following line:
nbytes = ((BitsLenTbl[usedRate] + 14) / 15) * sizeof(short);
I believe it should be:
a)
nbytes = ((BitsLenTbl[usedRate] + 15) / 16) * sizeof(short);
Or maybe:
b)
nbytes = ((BitsLenTbl[usedRate] + 7) / 8) * sizeof(short);
the b) is equivqlent to what is done in gsmamr (amr narrowband) module.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot!
This is a bug. The bitstream length shouldbe calculated either wayyou pointed out. The bugwill be fixed in thenearest future version of IPP.
Kind regards
Vyacheslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually thinkink some more about it
c) is buggy too
the correct code will be:
d)
nbytes = ((BitsLenTbl[usedRate] + 7) / 8);
and b) is faulty too because it will always generate an even
result which is incorrect
Vadim
c) is buggy too
the correct code will be:
d)
nbytes = ((BitsLenTbl[usedRate] + 7) / 8);
and b) is faulty too because it will always generate an even
result which is incorrect
Vadim
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page