[CELT-dev] Scanning the compressed celt for an artifact
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Sun Jul 17 07:20:45 PDT 2011
On 07/17/2011 08:32 AM, Andrew Lentvorski wrote:
> On 7/17/11 12:52 AM, Gregory Maxwell wrote:
>> On Sat, Jul 16, 2011 at 8:51 PM, Andrew Lentvorski<bsder at allcaps.org> wrote:
>>> I need to test the latency of a system that I ported CELT to. I'd like
>>> to set a flag when the stream "changes".
>> [snip]
>>> Can anybody with more CELT knowledge than me give me some pointers?
>>
>>
>> Send in digital silence. That is the most trivially detected.
>
> Is it? A codec never produces precisely flat baseline; it always has a
> little bit of noise in the last couple of LSB's.
>
> What will CELT do with that? Is CELT smart enough to collapse the small
> amount of noise to 0?
Recent versions of CELT have a special case for exact digital silence, and
will generally produce identical output for all-zeros input. Note that
this only applies to packets whose entire window is zero, including the
last 2.5ms of the preceding frame.
I think your use case is very strange. Since CELT's latency is a known
constant, you could just look at packet numbers to determine the rest of
the system's latency. Alternatively, you could just send pre-encoded
packets with known contents.
Presumably there is a reason why this is impossible. In that case, you
should be able to distinguish easily between packets that are all zeros
and packets that contain any nonzero values by looking at the first 2 or 3
bytes. If you need to be able to detect both directions of the
transition, then your nonzero frames should still have digital silence for
the last 2.5 ms.
--Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/opus/attachments/20110717/519ccd11/attachment-0002.pgp
More information about the celt-dev
mailing list