GNOME Bugzilla – Bug 728646
siren: fix sample list rate
Last modified: 2014-10-30 15:22:54 UTC
Created attachment 274801 [details] [review] fix sample rate list Would need someone who knows the format to double check. Spec found there: https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-G.722.1-200505-I!!SOFT-ZST-E&type=items but not helpful about this. I might have the wrong spec though, since it appears there are a handful of different codecs named G.722 (one or more of which appears to be siren).
We would need to compare with output from Microsoft's encoder. But your patch makes sense to me.
Review of attachment 274801 [details] [review]: From: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Mon, 21 Apr 2014 11:48:22 +0100 Subject: [PATCH] siren: fix sample rate list It was using a 24000/24000/48000, but I think it meant to use 24000/32000/48000. Not 100% sure... https://en.wikipedia.org/wiki/G.722.1 has the list of supported bitrates. It's not clear whether the "flag" code maps to this, however. Coverity 206072 --- gst/siren/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Looks good to me too (though I don't have any in-depth knowledge): - Wikipedia (https://en.wikipedia.org/wiki/Siren_%28codec%29#Editions) mentions 16, 24 and 32 kbit. Looking at the code that might imply that flag=1 is siren 7, while flag=2 is siren 14. number_of_regions=14 and number_of_coefs=320 for flag=1 matches the G.722 standard as far as I can see (http://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-G.722.1-200505-I!!SOFT-ZST-E&type=items). G.722.1 Annex C uses also number_of_coefs=640 which indicates that hypothesis might be correct. If so I suggest you also update the comment in common.c ("Looks like the flag means what kind of encoding is used").
*** Bug 736958 has been marked as a duplicate of this bug. ***
This seems almost 100% certain to be correct now, so I pushed it. commit a5350f2d0ce0a59fb21afaaef5e519f2a3b93aa0 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Mon Apr 21 11:48:22 2014 +0100 siren: fix sample rate list It was using a 24000/24000/48000, but I think it meant to use 24000/32000/48000. Not 100% sure... https://en.wikipedia.org/wiki/G.722.1 has the list of supported bitrates. It's not clear whether the "flag" code maps to this, however. Coverity 206072