[Asterisk-code-review] translate.c: Prefer better codecs upon translate ties. (asterisk[master])

N A asteriskteam at digium.com
Mon Oct 31 08:42:05 CDT 2022


Attention is currently required from: George Joseph, Kevin Harwell.

N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15953 )

Change subject: translate.c: Prefer better codecs upon translate ties.
......................................................................


Patch Set 6:

(4 comments)

Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/15953/comment/66f77db2_1b53d255 
PS6, Line 15: ceteris paribus
> Can you _translate_ this 😊 […]
Ack


Patchset:

PS6: 
> Couldn't we just create a macro that returns "quality" as a function of sample rate, sample size and […]
Could there be codecs that might be similar in those properties but one is still inferior from a quality perspective? Then those should not have the same value.


File main/codec_builtin.c:

https://gerrit.asterisk.org/c/asterisk/+/15953/comment/9e1f7c14_b4f96f62 
PS6, Line 623: 	.quality = 40,
> 16KHz and only 40?
The qualities assigned are loosely based on these definitions: https://github.com/asterisk/asterisk/blob/master/channels/iax2/format_compatibility.c#L79

This isn't ordering exactly the same property, it's not strictly quality but overall preference based on a few factors.

I'm not familiar with the quality of many of the codecs, such as speex, we could not assign them a quality or somebody that knows the codecs better could suggestion assignments.


https://gerrit.asterisk.org/c/asterisk/+/15953/comment/b23e8cd6_73265b9d 
PS6, Line 889: 	.samples_count = silk_samples,
> Why do the silks not have quality?
They didn't appear in chan_iax2 so I left them alone for now, since translation ties are probably likely to occur only with more common codecs (e.g. ulaw/gsm).
So I felt it was better to leave them alone for now rather than try to come up with some arbitrary assignment.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15953
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I4b7297e1baca7aac14fe4a3c7538e18e2dbe9fd6
Gerrit-Change-Number: 15953
Gerrit-PatchSet: 6
Gerrit-Owner: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <default.enum at gmail.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Attention: Kevin Harwell <default.enum at gmail.com>
Gerrit-Comment-Date: Mon, 31 Oct 2022 13:42:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221031/6d5461ba/attachment.html>


More information about the asterisk-code-review mailing list