[FFmpeg-devel] [PATCH 3/4] oggdec: add support for Opus codec.

Nicolas George nicolas.george at normalesup.org
Thu Jul 12 15:14:43 CEST 2012


Le quartidi 24 messidor, an CCXX, Gregory Maxwell a écrit :
> For round-tripping durations and phase shifts this should be easy to
> check, and I have scripts for this that should help.
> 
> For AV sync, you've got me. Thats harder.

There is still time, as I need to figure out how to make that 3840 samples
clause work. IMHO, the cleaner course of action would be to set the
convergence_duration field to the duration of 3840 samples (probably using
an AVCodecParser, since it must not be Ogg-specific), and fix all of ffmpeg
not to ignore convergence_duration. But that is a lot of work.

> It's somewhat more complex codewise to lower it, as it will need to be
> done in four places— in different ways because of different
> units/scaling used a the different points (e.g. the correct way to
> efficiently do it in MDCT mode is by scaling the log domain band
> energy).
> 
> I would have done so except we're currently working on making the 1.0
> release and complicated changes need to be done carefully, and because
> I was in a big hurry because I was hoping avoid a compatibility mess.
> 
> But sure, it will be eventually be done at the cost of only 25 adds
> per frame, at least in the MDCT modes and the PLC, the LP modes will
> likely need to retain a multiply add pass over the signal because the
> scaling of the data in the predictive loop is important.
> 
> Fortunately this won't change the API. It will just become faster for
> those using it.

Ok, thanks for the explanations.

> Debian stable is actually shipping a snapshot of this branch rather
> than our "releases". The addition is forwards and backwards ABI
> compatible. (or at least backwards assuming you handle it throwing
> unimplemented at runtime)
> 
> This interface will be in our first stable library release in a few
> weeks and should make its way into Debian in the fullness of time.

Unfortunately, for Debian stable, "in the fullness of time" means a long
time, especially since we just started the freeze period.

For that reason, I implemented both versions: if OPUS_SET_GAIN is defined,
use it, if not do the gain in lavc. In ~3 years, we can consider relying
only on OPUS_SET_GAIN.

A side effect would be that if ffmpeg is built with a recent version of
libopus but run with an older version, the gail will be ignored. I believe
this is acceptable.

> I look forward to it.

Just sent them. The pre_skip and end_trim stuff is still not working as it
needs Michael's patches:
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-July/127099.html
and next.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120712/9145c667/attachment.asc>


More information about the ffmpeg-devel mailing list