Merge commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd'

* commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd':
  On2 AVC decoder

Conflicts:
	Changelog
	configure
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-23 20:47:13 +02:00
commit 56efd98a65
12 changed files with 10497 additions and 2 deletions

View File

@ -19,6 +19,7 @@ version <next>:
- AVFoundation input device - AVFoundation input device
- Direct Stream Digital (DSD) decoder - Direct Stream Digital (DSD) decoder
- Magic Lantern Video (MLV) demuxer - Magic Lantern Video (MLV) demuxer
- On2 AVC (Audio for Video) decoder
version 2.2: version 2.2:

1
configure vendored
View File

@ -2093,6 +2093,7 @@ mxpeg_decoder_select="mjpeg_decoder"
nellymoser_decoder_select="mdct sinewin" nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="audio_frame_queue mdct sinewin" nellymoser_encoder_select="audio_frame_queue mdct sinewin"
nuv_decoder_select="dsputil lzo" nuv_decoder_select="dsputil lzo"
on2avc_decoder_select="mdct"
png_decoder_select="zlib" png_decoder_select="zlib"
png_encoder_select="dsputil zlib" png_encoder_select="dsputil zlib"
prores_decoder_select="dsputil" prores_decoder_select="dsputil"

View File

@ -933,6 +933,7 @@ following image formats are supported:
@item Musepack SV7 @tab @tab X @item Musepack SV7 @tab @tab X
@item Musepack SV8 @tab @tab X @item Musepack SV8 @tab @tab X
@item Nellymoser Asao @tab X @tab X @item Nellymoser Asao @tab X @tab X
@item On2 AVC (Audio for Video Codec) @tab @tab X
@item Opus @tab E @tab E @item Opus @tab E @tab E
@tab supported through external library libopus @tab supported through external library libopus
@item PCM A-law @tab X @tab X @item PCM A-law @tab X @tab X

View File

@ -329,6 +329,7 @@ OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o
OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o
OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o
OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o
OBJS-$(CONFIG_ON2AVC_DECODER) += on2avc.o on2avcdata.o
OBJS-$(CONFIG_PAF_VIDEO_DECODER) += paf.o OBJS-$(CONFIG_PAF_VIDEO_DECODER) += paf.o
OBJS-$(CONFIG_PAF_AUDIO_DECODER) += paf.o OBJS-$(CONFIG_PAF_AUDIO_DECODER) += paf.o
OBJS-$(CONFIG_PAM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PAM_DECODER) += pnmdec.o pnm.o

View File

@ -370,6 +370,7 @@ void avcodec_register_all(void)
REGISTER_DECODER(MPC7, mpc7); REGISTER_DECODER(MPC7, mpc7);
REGISTER_DECODER(MPC8, mpc8); REGISTER_DECODER(MPC8, mpc8);
REGISTER_ENCDEC (NELLYMOSER, nellymoser); REGISTER_ENCDEC (NELLYMOSER, nellymoser);
REGISTER_DECODER(ON2AVC, on2avc);
REGISTER_DECODER(PAF_AUDIO, paf_audio); REGISTER_DECODER(PAF_AUDIO, paf_audio);
REGISTER_DECODER(QCELP, qcelp); REGISTER_DECODER(QCELP, qcelp);
REGISTER_DECODER(QDM2, qdm2); REGISTER_DECODER(QDM2, qdm2);

View File

@ -484,6 +484,7 @@ enum AVCodecID {
AV_CODEC_ID_TAK_DEPRECATED, AV_CODEC_ID_TAK_DEPRECATED,
AV_CODEC_ID_METASOUND, AV_CODEC_ID_METASOUND,
AV_CODEC_ID_PAF_AUDIO_DEPRECATED, AV_CODEC_ID_PAF_AUDIO_DEPRECATED,
AV_CODEC_ID_ON2AVC,
AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'), AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'), AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'), AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),

View File

@ -2446,6 +2446,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"), .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"),
.props = AV_CODEC_PROP_LOSSY, .props = AV_CODEC_PROP_LOSSY,
}, },
{
.id = AV_CODEC_ID_ON2AVC,
.type = AVMEDIA_TYPE_AUDIO,
.name = "avc",
.long_name = NULL_IF_CONFIG_SMALL("On2 Audio for Video Codec"),
.props = AV_CODEC_PROP_LOSSY,
},
{ {
.id = AV_CODEC_ID_EVRC, .id = AV_CODEC_ID_EVRC,
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,

1015
libavcodec/on2avc.c Normal file

File diff suppressed because it is too large Load Diff

9383
libavcodec/on2avcdata.c Normal file

File diff suppressed because it is too large Load Diff

82
libavcodec/on2avcdata.h Normal file
View File

@ -0,0 +1,82 @@
/*
* On2 Audio for Video Codec decoder
*
* Copyright (c) 2013 Konstantin Shishkov
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_ON2AVC_DATA_H
#define AVCODEC_ON2AVC_DATA_H
#include <stdint.h>
#define ON2AVC_MAX_BANDS 112
#define ON2AVC_ESC_CB 15
typedef struct On2AVCMode {
int num_windows;
int num_bands;
const int *band_start;
} On2AVCMode;
extern const On2AVCMode ff_on2avc_modes_40[8];
extern const On2AVCMode ff_on2avc_modes_44[8];
#define ON2AVC_SCALE_DIFFS 121
extern const uint32_t ff_on2avc_scale_diff_codes[];
extern const uint8_t ff_on2avc_scale_diff_bits[];
extern const uint32_t * const ff_on2avc_quad_cb_codes[];
extern const uint8_t * const ff_on2avc_quad_cb_bits[];
extern const uint16_t * const ff_on2avc_quad_cb_syms[];
extern const int ff_on2avc_quad_cb_elems[];
extern const uint16_t * const ff_on2avc_pair_cb_codes[];
extern const uint8_t * const ff_on2avc_pair_cb_bits[];
extern const uint16_t * const ff_on2avc_pair_cb_syms[];
extern const int ff_on2avc_pair_cb_elems[];
extern const float ff_on2avc_window_long_32000[1024];
extern const float ff_on2avc_window_long_24000[1024];
extern const float ff_on2avc_window_short[128];
extern const double ff_on2avc_tab_10_1[];
extern const double ff_on2avc_tab_10_2[];
extern const double ff_on2avc_tab_20_1[];
extern const double ff_on2avc_tab_20_2[];
extern const double ff_on2avc_tab_40_1[];
extern const double ff_on2avc_tab_40_2[];
extern const double ff_on2avc_tab_84_1[];
extern const double ff_on2avc_tab_84_2[];
extern const double ff_on2avc_tab_84_3[];
extern const double ff_on2avc_tab_84_4[];
extern const double* ff_on2avc_tabs_4_10_1[4];
extern const double* ff_on2avc_tabs_4_10_2[4];
extern const double* ff_on2avc_tabs_9_20_1[9];
extern const double* ff_on2avc_tabs_9_20_2[9];
extern const double* ff_on2avc_tabs_19_40_1[19];
extern const double* ff_on2avc_tabs_19_40_2[19];
extern const double* ff_on2avc_tabs_20_84_1[20];
extern const double* ff_on2avc_tabs_20_84_2[20];
extern const double* ff_on2avc_tabs_20_84_3[20];
extern const double* ff_on2avc_tabs_20_84_4[20];
extern const float ff_on2avc_ctab_1[2048];
extern const float ff_on2avc_ctab_2[2048];
extern const float ff_on2avc_ctab_3[2048];
extern const float ff_on2avc_ctab_4[2048];
#endif /* AVCODEC_ff_on2avc_DATA_H */

View File

@ -29,8 +29,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 55 #define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 58 #define LIBAVCODEC_VERSION_MINOR 59
#define LIBAVCODEC_VERSION_MICRO 105 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \

View File

@ -410,6 +410,8 @@ const AVCodecTag ff_codec_wav_tags[] = {
{ AV_CODEC_ID_ADPCM_G722, 0x028F }, { AV_CODEC_ID_ADPCM_G722, 0x028F },
{ AV_CODEC_ID_IMC, 0x0401 }, { AV_CODEC_ID_IMC, 0x0401 },
{ AV_CODEC_ID_IAC, 0x0402 }, { AV_CODEC_ID_IAC, 0x0402 },
{ AV_CODEC_ID_ON2AVC, 0x0500 },
{ AV_CODEC_ID_ON2AVC, 0x0501 },
{ AV_CODEC_ID_GSM_MS, 0x1500 }, { AV_CODEC_ID_GSM_MS, 0x1500 },
{ AV_CODEC_ID_TRUESPEECH, 0x1501 }, { AV_CODEC_ID_TRUESPEECH, 0x1501 },
/* ADTS AAC */ /* ADTS AAC */