[FFmpeg-devel] [PATCH 2/3] lavc: Opus decoder using libopus.

Michael Niedermayer michaelni at gmx.at
Thu Jul 5 22:55:07 CEST 2012


On Wed, Jul 04, 2012 at 04:43:49PM +0200, Nicolas George wrote:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  configure                |    5 ++
>  libavcodec/Makefile      |    1 +
>  libavcodec/allcodecs.c   |    1 +
>  libavcodec/libopus_dec.c |  166 ++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 173 insertions(+)
>  create mode 100644 libavcodec/libopus_dec.c
> 
[...]
> +static inline void reorder(uint8_t *data, unsigned channels, unsigned bps,
> +                           unsigned samples, const uint8_t *map)
> +{
> +    uint8_t tmp[8 * 4];
> +    unsigned i;
> +
> +    for (; samples > 0; samples--) {
> +        for (i = 0; i < channels; i++)
> +            memcpy(tmp + bps * i, data + bps * map[i], bps);

maybe a assert could be added here to protect against a potential
bug if the max channels increase

otherwise LGTM

[..]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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/20120705/d50170a9/attachment.asc>


More information about the ffmpeg-devel mailing list