Compare commits
45 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
acf511de34 | ||
![]() |
fd2951bb53 | ||
![]() |
fa004f4854 | ||
![]() |
1155bdb754 | ||
![]() |
01838c5732 | ||
![]() |
f09f33031b | ||
![]() |
b2a9f64e1b | ||
![]() |
15ea618ef6 | ||
![]() |
ec33423273 | ||
![]() |
d5dd54df69 | ||
![]() |
e7a4c34e7c | ||
![]() |
2881bfbfd6 | ||
![]() |
80fb38153e | ||
![]() |
b79f337f8a | ||
![]() |
f593ac1c21 | ||
![]() |
baf92305a6 | ||
![]() |
d6d168e87b | ||
![]() |
50f9c4acc3 | ||
![]() |
211374e52a | ||
![]() |
1bf2461765 | ||
![]() |
64444cd578 | ||
![]() |
0047a31090 | ||
![]() |
d73ce6cb56 | ||
![]() |
9a6d3eee59 | ||
![]() |
8b221d60fa | ||
![]() |
9da9b36435 | ||
![]() |
09b33f9a82 | ||
![]() |
fa6b6dad3d | ||
![]() |
e0d88cfd18 | ||
![]() |
18043e3d22 | ||
![]() |
ccf470fdb6 | ||
![]() |
8f9bc6f2ce | ||
![]() |
fcab45f39b | ||
![]() |
bc44d06c3d | ||
![]() |
7740e36a89 | ||
![]() |
6127f792f9 | ||
![]() |
fd2cf9c45d | ||
![]() |
fc3dec8b62 | ||
![]() |
a7315116dd | ||
![]() |
37268dcc86 | ||
![]() |
ea28e74205 | ||
![]() |
c1c84f0a55 | ||
![]() |
56bf38859b | ||
![]() |
1cda4aa1e0 | ||
![]() |
9711b52739 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -63,7 +63,6 @@
|
||||
/tools/aviocat
|
||||
/tools/ffbisect
|
||||
/tools/bisect.need
|
||||
/tools/crypto_bench
|
||||
/tools/cws2fws
|
||||
/tools/fourcc2pixfmt
|
||||
/tools/ffescape
|
||||
|
55
Changelog
55
Changelog
@@ -1,55 +1,6 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version <next>
|
||||
|
||||
|
||||
version 2.1:
|
||||
|
||||
- aecho filter
|
||||
- perspective filter ported from libmpcodecs
|
||||
- ffprobe -show_programs option
|
||||
- compand filter
|
||||
- RTMP seek support
|
||||
- when transcoding with ffmpeg (i.e. not streamcopying), -ss is now accurate
|
||||
even when used as an input option. Previous behavior can be restored with
|
||||
the -noaccurate_seek option.
|
||||
- ffmpeg -t option can now be used for inputs, to limit the duration of
|
||||
data read from an input file
|
||||
- incomplete Voxware MetaSound decoder
|
||||
- read EXIF metadata from JPEG
|
||||
- DVB teletext decoder
|
||||
- phase filter ported from libmpcodecs
|
||||
- w3fdif filter
|
||||
- Opus support in Matroska
|
||||
- FFV1 version 1.3 is stable and no longer experimental
|
||||
- FFV1: YUVA(444,422,420) 9, 10 and 16 bit support
|
||||
- changed DTS stream id in lavf mpeg ps muxer from 0x8a to 0x88, to be
|
||||
more consistent with other muxers.
|
||||
- adelay filter
|
||||
- pullup filter ported from libmpcodecs
|
||||
- ffprobe -read_intervals option
|
||||
- Lossless and alpha support for WebP decoder
|
||||
- Error Resilient AAC syntax (ER AAC LC) decoding
|
||||
- Low Delay AAC (ER AAC LD) decoding
|
||||
- mux chapters in ASF files
|
||||
- SFTP protocol (via libssh)
|
||||
- libx264: add ability to encode in YUVJ422P and YUVJ444P
|
||||
- Fraps: use BT.709 colorspace by default for yuv, as reference fraps decoder does
|
||||
- make decoding alpha optional for prores, ffv1 and vp6 by setting
|
||||
the skip_alpha flag.
|
||||
- ladspa wrapper filter
|
||||
- native VP9 decoder
|
||||
- dpx parser
|
||||
- max_error_rate parameter in ffmpeg
|
||||
- PulseAudio output device
|
||||
- ReplayGain scanner
|
||||
- Enhanced Low Delay AAC (ER AAC ELD) decoding (no LD SBR support)
|
||||
- Linux framebuffer output device
|
||||
- HEVC decoder, raw HEVC demuxer, HEVC demuxing in TS, Matroska and MP4
|
||||
- mergeplanes filter
|
||||
|
||||
|
||||
version 2.0:
|
||||
|
||||
- curves filter
|
||||
@@ -656,7 +607,7 @@ version 0.6:
|
||||
- LPCM support in MPEG-TS (HDMV RID as found on Blu-ray disks)
|
||||
- WMA Pro decoder
|
||||
- Core Audio Format demuxer
|
||||
- ATRAC1 decoder
|
||||
- Atrac1 decoder
|
||||
- MD STUDIO audio demuxer
|
||||
- RF64 support in WAV demuxer
|
||||
- MPEG-4 Audio Lossless Coding (ALS) decoder
|
||||
@@ -756,7 +707,7 @@ version 0.5:
|
||||
- MXF demuxer
|
||||
- VC-1/WMV3/WMV9 video decoder
|
||||
- MacIntel support
|
||||
- AviSynth support
|
||||
- AVISynth support
|
||||
- VMware video decoder
|
||||
- VP5 video decoder
|
||||
- VP6 video decoder
|
||||
@@ -784,7 +735,7 @@ version 0.5:
|
||||
- Interplay C93 demuxer and video decoder
|
||||
- Bethsoft VID demuxer and video decoder
|
||||
- CRYO APC demuxer
|
||||
- ATRAC3 decoder
|
||||
- Atrac3 decoder
|
||||
- V.Flash PTX decoder
|
||||
- RoQ muxer, RoQ audio encoder
|
||||
- Renderware TXD demuxer and decoder
|
||||
|
5
LICENSE
5
LICENSE
@@ -33,14 +33,13 @@ Specifically, the GPL parts of FFmpeg are
|
||||
- vf_geq.c
|
||||
- vf_histeq.c
|
||||
- vf_hqdn3d.c
|
||||
- vf_hue.c
|
||||
- vf_kerndeint.c
|
||||
- vf_mcdeint.c
|
||||
- vf_mp.c
|
||||
- vf_noise.c
|
||||
- vf_owdenoise.c
|
||||
- vf_perspective.c
|
||||
- vf_phase.c
|
||||
- vf_pp.c
|
||||
- vf_pullup.c
|
||||
- vf_sab.c
|
||||
- vf_smartblur.c
|
||||
- vf_spp.c
|
||||
|
54
MAINTAINERS
54
MAINTAINERS
@@ -43,24 +43,16 @@ QuickTime faststart:
|
||||
Miscellaneous Areas
|
||||
===================
|
||||
|
||||
documentation Stefano Sabatini, Mike Melanson, Timothy Gu
|
||||
documentation Mike Melanson
|
||||
website Robert Swain, Lou Logan
|
||||
build system (configure,Makefiles) Diego Biurrun, Mans Rullgard
|
||||
project server Árpád Gereöffy, Michael Niedermayer, Reimar Döffinger, Alexander Strasser
|
||||
mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan
|
||||
presets Robert Swain
|
||||
metadata subsystem Aurelien Jacobs
|
||||
release management Michael Niedermayer
|
||||
|
||||
|
||||
Communication
|
||||
=============
|
||||
|
||||
website Robert Swain, Lou Logan
|
||||
mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan
|
||||
Google+ Paul B Mahol, Michael Niedermayer, Alexander Strasser
|
||||
Twitter Lou Logan
|
||||
Launchpad Timothy Gu
|
||||
|
||||
|
||||
libavutil
|
||||
=========
|
||||
|
||||
@@ -73,16 +65,13 @@ Other:
|
||||
bprint Nicolas George
|
||||
bswap.h
|
||||
des Reimar Doeffinger
|
||||
eval.c, eval.h Michael Niedermayer
|
||||
float_dsp Loren Merritt
|
||||
hash Reimar Doeffinger
|
||||
intfloat* Michael Niedermayer
|
||||
integer.c, integer.h Michael Niedermayer
|
||||
lzo Reimar Doeffinger
|
||||
mathematics.c, mathematics.h Michael Niedermayer
|
||||
mem.c, mem.h Michael Niedermayer
|
||||
opencl.c, opencl.h Wei Gao
|
||||
opt.c, opt.h Michael Niedermayer
|
||||
rational.c, rational.h Michael Niedermayer
|
||||
rc4 Reimar Doeffinger
|
||||
ripemd.c, ripemd.h James Almer
|
||||
@@ -97,6 +86,10 @@ Generic Parts:
|
||||
avcodec.h Michael Niedermayer
|
||||
utility code:
|
||||
utils.c Michael Niedermayer
|
||||
mem.c Michael Niedermayer
|
||||
opt.c, opt.h Michael Niedermayer
|
||||
arithmetic expression evaluator:
|
||||
eval.c Michael Niedermayer
|
||||
audio and video frame extraction:
|
||||
parser.c Michael Niedermayer
|
||||
bitstream reading:
|
||||
@@ -127,8 +120,6 @@ Generic Parts:
|
||||
libpostproc/* Michael Niedermayer
|
||||
table generation:
|
||||
tableprint.c, tableprint.h Reimar Doeffinger
|
||||
fixed point FFT:
|
||||
fft* Zeljko Lukac
|
||||
|
||||
Codecs:
|
||||
4xm.c Michael Niedermayer
|
||||
@@ -162,7 +153,6 @@ Codecs:
|
||||
dv.c Roman Shaposhnik
|
||||
dxa.c Kostya Shishkov
|
||||
eacmv*, eaidct*, eat* Peter Ross
|
||||
exif.c, exif.h Thilo Borgmann
|
||||
ffv1.c Michael Niedermayer
|
||||
ffwavesynth.c Nicolas George
|
||||
flac* Justin Ruggles
|
||||
@@ -274,7 +264,6 @@ Codecs:
|
||||
wnv1.c Kostya Shishkov
|
||||
xan.c Mike Melanson
|
||||
xbm* Paul B Mahol
|
||||
xface Stefano Sabatini
|
||||
xl.c Kostya Shishkov
|
||||
xvmc.c Ivan Kalvachev
|
||||
xwd* Paul B Mahol
|
||||
@@ -297,12 +286,8 @@ libavdevice
|
||||
|
||||
|
||||
dshow.c Roger Pack
|
||||
fbdev_enc.c Lukasz Marek
|
||||
iec61883.c Georg Lippitsch
|
||||
lavfi Stefano Sabatini
|
||||
libdc1394.c Roman Shaposhnik
|
||||
pulse_audio_enc.c Lukasz Marek
|
||||
sdl Stefano Sabatini
|
||||
v4l2.c Luca Abeni
|
||||
vfwcap.c Ramiro Polla
|
||||
|
||||
@@ -313,33 +298,14 @@ Generic parts:
|
||||
graphdump.c Nicolas George
|
||||
|
||||
Filters:
|
||||
af_adelay.c Paul B Mahol
|
||||
af_aecho.c Paul B Mahol
|
||||
af_afade.c Paul B Mahol
|
||||
af_amerge.c Nicolas George
|
||||
af_aphaser.c Paul B Mahol
|
||||
af_aresample.c Michael Niedermayer
|
||||
af_astats.c Paul B Mahol
|
||||
af_astreamsync.c Nicolas George
|
||||
af_atempo.c Pavel Koshevoy
|
||||
af_biquads.c Paul B Mahol
|
||||
af_compand.c Paul B Mahol
|
||||
af_ladspa.c Paul B Mahol
|
||||
af_pan.c Nicolas George
|
||||
avf_avectorscope.c Paul B Mahol
|
||||
vf_blend.c Paul B Mahol
|
||||
vf_colorbalance.c Paul B Mahol
|
||||
vf_delogo.c Jean Delvare (CC <khali@linux-fr.org>)
|
||||
vf_drawbox.c/drawgrid Andrey Utkin
|
||||
vf_extractplanes.c Paul B Mahol
|
||||
vf_histogram.c Paul B Mahol
|
||||
vf_il.c Paul B Mahol
|
||||
vf_mergeplanes.c Paul B Mahol
|
||||
vf_psnr.c Paul B Mahol
|
||||
vf_scale.c Michael Niedermayer
|
||||
vf_separatefields.c Paul B Mahol
|
||||
vf_stereo3d.c Paul B Mahol
|
||||
vf_telecine.c Paul B Mahol
|
||||
vf_yadif.c Michael Niedermayer
|
||||
|
||||
Sources:
|
||||
@@ -462,7 +428,6 @@ Protocols:
|
||||
bluray.c Petri Hintukainen
|
||||
ftp.c Lukasz Marek
|
||||
http.c Ronald S. Bultje
|
||||
libssh.c Lukasz Marek
|
||||
mms*.c Ronald S. Bultje
|
||||
udp.c Luca Abeni
|
||||
|
||||
@@ -487,7 +452,7 @@ Operating systems / CPU architectures
|
||||
Alpha Mans Rullgard, Falk Hueffner
|
||||
ARM Mans Rullgard
|
||||
AVR32 Mans Rullgard
|
||||
MIPS Mans Rullgard, Nedeljko Babic
|
||||
MIPS Mans Rullgard
|
||||
Mac OS X / PowerPC Romain Dolbeau, Guillaume Poirier
|
||||
Amiga / PowerPC Colin Ward
|
||||
Linux / PowerPC Luca Barbato
|
||||
@@ -501,8 +466,8 @@ x86 Michael Niedermayer
|
||||
Releases
|
||||
========
|
||||
|
||||
2.1 Michael Niedermayer
|
||||
2.0 Michael Niedermayer
|
||||
1.2 Michael Niedermayer
|
||||
|
||||
If you want to maintain an older release, please contact us
|
||||
|
||||
@@ -510,7 +475,6 @@ If you want to maintain an older release, please contact us
|
||||
GnuPG Fingerprints of maintainers and contributors
|
||||
==================================================
|
||||
|
||||
Alexander Strasser 1C96 78B7 83CB 8AA7 9AF5 D1EB A7D8 A57B A876 E58F
|
||||
Anssi Hannula 1A92 FF42 2DD9 8D2E 8AF7 65A9 4278 C520 513D F3CB
|
||||
Anton Khirnov 6D0C 6625 56F8 65D1 E5F5 814B B50A 1241 C067 07AB
|
||||
Ash Hughes 694D 43D2 D180 C7C7 6421 ABD3 A641 D0B7 623D 6029
|
||||
|
73
cmdutils.c
73
cmdutils.c
@@ -47,7 +47,6 @@
|
||||
#include "libavutil/eval.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "cmdutils.h"
|
||||
#include "version.h"
|
||||
#if CONFIG_NETWORK
|
||||
@@ -68,7 +67,7 @@ struct SwsContext *sws_opts;
|
||||
AVDictionary *swr_opts;
|
||||
AVDictionary *format_opts, *codec_opts, *resample_opts;
|
||||
|
||||
const int this_year = 2014;
|
||||
const int this_year = 2013;
|
||||
|
||||
static FILE *report_file;
|
||||
|
||||
@@ -214,10 +213,7 @@ static const OptionDef *find_option(const OptionDef *po, const char *name)
|
||||
return po;
|
||||
}
|
||||
|
||||
/* _WIN32 means using the windows libc - cygwin doesn't define that
|
||||
* by default. HAVE_COMMANDLINETOARGVW is true on cygwin, while
|
||||
* it doesn't provide the actual command line via GetCommandLineW(). */
|
||||
#if HAVE_COMMANDLINETOARGVW && defined(_WIN32)
|
||||
#if HAVE_COMMANDLINETOARGVW
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
/* Will be leaked on exit */
|
||||
@@ -498,15 +494,6 @@ void parse_loglevel(int argc, char **argv, const OptionDef *options)
|
||||
}
|
||||
}
|
||||
|
||||
static const AVOption *opt_find(void *obj, const char *name, const char *unit,
|
||||
int opt_flags, int search_flags)
|
||||
{
|
||||
const AVOption *o = av_opt_find(obj, name, unit, opt_flags, search_flags);
|
||||
if(o && !o->flags)
|
||||
return NULL;
|
||||
return o;
|
||||
}
|
||||
|
||||
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
||||
int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
@@ -527,14 +514,14 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
p = opt + strlen(opt);
|
||||
av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1));
|
||||
|
||||
if ((o = opt_find(&cc, opt_stripped, NULL, 0,
|
||||
if ((o = av_opt_find(&cc, opt_stripped, NULL, 0,
|
||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) ||
|
||||
((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&
|
||||
(o = opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) {
|
||||
(o = av_opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) {
|
||||
av_dict_set(&codec_opts, opt, arg, FLAGS);
|
||||
consumed = 1;
|
||||
}
|
||||
if ((o = opt_find(&fc, opt, NULL, 0,
|
||||
if ((o = av_opt_find(&fc, opt, NULL, 0,
|
||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||
av_dict_set(&format_opts, opt, arg, FLAGS);
|
||||
if (consumed)
|
||||
@@ -543,7 +530,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
}
|
||||
#if CONFIG_SWSCALE
|
||||
sc = sws_get_class();
|
||||
if (!consumed && opt_find(&sc, opt, NULL, 0,
|
||||
if (!consumed && av_opt_find(&sc, opt, NULL, 0,
|
||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
|
||||
// XXX we only support sws_flags, not arbitrary sws options
|
||||
int ret = av_opt_set(sws_opts, opt, arg, 0);
|
||||
@@ -556,7 +543,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
#endif
|
||||
#if CONFIG_SWRESAMPLE
|
||||
swr_class = swr_get_class();
|
||||
if (!consumed && (o=opt_find(&swr_class, opt, NULL, 0,
|
||||
if (!consumed && (o=av_opt_find(&swr_class, opt, NULL, 0,
|
||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||
struct SwrContext *swr = swr_alloc();
|
||||
int ret = av_opt_set(swr, opt, arg, 0);
|
||||
@@ -570,7 +557,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
}
|
||||
#endif
|
||||
#if CONFIG_AVRESAMPLE
|
||||
if ((o=opt_find(&rc, opt, NULL, 0,
|
||||
if ((o=av_opt_find(&rc, opt, NULL, 0,
|
||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||
av_dict_set(&resample_opts, opt, arg, FLAGS);
|
||||
consumed = 1;
|
||||
@@ -809,18 +796,6 @@ do { \
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
int ret;
|
||||
unsigned flags = av_get_cpu_flags();
|
||||
|
||||
if ((ret = av_parse_cpu_caps(&flags, arg)) < 0)
|
||||
return ret;
|
||||
|
||||
av_force_cpu_flags(flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
const struct { const char *name; int level; } log_levels[] = {
|
||||
@@ -973,6 +948,18 @@ int opt_max_alloc(void *optctx, const char *opt, const char *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
int ret;
|
||||
unsigned flags = av_get_cpu_flags();
|
||||
|
||||
if ((ret = av_parse_cpu_caps(&flags, arg)) < 0)
|
||||
return ret;
|
||||
|
||||
av_force_cpu_flags(flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_timelimit(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
#if HAVE_SETRLIMIT
|
||||
@@ -1482,9 +1469,8 @@ int show_filters(void *optctx, const char *opt, const char *arg)
|
||||
const AVFilterPad *pad;
|
||||
|
||||
printf("Filters:\n"
|
||||
" T.. = Timeline support\n"
|
||||
" .S. = Slice threading\n"
|
||||
" ..C = Commmand support\n"
|
||||
" T. = Timeline support\n"
|
||||
" .S = Slice threading\n"
|
||||
" A = Audio input/output\n"
|
||||
" V = Video input/output\n"
|
||||
" N = Dynamic number and/or type of input/output\n"
|
||||
@@ -1508,28 +1494,15 @@ int show_filters(void *optctx, const char *opt, const char *arg)
|
||||
( i && (filter->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS))) ? 'N' : '|';
|
||||
}
|
||||
*descr_cur = 0;
|
||||
printf(" %c%c%c %-16s %-10s %s\n",
|
||||
printf(" %c%c %-16s %-10s %s\n",
|
||||
filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE ? 'T' : '.',
|
||||
filter->flags & AVFILTER_FLAG_SLICE_THREADS ? 'S' : '.',
|
||||
filter->process_command ? 'C' : '.',
|
||||
filter->name, descr, filter->description);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void show_colors(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
const char *name;
|
||||
const uint8_t *rgb;
|
||||
int i;
|
||||
|
||||
printf("%-32s #RRGGBB\n", "name");
|
||||
|
||||
for (i = 0; name = av_get_known_color_name(i, &rgb); i++)
|
||||
printf("%-32s #%02x%02x%02x\n", name, rgb[0], rgb[1], rgb[2]);
|
||||
}
|
||||
|
||||
int show_pix_fmts(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
const AVPixFmtDescriptor *pix_desc = NULL;
|
||||
|
15
cmdutils.h
15
cmdutils.h
@@ -81,11 +81,6 @@ void uninit_opts(void);
|
||||
*/
|
||||
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
|
||||
|
||||
/**
|
||||
* Override the cpuflags.
|
||||
*/
|
||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Fallback for options that are not explicitly handled, these will be
|
||||
* parsed through AVOptions.
|
||||
@@ -101,6 +96,8 @@ int opt_report(const char *opt);
|
||||
|
||||
int opt_max_alloc(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
int opt_codec_debug(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
int opt_opencl(void *optctx, const char *opt, const char *arg);
|
||||
@@ -488,12 +485,6 @@ int show_layouts(void *optctx, const char *opt, const char *arg);
|
||||
*/
|
||||
int show_sample_fmts(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Print a listing containing all the color names and values recognized
|
||||
* by the program.
|
||||
*/
|
||||
void show_colors(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Return a positive value if a line read from standard input
|
||||
* starts with [yY], otherwise return 0.
|
||||
@@ -507,7 +498,7 @@ int read_yesno(void);
|
||||
* @param filename file to read from
|
||||
* @param bufptr location where pointer to buffer is returned
|
||||
* @param size location where size of buffer is returned
|
||||
* @return >= 0 in case of success, a negative value corresponding to an
|
||||
* @return 0 in case of success, a negative value corresponding to an
|
||||
* AVERROR error code in case of failure.
|
||||
*/
|
||||
int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
||||
|
@@ -14,12 +14,11 @@
|
||||
{ "pix_fmts" , OPT_EXIT, {.func_arg = show_pix_fmts }, "show available pixel formats" },
|
||||
{ "layouts" , OPT_EXIT, {.func_arg = show_layouts }, "show standard channel layouts" },
|
||||
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
|
||||
{ "colors" , OPT_EXIT, {.func_arg = show_colors }, "show available color names" },
|
||||
{ "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" },
|
||||
{ "v", HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" },
|
||||
{ "report" , 0, {(void*)opt_report}, "generate a report" },
|
||||
{ "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
|
||||
{ "cpuflags" , HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" },
|
||||
{ "cpuflags" , HAS_ARG | OPT_EXPERT, {.func_arg = opt_cpuflags}, "force specific cpu flags", "flags" },
|
||||
#if CONFIG_OPENCL
|
||||
{ "opencl_options", HAS_ARG, {.func_arg = opt_opencl}, "set OpenCL environment options" },
|
||||
#endif
|
||||
|
@@ -99,8 +99,7 @@ TOOLOBJS := $(TOOLS:%=tools/%.o)
|
||||
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
||||
HEADERS += $(HEADERS-yes)
|
||||
|
||||
PATH_LIBNAME = $(foreach NAME,$(1),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
||||
DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib)))
|
||||
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
||||
|
||||
SRC_DIR := $(SRC_PATH)/lib$(NAME)
|
||||
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
||||
|
@@ -1,26 +1,9 @@
|
||||
/*
|
||||
* Work around the class() function in AIX math.h clashing with
|
||||
* identifiers named "class".
|
||||
*
|
||||
* 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
|
||||
* Workaround aix-specific class() function clashing with ffmpeg class usage
|
||||
*/
|
||||
|
||||
#ifndef FFMPEG_COMPAT_AIX_MATH_H
|
||||
#define FFMPEG_COMPAT_AIX_MATH_H
|
||||
#ifndef COMPAT_AIX_MATH_H
|
||||
#define COMPAT_AIX_MATH_H
|
||||
|
||||
#define class class_in_math_h_causes_problems
|
||||
|
||||
@@ -28,4 +11,4 @@
|
||||
|
||||
#undef class
|
||||
|
||||
#endif /* FFMPEG_COMPAT_AIX_MATH_H */
|
||||
#endif /* COMPAT_AIX_MATH_H */
|
||||
|
@@ -1,68 +0,0 @@
|
||||
// Copyright (c) 2011 FFmpegSource Project
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
/* these are defines/functions that are used and were changed in the switch to 2.6
|
||||
* and are needed to maintain full compatility with 2.5 */
|
||||
|
||||
enum {
|
||||
AVS_CS_YV12_25 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR, // y-v-u, planar
|
||||
AVS_CS_I420_25 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR, // y-u-v, planar
|
||||
};
|
||||
|
||||
AVSC_INLINE int avs_get_height_p_25(const AVS_VideoFrame * p, int plane) {
|
||||
switch (plane)
|
||||
{
|
||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
||||
if (p->pitchUV)
|
||||
return p->height>>1;
|
||||
return 0;
|
||||
}
|
||||
return p->height;}
|
||||
|
||||
AVSC_INLINE int avs_get_row_size_p_25(const AVS_VideoFrame * p, int plane) {
|
||||
int r;
|
||||
switch (plane)
|
||||
{
|
||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
||||
if (p->pitchUV)
|
||||
return p->row_size>>1;
|
||||
else
|
||||
return 0;
|
||||
case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED:
|
||||
if (p->pitchUV)
|
||||
{
|
||||
r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize
|
||||
if (r < p->pitchUV)
|
||||
return r;
|
||||
return p->row_size>>1;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
case AVS_PLANAR_Y_ALIGNED:
|
||||
r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
|
||||
if (r <= p->pitch)
|
||||
return r;
|
||||
return p->row_size;
|
||||
}
|
||||
return p->row_size;
|
||||
}
|
||||
|
||||
AVSC_INLINE int avs_is_yv12_25(const AVS_VideoInfo * p)
|
||||
{ return ((p->pixel_type & AVS_CS_YV12_25) == AVS_CS_YV12_25)||((p->pixel_type & AVS_CS_I420_25) == AVS_CS_I420_25); }
|
@@ -1,24 +1,3 @@
|
||||
/*
|
||||
* 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 FFMPEG_COMPAT_TMS470_MATH_H
|
||||
#define FFMPEG_COMPAT_TMS470_MATH_H
|
||||
|
||||
#include_next <math.h>
|
||||
|
||||
#undef INFINITY
|
||||
@@ -26,5 +5,3 @@
|
||||
|
||||
#define INFINITY (*(const float*)((const unsigned []){ 0x7f800000 }))
|
||||
#define NAN (*(const float*)((const unsigned []){ 0x7fc00000 }))
|
||||
|
||||
#endif /* FFMPEG_COMPAT_TMS470_MATH_H */
|
||||
|
@@ -26,8 +26,8 @@
|
||||
* w32threads to pthreads wrapper
|
||||
*/
|
||||
|
||||
#ifndef FFMPEG_COMPAT_W32PTHREADS_H
|
||||
#define FFMPEG_COMPAT_W32PTHREADS_H
|
||||
#ifndef LIBAV_W32PTHREADS_H
|
||||
#define LIBAV_W32PTHREADS_H
|
||||
|
||||
/* Build up a pthread-like API using underlying Windows API. Have only static
|
||||
* methods so as to not conflict with a potentially linked in pthread-win32
|
||||
@@ -62,18 +62,11 @@ typedef struct pthread_cond_t {
|
||||
} pthread_cond_t;
|
||||
|
||||
/* function pointers to conditional variable API on windows 6.0+ kernels */
|
||||
#if _WIN32_WINNT < 0x0600
|
||||
static void (WINAPI *cond_broadcast)(pthread_cond_t *cond);
|
||||
static void (WINAPI *cond_init)(pthread_cond_t *cond);
|
||||
static void (WINAPI *cond_signal)(pthread_cond_t *cond);
|
||||
static BOOL (WINAPI *cond_wait)(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
DWORD milliseconds);
|
||||
#else
|
||||
#define cond_init InitializeConditionVariable
|
||||
#define cond_broadcast WakeAllConditionVariable
|
||||
#define cond_signal WakeConditionVariable
|
||||
#define cond_wait SleepConditionVariableCS
|
||||
#endif
|
||||
|
||||
static unsigned __stdcall attribute_align_arg win32thread_worker(void *arg)
|
||||
{
|
||||
@@ -275,8 +268,13 @@ static void w32thread_init(void)
|
||||
(void*)GetProcAddress(kernel_dll, "WakeConditionVariable");
|
||||
cond_wait =
|
||||
(void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS");
|
||||
#else
|
||||
cond_init = InitializeConditionVariable;
|
||||
cond_broadcast = WakeAllConditionVariable;
|
||||
cond_signal = WakeConditionVariable;
|
||||
cond_wait = SleepConditionVariableCS;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif /* FFMPEG_COMPAT_W32PTHREADS_H */
|
||||
#endif /* LIBAV_W32PTHREADS_H */
|
||||
|
260
configure
vendored
260
configure
vendored
@@ -82,7 +82,6 @@ Standard options:
|
||||
--prefix=PREFIX install in PREFIX [$prefix]
|
||||
--bindir=DIR install binaries in DIR [PREFIX/bin]
|
||||
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
|
||||
--docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg]
|
||||
--libdir=DIR install libs in DIR [PREFIX/lib]
|
||||
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
|
||||
--incdir=DIR install includes in DIR [PREFIX/include]
|
||||
@@ -105,7 +104,6 @@ Configuration options:
|
||||
--disable-all disable building components, libraries and programs
|
||||
--enable-incompatible-libav-abi enable incompatible Libav fork ABI [no]
|
||||
--enable-incompatible-fork-abi enable incompatible Libav fork ABI (deprecated) [no]
|
||||
--enable-raise-major increase major version numbers in sonames [no]
|
||||
|
||||
Program options:
|
||||
--disable-programs do not build command line programs
|
||||
@@ -188,13 +186,12 @@ Individual component options:
|
||||
--disable-filters disable all filters
|
||||
|
||||
External library support:
|
||||
--enable-avisynth enable reading of AviSynth script files [no]
|
||||
--enable-avisynth enable reading of AVISynth script files [no]
|
||||
--disable-bzlib disable bzlib [autodetect]
|
||||
--enable-fontconfig enable fontconfig
|
||||
--enable-frei0r enable frei0r video filtering
|
||||
--enable-gnutls enable gnutls [no]
|
||||
--disable-iconv disable iconv [autodetect]
|
||||
--enable-ladspa enable LADSPA audio filtering
|
||||
--enable-libaacplus enable AAC+ encoding via libaacplus [no]
|
||||
--enable-libass enable libass subtitles rendering [no]
|
||||
--enable-libbluray enable BluRay reading using libbluray [no]
|
||||
@@ -204,7 +201,7 @@ External library support:
|
||||
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
|
||||
and libraw1394 [no]
|
||||
--enable-libfaac enable AAC encoding via libfaac [no]
|
||||
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
|
||||
--enable-libfdk-aac enable AAC encoding via libfdk-aac [no]
|
||||
--enable-libflite enable flite (voice synthesis) support via libflite [no]
|
||||
--enable-libfreetype enable libfreetype [no]
|
||||
--enable-libgme enable Game Music Emu via libgme [no]
|
||||
@@ -227,7 +224,6 @@ External library support:
|
||||
--enable-libshine enable fixed-point MP3 encoding via libshine [no]
|
||||
--enable-libsoxr enable Include libsoxr resampling [no]
|
||||
--enable-libspeex enable Speex de/encoding via libspeex [no]
|
||||
--enable-libssh enable SFTP protocol via libssh [no]
|
||||
--enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
|
||||
--enable-libtheora enable Theora encoding via libtheora [no]
|
||||
--enable-libtwolame enable MP2 encoding via libtwolame [no]
|
||||
@@ -245,7 +241,6 @@ External library support:
|
||||
--enable-libxvid enable Xvid encoding via xvidcore,
|
||||
native MPEG-4/Xvid encoder exists [no]
|
||||
--enable-libzmq enable message passing via libzmq [no]
|
||||
--enable-libzvbi enable teletext support via libzvbi [no]
|
||||
--enable-openal enable OpenAL 1.1 capture support [no]
|
||||
--enable-opencl enable OpenCL code
|
||||
--enable-openssl enable openssl [no]
|
||||
@@ -261,7 +256,6 @@ Advanced options (experts only):
|
||||
--target-exec=CMD command to run executables on target
|
||||
--target-path=DIR path to view of build directory on target
|
||||
--target-samples=DIR path to samples directory on target
|
||||
--tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
|
||||
--toolchain=NAME set tool defaults according to NAME
|
||||
--nm=NM use nm tool NM [$nm_default]
|
||||
--ar=AR use archive tool AR [$ar_default]
|
||||
@@ -316,7 +310,6 @@ Optimization options (experts only):
|
||||
--disable-sse42 disable SSE4.2 optimizations
|
||||
--disable-avx disable AVX optimizations
|
||||
--disable-fma4 disable FMA4 optimizations
|
||||
--disable-avx2 disable AVX2 optimizations
|
||||
--disable-armv5te disable armv5te optimizations
|
||||
--disable-armv6 disable armv6 optimizations
|
||||
--disable-armv6t2 disable armv6t2 optimizations
|
||||
@@ -426,7 +419,7 @@ sh_quote(){
|
||||
}
|
||||
|
||||
cleanws(){
|
||||
echo "$@" | sed 's/^ *//;s/ */ /g;s/ *$//;s/\r//g'
|
||||
echo "$@" | sed 's/^ *//;s/ */ /g;s/ *$//'
|
||||
}
|
||||
|
||||
filter(){
|
||||
@@ -729,10 +722,6 @@ add_ldflags(){
|
||||
append LDFLAGS $($ldflags_filter "$@")
|
||||
}
|
||||
|
||||
add_stripflags(){
|
||||
append ASMSTRIPFLAGS "$@"
|
||||
}
|
||||
|
||||
add_extralibs(){
|
||||
prepend extralibs $($ldflags_filter "$@")
|
||||
}
|
||||
@@ -890,20 +879,6 @@ check_ldflags(){
|
||||
test_ldflags "$@" && add_ldflags "$@"
|
||||
}
|
||||
|
||||
test_stripflags(){
|
||||
log test_stripflags "$@"
|
||||
# call check_cc to get a fresh TMPO
|
||||
check_cc <<EOF
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
check_cmd $strip $ASMSTRIPFLAGS "$@" $TMPO
|
||||
}
|
||||
|
||||
check_stripflags(){
|
||||
log check_stripflags "$@"
|
||||
test_stripflags "$@" && add_stripflags "$@"
|
||||
}
|
||||
|
||||
check_header(){
|
||||
log check_header "$@"
|
||||
header=$1
|
||||
@@ -1018,7 +993,7 @@ check_pkg_config(){
|
||||
headers="$2"
|
||||
funcs="$3"
|
||||
shift 3
|
||||
check_cmd $pkg_config --exists --print-errors $pkg || return
|
||||
$pkg_config --exists $pkg 2>/dev/null || return
|
||||
pkg_cflags=$($pkg_config --cflags $pkg)
|
||||
pkg_libs=$($pkg_config --libs $pkg)
|
||||
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
|
||||
@@ -1121,26 +1096,6 @@ require_pkg_config(){
|
||||
add_extralibs $(get_safe ${pkg}_libs)
|
||||
}
|
||||
|
||||
require_libfreetype(){
|
||||
log require_libfreetype "$@"
|
||||
pkg="freetype2"
|
||||
check_cmd $pkg_config --exists --print-errors $pkg \
|
||||
|| die "ERROR: $pkg not found"
|
||||
pkg_cflags=$($pkg_config --cflags $pkg)
|
||||
pkg_libs=$($pkg_config --libs $pkg)
|
||||
{
|
||||
echo "#include <ft2build.h>"
|
||||
echo "#include FT_FREETYPE_H"
|
||||
echo "long check_func(void) { return (long) FT_Init_FreeType; }"
|
||||
echo "int main(void) { return 0; }"
|
||||
} | check_ld "cc" $pkg_cflags $pkg_libs \
|
||||
&& set_safe ${pkg}_cflags $pkg_cflags \
|
||||
&& set_safe ${pkg}_libs $pkg_libs \
|
||||
|| die "ERROR: $pkg not found"
|
||||
add_cflags $(get_safe ${pkg}_cflags)
|
||||
add_extralibs $(get_safe ${pkg}_libs)
|
||||
}
|
||||
|
||||
hostcc_o(){
|
||||
eval printf '%s\\n' $HOSTCC_O
|
||||
}
|
||||
@@ -1204,7 +1159,6 @@ EXTERNAL_LIBRARY_LIST="
|
||||
frei0r
|
||||
gnutls
|
||||
iconv
|
||||
ladspa
|
||||
libaacplus
|
||||
libass
|
||||
libbluray
|
||||
@@ -1235,7 +1189,6 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libshine
|
||||
libsoxr
|
||||
libspeex
|
||||
libssh
|
||||
libstagefright_h264
|
||||
libtheora
|
||||
libtwolame
|
||||
@@ -1251,7 +1204,6 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libxavs
|
||||
libxvid
|
||||
libzmq
|
||||
libzvbi
|
||||
openal
|
||||
opencl
|
||||
openssl
|
||||
@@ -1319,7 +1271,6 @@ CONFIG_LIST="
|
||||
network
|
||||
nonfree
|
||||
pic
|
||||
raise_major
|
||||
rdft
|
||||
runtime_cpudetect
|
||||
safe_bitstream_reader
|
||||
@@ -1385,9 +1336,7 @@ ARCH_EXT_LIST_X86='
|
||||
amd3dnow
|
||||
amd3dnowext
|
||||
avx
|
||||
avx2
|
||||
fma4
|
||||
i686
|
||||
mmx
|
||||
mmxext
|
||||
sse
|
||||
@@ -1512,10 +1461,10 @@ HAVE_LIST="
|
||||
glob
|
||||
gnu_as
|
||||
gsm_h
|
||||
i686
|
||||
ibm_asm
|
||||
inet_aton
|
||||
io_h
|
||||
inline_asm_labels
|
||||
isatty
|
||||
jack_port_get_latency_range
|
||||
kbhit
|
||||
@@ -1547,11 +1496,9 @@ HAVE_LIST="
|
||||
pod2man
|
||||
poll_h
|
||||
posix_memalign
|
||||
pragma_deprecated
|
||||
pthread_cancel
|
||||
rdtsc
|
||||
rsync_contimeout
|
||||
sarestart
|
||||
sched_getaffinity
|
||||
sdl
|
||||
SetConsoleTextAttribute
|
||||
@@ -1585,7 +1532,6 @@ HAVE_LIST="
|
||||
sys_select_h
|
||||
sys_soundcard_h
|
||||
sys_time_h
|
||||
sys_un_h
|
||||
sys_videoio_h
|
||||
termios_h
|
||||
texi2html
|
||||
@@ -1606,7 +1552,6 @@ CONFIG_EXTRA="
|
||||
ac3dsp
|
||||
audio_frame_queue
|
||||
dsputil
|
||||
exif
|
||||
frame_thread_encoder
|
||||
gcrypt
|
||||
golomb
|
||||
@@ -1625,8 +1570,6 @@ CONFIG_EXTRA="
|
||||
mpegvideoenc
|
||||
nettle
|
||||
rangecoder
|
||||
riffdec
|
||||
riffenc
|
||||
rtpdec
|
||||
rtpenc_chain
|
||||
sinewin
|
||||
@@ -1652,7 +1595,6 @@ CMDLINE_SELECT="
|
||||
PATHS_LIST='
|
||||
bindir
|
||||
datadir
|
||||
docdir
|
||||
incdir
|
||||
libdir
|
||||
mandir
|
||||
@@ -1696,7 +1638,6 @@ CMDLINE_SET="
|
||||
target_os
|
||||
target_path
|
||||
target_samples
|
||||
tempprefix
|
||||
toolchain
|
||||
valgrind
|
||||
yasmexe
|
||||
@@ -1731,9 +1672,7 @@ ppc4xx_deps="ppc"
|
||||
|
||||
vis_deps="sparc"
|
||||
|
||||
cpunop_deps="i686"
|
||||
x86_64_select="i686"
|
||||
x86_64_suggest="fast_cmov"
|
||||
x86_64_suggest="fast_cmov i686"
|
||||
|
||||
amd3dnow_deps="mmx"
|
||||
amd3dnowext_deps="amd3dnow"
|
||||
@@ -1747,7 +1686,6 @@ sse4_deps="ssse3"
|
||||
sse42_deps="sse4"
|
||||
avx_deps="sse42"
|
||||
fma4_deps="avx"
|
||||
avx2_deps="avx"
|
||||
|
||||
mmx_external_deps="yasm"
|
||||
mmx_inline_deps="inline_asm"
|
||||
@@ -1796,7 +1734,7 @@ alac_encoder_select="lpc"
|
||||
als_decoder_select="dsputil"
|
||||
amrnb_decoder_select="lsp"
|
||||
amrwb_decoder_select="lsp"
|
||||
amv_decoder_select="dsputil hpeldsp exif"
|
||||
amv_decoder_select="dsputil hpeldsp"
|
||||
amv_encoder_select="aandcttables"
|
||||
ape_decoder_select="dsputil"
|
||||
asv1_decoder_select="dsputil"
|
||||
@@ -1805,7 +1743,6 @@ asv2_decoder_select="dsputil"
|
||||
asv2_encoder_select="dsputil"
|
||||
atrac1_decoder_select="mdct sinewin"
|
||||
atrac3_decoder_select="mdct"
|
||||
avrn_decoder_select="exif"
|
||||
bink_decoder_select="dsputil hpeldsp"
|
||||
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
|
||||
binkaudio_rdft_decoder_select="mdct rdft sinewin"
|
||||
@@ -1852,24 +1789,22 @@ h263i_decoder_select="h263_decoder"
|
||||
h263p_encoder_select="h263_encoder"
|
||||
h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel videodsp"
|
||||
h264_decoder_suggest="error_resilience"
|
||||
hevc_decoder_select="dsputil golomb videodsp"
|
||||
huffyuv_decoder_select="dsputil"
|
||||
huffyuv_encoder_select="dsputil huffman"
|
||||
iac_decoder_select="dsputil fft mdct sinewin"
|
||||
imc_decoder_select="dsputil fft mdct sinewin"
|
||||
indeo3_decoder_select="hpeldsp"
|
||||
interplay_video_decoder_select="hpeldsp"
|
||||
jpegls_decoder_select="dsputil golomb hpeldsp exif"
|
||||
jpegls_decoder_select="dsputil golomb hpeldsp"
|
||||
jpegls_encoder_select="golomb"
|
||||
jv_decoder_select="dsputil"
|
||||
lagarith_decoder_select="dsputil"
|
||||
ljpeg_encoder_select="aandcttables mpegvideoenc"
|
||||
loco_decoder_select="golomb"
|
||||
mdec_decoder_select="dsputil error_resilience mpegvideo"
|
||||
metasound_decoder_select="lsp mdct sinewin"
|
||||
mimic_decoder_select="dsputil hpeldsp"
|
||||
mjpeg_decoder_select="dsputil hpeldsp exif"
|
||||
mjpegb_decoder_select="dsputil hpeldsp exif"
|
||||
mjpeg_decoder_select="dsputil hpeldsp"
|
||||
mjpegb_decoder_select="dsputil hpeldsp"
|
||||
mjpeg_encoder_select="aandcttables dsputil mpegvideoenc"
|
||||
mlp_decoder_select="dsputil mlp_parser"
|
||||
motionpixels_decoder_select="dsputil"
|
||||
@@ -1899,7 +1834,7 @@ msmpeg4v2_encoder_select="h263_encoder"
|
||||
msmpeg4v3_decoder_select="h263_decoder"
|
||||
msmpeg4v3_encoder_select="h263_encoder"
|
||||
mss2_decoder_select="error_resilience vc1_decoder"
|
||||
mxpeg_decoder_select="dsputil hpeldsp exif"
|
||||
mxpeg_decoder_select="dsputil hpeldsp"
|
||||
nellymoser_decoder_select="mdct sinewin"
|
||||
nellymoser_encoder_select="audio_frame_queue mdct sinewin"
|
||||
nuv_decoder_select="dsputil lzo"
|
||||
@@ -1925,7 +1860,7 @@ snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rang
|
||||
sonic_decoder_select="golomb"
|
||||
sonic_encoder_select="golomb"
|
||||
sonic_ls_encoder_select="golomb"
|
||||
sp5x_decoder_select="dsputil hpeldsp exif"
|
||||
sp5x_decoder_select="dsputil hpeldsp"
|
||||
svq1_decoder_select="hpeldsp"
|
||||
svq1_encoder_select="aandcttables dsputil hpeldsp mpegvideoenc"
|
||||
svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp"
|
||||
@@ -1934,7 +1869,7 @@ tak_decoder_select="dsputil"
|
||||
theora_decoder_select="vp3_decoder"
|
||||
tiff_decoder_suggest="zlib"
|
||||
tiff_encoder_suggest="zlib"
|
||||
thp_decoder_select="dsputil hpeldsp exif"
|
||||
thp_decoder_select="dsputil hpeldsp"
|
||||
truehd_decoder_select="mlp_parser"
|
||||
truemotion2_decoder_select="dsputil"
|
||||
truespeech_decoder_select="dsputil"
|
||||
@@ -1953,7 +1888,6 @@ vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp"
|
||||
vp6a_decoder_select="vp6_decoder"
|
||||
vp6f_decoder_select="vp6_decoder"
|
||||
vp8_decoder_select="h264pred videodsp"
|
||||
vp9_decoder_select="videodsp"
|
||||
webp_decoder_select="vp8_decoder"
|
||||
wmapro_decoder_select="mdct sinewin"
|
||||
wmav1_decoder_select="mdct sinewin"
|
||||
@@ -2036,7 +1970,6 @@ wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
|
||||
|
||||
# parsers
|
||||
h264_parser_select="golomb h264chroma h264dsp h264pred h264qpel videodsp"
|
||||
hevc_parser_select="hevc_decoder"
|
||||
mpeg4video_parser_select="error_resilience mpegvideo"
|
||||
mpegvideo_parser_select="error_resilience mpegvideo"
|
||||
vc1_parser_select="mpegvideo"
|
||||
@@ -2046,7 +1979,6 @@ libaacplus_encoder_deps="libaacplus"
|
||||
libcelt_decoder_deps="libcelt"
|
||||
libfaac_encoder_deps="libfaac"
|
||||
libfaac_encoder_select="audio_frame_queue"
|
||||
libfdk_aac_decoder_deps="libfdk_aac"
|
||||
libfdk_aac_encoder_deps="libfdk_aac"
|
||||
libfdk_aac_encoder_select="audio_frame_queue"
|
||||
libgme_demuxer_deps="libgme"
|
||||
@@ -2096,45 +2028,30 @@ libxavs_encoder_deps="libxavs"
|
||||
libxvid_encoder_deps="libxvid"
|
||||
libutvideo_decoder_deps="libutvideo"
|
||||
libutvideo_encoder_deps="libutvideo"
|
||||
libzvbi_teletext_decoder_deps="libzvbi"
|
||||
|
||||
# demuxers / muxers
|
||||
ac3_demuxer_select="ac3_parser"
|
||||
asf_demuxer_select="riffdec"
|
||||
asf_muxer_select="riffenc"
|
||||
asf_stream_muxer_select="asf_muxer"
|
||||
avi_demuxer_select="riffdec"
|
||||
avi_muxer_select="riffenc"
|
||||
avisynth_demuxer_deps="avisynth"
|
||||
avisynth_demuxer_select="riffdec"
|
||||
caf_demuxer_select="riffdec"
|
||||
dirac_demuxer_select="dirac_parser"
|
||||
dts_demuxer_select="dca_parser"
|
||||
dtshd_demuxer_select="dca_parser"
|
||||
dxa_demuxer_select="riffdec"
|
||||
eac3_demuxer_select="ac3_parser"
|
||||
f4v_muxer_select="mov_muxer"
|
||||
flac_demuxer_select="flac_parser"
|
||||
hls_muxer_select="mpegts_muxer"
|
||||
ipod_muxer_select="mov_muxer"
|
||||
ismv_muxer_select="mov_muxer"
|
||||
libnut_demuxer_deps="libnut"
|
||||
libnut_muxer_deps="libnut"
|
||||
matroska_audio_muxer_select="matroska_muxer"
|
||||
matroska_demuxer_select="riffdec"
|
||||
matroska_demuxer_suggest="bzlib lzo zlib"
|
||||
matroska_muxer_select="riffenc"
|
||||
mmf_muxer_select="riffenc"
|
||||
mov_demuxer_select="riffdec"
|
||||
mov_demuxer_suggest="zlib"
|
||||
mov_muxer_select="riffenc rtpenc_chain"
|
||||
mov_muxer_select="rtpenc_chain"
|
||||
mp3_demuxer_select="mpegaudio_parser"
|
||||
mp4_muxer_select="mov_muxer"
|
||||
mpegts_muxer_select="adts_muxer latm_muxer"
|
||||
mpegtsraw_demuxer_select="mpegts_demuxer"
|
||||
mxf_d10_muxer_select="mxf_muxer"
|
||||
nut_muxer_select="riffenc"
|
||||
nuv_demuxer_select="riffdec"
|
||||
ogg_demuxer_select="golomb"
|
||||
psp_muxer_select="mov_muxer"
|
||||
rtp_demuxer_select="sdp_demuxer"
|
||||
@@ -2150,14 +2067,8 @@ tak_demuxer_select="tak_parser"
|
||||
tg2_muxer_select="mov_muxer"
|
||||
tgp_muxer_select="mov_muxer"
|
||||
vobsub_demuxer_select="mpegps_demuxer"
|
||||
w64_demuxer_select="wav_demuxer"
|
||||
w64_muxer_select="wav_muxer"
|
||||
wav_demuxer_select="riffdec"
|
||||
wav_muxer_select="riffenc"
|
||||
webm_muxer_select="riffenc"
|
||||
wtv_demuxer_select="riffdec"
|
||||
xmv_demuxer_select="riffdec"
|
||||
xwma_demuxer_select="riffdec"
|
||||
w64_demuxer_deps="wav_demuxer"
|
||||
w64_muxer_deps="wav_muxer"
|
||||
|
||||
# indevs / outdevs
|
||||
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
|
||||
@@ -2166,10 +2077,8 @@ bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr
|
||||
caca_outdev_deps="libcaca"
|
||||
dshow_indev_deps="IBaseFilter"
|
||||
dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
|
||||
dv1394_indev_deps="dv1394"
|
||||
dv1394_indev_select="dv_demuxer"
|
||||
dv1394_indev_deps="dv1394 dv_demuxer"
|
||||
fbdev_indev_deps="linux_fb_h"
|
||||
fbdev_outdev_deps="linux_fb_h"
|
||||
iec61883_indev_deps="libiec61883"
|
||||
jack_indev_deps="jack_jack_h sem_timedwait"
|
||||
lavfi_indev_deps="avfilter"
|
||||
@@ -2180,7 +2089,6 @@ openal_indev_deps="openal"
|
||||
oss_indev_deps_any="soundcard_h sys_soundcard_h"
|
||||
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
|
||||
pulse_indev_deps="libpulse"
|
||||
pulse_outdev_deps="libpulse"
|
||||
sdl_outdev_deps="sdl"
|
||||
sndio_indev_deps="sndio_h"
|
||||
sndio_outdev_deps="sndio_h"
|
||||
@@ -2210,7 +2118,6 @@ librtmpe_protocol_deps="librtmp"
|
||||
librtmps_protocol_deps="librtmp"
|
||||
librtmpt_protocol_deps="librtmp"
|
||||
librtmpte_protocol_deps="librtmp"
|
||||
libssh_protocol_deps="libssh"
|
||||
mmsh_protocol_select="http_protocol"
|
||||
mmst_protocol_select="network"
|
||||
rtmp_protocol_deps="!librtmp_protocol"
|
||||
@@ -2229,8 +2136,6 @@ tcp_protocol_select="network"
|
||||
tls_protocol_deps_any="openssl gnutls"
|
||||
tls_protocol_select="tcp_protocol"
|
||||
udp_protocol_select="network"
|
||||
unix_protocol_deps="sys_un_h"
|
||||
unix_protocol_select="network"
|
||||
|
||||
# filters
|
||||
aconvert_filter_deps="swresample"
|
||||
@@ -2238,15 +2143,13 @@ amovie_filter_deps="avcodec avformat"
|
||||
aresample_filter_deps="swresample"
|
||||
ass_filter_deps="libass"
|
||||
asyncts_filter_deps="avresample"
|
||||
atempo_filter_deps="avcodec"
|
||||
atempo_filter_select="rdft"
|
||||
atempo_filter_deps="avcodec rdft"
|
||||
azmq_filter_deps="libzmq"
|
||||
blackframe_filter_deps="gpl"
|
||||
boxblur_filter_deps="gpl"
|
||||
colormatrix_filter_deps="gpl"
|
||||
cropdetect_filter_deps="gpl"
|
||||
dctdnoiz_filter_deps="avcodec"
|
||||
dctdnoiz_filter_select="fft"
|
||||
dctdnoiz_filter_deps="avcodec fft"
|
||||
delogo_filter_deps="gpl"
|
||||
deshake_filter_deps="avcodec"
|
||||
deshake_filter_select="dsputil"
|
||||
@@ -2260,31 +2163,27 @@ frei0r_src_filter_extralibs='$ldl'
|
||||
geq_filter_deps="gpl"
|
||||
histeq_filter_deps="gpl"
|
||||
hqdn3d_filter_deps="gpl"
|
||||
hue_filter_deps="gpl"
|
||||
interlace_filter_deps="gpl"
|
||||
kerndeint_filter_deps="gpl"
|
||||
ladspa_filter_deps="ladspa dlopen"
|
||||
mcdeint_filter_deps="avcodec gpl"
|
||||
movie_filter_deps="avcodec avformat"
|
||||
mp_filter_deps="gpl avcodec swscale inline_asm"
|
||||
mpdecimate_filter_deps="gpl avcodec"
|
||||
mptestsrc_filter_deps="gpl"
|
||||
negate_filter_deps="lut_filter"
|
||||
perspective_filter_deps="gpl"
|
||||
noise_filter_deps="gpl"
|
||||
resample_filter_deps="avresample"
|
||||
ocv_filter_deps="libopencv"
|
||||
owdenoise_filter_deps="gpl"
|
||||
pan_filter_deps="swresample"
|
||||
phase_filter_deps="gpl"
|
||||
pp_filter_deps="gpl postproc"
|
||||
pullup_filter_deps="gpl"
|
||||
removelogo_filter_deps="avcodec avformat swscale"
|
||||
sab_filter_deps="gpl swscale"
|
||||
scale_filter_deps="swscale"
|
||||
smartblur_filter_deps="gpl swscale"
|
||||
showspectrum_filter_deps="avcodec"
|
||||
showspectrum_filter_select="rdft"
|
||||
spp_filter_deps="gpl avcodec"
|
||||
spp_filter_select="fft"
|
||||
showspectrum_filter_deps="avcodec rdft"
|
||||
spp_filter_deps="gpl avcodec fft"
|
||||
stereo3d_filter_deps="gpl"
|
||||
subtitles_filter_deps="avformat avcodec libass"
|
||||
super2xsai_filter_deps="gpl"
|
||||
@@ -2307,15 +2206,14 @@ postproc_deps="avutil gpl"
|
||||
swscale_deps="avutil"
|
||||
|
||||
# programs
|
||||
ffmpeg_deps="avcodec avfilter avformat swresample"
|
||||
ffmpeg_deps="avcodec avfilter avformat swscale swresample"
|
||||
ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
|
||||
null_filter
|
||||
setpts_filter trim_filter"
|
||||
ffplay_deps="avcodec avformat swscale swresample sdl"
|
||||
ffplay_select="rdft crop_filter"
|
||||
ffprobe_deps="avcodec avformat"
|
||||
ffserver_deps="avformat fork sarestart"
|
||||
ffserver_select="ffm_muxer rtp_protocol rtsp_demuxer"
|
||||
ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
|
||||
ffserver_extralibs='$ldl'
|
||||
|
||||
# documentation
|
||||
@@ -2333,7 +2231,6 @@ logfile="config.log"
|
||||
prefix_default="/usr/local"
|
||||
bindir_default='${prefix}/bin'
|
||||
datadir_default='${prefix}/share/ffmpeg'
|
||||
docdir_default='${prefix}/share/doc/ffmpeg'
|
||||
incdir_default='${prefix}/include'
|
||||
libdir_default='${prefix}/lib'
|
||||
mandir_default='${prefix}/share/man'
|
||||
@@ -2384,6 +2281,7 @@ enable dxva2 vaapi vdpau
|
||||
|
||||
# build settings
|
||||
SHFLAGS='-shared -Wl,-soname,$$(@F)'
|
||||
FFSERVERLDFLAGS=-Wl,-E
|
||||
LIBPREF="lib"
|
||||
LIBSUF=".a"
|
||||
FULLNAME='$(NAME)$(BUILDSUF)'
|
||||
@@ -2702,11 +2600,7 @@ HOSTEXESUF=$(exesuf $host_os)
|
||||
: ${TMPDIR:=$TMP}
|
||||
: ${TMPDIR:=/tmp}
|
||||
|
||||
if [ -n "$tempprefix" ] ; then
|
||||
mktemp(){
|
||||
echo $tempprefix.${HOSTNAME}.${UID}
|
||||
}
|
||||
elif ! check_cmd mktemp -u XXXXXX; then
|
||||
if ! check_cmd mktemp -u XXXXXX; then
|
||||
# simple replacement for missing mktemp
|
||||
# NOT SAFE FOR GENERAL USE
|
||||
mktemp(){
|
||||
@@ -2769,18 +2663,6 @@ ccc_flags(){
|
||||
done
|
||||
}
|
||||
|
||||
cparser_flags(){
|
||||
for flag; do
|
||||
case $flag in
|
||||
-Wno-switch) echo -Wno-switch-enum ;;
|
||||
-Wno-format-zero-length) ;;
|
||||
-Wdisabled-optimization) ;;
|
||||
-Wno-pointer-sign) echo -Wno-other ;;
|
||||
*) echo $flag ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
msvc_common_flags(){
|
||||
for flag; do
|
||||
case $flag in
|
||||
@@ -2815,7 +2697,7 @@ msvc_flags(){
|
||||
-wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
|
||||
-wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
|
||||
-wd4554 \
|
||||
-wd4273 ;;
|
||||
-wd4996 -wd4273 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@@ -2919,9 +2801,7 @@ probe_cc(){
|
||||
unset _depflags _DEPCMD _DEPFLAGS
|
||||
_flags_filter=echo
|
||||
|
||||
if $_cc --version 2>&1 | grep -q '^GNU assembler'; then
|
||||
true # no-op to avoid reading stdin in following checks
|
||||
elif $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
|
||||
if $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
|
||||
_type=llvm_gcc
|
||||
gcc_extra_ver=$(expr "$($_cc --version | head -n1)" : '.*\((.*)\)')
|
||||
_ident="llvm-gcc $($_cc -dumpversion) $gcc_extra_ver"
|
||||
@@ -3042,7 +2922,7 @@ probe_cc(){
|
||||
_ld_lib='lib%.a'
|
||||
_ld_path='-libpath:'
|
||||
_flags='-nologo'
|
||||
_cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
|
||||
_cflags='-D_USE_MATH_DEFINES -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
|
||||
if [ $pfx = hostcc ]; then
|
||||
append _cflags -Dsnprintf=_snprintf
|
||||
fi
|
||||
@@ -3075,13 +2955,6 @@ probe_cc(){
|
||||
if [ $pfx = hostcc ]; then
|
||||
append _cflags -Dsnprintf=_snprintf
|
||||
fi
|
||||
elif $_cc --version 2>/dev/null | grep -q ^cparser; then
|
||||
_type=cparser
|
||||
_ident=$($_cc --version | head -n1)
|
||||
_depflags='-MMD'
|
||||
_cflags_speed='-O4'
|
||||
_cflags_size='-O2'
|
||||
_flags_filter=cparser_flags
|
||||
fi
|
||||
|
||||
eval ${pfx}_type=\$_type
|
||||
@@ -3156,9 +3029,6 @@ if $ar 2>&1 | grep -q Microsoft; then
|
||||
elif $ar 2>&1 | grep -q 'Texas Instruments'; then
|
||||
arflags="rq"
|
||||
ar_o='$@'
|
||||
elif $ar 2>&1 | grep -q 'Usage: ar.*-X.*any'; then
|
||||
arflags='-Xany -r -c'
|
||||
ar_o='$@'
|
||||
else
|
||||
arflags="rc"
|
||||
ar_o='$@'
|
||||
@@ -3208,7 +3078,7 @@ case "$arch" in
|
||||
aarch64|arm64)
|
||||
arch="aarch64"
|
||||
;;
|
||||
arm*|iPad*|iPhone*)
|
||||
arm*|iPad*)
|
||||
arch="arm"
|
||||
;;
|
||||
mips*|IP*)
|
||||
@@ -3531,9 +3401,7 @@ enabled spic && enable_weak pic
|
||||
# OS specific
|
||||
case $target_os in
|
||||
aix)
|
||||
SHFLAGS=-shared
|
||||
add_cppflags '-I\$(SRC_PATH)/compat/aix'
|
||||
enabled shared && add_ldflags -Wl,-brtl
|
||||
;;
|
||||
haiku)
|
||||
prefix_default="/boot/common"
|
||||
@@ -3541,6 +3409,7 @@ case $target_os in
|
||||
host_libs=
|
||||
;;
|
||||
sunos)
|
||||
FFSERVERLDFLAGS=""
|
||||
SHFLAGS='-shared -Wl,-h,$$(@F)'
|
||||
enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
|
||||
network_extralibs="-lsocket -lnsl"
|
||||
@@ -3588,6 +3457,7 @@ case $target_os in
|
||||
SLIBSUF=".dylib"
|
||||
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
|
||||
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
|
||||
FFSERVERLDFLAGS=-Wl,-bind_at_load
|
||||
objformat="macho"
|
||||
enabled x86_64 && objformat="macho64"
|
||||
enabled_any pic shared ||
|
||||
@@ -3635,7 +3505,7 @@ case $target_os in
|
||||
# Link to the import library instead of the normal static library
|
||||
# for shared libs.
|
||||
LD_LIB='%.lib'
|
||||
# Cannot build both shared and static libs with MSVC or icl.
|
||||
# Cannot build shared and static libs at the same time with MSVC.
|
||||
disable static
|
||||
fi
|
||||
shlibdir_default="$bindir_default"
|
||||
@@ -3687,6 +3557,7 @@ case $target_os in
|
||||
add_cppflags -D_GNU_SOURCE
|
||||
add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
|
||||
SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
|
||||
FFSERVERLDFLAGS=""
|
||||
LIBSUF="_s.a"
|
||||
SLIBPREF=""
|
||||
SLIBSUF=".dll"
|
||||
@@ -3727,6 +3598,7 @@ case $target_os in
|
||||
;;
|
||||
osf1)
|
||||
add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT
|
||||
FFSERVERLDFLAGS=
|
||||
;;
|
||||
minix)
|
||||
;;
|
||||
@@ -3853,7 +3725,6 @@ die_license_disabled gpl libvidstab
|
||||
die_license_disabled gpl libx264
|
||||
die_license_disabled gpl libxavs
|
||||
die_license_disabled gpl libxvid
|
||||
die_license_disabled gpl libzvbi
|
||||
die_license_disabled gpl x11grab
|
||||
|
||||
die_license_disabled nonfree libaacplus
|
||||
@@ -3903,10 +3774,6 @@ void foo(char * $restrict_keyword p);
|
||||
EOF
|
||||
done
|
||||
|
||||
check_cc <<EOF && enable pragma_deprecated
|
||||
void foo(void) { _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") }
|
||||
EOF
|
||||
|
||||
check_cc <<EOF && enable attribute_packed
|
||||
struct { int x; } __attribute__((packed)) x;
|
||||
EOF
|
||||
@@ -3920,8 +3787,6 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
|
||||
EOF
|
||||
od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
|
||||
|
||||
check_inline_asm inline_asm_labels '"1:\n"'
|
||||
|
||||
if enabled alpha; then
|
||||
|
||||
check_cflags -mieee
|
||||
@@ -3995,9 +3860,7 @@ elif enabled ppc; then
|
||||
|
||||
# AltiVec flags: The FSF version of GCC differs from the Apple version
|
||||
if enabled altivec; then
|
||||
if ! enabled_any pic ppc64; then
|
||||
nogas=warn
|
||||
fi
|
||||
nogas=warn
|
||||
check_cflags -maltivec -mabi=altivec &&
|
||||
{ check_header altivec.h && inc_altivec_h="#include <altivec.h>" ; } ||
|
||||
check_cflags -faltivec
|
||||
@@ -4065,11 +3928,11 @@ EOF
|
||||
elf*) enabled debug && append YASMFLAGS $yasm_debug ;;
|
||||
esac
|
||||
|
||||
check_yasm "movbe ecx, [5]" && enable yasm ||
|
||||
die "yasm/nasm not found or too old. Use --disable-yasm for a crippled build."
|
||||
check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx_external avresample
|
||||
check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
|
||||
die "yasm not found, use --disable-yasm for a crippled build"
|
||||
check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx_external
|
||||
check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
|
||||
check_yasm "CPU amdnop" && enable cpunop
|
||||
check_yasm "CPU amdnop" && enabled i686 && enable cpunop
|
||||
fi
|
||||
|
||||
case "$cpu" in
|
||||
@@ -4165,7 +4028,6 @@ check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync
|
||||
check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
|
||||
check_builtin atomic_cas_ptr atomic.h "void **ptr; void *oldval, *newval; atomic_cas_ptr(ptr, oldval, newval)"
|
||||
check_builtin MemoryBarrier windows.h "MemoryBarrier()"
|
||||
check_builtin sarestart signal.h "SA_RESTART"
|
||||
check_func sysconf
|
||||
check_func sysctl
|
||||
check_func usleep
|
||||
@@ -4200,7 +4062,6 @@ check_header sys/param.h
|
||||
check_header sys/resource.h
|
||||
check_header sys/select.h
|
||||
check_header sys/time.h
|
||||
check_header sys/un.h
|
||||
check_header termios.h
|
||||
check_header unistd.h
|
||||
check_header vdpau/vdpau.h
|
||||
@@ -4270,7 +4131,6 @@ enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } ||
|
||||
enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
|
||||
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
|
||||
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
|
||||
enabled ladspa && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
|
||||
enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
|
||||
enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
|
||||
enabled libass && require_pkg_config libass ass/ass.h ass_library_init
|
||||
@@ -4283,8 +4143,8 @@ enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersio
|
||||
enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
|
||||
flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
|
||||
enabled libflite && require2 libflite "flite/flite.h" flite_init $flite_libs
|
||||
enabled libfreetype && require_libfreetype
|
||||
enabled libgme && require libgme gme/gme.h gme_new_emu -lgme -lstdc++
|
||||
enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
|
||||
enabled libgme && require libgme gme/gme.h gme_new_emu -lgme
|
||||
enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
|
||||
check_lib "${gsm_hdr}" gsm_create -lgsm && break;
|
||||
done || die "ERROR: libgsm not found"; }
|
||||
@@ -4303,9 +4163,8 @@ enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h p
|
||||
enabled libquvi && require_pkg_config libquvi quvi/quvi.h quvi_init
|
||||
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
|
||||
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
|
||||
enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer
|
||||
enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_frame
|
||||
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
|
||||
enabled libssh && require_pkg_config libssh libssh/sftp.h sftp_init
|
||||
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
|
||||
enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
|
||||
media/stagefright/MediaBufferGroup.h media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h
|
||||
@@ -4334,7 +4193,6 @@ enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &
|
||||
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
|
||||
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
|
||||
enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new
|
||||
enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi
|
||||
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
|
||||
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
|
||||
die "ERROR: openal not found"; } &&
|
||||
@@ -4343,7 +4201,7 @@ enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lO
|
||||
enabled opencl && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
|
||||
check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
|
||||
die "ERROR: opencl not found"; } &&
|
||||
{ ! enabled_any w32threads os2threads ||
|
||||
{ enabled_any w32threads os2threads &&
|
||||
die "opencl currently needs --enable-pthreads or --disable-w32threads"; } &&
|
||||
{ check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
|
||||
check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
|
||||
@@ -4479,10 +4337,6 @@ check_ldflags -Wl,--warn-common
|
||||
check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
|
||||
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
|
||||
|
||||
# add some strip flags
|
||||
# -wN '..@*' is more selective than -x, but not available everywhere.
|
||||
check_stripflags -wN \'..@*\' || check_stripflags -x
|
||||
|
||||
enabled xmm_clobber_test &&
|
||||
check_ldflags -Wl,--wrap,avcodec_open2 \
|
||||
-Wl,--wrap,avcodec_decode_audio4 \
|
||||
@@ -4490,7 +4344,6 @@ enabled xmm_clobber_test &&
|
||||
-Wl,--wrap,avcodec_decode_subtitle2 \
|
||||
-Wl,--wrap,avcodec_encode_audio2 \
|
||||
-Wl,--wrap,avcodec_encode_video \
|
||||
-Wl,--wrap,avcodec_encode_video2 \
|
||||
-Wl,--wrap,avcodec_encode_subtitle \
|
||||
-Wl,--wrap,sws_scale ||
|
||||
disable xmm_clobber_test
|
||||
@@ -4584,9 +4437,6 @@ elif enabled clang; then
|
||||
check_cflags -Werror=implicit-function-declaration
|
||||
check_cflags -Werror=missing-prototypes
|
||||
check_cflags -Werror=return-type
|
||||
elif enabled cparser; then
|
||||
add_cflags -Wno-missing-variable-declarations
|
||||
add_cflags -Wno-empty-statement
|
||||
elif enabled armcc; then
|
||||
# 2523: use of inline assembler is deprecated
|
||||
add_cflags -W${armcc_opt},--diag_suppress=2523
|
||||
@@ -4602,16 +4452,11 @@ elif enabled pathscale; then
|
||||
elif enabled_any msvc icl; then
|
||||
enabled x86_32 && disable aligned_stack
|
||||
enabled_all x86_32 debug && add_cflags -Oy-
|
||||
enabled debug && add_ldflags -debug
|
||||
enable pragma_deprecated
|
||||
if enabled icl; then
|
||||
# -Qansi-alias is basically -fstrict-aliasing, but does not work
|
||||
# (correctly) on icl 13.x.
|
||||
check_cpp_condition "windows.h" "__ICL < 1300 || __ICL >= 1400" &&
|
||||
add_cflags -Qansi-alias
|
||||
# basically -fstrict-aliasing that does not work (correctly) on icl 13.x
|
||||
check_cpp_condition "windows.h" "__ICL < 1300" && add_cflags -Qansi-alias
|
||||
# icl will pass the inline asm tests but inline asm is currently
|
||||
# not supported (build will fail)
|
||||
disabled inline_asm || warn "inline asm disabled due to issues with it in ICL"
|
||||
disable inline_asm
|
||||
fi
|
||||
fi
|
||||
@@ -4629,8 +4474,6 @@ enable frame_thread_encoder
|
||||
enabled_any $THREADS_LIST && enable threads
|
||||
enabled_any $ATOMICS_LIST && enable atomics_native
|
||||
|
||||
enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
|
||||
|
||||
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
|
||||
|
||||
check_deps $CONFIG_LIST \
|
||||
@@ -4739,7 +4582,6 @@ echo "threading support ${thread_type-no}"
|
||||
echo "safe bitstream reader ${safe_bitstream_reader-no}"
|
||||
echo "SDL support ${sdl-no}"
|
||||
echo "opencl enabled ${opencl-no}"
|
||||
echo "libzvbi enabled ${libzvbi-no}"
|
||||
echo "texi2html enabled ${texi2html-no}"
|
||||
echo "perl enabled ${perl-no}"
|
||||
echo "pod2man enabled ${pod2man-no}"
|
||||
@@ -4791,7 +4633,6 @@ SHLIBDIR=\$(DESTDIR)$shlibdir
|
||||
INCDIR=\$(DESTDIR)$incdir
|
||||
BINDIR=\$(DESTDIR)$bindir
|
||||
DATADIR=\$(DESTDIR)$datadir
|
||||
DOCDIR=\$(DESTDIR)$docdir
|
||||
MANDIR=\$(DESTDIR)$mandir
|
||||
SRC_PATH=$source_path
|
||||
ifndef MAIN_MAKEFILE
|
||||
@@ -4813,9 +4654,9 @@ AR=$ar
|
||||
ARFLAGS=$arflags
|
||||
AR_O=$ar_o
|
||||
RANLIB=$ranlib
|
||||
STRIP=$strip
|
||||
CP=cp -p
|
||||
LN_S=$ln_s
|
||||
STRIP=$strip
|
||||
CPPFLAGS=$CPPFLAGS
|
||||
CFLAGS=$CFLAGS
|
||||
CXXFLAGS=$CXXFLAGS
|
||||
@@ -4832,8 +4673,8 @@ LD_LIB=$LD_LIB
|
||||
LD_PATH=$LD_PATH
|
||||
DLLTOOL=$dlltool
|
||||
LDFLAGS=$LDFLAGS
|
||||
LDFLAGS-ffserver=$FFSERVERLDFLAGS
|
||||
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
|
||||
ASMSTRIPFLAGS=$ASMSTRIPFLAGS
|
||||
YASMFLAGS=$YASMFLAGS
|
||||
BUILDSUF=$build_suffix
|
||||
PROGSSUF=$progs_suffix
|
||||
@@ -4897,7 +4738,6 @@ get_version(){
|
||||
name=$(toupper $lcname)
|
||||
file=$source_path/$lcname/version.h
|
||||
eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
|
||||
enabled raise_major && eval ${name}_VERSION_MAJOR=$((${name}_VERSION_MAJOR+100))
|
||||
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
||||
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
|
||||
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
|
||||
@@ -5013,7 +4853,7 @@ Description: $comment
|
||||
Version: $version
|
||||
Requires: $requires
|
||||
Conflicts:
|
||||
Libs: -L\${libdir} -Wl,-rpath,\${libdir} -l${shortname} $(enabled shared || echo $libs)
|
||||
Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
|
||||
Cflags: -I\${includedir}
|
||||
EOF
|
||||
}
|
||||
|
176
doc/APIchanges
176
doc/APIchanges
@@ -15,96 +15,24 @@ libavutil: 2012-10-22
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2013-10-27 - xxxxxxx - lavc 55.39.100 - avcodec.h
|
||||
Add CODEC_CAP_DELAY support to avcodec_decode_subtitle2.
|
||||
|
||||
2013-10-27 - xxxxxxx - lavu 52.48.100 - parseutils.h
|
||||
Add av_get_known_color_name().
|
||||
|
||||
2013-10-17 - xxxxxxx - lavu 52.47.100 - opt.h
|
||||
Add AV_OPT_TYPE_CHANNEL_LAYOUT and channel layout option handlers
|
||||
av_opt_get_channel_layout() and av_opt_set_channel_layout().
|
||||
|
||||
2013-10-xx - xxxxxxx -libswscale 2.5.101 - options.c
|
||||
Change default scaler to bicubic
|
||||
|
||||
2013-10-03 - xxxxxxx - lavc 55.34.100 - avcodec.h
|
||||
Add av_codec_get_max_lowres()
|
||||
|
||||
2013-10-02 - xxxxxxx - lavf 55.19.100 - avformat.h
|
||||
Add audio/video/subtitle AVCodec fields to AVFormatContext to force specific
|
||||
decoders
|
||||
|
||||
2013-08-xx - xxxxxxx - lavfi 3.11.0 - avfilter.h
|
||||
Add AVFilterGraph.execute and AVFilterGraph.opaque for custom slice threading
|
||||
implementations.
|
||||
|
||||
2013-09-21 - xxxxxxx - lavu 52.16.0 - pixfmt.h
|
||||
Add interleaved 4:2:2 8/10-bit formats AV_PIX_FMT_NV16 and
|
||||
AV_PIX_FMT_NV20.
|
||||
|
||||
2013-09-16 - c74c3fb / 3feb3d6 - lavu 52.44.100 / 52.15.0 - mem.h
|
||||
Add av_reallocp.
|
||||
|
||||
2013-09-04 - 3e1f507 - lavc 55.31.101 - avcodec.h
|
||||
avcodec_close() argument can be NULL.
|
||||
|
||||
2013-09-04 - 36cd017 - lavf 55.16.101 - avformat.h
|
||||
avformat_close_input() argument can be NULL and point on NULL.
|
||||
|
||||
2013-08-29 - e31db62 - lavf 55.15.100 - avformat.h
|
||||
Add av_format_get_probe_score().
|
||||
|
||||
2013-08-15 - 1e0e193 - lsws 2.5.100 -
|
||||
Add a sws_dither AVOption, allowing to set the dither algorithm used
|
||||
|
||||
2013-08-xx - xxxxxxx - lavc 55.27.100 - vdpau.h
|
||||
Add a render2 alternative to the render callback function.
|
||||
|
||||
2013-08-xx - xxxxxxx - lavc 55.26.100 - vdpau.h
|
||||
Add allocation function for AVVDPAUContext, allowing
|
||||
to extend it in the future without breaking ABI/API.
|
||||
|
||||
2013-08-10 - 67a580f / 5a9a9d4 - lavc 55.25.100 / 55.16.0 - avcodec.h
|
||||
Extend AVPacket API with av_packet_unref, av_packet_ref,
|
||||
av_packet_move_ref, av_packet_copy_props, av_packet_free_side_data.
|
||||
|
||||
2013-08-05 - 9547e3e / f824535 - lavc 55.22.100 / 55.13.0 - avcodec.h
|
||||
Deprecate the bitstream-related members from struct AVVDPAUContext.
|
||||
The bistream buffers no longer need to be explicitly freed.
|
||||
|
||||
2013-08-05 - 3b805dc / 549294f - lavc 55.21.100 / 55.12.0 - avcodec.h
|
||||
Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL
|
||||
and select the AV_PIX_FMT_VDPAU format with get_format() instead.
|
||||
|
||||
2013-08-05 - 4ee0984 / a0ad5d0 - lavu 52.41.100 / 52.14.0 - pixfmt.h
|
||||
Deprecate AV_PIX_FMT_VDPAU_*. Use AV_PIX_FMT_VDPAU instead.
|
||||
|
||||
2013-08-02 - 82fdfe8 / a8b1927 - lavc 55.20.100 / 55.11.0 - avcodec.h
|
||||
Add output_picture_number to AVCodecParserContext.
|
||||
|
||||
2013-07-23 - abc8110 - lavc 55.19.100 - avcodec.h
|
||||
Add avcodec_chroma_pos_to_enum()
|
||||
Add avcodec_enum_to_chroma_pos()
|
||||
|
||||
2013-07-03 - 838bd73 - lavfi 3.78.100 - avfilter.h
|
||||
2013-07-03 - xxxxxxx - lavfi 3.78.100 - avfilter.h
|
||||
Deprecate avfilter_graph_parse() in favor of the equivalent
|
||||
avfilter_graph_parse_ptr().
|
||||
|
||||
2013-06-24 - af5f9c0 / 95d5246 - lavc 55.17.100 / 55.10.0 - avcodec.h
|
||||
2013-06-xx - xxxxxxx - lavc 55.10.0 - avcodec.h
|
||||
Add MPEG-2 AAC profiles
|
||||
|
||||
2013-06-25 - af5f9c0 / 95d5246 - lavf 55.10.100 - avformat.h
|
||||
2013-06-xx - xxxxxxx - lavf 55.10.100 - avformat.h
|
||||
Add AV_DISPOSITION_* flags to indicate text track kind.
|
||||
|
||||
2013-06-15 - 99b8cd0 - lavu 52.36.100
|
||||
2013-06-xx - xxxxxxx - lavu 52.36.100
|
||||
Add AVRIPEMD:
|
||||
av_ripemd_alloc()
|
||||
av_ripemd_init()
|
||||
av_ripemd_update()
|
||||
av_ripemd_final()
|
||||
|
||||
2013-06-04 - 30b491f / fc962d4 - lavu 52.35.100 / 52.13.0 - mem.h
|
||||
2013-06-05 - fc962d4 - lavu 52.13.0 - mem.h
|
||||
Add av_realloc_array and av_reallocp_array
|
||||
|
||||
2013-05-30 - 682b227 - lavu 52.35.100
|
||||
@@ -114,55 +42,55 @@ API changes, most recent first:
|
||||
av_sha512_update()
|
||||
av_sha512_final()
|
||||
|
||||
2013-05-24 - 8d4e969 / 129bb23 - lavfi 3.10.0 / 3.70.100 - avfilter.h
|
||||
2013-05-24 - xxxxxxx - lavfi 3.70.100 - avfilter.h
|
||||
Add support for slice multithreading to lavfi. Filters supporting threading
|
||||
are marked with AVFILTER_FLAG_SLICE_THREADS.
|
||||
New fields AVFilterContext.thread_type, AVFilterGraph.thread_type and
|
||||
AVFilterGraph.nb_threads (accessible directly or through AVOptions) may be
|
||||
used to configure multithreading.
|
||||
|
||||
2013-05-24 - fe40a9f / 2a6eaea - lavu 52.12.0 / 52.34.100 - cpu.h
|
||||
2013-05-24 - xxxxxxx - lavu 52.34.100 - cpu.h
|
||||
Add av_cpu_count() function for getting the number of logical CPUs.
|
||||
|
||||
2013-05-24 - 0c25c39 / b493847 - lavc 55.7.0 / 55.12.100 - avcodec.h
|
||||
2013-05-24 - xxxxxxx - lavc 55.12.100 - avcodec.h
|
||||
Add picture_structure to AVCodecParserContext.
|
||||
|
||||
2013-05-17 - 3a751ea - lavu 52.33.100 - opt.h
|
||||
2013-05-17 - xxxxxxx - lavu 52.33.100 - opt.h
|
||||
Add AV_OPT_TYPE_COLOR value to AVOptionType enum.
|
||||
|
||||
2013-05-13 - e398416 - lavu 52.31.100 - mem.h
|
||||
2013-05-13 - xxxxxxx - lavu 52.31.100 - mem.h
|
||||
Add av_dynarray2_add().
|
||||
|
||||
2013-05-12 - 1776177 - lavfi 3.65.100
|
||||
2013-05-12 - xxxxxxx - lavfi 3.65.100
|
||||
Add AVFILTER_FLAG_SUPPORT_TIMELINE* filter flags.
|
||||
|
||||
2013-04-19 - 380cfce - lavc 55.4.100
|
||||
2013-04-19 - xxxxxxx - lavc 55.4.100
|
||||
Add AV_CODEC_PROP_TEXT_SUB property for text based subtitles codec.
|
||||
|
||||
2013-04-18 - 7c1a002 - lavf 55.3.100
|
||||
2013-04-18 - xxxxxxx - lavf 55.3.100
|
||||
The matroska demuxer can now output proper verbatim ASS packets. It will
|
||||
become the default starting lavf 56.0.100.
|
||||
|
||||
2013-04-10 - af0d270 - lavu 25.26.100 - avutil.h,opt.h
|
||||
2013-04-10 - xxxxxxx - lavu 25.26.100 - avutil.h,opt.h
|
||||
Add av_int_list_length()
|
||||
and av_opt_set_int_list().
|
||||
|
||||
2013-03-30 - 5c73645 - lavu 52.24.100 - samplefmt.h
|
||||
2013-03-30 - xxxxxxx - lavu 52.24.100 - samplefmt.h
|
||||
Add av_samples_alloc_array_and_samples().
|
||||
|
||||
2013-03-29 - ef7b6b4 - lavf 55.1.100 - avformat.h
|
||||
2013-03-29 - xxxxxxx - lavf 55.1.100 - avformat.h
|
||||
Add av_guess_frame_rate()
|
||||
|
||||
2013-03-20 - 8d928a9 - lavu 52.22.100 - opt.h
|
||||
2013-03-20 - xxxxxxx - lavu 52.22.100 - opt.h
|
||||
Add AV_OPT_TYPE_DURATION value to AVOptionType enum.
|
||||
|
||||
2013-03-17 - 7aa9af5 - lavu 52.20.100 - opt.h
|
||||
2013-03-17 - xxxxxx - lavu 52.20.100 - opt.h
|
||||
Add AV_OPT_TYPE_VIDEO_RATE value to AVOptionType enum.
|
||||
|
||||
2013-03-07 - 9767ec6 - lavu 52.18.100 - avstring.h,bprint.h
|
||||
2013-03-07 - xxxxxx - lavu 52.18.100 - avstring.h,bprint.h
|
||||
Add av_escape() and av_bprint_escape() API.
|
||||
|
||||
2013-02-24 - b59cd08 - lavfi 3.41.100 - buffersink.h
|
||||
2013-02-24 - xxxxxx - lavfi 3.41.100 - buffersink.h
|
||||
Add sample_rates field to AVABufferSinkParams.
|
||||
|
||||
2013-01-17 - a1a707f - lavf 54.61.100
|
||||
@@ -175,7 +103,7 @@ API changes, most recent first:
|
||||
Add AVFilterLink.channels, avfilter_link_get_channels()
|
||||
and avfilter_ref_get_channels().
|
||||
|
||||
2012-12-15 - 96d815fc - lavc 54.80.100 - avcodec.h
|
||||
2012-12-15 - 2ada584d - lavc 54.80.100 - avcodec.h
|
||||
Add pkt_size field to AVFrame.
|
||||
|
||||
2012-11-25 - c70ec631 - lavu 52.9.100 - opt.h
|
||||
@@ -288,52 +216,52 @@ API changes, most recent first:
|
||||
2012-03-26 - a67d9cf - lavfi 2.66.100
|
||||
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
||||
|
||||
2013-05-15 - ff46809 / e6c4ac7 - lavu 52.32.100 / 52.11.0 - pixdesc.h
|
||||
2013-05-xx - xxxxxxx - lavu 52.11.0 - pixdesc.h
|
||||
Replace PIX_FMT_* flags with AV_PIX_FMT_FLAG_*.
|
||||
|
||||
2013-04-03 - 6fc58a8 / 507b1e4 - lavc 55.7.100 / 55.4.0 - avcodec.h
|
||||
2013-04-xx - xxxxxxx - lavc 55.4.0 - avcodec.h
|
||||
Add field_order to AVCodecParserContext.
|
||||
|
||||
2013-04-19 - f4b05cd / 5e83d9a - lavc 55.5.100 / 55.2.0 - avcodec.h
|
||||
2013-03-xx - xxxxxxx - lavc 55.2.0 - avcodec.h
|
||||
Add CODEC_FLAG_UNALIGNED to allow decoders to produce unaligned output.
|
||||
|
||||
2013-04-11 - lavfi 3.53.100 / 3.8.0
|
||||
231fd44 / 38f0c07 - Move all content from avfiltergraph.h to avfilter.h. Deprecate
|
||||
2013-04-11 - lavfi 3.8.0
|
||||
38f0c07 - Move all content from avfiltergraph.h to avfilter.h. Deprecate
|
||||
avfilterhraph.h, user applications should include just avfilter.h
|
||||
86070b8 / bc1a985 - Add avfilter_graph_alloc_filter(), deprecate avfilter_open() and
|
||||
bc1a985 - Add avfilter_graph_alloc_filter(), deprecate avfilter_open() and
|
||||
avfilter_graph_add_filter().
|
||||
4fde705 / 1113672 - Add AVFilterContext.graph pointing to the AVFilterGraph that contains the
|
||||
1113672 - Add AVFilterContext.graph pointing to the AVFilterGraph that contains the
|
||||
filter.
|
||||
710b0aa / 48a5ada - Add avfilter_init_str(), deprecate avfilter_init_filter().
|
||||
46de9ba / 1ba95a9 - Add avfilter_init_dict().
|
||||
16fc24b / 7cdd737 - Add AVFilter.flags field and AVFILTER_FLAG_DYNAMIC_{INPUTS,OUTPUTS} flags.
|
||||
f4db6bf / 7e8fe4b - Add avfilter_pad_count() for counting filter inputs/outputs.
|
||||
835cc0f / fa2a34c - Add avfilter_next(), deprecate av_filter_next().
|
||||
48a5ada - Add avfilter_init_str(), deprecate avfilter_init_filter().
|
||||
1ba95a9 - Add avfilter_init_dict().
|
||||
7cdd737 - Add AVFilter.flags field and AVFILTER_FLAG_DYNAMIC_{INPUTS,OUTPUTS} flags.
|
||||
7e8fe4b - Add avfilter_pad_count() for counting filter inputs/outputs.
|
||||
fa2a34c - Add avfilter_next(), deprecate av_filter_next().
|
||||
Deprecate avfilter_uninit().
|
||||
|
||||
2013-04-09 - lavfi 3.51.100 / 3.7.0 - avfilter.h
|
||||
0594ef0 / b439c99 - Add AVFilter.priv_class for exporting filter options through the
|
||||
2013-04-09 - lavfi 3.7.0 - avfilter.h
|
||||
b439c99 - Add AVFilter.priv_class for exporting filter options through the
|
||||
AVOptions API in the similar way private options work in lavc and lavf.
|
||||
44d4488 / 8114c10 - Add avfilter_get_class().
|
||||
8114c10 - Add avfilter_get_class().
|
||||
Switch all filters to use AVOptions.
|
||||
|
||||
2013-03-19 - 17ebef2 / 2c328a9 - lavu 52.20.100 / 52.9.0 - pixdesc.h
|
||||
2013-03-19 - 2c328a9 - lavu 52.9.0 - pixdesc.h
|
||||
Add av_pix_fmt_count_planes() function for counting planes in a pixel format.
|
||||
|
||||
2013-03-16 - ecade98 / 42c7c61 - lavfi 3.47.100 / 3.6.0
|
||||
2013-03-16 - 42c7c61 - lavfi 3.6.0
|
||||
Add AVFilterGraph.nb_filters, deprecate AVFilterGraph.filter_count.
|
||||
|
||||
2013-03-08 - Reference counted buffers - lavu 52.8.0, lavc 55.0.100 / 55.0.0, lavf 55.0.100 / 55.0.0,
|
||||
lavd 54.4.100 / 54.0.0, lavfi 3.5.0
|
||||
36099df / 8e401db, 532f31a / 1cec062 - add a new API for reference counted buffers and buffer
|
||||
2013-03-08 - Reference counted buffers - lavu 52.8.0, lavc 55.0.0, lavf 55.0.0,
|
||||
lavd 54.0.0, lavfi 3.5.0
|
||||
8e401db, 1cec062 - add a new API for reference counted buffers and buffer
|
||||
pools (new header libavutil/buffer.h).
|
||||
2653e12 / 1afddbe - add AVPacket.buf to allow reference counting for the AVPacket data.
|
||||
1afddbe - add AVPacket.buf to allow reference counting for the AVPacket data.
|
||||
Add av_packet_from_data() function for constructing packets from
|
||||
av_malloc()ed data.
|
||||
c4e8821 / 7ecc2d4 - move AVFrame from lavc to lavu (new header libavutil/frame.h), add
|
||||
7ecc2d4 - move AVFrame from lavc to lavu (new header libavutil/frame.h), add
|
||||
AVFrame.buf/extended_buf to allow reference counting for the AVFrame
|
||||
data. Add new API for working with reference-counted AVFrames.
|
||||
80e9e63 / 759001c - add the refcounted_frames field to AVCodecContext to make audio and
|
||||
759001c - add the refcounted_frames field to AVCodecContext to make audio and
|
||||
video decoders return reference-counted frames. Add get_buffer2()
|
||||
callback to AVCodecContext which allocates reference-counted frames.
|
||||
Add avcodec_default_get_buffer2() as the default get_buffer2()
|
||||
@@ -351,30 +279,30 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
|
||||
* qscale_table, qstride, qscale_type, mbskip_table, motion_val,
|
||||
mb_type, dct_coeff, ref_index -- mpegvideo-specific tables,
|
||||
which are not exported anymore.
|
||||
a05a44e / 7e35037 - switch libavfilter to use AVFrame instead of AVFilterBufferRef. Add
|
||||
7e35037 - switch libavfilter to use AVFrame instead of AVFilterBufferRef. Add
|
||||
av_buffersrc_add_frame(), deprecate av_buffersrc_buffer().
|
||||
Add av_buffersink_get_frame() and av_buffersink_get_samples(),
|
||||
deprecate av_buffersink_read() and av_buffersink_read_samples().
|
||||
Deprecate AVFilterBufferRef and all functions for working with it.
|
||||
|
||||
2013-03-17 - 6c17ff8 / 12c5c1d - lavu 52.19.100 / 52.8.0 - avstring.h
|
||||
2013-03-17 - 12c5c1d - lavu 52.8.0 - avstring.h
|
||||
Add av_isdigit, av_isgraph, av_isspace, av_isxdigit.
|
||||
|
||||
2013-02-23 - 71cf094 / 9f12235 - lavfi 3.40.100 / 3.4.0 - avfiltergraph.h
|
||||
2013-02-23 - 9f12235 - lavfi 3.4.0 - avfiltergraph.h
|
||||
Add resample_lavr_opts to AVFilterGraph for setting libavresample options
|
||||
for auto-inserted resample filters.
|
||||
|
||||
2013-01-25 - e7e14bc / 38c1466 - lavu 52.17.100 / 52.7.0 - dict.h
|
||||
2013-01-25 - 38c1466 - lavu 52.7.0 - dict.h
|
||||
Add av_dict_parse_string() to set multiple key/value pairs at once from a
|
||||
string.
|
||||
|
||||
2013-01-25 - 25be630 / b85a5e8 - lavu 52.16.100 / 52.6.0 - avstring.h
|
||||
2013-01-25 - b85a5e8 - lavu 52.6.0 - avstring.h
|
||||
Add av_strnstr()
|
||||
|
||||
2013-01-15 - e7e0186 / 8ee288d - lavu 52.15.100 / 52.5.0 - hmac.h
|
||||
2013-01-15 - 8ee288d - lavu 52.5.0 - hmac.h
|
||||
Add AVHMAC.
|
||||
|
||||
2013-01-13 - 8ee7b38 / 44e065d - lavc 54.87.100 / 54.36.0 - vdpau.h
|
||||
2013-01-13 - 44e065d - lavc 54.87.100 / 54.36.0 - vdpau.h
|
||||
Add AVVDPAUContext struct for VDPAU hardware-accelerated decoding.
|
||||
|
||||
2013-01-12 - dae382b / 169fb94 - lavu 52.14.100 / 52.4.0 - pixdesc.h
|
||||
@@ -462,7 +390,7 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
|
||||
2012-07-29 - 7c26761 / 681ed00 - lavf 54.22.100 / 54.13.0 - avformat.h
|
||||
Add AVFMT_FLAG_NOBUFFER for low latency use cases.
|
||||
|
||||
2012-07-10 - fbe0245 / f3e5e6f - lavu 51.65.100 / 51.37.0
|
||||
2012-07-10 - 5fade8a - lavu 51.37.0
|
||||
Add av_malloc_array() and av_mallocz_array()
|
||||
|
||||
2012-06-22 - e847f41 / d3d3a32 - lavu 51.61.100 / 51.34.0
|
||||
|
@@ -31,9 +31,9 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.1.4
|
||||
PROJECT_NUMBER = 2.0.1
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will
|
||||
# copy the logo to the output directory.
|
||||
|
23
doc/Makefile
23
doc/Makefile
@@ -88,20 +88,8 @@ $(DOCS) doc/doxy/html: | doc/
|
||||
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
|
||||
$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
|
||||
|
||||
install-doc: install-html install-man
|
||||
|
||||
install-html:
|
||||
|
||||
install-man:
|
||||
|
||||
ifdef CONFIG_HTMLPAGES
|
||||
install-progs-$(CONFIG_DOC): install-html
|
||||
|
||||
install-html: $(HTMLPAGES)
|
||||
$(Q)mkdir -p "$(DOCDIR)"
|
||||
$(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MANPAGES
|
||||
install-progs-$(CONFIG_DOC): install-man
|
||||
|
||||
@@ -112,16 +100,11 @@ install-man: $(MANPAGES)
|
||||
$(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3"
|
||||
endif
|
||||
|
||||
uninstall: uninstall-doc
|
||||
|
||||
uninstall-doc: uninstall-html uninstall-man
|
||||
|
||||
uninstall-html:
|
||||
$(RM) -r "$(DOCDIR)"
|
||||
uninstall: uninstall-man
|
||||
|
||||
uninstall-man:
|
||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(PROGS-yes:%=%.1) $(PROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
|
||||
$(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
|
||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(MANPAGES1))
|
||||
$(RM) $(addprefix "$(MANDIR)/man3/",$(MANPAGES3))
|
||||
|
||||
clean:: docclean
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
* 2.1 "Fourier" October, 2013
|
||||
* 2.0 "Nameless" July, 2013
|
||||
|
||||
|
||||
General notes
|
||||
@@ -14,3 +14,7 @@ accepted. If you are experiencing issues with any formally released version of
|
||||
FFmpeg, please try git master to check if the issue still exists. If it does,
|
||||
make your report against the development code following the usual bug reporting
|
||||
guidelines.
|
||||
|
||||
AVI/AVXSynth
|
||||
--------
|
||||
If you want to use FFmpeg with AVISynth, you need AVISynth 2.6.0 at minimum.
|
||||
|
@@ -59,18 +59,10 @@ Show license.
|
||||
|
||||
@item -h, -?, -help, --help [@var{arg}]
|
||||
Show help. An optional parameter may be specified to print help about a specific
|
||||
item. If no argument is specified, only basic (non advanced) tool
|
||||
options are shown.
|
||||
item.
|
||||
|
||||
Possible values of @var{arg} are:
|
||||
@table @option
|
||||
@item long
|
||||
Print advanced tool options in addition to the basic tool options.
|
||||
|
||||
@item full
|
||||
Print complete list of options, including shared and private options
|
||||
for encoders, decoders, demuxers, muxers, filters, etc.
|
||||
|
||||
@item decoder=@var{decoder_name}
|
||||
Print detailed information about the decoder named @var{decoder_name}. Use the
|
||||
@option{-decoders} option to get a list of all decoders.
|
||||
@@ -90,6 +82,7 @@ Print detailed information about the muxer named @var{muxer_name}. Use the
|
||||
@item filter=@var{filter_name}
|
||||
Print detailed information about the filter name @var{filter_name}. Use the
|
||||
@option{-filters} option to get a list of all filters.
|
||||
|
||||
@end table
|
||||
|
||||
@item -version
|
||||
@@ -128,9 +121,6 @@ Show available sample formats.
|
||||
@item -layouts
|
||||
Show channel names and standard channel layouts.
|
||||
|
||||
@item -colors
|
||||
Show recognized color names.
|
||||
|
||||
@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
|
||||
Set the logging level used by the library.
|
||||
Adding "repeat+" indicates that repeated log output should not be compressed
|
||||
@@ -281,12 +271,11 @@ muxer:
|
||||
ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
||||
@end example
|
||||
|
||||
All codec AVOptions are per-stream, and thus a stream specifier
|
||||
should be attached to them.
|
||||
All codec AVOptions are obviously per-stream, so the chapter on stream
|
||||
specifiers applies to them
|
||||
|
||||
Note: the @option{-nooption} syntax cannot be used for boolean
|
||||
AVOptions, use @option{-option 0}/@option{-option 1}.
|
||||
Note @option{-nooption} syntax cannot be used for boolean AVOptions,
|
||||
use @option{-option 0}/@option{-option 1}.
|
||||
|
||||
Note: the old undocumented way of specifying per-stream AVOptions by
|
||||
prepending v/a/s to the options name is now obsolete and will be
|
||||
removed soon.
|
||||
Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
||||
v/a/s to the options name is now obsolete and will be removed soon.
|
@@ -30,33 +30,7 @@ ADTS AAC container to a FLV or a MOV/MP4 file.
|
||||
|
||||
Remove zero padding at the end of a packet.
|
||||
|
||||
@section dump_extra
|
||||
|
||||
Add extradata to the beginning of the filtered packets.
|
||||
|
||||
The additional argument specifies which packets should be filtered.
|
||||
It accepts the values:
|
||||
@table @samp
|
||||
@item a
|
||||
add extradata to all key packets, but only if @var{local_header} is
|
||||
set in the @option{flags2} codec context field
|
||||
|
||||
@item k
|
||||
add extradata to all key packets
|
||||
|
||||
@item e
|
||||
add extradata to all packets
|
||||
@end table
|
||||
|
||||
If not specified it is assumed @samp{k}.
|
||||
|
||||
For example the following @command{ffmpeg} command forces a global
|
||||
header (thus disabling individual packet headers) in the H.264 packets
|
||||
generated by the @code{libx264} encoder, but corrects them by adding
|
||||
the header stored in extradata to the key packets:
|
||||
@example
|
||||
ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
|
||||
@end example
|
||||
@section dump_extradata
|
||||
|
||||
@section h264_mp4toannexb
|
||||
|
||||
@@ -123,6 +97,6 @@ ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
|
||||
|
||||
@section noise
|
||||
|
||||
@section remove_extra
|
||||
@section remove_extradata
|
||||
|
||||
@c man end BITSTREAM FILTERS
|
||||
|
@@ -1,4 +1,3 @@
|
||||
@anchor{codec-options}
|
||||
@chapter Codec Options
|
||||
@c man begin CODEC OPTIONS
|
||||
|
||||
@@ -84,6 +83,9 @@ Apply interlaced motion estimation.
|
||||
Use closed gop.
|
||||
@end table
|
||||
|
||||
@item sub_id @var{integer}
|
||||
Deprecated, currently unused.
|
||||
|
||||
@item me_method @var{integer} (@emph{encoding,video})
|
||||
Set motion estimation method.
|
||||
|
||||
@@ -383,6 +385,10 @@ Possible values:
|
||||
|
||||
@item simplemmx
|
||||
|
||||
@item libmpeg2mmx
|
||||
|
||||
@item mmi
|
||||
|
||||
@item arm
|
||||
|
||||
@item altivec
|
||||
@@ -399,6 +405,10 @@ Possible values:
|
||||
|
||||
@item simplealpha
|
||||
|
||||
@item h264
|
||||
|
||||
@item vp3
|
||||
|
||||
@item ipp
|
||||
|
||||
@item xvidmmx
|
||||
@@ -761,26 +771,26 @@ Set noise reduction.
|
||||
Set number of bits which should be loaded into the rc buffer before
|
||||
decoding starts.
|
||||
|
||||
@item inter_threshold @var{integer} (@emph{encoding,video})
|
||||
|
||||
@item flags2 @var{flags} (@emph{decoding/encoding,audio,video})
|
||||
|
||||
Possible values:
|
||||
@table @samp
|
||||
@item fast
|
||||
Allow non spec compliant speedup tricks.
|
||||
allow non spec compliant speedup tricks
|
||||
@item sgop
|
||||
Deprecated, use mpegvideo private options instead.
|
||||
Deprecated, use mpegvideo private options instead
|
||||
@item noout
|
||||
Skip bitstream encoding.
|
||||
@item ignorecrop
|
||||
Ignore cropping information from sps.
|
||||
skip bitstream encoding
|
||||
@item local_header
|
||||
Place global headers at every keyframe instead of in extradata.
|
||||
place global headers at every keyframe instead of in extradata
|
||||
@item chunks
|
||||
Frame data might be split into multiple chunks.
|
||||
Frame data might be split into multiple chunks
|
||||
@item showall
|
||||
Show all frames before the first keyframe.
|
||||
Show all frames before the first keyframe
|
||||
@item skiprd
|
||||
Deprecated, use mpegvideo private options instead.
|
||||
Deprecated, use mpegvideo private options instead
|
||||
@end table
|
||||
|
||||
@item error @var{integer} (@emph{encoding,video})
|
||||
@@ -836,10 +846,6 @@ Possible values:
|
||||
|
||||
@item aac_eld
|
||||
|
||||
@item mpeg2_aac_low
|
||||
|
||||
@item mpeg2_aac_he
|
||||
|
||||
@item dts
|
||||
|
||||
@item dts_es
|
||||
@@ -1058,27 +1064,6 @@ Set sample format audio decoders should prefer. Default value is
|
||||
|
||||
@item sub_charenc @var{encoding} (@emph{decoding,subtitles})
|
||||
Set the input subtitles character encoding.
|
||||
|
||||
@item field_order @var{field_order} (@emph{video})
|
||||
Set/override the field order of the video.
|
||||
Possible values:
|
||||
@table @samp
|
||||
@item progressive
|
||||
Progressive video
|
||||
@item tt
|
||||
Interlaced video, top field coded and displayed first
|
||||
@item bb
|
||||
Interlaced video, bottom field coded and displayed first
|
||||
@item tb
|
||||
Interlaced video, top coded first, bottom displayed first
|
||||
@item bt
|
||||
Interlaced video, bottom coded first, top displayed first
|
||||
@end table
|
||||
|
||||
@item skip_alpha @var{integer} (@emph{decoding,video})
|
||||
Set to 1 to disable processing alpha (transparency). This works like the
|
||||
@samp{gray} flag in the @option{flags} option which skips chroma information
|
||||
instead of alpha. Default is 0.
|
||||
@end table
|
||||
|
||||
@c man end CODEC OPTIONS
|
||||
|
@@ -158,45 +158,4 @@ ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
|
||||
7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
|
||||
@end table
|
||||
|
||||
@section libzvbi-teletext
|
||||
|
||||
Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
|
||||
subtitles. Requires the presence of the libzvbi headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libzvbi}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
@item txt_page
|
||||
List of teletext page numbers to decode. You may use the special * string to
|
||||
match all pages. Pages that do not match the specified list are dropped.
|
||||
Default value is *.
|
||||
@item txt_chop_top
|
||||
Discards the top teletext line. Default value is 1.
|
||||
@item txt_format
|
||||
Specifies the format of the decoded subtitles. The teletext decoder is capable
|
||||
of decoding the teletext pages to bitmaps or to simple text, you should use
|
||||
"bitmap" for teletext pages, because certain graphics and colors cannot be
|
||||
expressed in simple text. You might use "text" for teletext based subtitles if
|
||||
your application can handle simple text based subtitles. Default value is
|
||||
bitmap.
|
||||
@item txt_left
|
||||
X offset of generated bitmaps, default is 0.
|
||||
@item txt_top
|
||||
Y offset of generated bitmaps, default is 0.
|
||||
@item txt_chop_spaces
|
||||
Chops leading and trailing spaces and removes empty lines from the generated
|
||||
text. This option is useful for teletext based subtitles where empty spaces may
|
||||
be present at the start or at the end of the lines or empty lines may be
|
||||
present between the subtitle lines because of double-sized teletext charactes.
|
||||
Default value is 1.
|
||||
@item txt_duration
|
||||
Sets the display duration of the decoded teletext pages or subtitles in
|
||||
miliseconds. Default value is 30000 which is 30 seconds.
|
||||
@item txt_transparent
|
||||
Force transparent background of the generated teletext bitmaps. Default value
|
||||
is 0 which means an opaque (black) background.
|
||||
@end table
|
||||
|
||||
@c man end SUBTILES DECODERS
|
||||
|
@@ -1,7 +1,3 @@
|
||||
a.summary-letter {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2D6198;
|
||||
}
|
||||
@@ -49,16 +45,11 @@ body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 a, h2 a, h3 a, h4 a {
|
||||
text-decoration: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
h1, h2, h3 {
|
||||
padding-left: 0.4em;
|
||||
border-radius: 4px;
|
||||
padding-bottom: 0.25em;
|
||||
padding-top: 0.25em;
|
||||
padding-bottom: 0.2em;
|
||||
padding-top: 0.2em;
|
||||
border: 1px solid #6A996A;
|
||||
}
|
||||
|
||||
@@ -72,22 +63,15 @@ h1 {
|
||||
|
||||
h2 {
|
||||
color: #313131;
|
||||
font-size: 1.0em;
|
||||
font-size: 0.9em;
|
||||
background-color: #ABE3AB;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #313131;
|
||||
font-size: 0.9em;
|
||||
margin-bottom: -6px;
|
||||
background-color: #BBF3BB;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #313131;
|
||||
font-size: 0.8em;
|
||||
margin-bottom: -8px;
|
||||
background-color: #D1FDD1;
|
||||
background-color: #BBF3BB;
|
||||
}
|
||||
|
||||
img {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@chapter Demuxers
|
||||
@c man begin DEMUXERS
|
||||
|
||||
Demuxers are configured elements in FFmpeg that can read the
|
||||
Demuxers are configured elements in FFmpeg which allow to read the
|
||||
multimedia streams from a particular type of file.
|
||||
|
||||
When you configure your FFmpeg build, all the supported demuxers
|
||||
@@ -29,17 +29,6 @@ the caller can decide which variant streams to actually receive.
|
||||
The total bitrate of the variant that the stream belongs to is
|
||||
available in a metadata key named "variant_bitrate".
|
||||
|
||||
@section asf
|
||||
|
||||
Advanced Systems Format demuxer.
|
||||
|
||||
This demuxer is used to demux ASF files and MMS network streams.
|
||||
|
||||
@table @option
|
||||
@item -no_resync_search @var{bool}
|
||||
Do not try to resynchronize by looking for a certain optional start code.
|
||||
@end table
|
||||
|
||||
@anchor{concat}
|
||||
@section concat
|
||||
|
||||
@@ -114,17 +103,6 @@ probed and 0 otherwise.
|
||||
|
||||
@end table
|
||||
|
||||
@section flv
|
||||
|
||||
Adobe Flash Video Format demuxer.
|
||||
|
||||
This demuxer is used to demux FLV files and RTMP network streams.
|
||||
|
||||
@table @option
|
||||
@item -flv_metadata @var{bool}
|
||||
Allocate the streams according to the onMetaData array content.
|
||||
@end table
|
||||
|
||||
@section libgme
|
||||
|
||||
The Game Music Emu library is a collection of video game music file emulators.
|
||||
@@ -262,36 +240,23 @@ Use @command{ffmpeg} for creating a video from the images in the file
|
||||
sequence @file{img-001.jpeg}, @file{img-002.jpeg}, ..., assuming an
|
||||
input frame rate of 10 frames per second:
|
||||
@example
|
||||
ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
|
||||
ffmpeg -i 'img-%03d.jpeg' -r 10 out.mkv
|
||||
@end example
|
||||
|
||||
@item
|
||||
As above, but start by reading from a file with index 100 in the sequence:
|
||||
@example
|
||||
ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
|
||||
ffmpeg -start_number 100 -i 'img-%03d.jpeg' -r 10 out.mkv
|
||||
@end example
|
||||
|
||||
@item
|
||||
Read images matching the "*.png" glob pattern , that is all the files
|
||||
terminating with the ".png" suffix:
|
||||
@example
|
||||
ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv
|
||||
ffmpeg -pattern_type glob -i "*.png" -r 10 out.mkv
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@section mpegts
|
||||
|
||||
MPEG-2 transport stream demuxer.
|
||||
|
||||
@table @option
|
||||
|
||||
@item fix_teletext_pts
|
||||
Overrides teletext packet PTS and DTS values with the timestamps calculated
|
||||
from the PCR of the first program which the teletext stream is part of and is
|
||||
not discarded. Default value is 1, set this option to 0 if you want your
|
||||
teletext packet PTS and DTS values untouched.
|
||||
@end table
|
||||
|
||||
@section rawvideo
|
||||
|
||||
Raw video demuxer.
|
||||
|
@@ -11,23 +11,29 @@
|
||||
|
||||
@chapter Developers Guide
|
||||
|
||||
@section Notes for external developers
|
||||
@section API
|
||||
@itemize @bullet
|
||||
@item libavcodec is the library containing the codecs (both encoding and
|
||||
decoding). Look at @file{doc/examples/decoding_encoding.c} to see how to use
|
||||
it.
|
||||
|
||||
This document is mostly useful for internal FFmpeg developers.
|
||||
External developers who need to use the API in their application should
|
||||
refer to the API doxygen documentation in the public headers, and
|
||||
check the examples in @file{doc/examples} and in the source code to
|
||||
see how the public API is employed.
|
||||
@item libavformat is the library containing the file format handling (mux and
|
||||
demux code for several formats). Look at @file{ffplay.c} to use it in a
|
||||
player. See @file{doc/examples/muxing.c} to use it to generate audio or video
|
||||
streams.
|
||||
|
||||
You can use the FFmpeg libraries in your commercial program, but you
|
||||
are encouraged to @emph{publish any patch you make}. In this case the
|
||||
best way to proceed is to send your patches to the ffmpeg-devel
|
||||
mailing list following the guidelines illustrated in the remainder of
|
||||
this document.
|
||||
@end itemize
|
||||
|
||||
For more detailed legal information about the use of FFmpeg in
|
||||
external programs read the @file{LICENSE} file in the source tree and
|
||||
consult @url{http://ffmpeg.org/legal.html}.
|
||||
@section Integrating libavcodec or libavformat in your program
|
||||
|
||||
You can integrate all the source code of the libraries to link them
|
||||
statically to avoid any version problem. All you need is to provide a
|
||||
'config.mak' and a 'config.h' in the parent directory. See the defines
|
||||
generated by ./configure to understand what is needed.
|
||||
|
||||
You can use libavcodec or libavformat in your commercial program, but
|
||||
@emph{any patch you make must be published}. The best way to proceed is
|
||||
to send your patches to the FFmpeg mailing list.
|
||||
|
||||
@section Contributing
|
||||
|
||||
@@ -51,16 +57,13 @@ and should try to fix issues their commit causes.
|
||||
@subsection Code formatting conventions
|
||||
|
||||
There are the following guidelines regarding the indentation in files:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Indent size is 4.
|
||||
|
||||
@item
|
||||
The TAB character is forbidden outside of Makefiles as is any
|
||||
form of trailing whitespace. Commits containing either will be
|
||||
rejected by the git repository.
|
||||
|
||||
@item
|
||||
You should try to limit your code lines to 80 characters; however, do so if
|
||||
and only if this improves readability.
|
||||
@@ -114,17 +117,13 @@ int myfunc(int my_parameter)
|
||||
|
||||
FFmpeg is programmed in the ISO C90 language with a few additional
|
||||
features from ISO C99, namely:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
the @samp{inline} keyword;
|
||||
|
||||
@item
|
||||
@samp{//} comments;
|
||||
|
||||
@item
|
||||
designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
|
||||
|
||||
@item
|
||||
compound literals (@samp{x = (struct s) @{ 17, 23 @};})
|
||||
@end itemize
|
||||
@@ -136,17 +135,13 @@ clarity and performance.
|
||||
All code must compile with recent versions of GCC and a number of other
|
||||
currently supported compilers. To ensure compatibility, please do not use
|
||||
additional C99 features or GCC extensions. Especially watch out for:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
mixing statements and declarations;
|
||||
|
||||
@item
|
||||
@samp{long long} (use @samp{int64_t} instead);
|
||||
|
||||
@item
|
||||
@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
|
||||
|
||||
@item
|
||||
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
||||
@end itemize
|
||||
@@ -158,25 +153,20 @@ All names should be composed with underscores (_), not CamelCase. For example,
|
||||
for example structs and enums; they should always be in the CamelCase
|
||||
|
||||
There are the following conventions for naming variables and functions:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
For local variables no prefix is required.
|
||||
|
||||
@item
|
||||
For file-scope variables and functions declared as @code{static}, no prefix
|
||||
is required.
|
||||
|
||||
@item
|
||||
For variables and functions visible outside of file scope, but only used
|
||||
internally by a library, an @code{ff_} prefix should be used,
|
||||
e.g. @samp{ff_w64_demuxer}.
|
||||
|
||||
@item
|
||||
For variables and functions visible outside of file scope, used internally
|
||||
across multiple libraries, use @code{avpriv_} as prefix, for example,
|
||||
@samp{avpriv_aac_parse_header}.
|
||||
|
||||
@item
|
||||
Each library has its own prefix for public symbols, in addition to the
|
||||
commonly used @code{av_} (@code{avformat_} for libavformat,
|
||||
@@ -196,12 +186,10 @@ are reserved at the file level and may not be used for externally visible
|
||||
symbols. If in doubt, just avoid names starting with @code{_} altogether.
|
||||
|
||||
@subsection Miscellaneous conventions
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
fprintf and printf are forbidden in libavformat and libavcodec,
|
||||
please use av_log() instead.
|
||||
|
||||
@item
|
||||
Casts should be used only when necessary. Unneeded parentheses
|
||||
should also be avoided if they don't make the code easier to understand.
|
||||
@@ -244,154 +232,131 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Contributions should be licensed under the
|
||||
@uref{http://www.gnu.org/licenses/lgpl-2.1.html, LGPL 2.1},
|
||||
including an "or any later version" clause, or, if you prefer
|
||||
a gift-style license, the
|
||||
@uref{http://www.isc.org/software/license/, ISC} or
|
||||
@uref{http://mit-license.org/, MIT} license.
|
||||
@uref{http://www.gnu.org/licenses/gpl-2.0.html, GPL 2} including
|
||||
an "or any later version" clause is also acceptable, but LGPL is
|
||||
preferred.
|
||||
If you add a new file, give it a proper license header. Do not copy and
|
||||
paste it from a random place, use an existing file as template.
|
||||
|
||||
Contributions should be licensed under the
|
||||
@uref{http://www.gnu.org/licenses/lgpl-2.1.html, LGPL 2.1},
|
||||
including an "or any later version" clause, or, if you prefer
|
||||
a gift-style license, the
|
||||
@uref{http://www.isc.org/software/license/, ISC} or
|
||||
@uref{http://mit-license.org/, MIT} license.
|
||||
@uref{http://www.gnu.org/licenses/gpl-2.0.html, GPL 2} including
|
||||
an "or any later version" clause is also acceptable, but LGPL is
|
||||
preferred.
|
||||
@item
|
||||
You must not commit code which breaks FFmpeg! (Meaning unfinished but
|
||||
enabled code which breaks compilation or compiles but does not work or
|
||||
breaks the regression tests)
|
||||
You can commit unfinished stuff (for testing etc), but it must be disabled
|
||||
(#ifdef etc) by default so it does not interfere with other developers'
|
||||
work.
|
||||
|
||||
You must not commit code which breaks FFmpeg! (Meaning unfinished but
|
||||
enabled code which breaks compilation or compiles but does not work or
|
||||
breaks the regression tests)
|
||||
You can commit unfinished stuff (for testing etc), but it must be disabled
|
||||
(#ifdef etc) by default so it does not interfere with other developers'
|
||||
work.
|
||||
@item
|
||||
The commit message should have a short first line in the form of
|
||||
a @samp{topic: short description} as a header, separated by a newline
|
||||
from the body consisting of an explanation of why the change is necessary.
|
||||
If the commit fixes a known bug on the bug tracker, the commit message
|
||||
should include its bug ID. Referring to the issue on the bug tracker does
|
||||
not exempt you from writing an excerpt of the bug in the commit message.
|
||||
|
||||
The commit message should have a short first line in the form of
|
||||
a @samp{topic: short description} as a header, separated by a newline
|
||||
from the body consisting of an explanation of why the change is necessary.
|
||||
If the commit fixes a known bug on the bug tracker, the commit message
|
||||
should include its bug ID. Referring to the issue on the bug tracker does
|
||||
not exempt you from writing an excerpt of the bug in the commit message.
|
||||
@item
|
||||
You do not have to over-test things. If it works for you, and you think it
|
||||
should work for others, then commit. If your code has problems
|
||||
(portability, triggers compiler bugs, unusual environment etc) they will be
|
||||
reported and eventually fixed.
|
||||
|
||||
You do not have to over-test things. If it works for you, and you think it
|
||||
should work for others, then commit. If your code has problems
|
||||
(portability, triggers compiler bugs, unusual environment etc) they will be
|
||||
reported and eventually fixed.
|
||||
@item
|
||||
Do not commit unrelated changes together, split them into self-contained
|
||||
pieces. Also do not forget that if part B depends on part A, but A does not
|
||||
depend on B, then A can and should be committed first and separate from B.
|
||||
Keeping changes well split into self-contained parts makes reviewing and
|
||||
understanding them on the commit log mailing list easier. This also helps
|
||||
in case of debugging later on.
|
||||
Also if you have doubts about splitting or not splitting, do not hesitate to
|
||||
ask/discuss it on the developer mailing list.
|
||||
|
||||
Do not commit unrelated changes together, split them into self-contained
|
||||
pieces. Also do not forget that if part B depends on part A, but A does not
|
||||
depend on B, then A can and should be committed first and separate from B.
|
||||
Keeping changes well split into self-contained parts makes reviewing and
|
||||
understanding them on the commit log mailing list easier. This also helps
|
||||
in case of debugging later on.
|
||||
Also if you have doubts about splitting or not splitting, do not hesitate to
|
||||
ask/discuss it on the developer mailing list.
|
||||
@item
|
||||
Do not change behavior of the programs (renaming options etc) or public
|
||||
API or ABI without first discussing it on the ffmpeg-devel mailing list.
|
||||
Do not remove functionality from the code. Just improve!
|
||||
|
||||
Note: Redundant code can be removed.
|
||||
Do not change behavior of the programs (renaming options etc) or public
|
||||
API or ABI without first discussing it on the ffmpeg-devel mailing list.
|
||||
Do not remove functionality from the code. Just improve!
|
||||
|
||||
Note: Redundant code can be removed.
|
||||
@item
|
||||
Do not commit changes to the build system (Makefiles, configure script)
|
||||
which change behavior, defaults etc, without asking first. The same
|
||||
applies to compiler warning fixes, trivial looking fixes and to code
|
||||
maintained by other developers. We usually have a reason for doing things
|
||||
the way we do. Send your changes as patches to the ffmpeg-devel mailing
|
||||
list, and if the code maintainers say OK, you may commit. This does not
|
||||
apply to files you wrote and/or maintain.
|
||||
|
||||
Do not commit changes to the build system (Makefiles, configure script)
|
||||
which change behavior, defaults etc, without asking first. The same
|
||||
applies to compiler warning fixes, trivial looking fixes and to code
|
||||
maintained by other developers. We usually have a reason for doing things
|
||||
the way we do. Send your changes as patches to the ffmpeg-devel mailing
|
||||
list, and if the code maintainers say OK, you may commit. This does not
|
||||
apply to files you wrote and/or maintain.
|
||||
@item
|
||||
We refuse source indentation and other cosmetic changes if they are mixed
|
||||
with functional changes, such commits will be rejected and removed. Every
|
||||
developer has his own indentation style, you should not change it. Of course
|
||||
if you (re)write something, you can use your own style, even though we would
|
||||
prefer if the indentation throughout FFmpeg was consistent (Many projects
|
||||
force a given indentation style - we do not.). If you really need to make
|
||||
indentation changes (try to avoid this), separate them strictly from real
|
||||
changes.
|
||||
|
||||
NOTE: If you had to put if()@{ .. @} over a large (> 5 lines) chunk of code,
|
||||
then either do NOT change the indentation of the inner part within (do not
|
||||
move it to the right)! or do so in a separate commit
|
||||
We refuse source indentation and other cosmetic changes if they are mixed
|
||||
with functional changes, such commits will be rejected and removed. Every
|
||||
developer has his own indentation style, you should not change it. Of course
|
||||
if you (re)write something, you can use your own style, even though we would
|
||||
prefer if the indentation throughout FFmpeg was consistent (Many projects
|
||||
force a given indentation style - we do not.). If you really need to make
|
||||
indentation changes (try to avoid this), separate them strictly from real
|
||||
changes.
|
||||
|
||||
NOTE: If you had to put if()@{ .. @} over a large (> 5 lines) chunk of code,
|
||||
then either do NOT change the indentation of the inner part within (do not
|
||||
move it to the right)! or do so in a separate commit
|
||||
@item
|
||||
Always fill out the commit log message. Describe in a few lines what you
|
||||
changed and why. You can refer to mailing list postings if you fix a
|
||||
particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
||||
Recommended format:
|
||||
area changed: Short 1 line description
|
||||
|
||||
details describing what and why and giving references.
|
||||
Always fill out the commit log message. Describe in a few lines what you
|
||||
changed and why. You can refer to mailing list postings if you fix a
|
||||
particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
||||
Recommended format:
|
||||
area changed: Short 1 line description
|
||||
|
||||
details describing what and why and giving references.
|
||||
@item
|
||||
Make sure the author of the commit is set correctly. (see git commit --author)
|
||||
If you apply a patch, send an
|
||||
answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
||||
you applied the patch.
|
||||
|
||||
Make sure the author of the commit is set correctly. (see git commit --author)
|
||||
If you apply a patch, send an
|
||||
answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
||||
you applied the patch.
|
||||
@item
|
||||
When applying patches that have been discussed (at length) on the mailing
|
||||
list, reference the thread in the log message.
|
||||
|
||||
When applying patches that have been discussed (at length) on the mailing
|
||||
list, reference the thread in the log message.
|
||||
@item
|
||||
Do NOT commit to code actively maintained by others without permission.
|
||||
Send a patch to ffmpeg-devel instead. If no one answers within a reasonable
|
||||
timeframe (12h for build failures and security fixes, 3 days small changes,
|
||||
1 week for big patches) then commit your patch if you think it is OK.
|
||||
Also note, the maintainer can simply ask for more time to review!
|
||||
|
||||
Do NOT commit to code actively maintained by others without permission.
|
||||
Send a patch to ffmpeg-devel instead. If no one answers within a reasonable
|
||||
timeframe (12h for build failures and security fixes, 3 days small changes,
|
||||
1 week for big patches) then commit your patch if you think it is OK.
|
||||
Also note, the maintainer can simply ask for more time to review!
|
||||
@item
|
||||
Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
|
||||
are sent there and reviewed by all the other developers. Bugs and possible
|
||||
improvements or general questions regarding commits are discussed there. We
|
||||
expect you to react if problems with your code are uncovered.
|
||||
|
||||
Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
|
||||
are sent there and reviewed by all the other developers. Bugs and possible
|
||||
improvements or general questions regarding commits are discussed there. We
|
||||
expect you to react if problems with your code are uncovered.
|
||||
@item
|
||||
Update the documentation if you change behavior or add features. If you are
|
||||
unsure how best to do this, send a patch to ffmpeg-devel, the documentation
|
||||
maintainer(s) will review and commit your stuff.
|
||||
|
||||
Update the documentation if you change behavior or add features. If you are
|
||||
unsure how best to do this, send a patch to ffmpeg-devel, the documentation
|
||||
maintainer(s) will review and commit your stuff.
|
||||
@item
|
||||
Try to keep important discussions and requests (also) on the public
|
||||
developer mailing list, so that all developers can benefit from them.
|
||||
|
||||
Try to keep important discussions and requests (also) on the public
|
||||
developer mailing list, so that all developers can benefit from them.
|
||||
@item
|
||||
Never write to unallocated memory, never write over the end of arrays,
|
||||
always check values read from some untrusted source before using them
|
||||
as array index or other risky things.
|
||||
|
||||
Never write to unallocated memory, never write over the end of arrays,
|
||||
always check values read from some untrusted source before using them
|
||||
as array index or other risky things.
|
||||
@item
|
||||
Remember to check if you need to bump versions for the specific libav*
|
||||
parts (libavutil, libavcodec, libavformat) you are changing. You need
|
||||
to change the version integer.
|
||||
Incrementing the first component means no backward compatibility to
|
||||
previous versions (e.g. removal of a function from the public API).
|
||||
Incrementing the second component means backward compatible change
|
||||
(e.g. addition of a function to the public API or extension of an
|
||||
existing data structure).
|
||||
Incrementing the third component means a noteworthy binary compatible
|
||||
change (e.g. encoder bug fix that matters for the decoder). The third
|
||||
component always starts at 100 to distinguish FFmpeg from Libav.
|
||||
|
||||
Remember to check if you need to bump versions for the specific libav*
|
||||
parts (libavutil, libavcodec, libavformat) you are changing. You need
|
||||
to change the version integer.
|
||||
Incrementing the first component means no backward compatibility to
|
||||
previous versions (e.g. removal of a function from the public API).
|
||||
Incrementing the second component means backward compatible change
|
||||
(e.g. addition of a function to the public API or extension of an
|
||||
existing data structure).
|
||||
Incrementing the third component means a noteworthy binary compatible
|
||||
change (e.g. encoder bug fix that matters for the decoder). The third
|
||||
component always starts at 100 to distinguish FFmpeg from Libav.
|
||||
@item
|
||||
Compiler warnings indicate potential bugs or code with bad style. If a type of
|
||||
warning always points to correct and clean code, that warning should
|
||||
be disabled, not the code changed.
|
||||
Thus the remaining warnings can either be bugs or correct code.
|
||||
If it is a bug, the bug has to be fixed. If it is not, the code should
|
||||
be changed to not generate a warning unless that causes a slowdown
|
||||
or obfuscates the code.
|
||||
|
||||
Compiler warnings indicate potential bugs or code with bad style. If a type of
|
||||
warning always points to correct and clean code, that warning should
|
||||
be disabled, not the code changed.
|
||||
Thus the remaining warnings can either be bugs or correct code.
|
||||
If it is a bug, the bug has to be fixed. If it is not, the code should
|
||||
be changed to not generate a warning unless that causes a slowdown
|
||||
or obfuscates the code.
|
||||
@item
|
||||
Make sure that no parts of the codebase that you maintain are missing from the
|
||||
@file{MAINTAINERS} file. If something that you want to maintain is missing add it with
|
||||
your name after it.
|
||||
If at some point you no longer want to maintain some code, then please help
|
||||
finding a new maintainer and also don't forget updating the @file{MAINTAINERS} file.
|
||||
If you add a new file, give it a proper license header. Do not copy and
|
||||
paste it from a random place, use an existing file as template.
|
||||
@end enumerate
|
||||
|
||||
We think our rules are not too hard. If you have comments, contact us.
|
||||
@@ -446,51 +411,40 @@ send a reminder by email. Your patch should eventually be dealt with.
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Did you use av_cold for codec initialization and close functions?
|
||||
|
||||
Did you use av_cold for codec initialization and close functions?
|
||||
@item
|
||||
Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
|
||||
AVInputFormat/AVOutputFormat struct?
|
||||
|
||||
Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
|
||||
AVInputFormat/AVOutputFormat struct?
|
||||
@item
|
||||
Did you bump the minor version number (and reset the micro version
|
||||
number) in @file{libavcodec/version.h} or @file{libavformat/version.h}?
|
||||
|
||||
Did you bump the minor version number (and reset the micro version
|
||||
number) in @file{libavcodec/version.h} or @file{libavformat/version.h}?
|
||||
@item
|
||||
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
|
||||
|
||||
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
|
||||
@item
|
||||
Did you add the AVCodecID to @file{avcodec.h}?
|
||||
When adding new codec IDs, also add an entry to the codec descriptor
|
||||
list in @file{libavcodec/codec_desc.c}.
|
||||
|
||||
Did you add the AVCodecID to @file{avcodec.h}?
|
||||
When adding new codec IDs, also add an entry to the codec descriptor
|
||||
list in @file{libavcodec/codec_desc.c}.
|
||||
@item
|
||||
If it has a FourCC, did you add it to @file{libavformat/riff.c},
|
||||
even if it is only a decoder?
|
||||
|
||||
If it has a FourCC, did you add it to @file{libavformat/riff.c},
|
||||
even if it is only a decoder?
|
||||
@item
|
||||
Did you add a rule to compile the appropriate files in the Makefile?
|
||||
Remember to do this even if you're just adding a format to a file that is
|
||||
already being compiled by some other rule, like a raw demuxer.
|
||||
|
||||
Did you add a rule to compile the appropriate files in the Makefile?
|
||||
Remember to do this even if you're just adding a format to a file that is
|
||||
already being compiled by some other rule, like a raw demuxer.
|
||||
@item
|
||||
Did you add an entry to the table of supported formats or codecs in
|
||||
@file{doc/general.texi}?
|
||||
|
||||
Did you add an entry to the table of supported formats or codecs in
|
||||
@file{doc/general.texi}?
|
||||
@item
|
||||
Did you add an entry in the Changelog?
|
||||
|
||||
Did you add an entry in the Changelog?
|
||||
@item
|
||||
If it depends on a parser or a library, did you add that dependency in
|
||||
configure?
|
||||
|
||||
If it depends on a parser or a library, did you add that dependency in
|
||||
configure?
|
||||
@item
|
||||
Did you @code{git add} the appropriate files before committing?
|
||||
|
||||
Did you @code{git add} the appropriate files before committing?
|
||||
@item
|
||||
Did you make sure it compiles standalone, i.e. with
|
||||
@code{configure --disable-everything --enable-decoder=foo}
|
||||
(or @code{--enable-demuxer} or whatever your component is)?
|
||||
Did you make sure it compiles standalone, i.e. with
|
||||
@code{configure --disable-everything --enable-decoder=foo}
|
||||
(or @code{--enable-demuxer} or whatever your component is)?
|
||||
@end enumerate
|
||||
|
||||
|
||||
@@ -498,109 +452,82 @@ Did you make sure it compiles standalone, i.e. with
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Does @code{make fate} pass with the patch applied?
|
||||
|
||||
Does @code{make fate} pass with the patch applied?
|
||||
@item
|
||||
Was the patch generated with git format-patch or send-email?
|
||||
|
||||
Was the patch generated with git format-patch or send-email?
|
||||
@item
|
||||
Did you sign off your patch? (git commit -s)
|
||||
See @url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/SubmittingPatches} for the meaning
|
||||
of sign off.
|
||||
|
||||
Did you sign off your patch? (git commit -s)
|
||||
See @url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/SubmittingPatches} for the meaning
|
||||
of sign off.
|
||||
@item
|
||||
Did you provide a clear git commit log message?
|
||||
|
||||
Did you provide a clear git commit log message?
|
||||
@item
|
||||
Is the patch against latest FFmpeg git master branch?
|
||||
|
||||
Is the patch against latest FFmpeg git master branch?
|
||||
@item
|
||||
Are you subscribed to ffmpeg-devel?
|
||||
(the list is subscribers only due to spam)
|
||||
|
||||
Are you subscribed to ffmpeg-devel?
|
||||
(the list is subscribers only due to spam)
|
||||
@item
|
||||
Have you checked that the changes are minimal, so that the same cannot be
|
||||
achieved with a smaller patch and/or simpler final code?
|
||||
|
||||
Have you checked that the changes are minimal, so that the same cannot be
|
||||
achieved with a smaller patch and/or simpler final code?
|
||||
@item
|
||||
If the change is to speed critical code, did you benchmark it?
|
||||
|
||||
If the change is to speed critical code, did you benchmark it?
|
||||
@item
|
||||
If you did any benchmarks, did you provide them in the mail?
|
||||
|
||||
If you did any benchmarks, did you provide them in the mail?
|
||||
@item
|
||||
Have you checked that the patch does not introduce buffer overflows or
|
||||
other security issues?
|
||||
|
||||
Have you checked that the patch does not introduce buffer overflows or
|
||||
other security issues?
|
||||
@item
|
||||
Did you test your decoder or demuxer against damaged data? If no, see
|
||||
tools/trasher, the noise bitstream filter, and
|
||||
@uref{http://caca.zoy.org/wiki/zzuf, zzuf}. Your decoder or demuxer
|
||||
should not crash, end in a (near) infinite loop, or allocate ridiculous
|
||||
amounts of memory when fed damaged data.
|
||||
|
||||
Did you test your decoder or demuxer against damaged data? If no, see
|
||||
tools/trasher, the noise bitstream filter, and
|
||||
@uref{http://caca.zoy.org/wiki/zzuf, zzuf}. Your decoder or demuxer
|
||||
should not crash, end in a (near) infinite loop, or allocate ridiculous
|
||||
amounts of memory when fed damaged data.
|
||||
@item
|
||||
Does the patch not mix functional and cosmetic changes?
|
||||
|
||||
Does the patch not mix functional and cosmetic changes?
|
||||
@item
|
||||
Did you add tabs or trailing whitespace to the code? Both are forbidden.
|
||||
|
||||
Did you add tabs or trailing whitespace to the code? Both are forbidden.
|
||||
@item
|
||||
Is the patch attached to the email you send?
|
||||
|
||||
Is the patch attached to the email you send?
|
||||
@item
|
||||
Is the mime type of the patch correct? It should be text/x-diff or
|
||||
text/x-patch or at least text/plain and not application/octet-stream.
|
||||
|
||||
Is the mime type of the patch correct? It should be text/x-diff or
|
||||
text/x-patch or at least text/plain and not application/octet-stream.
|
||||
@item
|
||||
If the patch fixes a bug, did you provide a verbose analysis of the bug?
|
||||
|
||||
If the patch fixes a bug, did you provide a verbose analysis of the bug?
|
||||
@item
|
||||
If the patch fixes a bug, did you provide enough information, including
|
||||
a sample, so the bug can be reproduced and the fix can be verified?
|
||||
Note please do not attach samples >100k to mails but rather provide a
|
||||
URL, you can upload to ftp://upload.ffmpeg.org
|
||||
|
||||
If the patch fixes a bug, did you provide enough information, including
|
||||
a sample, so the bug can be reproduced and the fix can be verified?
|
||||
Note please do not attach samples >100k to mails but rather provide a
|
||||
URL, you can upload to ftp://upload.ffmpeg.org
|
||||
@item
|
||||
Did you provide a verbose summary about what the patch does change?
|
||||
|
||||
Did you provide a verbose summary about what the patch does change?
|
||||
@item
|
||||
Did you provide a verbose explanation why it changes things like it does?
|
||||
|
||||
Did you provide a verbose explanation why it changes things like it does?
|
||||
@item
|
||||
Did you provide a verbose summary of the user visible advantages and
|
||||
disadvantages if the patch is applied?
|
||||
|
||||
Did you provide a verbose summary of the user visible advantages and
|
||||
disadvantages if the patch is applied?
|
||||
@item
|
||||
Did you provide an example so we can verify the new feature added by the
|
||||
patch easily?
|
||||
|
||||
Did you provide an example so we can verify the new feature added by the
|
||||
patch easily?
|
||||
@item
|
||||
If you added a new file, did you insert a license header? It should be
|
||||
taken from FFmpeg, not randomly copied and pasted from somewhere else.
|
||||
|
||||
If you added a new file, did you insert a license header? It should be
|
||||
taken from FFmpeg, not randomly copied and pasted from somewhere else.
|
||||
@item
|
||||
You should maintain alphabetical order in alphabetically ordered lists as
|
||||
long as doing so does not break API/ABI compatibility.
|
||||
|
||||
You should maintain alphabetical order in alphabetically ordered lists as
|
||||
long as doing so does not break API/ABI compatibility.
|
||||
@item
|
||||
Lines with similar content should be aligned vertically when doing so
|
||||
improves readability.
|
||||
|
||||
Lines with similar content should be aligned vertically when doing so
|
||||
improves readability.
|
||||
@item
|
||||
Consider to add a regression test for your code.
|
||||
|
||||
Consider to add a regression test for your code.
|
||||
@item
|
||||
If you added YASM code please check that things still work with --disable-yasm
|
||||
|
||||
If you added YASM code please check that things still work with --disable-yasm
|
||||
@item
|
||||
Make sure you check the return values of function and return appropriate
|
||||
error codes. Especially memory allocation functions like @code{av_malloc()}
|
||||
are notoriously left unchecked, which is a serious problem.
|
||||
|
||||
Make sure you check the return values of function and return appropriate
|
||||
error codes. Especially memory allocation functions like @code{av_malloc()}
|
||||
are notoriously left unchecked, which is a serious problem.
|
||||
@item
|
||||
Test your code with valgrind and or Address Sanitizer to ensure it's free
|
||||
of leaks, out of array accesses, etc.
|
||||
Test your code with valgrind and or Address Sanitizer to ensure it's free
|
||||
of leaks, out of array accesses, etc.
|
||||
@end enumerate
|
||||
|
||||
@section Patch review process
|
||||
@@ -663,15 +590,12 @@ the following steps:
|
||||
@item
|
||||
Configure to compile with instrumentation enabled:
|
||||
@code{configure --toolchain=gcov}.
|
||||
|
||||
@item
|
||||
Run your test case, either manually or via FATE. This can be either
|
||||
the full FATE regression suite, or any arbitrary invocation of any
|
||||
front-end tool provided by FFmpeg, in any combination.
|
||||
|
||||
@item
|
||||
Run @code{make lcov} to generate coverage data in HTML format.
|
||||
|
||||
@item
|
||||
View @code{lcov/index.html} in your preferred HTML viewer.
|
||||
@end enumerate
|
||||
@@ -706,13 +630,12 @@ There are two kinds of releases:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
@strong{Major releases} always include the latest and greatest
|
||||
features and functionality.
|
||||
|
||||
@strong{Major releases} always include the latest and greatest
|
||||
features and functionality.
|
||||
@item
|
||||
@strong{Point releases} are cut from @strong{release} branches,
|
||||
which are named @code{release/X}, with @code{X} being the release
|
||||
version number.
|
||||
@strong{Point releases} are cut from @strong{release} branches,
|
||||
which are named @code{release/X}, with @code{X} being the release
|
||||
version number.
|
||||
@end enumerate
|
||||
|
||||
Note that we promise to our users that shared libraries from any FFmpeg
|
||||
@@ -733,18 +656,15 @@ inclusion into a point release:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Fixes a security issue, preferably identified by a @strong{CVE
|
||||
number} issued by @url{http://cve.mitre.org/}.
|
||||
|
||||
Fixes a security issue, preferably identified by a @strong{CVE
|
||||
number} issued by @url{http://cve.mitre.org/}.
|
||||
@item
|
||||
Fixes a documented bug in @url{https://trac.ffmpeg.org}.
|
||||
|
||||
Fixes a documented bug in @url{https://trac.ffmpeg.org}.
|
||||
@item
|
||||
Improves the included documentation.
|
||||
|
||||
Improves the included documentation.
|
||||
@item
|
||||
Retains both source code and binary compatibility with previous
|
||||
point releases of the same release branch.
|
||||
Retains both source code and binary compatibility with previous
|
||||
point releases of the same release branch.
|
||||
@end enumerate
|
||||
|
||||
The order for checking the rules is (1 OR 2 OR 3) AND 4.
|
||||
@@ -756,42 +676,33 @@ The release process involves the following steps:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Ensure that the @file{RELEASE} file contains the version number for
|
||||
the upcoming release.
|
||||
|
||||
Ensure that the @file{RELEASE} file contains the version number for
|
||||
the upcoming release.
|
||||
@item
|
||||
Add the release at @url{https://trac.ffmpeg.org/admin/ticket/versions}.
|
||||
|
||||
Add the release at @url{https://trac.ffmpeg.org/admin/ticket/versions}.
|
||||
@item
|
||||
Announce the intent to do a release to the mailing list.
|
||||
|
||||
Announce the intent to do a release to the mailing list.
|
||||
@item
|
||||
Make sure all relevant security fixes have been backported. See
|
||||
@url{https://ffmpeg.org/security.html}.
|
||||
|
||||
Make sure all relevant security fixes have been backported. See
|
||||
@url{https://ffmpeg.org/security.html}.
|
||||
@item
|
||||
Ensure that the FATE regression suite still passes in the release
|
||||
branch on at least @strong{i386} and @strong{amd64}
|
||||
(cf. @ref{Regression tests}).
|
||||
|
||||
Ensure that the FATE regression suite still passes in the release
|
||||
branch on at least @strong{i386} and @strong{amd64}
|
||||
(cf. @ref{Regression tests}).
|
||||
@item
|
||||
Prepare the release tarballs in @code{bz2} and @code{gz} formats, and
|
||||
supplementing files that contain @code{gpg} signatures
|
||||
|
||||
Prepare the release tarballs in @code{bz2} and @code{gz} formats, and
|
||||
supplementing files that contain @code{gpg} signatures
|
||||
@item
|
||||
Publish the tarballs at @url{http://ffmpeg.org/releases}. Create and
|
||||
push an annotated tag in the form @code{nX}, with @code{X}
|
||||
containing the version number.
|
||||
|
||||
Publish the tarballs at @url{http://ffmpeg.org/releases}. Create and
|
||||
push an annotated tag in the form @code{nX}, with @code{X}
|
||||
containing the version number.
|
||||
@item
|
||||
Propose and send a patch to the @strong{ffmpeg-devel} mailing list
|
||||
with a news entry for the website.
|
||||
|
||||
Propose and send a patch to the @strong{ffmpeg-devel} mailing list
|
||||
with a news entry for the website.
|
||||
@item
|
||||
Publish the news entry.
|
||||
|
||||
Publish the news entry.
|
||||
@item
|
||||
Send announcement to the mailing list.
|
||||
Send announcement to the mailing list.
|
||||
@end enumerate
|
||||
|
||||
@bye
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,6 @@ OBJS=$(addsuffix .o,$(EXAMPLES))
|
||||
# the following examples make explicit use of the math library
|
||||
decoding_encoding: LDLIBS += -lm
|
||||
muxing: LDLIBS += -lm
|
||||
resampling_audio: LDLIBS += -lm
|
||||
|
||||
.phony: all clean-test clean
|
||||
|
||||
|
@@ -14,5 +14,5 @@ correctly configured.
|
||||
2) Build the examples in-tree
|
||||
|
||||
Assuming you are in the source FFmpeg checkout directory, you need to build
|
||||
FFmpeg (no need to make install in any prefix). Then you can go into
|
||||
FFmpeg (no need to make install in any prefix). Then you can go into the
|
||||
doc/examples and run a command such as PKG_CONFIG_PATH=pc-uninstalled make.
|
||||
|
@@ -47,6 +47,10 @@ static uint8_t *video_dst_data[4] = {NULL};
|
||||
static int video_dst_linesize[4];
|
||||
static int video_dst_bufsize;
|
||||
|
||||
static uint8_t **audio_dst_data = NULL;
|
||||
static int audio_dst_linesize;
|
||||
static int audio_dst_bufsize;
|
||||
|
||||
static int video_stream_idx = -1, audio_stream_idx = -1;
|
||||
static AVFrame *frame = NULL;
|
||||
static AVPacket pkt;
|
||||
@@ -56,7 +60,6 @@ static int audio_frame_count = 0;
|
||||
static int decode_packet(int *got_frame, int cached)
|
||||
{
|
||||
int ret = 0;
|
||||
int decoded = pkt.size;
|
||||
|
||||
if (pkt.stream_index == video_stream_idx) {
|
||||
/* decode video frame */
|
||||
@@ -88,32 +91,37 @@ static int decode_packet(int *got_frame, int cached)
|
||||
fprintf(stderr, "Error decoding audio frame\n");
|
||||
return ret;
|
||||
}
|
||||
/* Some audio decoders decode only part of the packet, and have to be
|
||||
* called again with the remainder of the packet data.
|
||||
* Sample: fate-suite/lossless-audio/luckynight-partial.shn
|
||||
* Also, some decoders might over-read the packet. */
|
||||
decoded = FFMIN(ret, pkt.size);
|
||||
|
||||
if (*got_frame) {
|
||||
size_t unpadded_linesize = frame->nb_samples * av_get_bytes_per_sample(frame->format);
|
||||
printf("audio_frame%s n:%d nb_samples:%d pts:%s\n",
|
||||
cached ? "(cached)" : "",
|
||||
audio_frame_count++, frame->nb_samples,
|
||||
av_ts2timestr(frame->pts, &audio_dec_ctx->time_base));
|
||||
|
||||
/* Write the raw audio data samples of the first plane. This works
|
||||
* fine for packed formats (e.g. AV_SAMPLE_FMT_S16). However,
|
||||
* most audio decoders output planar audio, which uses a separate
|
||||
* plane of audio samples for each channel (e.g. AV_SAMPLE_FMT_S16P).
|
||||
* In other words, this code will write only the first audio channel
|
||||
* in these cases.
|
||||
* You should use libswresample or libavfilter to convert the frame
|
||||
* to packed data. */
|
||||
fwrite(frame->extended_data[0], 1, unpadded_linesize, audio_dst_file);
|
||||
ret = av_samples_alloc(audio_dst_data, &audio_dst_linesize, av_frame_get_channels(frame),
|
||||
frame->nb_samples, frame->format, 1);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "Could not allocate audio buffer\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
/* TODO: extend return code of the av_samples_* functions so that this call is not needed */
|
||||
audio_dst_bufsize =
|
||||
av_samples_get_buffer_size(NULL, av_frame_get_channels(frame),
|
||||
frame->nb_samples, frame->format, 1);
|
||||
|
||||
/* copy audio data to destination buffer:
|
||||
* this is required since rawaudio expects non aligned data */
|
||||
av_samples_copy(audio_dst_data, frame->data, 0, 0,
|
||||
frame->nb_samples, av_frame_get_channels(frame), frame->format);
|
||||
|
||||
/* write to rawaudio file */
|
||||
fwrite(audio_dst_data[0], 1, audio_dst_bufsize, audio_dst_file);
|
||||
av_freep(&audio_dst_data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return decoded;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int open_codec_context(int *stream_idx,
|
||||
@@ -236,6 +244,8 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
if (open_codec_context(&audio_stream_idx, fmt_ctx, AVMEDIA_TYPE_AUDIO) >= 0) {
|
||||
int nb_planes;
|
||||
|
||||
audio_stream = fmt_ctx->streams[audio_stream_idx];
|
||||
audio_dec_ctx = audio_stream->codec;
|
||||
audio_dst_file = fopen(audio_dst_filename, "wb");
|
||||
@@ -244,6 +254,15 @@ int main (int argc, char **argv)
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
nb_planes = av_sample_fmt_is_planar(audio_dec_ctx->sample_fmt) ?
|
||||
audio_dec_ctx->channels : 1;
|
||||
audio_dst_data = av_mallocz(sizeof(uint8_t *) * nb_planes);
|
||||
if (!audio_dst_data) {
|
||||
fprintf(stderr, "Could not allocate audio data buffers\n");
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/* dump input information to stderr */
|
||||
@@ -274,15 +293,8 @@ int main (int argc, char **argv)
|
||||
|
||||
/* read frames from the file */
|
||||
while (av_read_frame(fmt_ctx, &pkt) >= 0) {
|
||||
AVPacket orig_pkt = pkt;
|
||||
do {
|
||||
ret = decode_packet(&got_frame, 0);
|
||||
if (ret < 0)
|
||||
break;
|
||||
pkt.data += ret;
|
||||
pkt.size -= ret;
|
||||
} while (pkt.size > 0);
|
||||
av_free_packet(&orig_pkt);
|
||||
decode_packet(&got_frame, 0);
|
||||
av_free_packet(&pkt);
|
||||
}
|
||||
|
||||
/* flush cached frames */
|
||||
@@ -302,25 +314,13 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
if (audio_stream) {
|
||||
enum AVSampleFormat sfmt = audio_dec_ctx->sample_fmt;
|
||||
int n_channels = audio_dec_ctx->channels;
|
||||
const char *fmt;
|
||||
|
||||
if (av_sample_fmt_is_planar(sfmt)) {
|
||||
const char *packed = av_get_sample_fmt_name(sfmt);
|
||||
printf("Warning: the sample format the decoder produced is planar "
|
||||
"(%s). This example will output the first channel only.\n",
|
||||
packed ? packed : "?");
|
||||
sfmt = av_get_packed_sample_fmt(sfmt);
|
||||
n_channels = 1;
|
||||
}
|
||||
|
||||
if ((ret = get_format_from_sample_fmt(&fmt, sfmt)) < 0)
|
||||
if ((ret = get_format_from_sample_fmt(&fmt, audio_dec_ctx->sample_fmt)) < 0)
|
||||
goto end;
|
||||
|
||||
printf("Play the output audio file with the command:\n"
|
||||
"ffplay -f %s -ac %d -ar %d %s\n",
|
||||
fmt, n_channels, audio_dec_ctx->sample_rate,
|
||||
fmt, audio_dec_ctx->channels, audio_dec_ctx->sample_rate,
|
||||
audio_dst_filename);
|
||||
}
|
||||
|
||||
@@ -336,6 +336,7 @@ end:
|
||||
fclose(audio_dst_file);
|
||||
av_free(frame);
|
||||
av_free(video_dst_data[0]);
|
||||
av_free(audio_dst_data);
|
||||
|
||||
return ret < 0;
|
||||
}
|
||||
|
@@ -38,8 +38,8 @@
|
||||
#include <libavfilter/buffersrc.h>
|
||||
#include <libavutil/opt.h>
|
||||
|
||||
static const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono";
|
||||
static const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
|
||||
const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono";
|
||||
const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
|
||||
|
||||
static AVFormatContext *fmt_ctx;
|
||||
static AVCodecContext *dec_ctx;
|
||||
@@ -90,9 +90,9 @@ static int init_filters(const char *filters_descr)
|
||||
AVFilter *abuffersink = avfilter_get_by_name("abuffersink");
|
||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
||||
AVFilterInOut *inputs = avfilter_inout_alloc();
|
||||
static const enum AVSampleFormat out_sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
|
||||
static const int64_t out_channel_layouts[] = { AV_CH_LAYOUT_MONO, -1 };
|
||||
static const int out_sample_rates[] = { 8000, -1 };
|
||||
const enum AVSampleFormat out_sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
|
||||
const int64_t out_channel_layouts[] = { AV_CH_LAYOUT_MONO, -1 };
|
||||
const int out_sample_rates[] = { 8000, -1 };
|
||||
const AVFilterLink *outlink;
|
||||
AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base;
|
||||
|
||||
|
42
doc/faq.texi
42
doc/faq.texi
@@ -105,7 +105,7 @@ For example, img1.jpg, img2.jpg, img3.jpg,...
|
||||
Then you may run:
|
||||
|
||||
@example
|
||||
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
|
||||
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
|
||||
@end example
|
||||
|
||||
Notice that @samp{%d} is replaced by the image number.
|
||||
@@ -118,7 +118,7 @@ the sequence. This is useful if your sequence does not start with
|
||||
example will start with @file{img100.jpg}:
|
||||
|
||||
@example
|
||||
ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg
|
||||
ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg
|
||||
@end example
|
||||
|
||||
If you have large number of pictures to rename, you can use the
|
||||
@@ -128,7 +128,7 @@ that match @code{*jpg} to the @file{/tmp} directory in the sequence of
|
||||
@file{img001.jpg}, @file{img002.jpg} and so on.
|
||||
|
||||
@example
|
||||
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
|
||||
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
|
||||
@end example
|
||||
|
||||
If you want to sequence them by oldest modified first, substitute
|
||||
@@ -137,7 +137,7 @@ If you want to sequence them by oldest modified first, substitute
|
||||
Then run:
|
||||
|
||||
@example
|
||||
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
|
||||
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
|
||||
@end example
|
||||
|
||||
The same logic is used for any image format that ffmpeg reads.
|
||||
@@ -145,7 +145,7 @@ The same logic is used for any image format that ffmpeg reads.
|
||||
You can also use @command{cat} to pipe images to ffmpeg:
|
||||
|
||||
@example
|
||||
cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
|
||||
cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
|
||||
@end example
|
||||
|
||||
@section How do I encode movie to single pictures?
|
||||
@@ -153,7 +153,7 @@ cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
|
||||
Use:
|
||||
|
||||
@example
|
||||
ffmpeg -i movie.mpg movie%d.jpg
|
||||
ffmpeg -i movie.mpg movie%d.jpg
|
||||
@end example
|
||||
|
||||
The @file{movie.mpg} used as input will be converted to
|
||||
@@ -169,7 +169,7 @@ to force the encoding.
|
||||
|
||||
Applying that to the previous example:
|
||||
@example
|
||||
ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg
|
||||
ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg
|
||||
@end example
|
||||
|
||||
Beware that there is no "jpeg" codec. Use "mjpeg" instead.
|
||||
@@ -227,15 +227,15 @@ then you may use any file that DirectShow can read as input.
|
||||
|
||||
Just create an "input.avs" text file with this single line ...
|
||||
@example
|
||||
DirectShowSource("C:\path to your file\yourfile.asf")
|
||||
DirectShowSource("C:\path to your file\yourfile.asf")
|
||||
@end example
|
||||
... and then feed that text file to ffmpeg:
|
||||
@example
|
||||
ffmpeg -i input.avs
|
||||
ffmpeg -i input.avs
|
||||
@end example
|
||||
|
||||
For ANY other help on AviSynth, please visit the
|
||||
@uref{http://www.avisynth.org/, AviSynth homepage}.
|
||||
For ANY other help on Avisynth, please visit the
|
||||
@uref{http://www.avisynth.org/, Avisynth homepage}.
|
||||
|
||||
@section How can I join video files?
|
||||
|
||||
@@ -475,10 +475,9 @@ read @uref{http://www.tux.org/lkml/#s15, "Programming Religion"}.
|
||||
|
||||
@section Why are the ffmpeg programs devoid of debugging symbols?
|
||||
|
||||
The build process creates @command{ffmpeg_g}, @command{ffplay_g}, etc. which
|
||||
contain full debug information. Those binaries are stripped to create
|
||||
@command{ffmpeg}, @command{ffplay}, etc. If you need the debug information, use
|
||||
the *_g versions.
|
||||
The build process creates ffmpeg_g, ffplay_g, etc. which contain full debug
|
||||
information. Those binaries are stripped to create ffmpeg, ffplay, etc. If
|
||||
you need the debug information, use the *_g versions.
|
||||
|
||||
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
||||
|
||||
@@ -498,7 +497,7 @@ An easy way to get the full list of required libraries in dependency order
|
||||
is to use @code{pkg-config}.
|
||||
|
||||
@example
|
||||
c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec)
|
||||
c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec)
|
||||
@end example
|
||||
|
||||
See @file{doc/example/Makefile} and @file{doc/example/pc-uninstalled} for
|
||||
@@ -522,6 +521,10 @@ to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
|
||||
You have to create a custom AVIOContext using @code{avio_alloc_context},
|
||||
see @file{libavformat/aviobuf.c} in FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer or MPlayer2 sources.
|
||||
|
||||
@section Where can I find libav* headers for Pascal/Delphi?
|
||||
|
||||
see @url{http://www.iversenit.dk/dev/ffmpeg-headers/}
|
||||
|
||||
@section Where is the documentation about ffv1, msmpeg4, asv1, 4xm?
|
||||
|
||||
see @url{http://www.ffmpeg.org/~michael/}
|
||||
@@ -534,12 +537,11 @@ In this specific case please look at RFC 4629 to see how it should be done.
|
||||
|
||||
@section AVStream.r_frame_rate is wrong, it is much larger than the frame rate.
|
||||
|
||||
@code{r_frame_rate} is NOT the average frame rate, it is the smallest frame rate
|
||||
r_frame_rate is NOT the average frame rate, it is the smallest frame rate
|
||||
that can accurately represent all timestamps. So no, it is not
|
||||
wrong if it is larger than the average!
|
||||
For example, if you have mixed 25 and 30 fps content, then @code{r_frame_rate}
|
||||
will be 150 (it is the least common multiple).
|
||||
If you are looking for the average frame rate, see @code{AVStream.avg_frame_rate}.
|
||||
For example, if you have mixed 25 and 30 fps content, then r_frame_rate
|
||||
will be 150.
|
||||
|
||||
@section Why is @code{make fate} not running all tests?
|
||||
|
||||
|
@@ -153,20 +153,20 @@ the synchronisation of the samples directory.
|
||||
|
||||
@table @option
|
||||
@item fate-rsync
|
||||
Download/synchronize sample files to the configured samples directory.
|
||||
Download/synchronize sample files to the configured samples directory.
|
||||
|
||||
@item fate-list
|
||||
Will list all fate/regression test targets.
|
||||
Will list all fate/regression test targets.
|
||||
|
||||
@item fate
|
||||
Run the FATE test suite (requires the fate-suite dataset).
|
||||
Run the FATE test suite (requires the fate-suite dataset).
|
||||
@end table
|
||||
|
||||
@section Makefile variables
|
||||
|
||||
@table @option
|
||||
@item V
|
||||
Verbosity level, can be set to 0, 1 or 2.
|
||||
Verbosity level, can be set to 0, 1 or 2.
|
||||
@itemize
|
||||
@item 0: show just the test arguments
|
||||
@item 1: show just the command used in the test
|
||||
@@ -174,26 +174,22 @@ Verbosity level, can be set to 0, 1 or 2.
|
||||
@end itemize
|
||||
|
||||
@item SAMPLES
|
||||
Specify or override the path to the FATE samples at make time, it has a
|
||||
meaning only while running the regression tests.
|
||||
Specify or override the path to the FATE samples at make time, it has a
|
||||
meaning only while running the regression tests.
|
||||
|
||||
@item THREADS
|
||||
Specify how many threads to use while running regression tests, it is
|
||||
quite useful to detect thread-related regressions.
|
||||
|
||||
Specify how many threads to use while running regression tests, it is
|
||||
quite useful to detect thread-related regressions.
|
||||
@item THREAD_TYPE
|
||||
Specify which threading strategy test, either @var{slice} or @var{frame},
|
||||
by default @var{slice+frame}
|
||||
|
||||
Specify which threading strategy test, either @var{slice} or @var{frame},
|
||||
by default @var{slice+frame}
|
||||
@item CPUFLAGS
|
||||
Specify CPU flags.
|
||||
|
||||
Specify CPU flags.
|
||||
@item TARGET_EXEC
|
||||
Specify or override the wrapper used to run the tests.
|
||||
The @var{TARGET_EXEC} option provides a way to run FATE wrapped in
|
||||
@command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets
|
||||
through @command{ssh}.
|
||||
|
||||
Specify or override the wrapper used to run the tests.
|
||||
The @var{TARGET_EXEC} option provides a way to run FATE wrapped in
|
||||
@command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets
|
||||
through @command{ssh}.
|
||||
@item GEN
|
||||
Set to @var{1} to generate the missing or mismatched references.
|
||||
@end table
|
||||
|
@@ -12,7 +12,7 @@
|
||||
@chapter Description
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
The FFmpeg resampler provides a high-level interface to the
|
||||
The FFmpeg resampler provides an high-level interface to the
|
||||
libswresample library audio resampling utilities. In particular it
|
||||
allows to perform audio resampling, audio channel layout rematrixing,
|
||||
and convert audio format and packing layout.
|
||||
|
@@ -12,7 +12,7 @@
|
||||
@chapter Description
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
The FFmpeg rescaler provides a high-level interface to the libswscale
|
||||
The FFmpeg rescaler provides an high-level interface to the libswscale
|
||||
library image conversion utilities. In particular it allows to perform
|
||||
image rescaling and pixel format conversion.
|
||||
|
||||
|
@@ -214,7 +214,7 @@ described.
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
@include avtools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@@ -272,15 +272,9 @@ Set the file size limit, expressed in bytes.
|
||||
|
||||
@item -ss @var{position} (@emph{input/output})
|
||||
When used as an input option (before @code{-i}), seeks in this input file to
|
||||
@var{position}. Note the in most formats it is not possible to seek exactly, so
|
||||
@command{ffmpeg} will seek to the closest seek point before @var{position}.
|
||||
When transcoding and @option{-accurate_seek} is enabled (the default), this
|
||||
extra segment between the seek point and @var{position} will be decoded and
|
||||
discarded. When doing stream copy or when @option{-noaccurate_seek} is used, it
|
||||
will be preserved.
|
||||
|
||||
When used as an output option (before an output filename), decodes but discards
|
||||
input until the timestamps reach @var{position}.
|
||||
@var{position}. When used as an output option (before an output filename),
|
||||
decodes but discards input until the timestamps reach @var{position}. This is
|
||||
slower, but more accurate.
|
||||
|
||||
@var{position} may be either in seconds or in @code{hh:mm:ss[.xxx]} form.
|
||||
|
||||
@@ -877,12 +871,13 @@ Dump each input packet to stderr.
|
||||
When dumping packets, also dump the payload.
|
||||
@item -re (@emph{input})
|
||||
Read input at native frame rate. Mainly used to simulate a grab device.
|
||||
or live input stream (e.g. when reading from a file). Should not be used
|
||||
with actual grab devices or live input streams (where it can cause packet
|
||||
loss).
|
||||
By default @command{ffmpeg} attempts to read the input(s) as fast as possible.
|
||||
This option will slow down the reading of the input(s) to the native frame rate
|
||||
of the input(s). It is useful for real-time output (e.g. live streaming).
|
||||
of the input(s). It is useful for real-time output (e.g. live streaming). If
|
||||
your input(s) is coming from some other live streaming source (through HTTP or
|
||||
UDP for example) the server might already be in real-time, thus the option will
|
||||
likely not be required. On the other hand, this is meaningful if your input(s)
|
||||
is a file you are trying to push in real-time.
|
||||
@item -loop_input
|
||||
Loop over the input stream. Currently it works only for image
|
||||
streams. This option is used for automatic FFserver testing.
|
||||
@@ -1065,12 +1060,6 @@ This option is similar to @option{-filter_complex}, the only difference is that
|
||||
its argument is the name of the file from which a complex filtergraph
|
||||
description is to be read.
|
||||
|
||||
@item -accurate_seek (@emph{input})
|
||||
This option enables or disables accurate seeking in input files with the
|
||||
@option{-ss} option. It is enabled by default, so seeking is accurate when
|
||||
transcoding. Use @option{-noaccurate_seek} to disable it, which may be useful
|
||||
e.g. when copying some streams and transcoding the others.
|
||||
|
||||
@item -override_ffserver (@emph{global})
|
||||
Overrides the input specifications from ffserver. Using this option you can
|
||||
map any input stream to ffserver and control many aspects of the encoding from
|
||||
@@ -1136,7 +1125,7 @@ then it will search for the file @file{libvpx-1080p.ffpreset}.
|
||||
|
||||
@itemize
|
||||
@item
|
||||
For streaming at very low bitrates, use a low frame rate
|
||||
For streaming at very low bitrate application, use a low frame rate
|
||||
and a small GOP size. This is especially true for RealVideo where
|
||||
the Linux player does not seem to be very fast, so it can miss
|
||||
frames. An example is:
|
||||
@@ -1215,14 +1204,14 @@ standard mixer.
|
||||
Grab the X11 display with ffmpeg via
|
||||
|
||||
@example
|
||||
ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 /tmp/out.mpg
|
||||
ffmpeg -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
|
||||
@end example
|
||||
|
||||
0.0 is display.screen number of your X11 server, same as
|
||||
the DISPLAY environment variable.
|
||||
|
||||
@example
|
||||
ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0+10,20 /tmp/out.mpg
|
||||
ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
|
||||
@end example
|
||||
|
||||
0.0 is display.screen number of your X11 server, same as the DISPLAY environment
|
||||
|
@@ -24,7 +24,7 @@ various FFmpeg APIs.
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
@include avtools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@@ -174,16 +174,13 @@ Toggle full screen.
|
||||
Pause.
|
||||
|
||||
@item a
|
||||
Cycle audio channel in the curret program.
|
||||
Cycle audio channel.
|
||||
|
||||
@item v
|
||||
Cycle video channel.
|
||||
|
||||
@item t
|
||||
Cycle subtitle channel in the current program.
|
||||
|
||||
@item c
|
||||
Cycle program.
|
||||
Cycle subtitle channel.
|
||||
|
||||
@item w
|
||||
Show audio waves.
|
||||
|
@@ -44,15 +44,14 @@ name (which may be shared by other sections), and an unique
|
||||
name. See the output of @option{sections}.
|
||||
|
||||
Metadata tags stored in the container or in the streams are recognized
|
||||
and printed in the corresponding "FORMAT", "STREAM" or "PROGRAM_STREAM"
|
||||
section.
|
||||
and printed in the corresponding "FORMAT" or "STREAM" section.
|
||||
|
||||
@c man end
|
||||
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
@include avtools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
@@ -113,7 +112,7 @@ ffprobe -show_packets -select_streams v:1 INPUT
|
||||
@end example
|
||||
|
||||
@item -show_data
|
||||
Show payload data, as a hexadecimal and ASCII dump. Coupled with
|
||||
Show payload data, as an hexadecimal and ASCII dump. Coupled with
|
||||
@option{-show_packets}, it will dump the packets' data. Coupled with
|
||||
@option{-show_streams}, it will dump the codec extradata.
|
||||
|
||||
@@ -210,13 +209,6 @@ multimedia stream.
|
||||
Each media stream information is printed within a dedicated section
|
||||
with name "STREAM".
|
||||
|
||||
@item -show_programs
|
||||
Show information about programs and their streams contained in the input
|
||||
multimedia stream.
|
||||
|
||||
Each media stream information is printed within a dedicated section
|
||||
with name "PROGRAM_STREAM".
|
||||
|
||||
@item -show_chapters
|
||||
Show information about chapters stored in the format.
|
||||
|
||||
@@ -230,70 +222,6 @@ corresponding stream section.
|
||||
Count the number of packets per stream and report it in the
|
||||
corresponding stream section.
|
||||
|
||||
@item -read_intervals @var{read_intervals}
|
||||
|
||||
Read only the specified intervals. @var{read_intervals} must be a
|
||||
sequence of interval specifications separated by ",".
|
||||
@command{ffprobe} will seek to the interval starting point, and will
|
||||
continue reading from that.
|
||||
|
||||
Each interval is specified by two optional parts, separated by "%".
|
||||
|
||||
The first part specifies the interval start position. It is
|
||||
interpreted as an abolute position, or as a relative offset from the
|
||||
current position if it is preceded by the "+" character. If this first
|
||||
part is not specified, no seeking will be performed when reading this
|
||||
interval.
|
||||
|
||||
The second part specifies the interval end position. It is interpreted
|
||||
as an absolute position, or as a relative offset from the current
|
||||
position if it is preceded by the "+" character. If the offset
|
||||
specification starts with "#", it is interpreted as the number of
|
||||
packets to read (not including the flushing packets) from the interval
|
||||
start. If no second part is specified, the program will read until the
|
||||
end of the input.
|
||||
|
||||
Note that seeking is not accurate, thus the actual interval start
|
||||
point may be different from the specified position. Also, when an
|
||||
interval duration is specified, the absolute end time will be computed
|
||||
by adding the duration to the interval start point found by seeking
|
||||
the file, rather than to the specified start value.
|
||||
|
||||
The formal syntax is given by:
|
||||
@example
|
||||
@var{INTERVAL} ::= [@var{START}|+@var{START_OFFSET}][%[@var{END}|+@var{END_OFFSET}]]
|
||||
@var{INTERVALS} ::= @var{INTERVAL}[,@var{INTERVALS}]
|
||||
@end example
|
||||
|
||||
A few examples follow.
|
||||
@itemize
|
||||
@item
|
||||
Seek to time 10, read packets until 20 seconds after the found seek
|
||||
point, then seek to position @code{01:30} (1 minute and thirty
|
||||
seconds) and read packets until position @code{01:45}.
|
||||
@example
|
||||
10%+20,01:30%01:45
|
||||
@end example
|
||||
|
||||
@item
|
||||
Read only 42 packets after seeking to position @code{01:23}:
|
||||
@example
|
||||
01:23%+#42
|
||||
@end example
|
||||
|
||||
@item
|
||||
Read only the first 20 seconds from the start:
|
||||
@example
|
||||
%+20
|
||||
@end example
|
||||
|
||||
@item
|
||||
Read from the start until position @code{02:30}:
|
||||
@example
|
||||
%02:30
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@item -show_private_data, -private
|
||||
Show private data, that is data depending on the format of the
|
||||
particular shown element.
|
||||
@@ -351,8 +279,8 @@ keyN=valN
|
||||
[/SECTION]
|
||||
@end example
|
||||
|
||||
Metadata tags are printed as a line in the corresponding FORMAT, STREAM or
|
||||
PROGRAM_STREAM section, and are prefixed by the string "TAG:".
|
||||
Metadata tags are printed as a line in the corresponding FORMAT or
|
||||
STREAM section, and are prefixed by the string "TAG:".
|
||||
|
||||
A description of the accepted options follows.
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
<xsd:element name="packets" type="ffprobe:packetsType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="frames" type="ffprobe:framesType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="programs" type="ffprobe:programsType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="chapters" type="ffprobe:chaptersType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="format" type="ffprobe:formatType" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="error" type="ffprobe:errorType" minOccurs="0" maxOccurs="1" />
|
||||
@@ -88,12 +87,6 @@
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="programsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="program" type="ffprobe:programType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="streamDispositionType">
|
||||
<xsd:attribute name="default" type="xsd:int" use="required" />
|
||||
<xsd:attribute name="dub" type="xsd:int" use="required" />
|
||||
@@ -110,8 +103,8 @@
|
||||
|
||||
<xsd:complexType name="streamType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
|
||||
<xsd:attribute name="index" type="xsd:int" use="required"/>
|
||||
@@ -138,7 +131,6 @@
|
||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
||||
<xsd:attribute name="sample_rate" type="xsd:int"/>
|
||||
<xsd:attribute name="channels" type="xsd:int"/>
|
||||
<xsd:attribute name="channel_layout" type="xsd:string"/>
|
||||
<xsd:attribute name="bits_per_sample" type="xsd:int"/>
|
||||
|
||||
<xsd:attribute name="id" type="xsd:string"/>
|
||||
@@ -155,23 +147,6 @@
|
||||
<xsd:attribute name="nb_read_packets" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="programType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
|
||||
<xsd:attribute name="program_id" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="program_num" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
||||
<xsd:attribute name="start_pts" type="xsd:long"/>
|
||||
<xsd:attribute name="end_time" type="xsd:float"/>
|
||||
<xsd:attribute name="end_pts" type="xsd:long"/>
|
||||
<xsd:attribute name="pmt_pid" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="pcr_pid" type="xsd:int" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="formatType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
@@ -179,14 +154,12 @@
|
||||
|
||||
<xsd:attribute name="filename" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="nb_programs" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="format_name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="format_long_name" type="xsd:string"/>
|
||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
||||
<xsd:attribute name="duration" type="xsd:float"/>
|
||||
<xsd:attribute name="size" type="xsd:long"/>
|
||||
<xsd:attribute name="bit_rate" type="xsd:long"/>
|
||||
<xsd:attribute name="probe_score" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="tagType">
|
||||
|
@@ -229,7 +229,7 @@ differing versions of tools. FFM2 is the default.
|
||||
@chapter Options
|
||||
@c man begin OPTIONS
|
||||
|
||||
@include fftools-common-opts.texi
|
||||
@include avtools-common-opts.texi
|
||||
|
||||
@section Main options
|
||||
|
||||
|
@@ -166,7 +166,7 @@ Buffer references ownership and permissions
|
||||
WRITE permission.
|
||||
|
||||
* Filters that read their input to produce a new frame on output (like
|
||||
scale) need the READ permission on input and must request a buffer
|
||||
scale) need the READ permission on input and and must request a buffer
|
||||
with the WRITE permission.
|
||||
|
||||
* Filters that intend to keep a reference after the filtering process
|
||||
|
937
doc/filters.texi
937
doc/filters.texi
File diff suppressed because it is too large
Load Diff
@@ -57,10 +57,6 @@ Enable RTP MP4A-LATM payload.
|
||||
Reduce the latency introduced by optional buffering
|
||||
@end table
|
||||
|
||||
@item seek2any @var{integer} (@emph{input})
|
||||
Allow seeking to non-keyframes on demuxer level when supported if set to 1.
|
||||
Default is 0.
|
||||
|
||||
@item analyzeduration @var{integer} (@emph{input})
|
||||
Specify how many microseconds are analyzed to probe the input. A
|
||||
higher value will allow to detect more accurate information, but will
|
||||
@@ -137,13 +133,6 @@ been without shifting.
|
||||
Also note that this affects only leading negative timestamps, and not
|
||||
non-monotonic negative timestamps.
|
||||
|
||||
@item skip_initial_bytes @var{integer} (@emph{input})
|
||||
Set number of bytes to skip before reading header and frames if set to 1.
|
||||
Default is 0.
|
||||
|
||||
@item correct_ts_overflow @var{integer} (@emph{input})
|
||||
Correct single timestamp overflows if set to 1. Default is 1.
|
||||
|
||||
@item flush_packets @var{integer} (@emph{output})
|
||||
Flush the underlying I/O stream after each packet. Default 1 enables it, and
|
||||
has the effect of reducing the latency; 0 disables it and may slightly
|
||||
@@ -152,37 +141,6 @@ increase performance in some cases.
|
||||
|
||||
@c man end FORMAT OPTIONS
|
||||
|
||||
@anchor{Format stream specifiers}
|
||||
@section Format stream specifiers
|
||||
|
||||
Format stream specifiers allow selection of one or more streams that
|
||||
match specific properties.
|
||||
|
||||
Possible forms of stream specifiers are:
|
||||
@table @option
|
||||
@item @var{stream_index}
|
||||
Matches the stream with this index.
|
||||
|
||||
@item @var{stream_type}[:@var{stream_index}]
|
||||
@var{stream_type} is one of following: 'v' for video, 'a' for audio,
|
||||
's' for subtitle, 'd' for data, and 't' for attachments. If
|
||||
@var{stream_index} is given, then it matches the stream number
|
||||
@var{stream_index} of this type. Otherwise, it matches all streams of
|
||||
this type.
|
||||
|
||||
@item p:@var{program_id}[:@var{stream_index}]
|
||||
If @var{stream_index} is given, then it matches the stream with number
|
||||
@var{stream_index} in the program with the id
|
||||
@var{program_id}. Otherwise, it matches all streams in the program.
|
||||
|
||||
@item #@var{stream_id}
|
||||
Matches the stream by a format-specific ID.
|
||||
@end table
|
||||
|
||||
The exact semantics of stream specifiers is defined by the
|
||||
@code{avformat_match_stream_specifier()} function declared in the
|
||||
@file{libavformat/avformat.h} header.
|
||||
|
||||
@include demuxers.texi
|
||||
@include muxers.texi
|
||||
@include metadata.texi
|
||||
|
@@ -94,7 +94,7 @@ Then pass @code{--enable-libtwolame} to configure to enable it.
|
||||
|
||||
@section libvpx
|
||||
|
||||
FFmpeg can make use of the libvpx library for VP8/VP9 encoding.
|
||||
FFmpeg can make use of the libvpx library for VP8 encoding.
|
||||
|
||||
Go to @url{http://www.webmproject.org/} and follow the instructions for
|
||||
installing the library. Then pass @code{--enable-libvpx} to configure to
|
||||
@@ -133,20 +133,6 @@ Go to @url{https://github.com/dekkers/libilbc} and follow the instructions for
|
||||
installing the library. Then pass @code{--enable-libilbc} to configure to
|
||||
enable it.
|
||||
|
||||
@section libzvbi
|
||||
|
||||
libzvbi is a VBI decoding library which can be used by FFmpeg to decode DVB
|
||||
teletext pages and DVB teletext subtitles.
|
||||
|
||||
Go to @url{http://sourceforge.net/projects/zapping/} and follow the instructions for
|
||||
installing the library. Then pass @code{--enable-libzvbi} to configure to
|
||||
enable it.
|
||||
|
||||
@float NOTE
|
||||
libzvbi is licensed under the GNU General Public License Version 2 or later
|
||||
(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for details),
|
||||
you must upgrade FFmpeg's license to GPL in order to use it.
|
||||
@end float
|
||||
|
||||
|
||||
@chapter Supported File Formats, Codecs or Features
|
||||
@@ -182,7 +168,7 @@ library:
|
||||
@item AST @tab X @tab X
|
||||
@tab Audio format used on the Nintendo Wii.
|
||||
@item AVI @tab X @tab X
|
||||
@item AviSynth @tab @tab X
|
||||
@item AVISynth @tab @tab X
|
||||
@item AVR @tab @tab X
|
||||
@tab Audio format used on Mac.
|
||||
@item AVS @tab @tab X
|
||||
@@ -488,8 +474,6 @@ following image formats are supported:
|
||||
@tab YUV, JPEG and some extension is not supported yet.
|
||||
@item Truevision Targa @tab X @tab X
|
||||
@tab Targa (.TGA) image format
|
||||
@item WebP @tab @tab X
|
||||
@tab WebP image format
|
||||
@item XBM @tab X @tab X
|
||||
@tab X BitMap image format
|
||||
@item XFace @tab X @tab X
|
||||
@@ -607,6 +591,7 @@ following image formats are supported:
|
||||
@item H.263+ / H.263-1998 / H.263 version 2 @tab X @tab X
|
||||
@item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 @tab E @tab X
|
||||
@tab encoding supported through external library libx264
|
||||
@item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) @tab E @tab X
|
||||
@item HuffYUV @tab X @tab X
|
||||
@item HuffYUV FFmpeg variant @tab X @tab X
|
||||
@item IBM Ultimotion @tab @tab X
|
||||
@@ -659,6 +644,7 @@ following image formats are supported:
|
||||
@item Motion Pixels video @tab @tab X
|
||||
@item MPEG-1 video @tab X @tab X
|
||||
@item MPEG-1/2 video XvMC (X-Video Motion Compensation) @tab @tab X
|
||||
@item MPEG-1/2 video (VDPAU acceleration) @tab @tab X
|
||||
@item MPEG-2 video @tab X @tab X
|
||||
@item MPEG-4 part 2 @tab X @tab X
|
||||
@tab libxvidcore can be used alternatively for encoding.
|
||||
@@ -676,8 +662,6 @@ following image formats are supported:
|
||||
@tab fourcc: VP60,VP61,VP62
|
||||
@item VP8 @tab E @tab X
|
||||
@tab fourcc: VP80, encoding supported through external library libvpx
|
||||
@item VP9 @tab E @tab X
|
||||
@tab encoding supported through external library libvpx
|
||||
@item Pinnacle TARGA CineWave YUV16 @tab @tab X
|
||||
@tab fourcc: Y216
|
||||
@item Prores @tab @tab X
|
||||
@@ -827,8 +811,8 @@ following image formats are supported:
|
||||
@item Amazing Studio PAF Audio @tab @tab X
|
||||
@item Apple lossless audio @tab X @tab X
|
||||
@tab QuickTime fourcc 'alac'
|
||||
@item ATRAC1 @tab @tab X
|
||||
@item ATRAC3 @tab @tab X
|
||||
@item Atrac 1 @tab @tab X
|
||||
@item Atrac 3 @tab @tab X
|
||||
@item Bink Audio @tab @tab X
|
||||
@tab Used in Bink and Smacker files in many games.
|
||||
@item CELT @tab @tab E
|
||||
@@ -938,9 +922,8 @@ following image formats are supported:
|
||||
@tab Used in LucasArts SMUSH animations.
|
||||
@item Vorbis @tab E @tab X
|
||||
@tab A native but very primitive encoder exists.
|
||||
@item Voxware MetaSound @tab @tab X
|
||||
@tab imperfect and incomplete support
|
||||
@item WavPack @tab X @tab X
|
||||
@item WavPack @tab E @tab X
|
||||
@tab supported through external library libwavpack
|
||||
@item Westwood Audio (SND1) @tab @tab X
|
||||
@item Windows Media Audio 1 @tab X @tab X
|
||||
@item Windows Media Audio 2 @tab X @tab X
|
||||
@@ -963,7 +946,6 @@ performance on systems without hardware floating point support).
|
||||
@item 3GPP Timed Text @tab @tab @tab X @tab X
|
||||
@item AQTitle @tab @tab X @tab @tab X
|
||||
@item DVB @tab X @tab X @tab X @tab X
|
||||
@item DVB teletext @tab @tab X @tab @tab E
|
||||
@item DVD @tab X @tab X @tab X @tab X
|
||||
@item JACOsub @tab X @tab X @tab @tab X
|
||||
@item MicroDVD @tab X @tab X @tab @tab X
|
||||
@@ -986,8 +968,6 @@ performance on systems without hardware floating point support).
|
||||
|
||||
@code{X} means that the feature is supported.
|
||||
|
||||
@code{E} means that support is provided through an external library.
|
||||
|
||||
@section Network Protocols
|
||||
|
||||
@multitable @columnfractions .4 .1
|
||||
|
117
doc/indevs.texi
117
doc/indevs.texi
@@ -485,52 +485,87 @@ For more information about OSS see:
|
||||
|
||||
@section pulse
|
||||
|
||||
PulseAudio input device.
|
||||
pulseaudio input device.
|
||||
|
||||
To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
|
||||
To enable this input device during configuration you need libpulse-simple
|
||||
installed in your system.
|
||||
|
||||
The filename to provide to the input device is a source device or the
|
||||
string "default"
|
||||
|
||||
To list the PulseAudio source devices and their properties you can invoke
|
||||
To list the pulse source devices and their properties you can invoke
|
||||
the command @command{pactl list sources}.
|
||||
|
||||
More information about PulseAudio can be found on @url{http://www.pulseaudio.org}.
|
||||
|
||||
@subsection Options
|
||||
@table @option
|
||||
@item server
|
||||
Connect to a specific PulseAudio server, specified by an IP address.
|
||||
Default server is used when not provided.
|
||||
|
||||
@item name
|
||||
Specify the application name PulseAudio will use when showing active clients,
|
||||
by default it is the @code{LIBAVFORMAT_IDENT} string.
|
||||
|
||||
@item stream_name
|
||||
Specify the stream name PulseAudio will use when showing active streams,
|
||||
by default it is "record".
|
||||
|
||||
@item sample_rate
|
||||
Specify the samplerate in Hz, by default 48kHz is used.
|
||||
|
||||
@item channels
|
||||
Specify the channels in use, by default 2 (stereo) is set.
|
||||
|
||||
@item frame_size
|
||||
Specify the number of bytes per frame, by default it is set to 1024.
|
||||
|
||||
@item fragment_size
|
||||
Specify the minimal buffering fragment in PulseAudio, it will affect the
|
||||
audio latency. By default it is unset.
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
Record a stream from default device:
|
||||
@example
|
||||
ffmpeg -f pulse -i default /tmp/pulse.wav
|
||||
@end example
|
||||
|
||||
@subsection @var{server} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-server @var{server name}
|
||||
@end example
|
||||
|
||||
Connects to a specific server.
|
||||
|
||||
@subsection @var{name} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-name @var{application name}
|
||||
@end example
|
||||
|
||||
Specify the application name pulse will use when showing active clients,
|
||||
by default it is the LIBAVFORMAT_IDENT string
|
||||
|
||||
@subsection @var{stream_name} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-stream_name @var{stream name}
|
||||
@end example
|
||||
|
||||
Specify the stream name pulse will use when showing active streams,
|
||||
by default it is "record"
|
||||
|
||||
@subsection @var{sample_rate} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-sample_rate @var{samplerate}
|
||||
@end example
|
||||
|
||||
Specify the samplerate in Hz, by default 48kHz is used.
|
||||
|
||||
@subsection @var{channels} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-channels @var{N}
|
||||
@end example
|
||||
|
||||
Specify the channels in use, by default 2 (stereo) is set.
|
||||
|
||||
@subsection @var{frame_size} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-frame_size @var{bytes}
|
||||
@end example
|
||||
|
||||
Specify the number of byte per frame, by default it is set to 1024.
|
||||
|
||||
@subsection @var{fragment_size} AVOption
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-fragment_size @var{bytes}
|
||||
@end example
|
||||
|
||||
Specify the minimal buffering fragment in pulseaudio, it will affect the
|
||||
audio latency. By default it is unset.
|
||||
|
||||
@section sndio
|
||||
|
||||
sndio input device.
|
||||
@@ -701,12 +736,12 @@ properties of your X11 display (e.g. grep for "name" or "dimensions").
|
||||
|
||||
For example to grab from @file{:0.0} using @command{ffmpeg}:
|
||||
@example
|
||||
ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
|
||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
||||
@end example
|
||||
|
||||
Grab at position @code{10,20}:
|
||||
@example
|
||||
ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
|
||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
|
||||
@end example
|
||||
|
||||
@subsection Options
|
||||
@@ -727,12 +762,12 @@ zero) to the edge of region.
|
||||
|
||||
For example:
|
||||
@example
|
||||
ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
|
||||
ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
|
||||
@end example
|
||||
|
||||
To follow only when the mouse pointer reaches within 100 pixels to edge:
|
||||
@example
|
||||
ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
|
||||
ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
|
||||
@end example
|
||||
|
||||
@item framerate
|
||||
@@ -748,12 +783,12 @@ know what is being grabbed if only a portion of the screen is grabbed.
|
||||
|
||||
For example:
|
||||
@example
|
||||
ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
|
||||
ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
|
||||
@end example
|
||||
|
||||
With @var{follow_mouse}:
|
||||
@example
|
||||
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
|
||||
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
|
||||
@end example
|
||||
|
||||
@item video_size
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FFmpeg's bug/feature request tracker manual
|
||||
FFmpeg's bug/patch/feature request tracker manual
|
||||
=================================================
|
||||
|
||||
NOTE: This is a draft.
|
||||
@@ -11,7 +11,7 @@ existing issues can be done through a web interface.
|
||||
|
||||
Issues can be different kinds of things we want to keep track of
|
||||
but that do not belong into the source tree itself. This includes
|
||||
bug reports, feature requests and license violations. We
|
||||
bug reports, patches, feature requests and license violations. We
|
||||
might add more items to this list in the future, so feel free to
|
||||
propose a new `type of issue' on the ffmpeg-devel mailing list if
|
||||
you feel it is worth tracking.
|
||||
@@ -28,9 +28,6 @@ http(s)://trac.ffmpeg.org
|
||||
|
||||
Type:
|
||||
-----
|
||||
art
|
||||
Artwork such as photos, music, banners, and logos.
|
||||
|
||||
bug / defect
|
||||
An error, flaw, mistake, failure, or fault in FFmpeg or libav* that
|
||||
prevents it from behaving as intended.
|
||||
@@ -44,18 +41,20 @@ feature request / enhancement
|
||||
license violation
|
||||
ticket to keep track of (L)GPL violations of ffmpeg by others
|
||||
|
||||
sponsoring request
|
||||
Developer requests for hardware, software, specifications, money,
|
||||
refunds, etc.
|
||||
patch
|
||||
A patch as generated by diff which conforms to the patch submission and
|
||||
development policy.
|
||||
|
||||
|
||||
Priority:
|
||||
---------
|
||||
critical
|
||||
Bugs about data loss and security issues.
|
||||
Bugs and patches which deal with data loss and security issues.
|
||||
No feature request can be critical.
|
||||
|
||||
important
|
||||
Bugs which make FFmpeg unusable for a significant number of users.
|
||||
Bugs which make FFmpeg unusable for a significant number of users, and
|
||||
patches fixing them.
|
||||
Examples here might be completely broken MPEG-4 decoding or a build issue
|
||||
on Linux.
|
||||
While broken 4xm decoding or a broken OS/2 build would not be important,
|
||||
@@ -69,7 +68,7 @@ normal
|
||||
|
||||
|
||||
minor
|
||||
Bugs about things like spelling errors, "mp2" instead of
|
||||
Bugs and patches about things like spelling errors, "mp2" instead of
|
||||
"mp3" being shown and such.
|
||||
Feature requests about things few people want or which do not make a big
|
||||
difference.
|
||||
@@ -104,13 +103,13 @@ This state implicates that the bug either has been reproduced or that
|
||||
reproduction is not needed as the bug is already understood.
|
||||
|
||||
|
||||
Type/Status:
|
||||
Type/Status/Substatus:
|
||||
----------
|
||||
*/new
|
||||
Initial state of new bugs and feature requests submitted by
|
||||
*/new/new
|
||||
Initial state of new bugs, patches and feature requests submitted by
|
||||
users.
|
||||
|
||||
*/open
|
||||
*/open/open
|
||||
Issues which have been briefly looked at and which did not look outright
|
||||
invalid.
|
||||
This implicates that no real more detailed state applies yet. Conversely,
|
||||
@@ -118,7 +117,9 @@ Type/Status:
|
||||
looked at.
|
||||
|
||||
*/closed/duplicate
|
||||
Bugs or feature requests which are duplicates.
|
||||
Bugs, patches or feature requests which are duplicates.
|
||||
Note that patches dealing with the same thing in a different way are not
|
||||
duplicates.
|
||||
Note, if you mark something as duplicate, do not forget setting the
|
||||
superseder so bug reports are properly linked.
|
||||
|
||||
@@ -133,7 +134,7 @@ Type/Status:
|
||||
bug/closed/fixed
|
||||
Bugs which have to the best of our knowledge been fixed.
|
||||
|
||||
bug/closed/wontfix
|
||||
bug/closed/wont_fix
|
||||
Bugs which we will not fix. Possible reasons include legality, high
|
||||
complexity for the sake of supporting obscure corner cases, speed loss
|
||||
for similarly esoteric purposes, et cetera.
|
||||
@@ -147,15 +148,33 @@ bug/closed/works_for_me
|
||||
reproduction failed - that is the code seems to work correctly to the
|
||||
best of our knowledge.
|
||||
|
||||
feature_request/closed/fixed
|
||||
patch/open/approved
|
||||
Patches which have been reviewed and approved by a developer.
|
||||
Such patches can be applied anytime by any other developer after some
|
||||
reasonable testing (compile + regression tests + does the patch do
|
||||
what the author claimed).
|
||||
|
||||
patch/open/needs_changes
|
||||
Patches which have been reviewed and need changes to be accepted.
|
||||
|
||||
patch/closed/applied
|
||||
Patches which have been applied.
|
||||
|
||||
patch/closed/rejected
|
||||
Patches which have been rejected.
|
||||
|
||||
feature_request/closed/implemented
|
||||
Feature requests which have been implemented.
|
||||
|
||||
feature_request/closed/wontfix
|
||||
feature_request/closed/wont_implement
|
||||
Feature requests which will not be implemented. The reasons here could
|
||||
be legal, philosophical or others.
|
||||
|
||||
Note, please do not use type-status-substatus combinations other than the
|
||||
above without asking on ffmpeg-dev first!
|
||||
|
||||
Note2, if you provide the requested info do not forget to remove the
|
||||
needs_more_info resolution.
|
||||
needs_more_info substatus.
|
||||
|
||||
Component:
|
||||
----------
|
||||
|
@@ -20,7 +20,7 @@ Specifically, this library performs the following conversions:
|
||||
@itemize
|
||||
@item
|
||||
@emph{Resampling}: is the process of changing the audio rate, for
|
||||
example from a high sample rate of 44100Hz to 8000Hz. Audio
|
||||
example from an high sample rate of 44100Hz to 8000Hz. Audio
|
||||
conversion from high to low sample rate is a lossy process. Several
|
||||
resampling options and algorithms are available.
|
||||
|
||||
|
@@ -47,11 +47,6 @@ Files that have MIPS copyright notice in them:
|
||||
* libavutil/mips/
|
||||
float_dsp_mips.c
|
||||
libm_mips.h
|
||||
* libavcodec/
|
||||
fft_fixed_32.c
|
||||
fft_init_table.c
|
||||
fft_table.h
|
||||
mdct_fixed_32.c
|
||||
* libavcodec/mips/
|
||||
aaccoder_mips.c
|
||||
aacpsy_mips.h
|
||||
|
@@ -260,7 +260,7 @@ ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg
|
||||
@table @option
|
||||
@item start_number @var{number}
|
||||
Start the sequence from @var{number}. Default value is 1. Must be a
|
||||
non-negative number.
|
||||
positive number.
|
||||
|
||||
@item -update @var{number}
|
||||
If @var{number} is nonzero, the filename will always be interpreted as just a
|
||||
@@ -451,8 +451,8 @@ pair for each track, making it easier to separate tracks.
|
||||
|
||||
This option is implicitly set when writing ismv (Smooth Streaming) files.
|
||||
@item -movflags faststart
|
||||
Run a second pass moving the index (moov atom) to the beginning of the file.
|
||||
This operation can take a while, and will not work in various situations such
|
||||
Run a second pass moving the moov atom on top of the file. This
|
||||
operation can take a while, and will not work in various situations such
|
||||
as fragmented output, thus it is not enabled by default.
|
||||
@item -movflags rtphint
|
||||
Add RTP hinting tracks to the output file.
|
||||
@@ -522,40 +522,6 @@ Set the service_id (default 0x0001) also known as program in DVB.
|
||||
Set the first PID for PMT (default 0x1000, max 0x1f00).
|
||||
@item -mpegts_start_pid @var{number}
|
||||
Set the first PID for data packets (default 0x0100, max 0x0f00).
|
||||
@item -mpegts_m2ts_mode @var{number}
|
||||
Enable m2ts mode if set to 1. Default value is -1 which disables m2ts mode.
|
||||
@item -muxrate @var{number}
|
||||
Set muxrate.
|
||||
@item -pes_payload_size @var{number}
|
||||
Set minimum PES packet payload in bytes.
|
||||
@item -mpegts_flags @var{flags}
|
||||
Set flags (see below).
|
||||
@item -mpegts_copyts @var{number}
|
||||
Preserve original timestamps, if value is set to 1. Default value is -1, which
|
||||
results in shifting timestamps so that they start from 0.
|
||||
@item -tables_version @var{number}
|
||||
Set PAT, PMT and SDT version (default 0, valid values are from 0 to 31, inclusively).
|
||||
This option allows updating stream structure so that standard consumer may
|
||||
detect the change. To do so, reopen output AVFormatContext (in case of API
|
||||
usage) or restart ffmpeg instance, cyclically changing tables_version value:
|
||||
@example
|
||||
ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111
|
||||
ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111
|
||||
...
|
||||
ffmpeg -i source3.ts -codec copy -f mpegts -tables_version 31 udp://1.1.1.1:1111
|
||||
ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111
|
||||
ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111
|
||||
...
|
||||
@end example
|
||||
@end table
|
||||
|
||||
Option mpegts_flags may take a set of such flags:
|
||||
|
||||
@table @option
|
||||
@item resend_headers
|
||||
Reemit PAT/PMT before writing the next packet.
|
||||
@item latm
|
||||
Use LATM packetization for AAC.
|
||||
@end table
|
||||
|
||||
The recognized metadata settings in mpegts muxer are @code{service_provider}
|
||||
@@ -775,10 +741,6 @@ Reset timestamps at the begin of each segment, so that each segment
|
||||
will start with near-zero timestamps. It is meant to ease the playback
|
||||
of the generated segments. May not work with some combinations of
|
||||
muxers/codecs. It is set to @code{0} by default.
|
||||
|
||||
@item initial_offset @var{offset}
|
||||
Specify timestamp offset to apply to the output packet timestamps. The
|
||||
argument must be a time duration specification, and defaults to 0.
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
@@ -852,55 +814,19 @@ leading or trailing spaces or any special character, it must be
|
||||
escaped (see the ``Quoting and escaping'' section in the ffmpeg-utils
|
||||
manual).
|
||||
|
||||
Muxer options can be specified for each slave by prepending them as a list of
|
||||
Options can be specified for each slave by prepending them as a list of
|
||||
@var{key}=@var{value} pairs separated by ':', between square brackets. If
|
||||
the options values contain a special character or the ':' separator, they
|
||||
must be escaped; note that this is a second level escaping.
|
||||
|
||||
The following special options are also recognized:
|
||||
@table @option
|
||||
@item f
|
||||
Specify the format name. Useful if it cannot be guessed from the
|
||||
output name suffix.
|
||||
|
||||
@item bsfs[/@var{spec}]
|
||||
Specify a list of bitstream filters to apply to the specified
|
||||
output. It is possible to specify to which streams a given bitstream
|
||||
filter applies, by appending a stream specifier to the option
|
||||
separated by @code{/}. If the stream specifier is not specified, the
|
||||
bistream filters will be applied to all streams in the output.
|
||||
|
||||
Several bitstream filters can be specified, separated by ",".
|
||||
|
||||
@item select
|
||||
Select the streams that should be mapped to the slave output,
|
||||
specified by a stream specifier. If not specified, this defaults to
|
||||
all the input streams.
|
||||
@end table
|
||||
|
||||
Some examples follow.
|
||||
@itemize
|
||||
@item
|
||||
Encode something and both archive it in a WebM file and stream it
|
||||
Example: encode something and both archive it in a WebM file and stream it
|
||||
as MPEG-TS over UDP (the streams need to be explicitly mapped):
|
||||
|
||||
@example
|
||||
ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
|
||||
"archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
|
||||
@end example
|
||||
|
||||
@item
|
||||
Use @command{ffmpeg} to encode the input, and send the output
|
||||
to three different destinations. The @code{dump_extra} bitstream
|
||||
filter is used to add extradata information to all the output video
|
||||
keyframes packets, as requested by the MPEG-TS format. The select
|
||||
option is applied to @file{out.aac} in order to make it contain only
|
||||
audio packets.
|
||||
@example
|
||||
ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac -strict experimental
|
||||
-f tee "[bsfs/v=dump_extra]out.ts|[movflags=+faststart]out.mp4|[select=a]out.aac"
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
Note: some codecs may need different options depending on the output format;
|
||||
the auto-detection of this can not work with the tee muxer. The main example
|
||||
is the @option{global_header} flag.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@chapter Output Devices
|
||||
@c man begin OUTPUT DEVICES
|
||||
|
||||
Output devices are configured elements in FFmpeg that can write
|
||||
Output devices are configured elements in FFmpeg which allow to write
|
||||
multimedia data to an output device attached to your system.
|
||||
|
||||
When you configure your FFmpeg build, all the supported output devices
|
||||
@@ -104,74 +104,10 @@ ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@section fbdev
|
||||
|
||||
Linux framebuffer output device.
|
||||
|
||||
The Linux framebuffer is a graphic hardware-independent abstraction
|
||||
layer to show graphics on a computer monitor, typically on the
|
||||
console. It is accessed through a file device node, usually
|
||||
@file{/dev/fb0}.
|
||||
|
||||
For more detailed information read the file
|
||||
@file{Documentation/fb/framebuffer.txt} included in the Linux source tree.
|
||||
|
||||
@subsection Options
|
||||
@table @option
|
||||
|
||||
@item xoffset
|
||||
@item yoffset
|
||||
Set x/y coordinate of top left corner. Default is 0.
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
Play a file on framebuffer device @file{/dev/fb0}.
|
||||
Required pixel format depends on current framebuffer settings.
|
||||
@example
|
||||
ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
|
||||
@end example
|
||||
|
||||
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
||||
|
||||
@section oss
|
||||
|
||||
OSS (Open Sound System) output device.
|
||||
|
||||
@section pulse
|
||||
|
||||
PulseAudio output device.
|
||||
|
||||
To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
|
||||
|
||||
More information about PulseAudio can be found on @url{http://www.pulseaudio.org}
|
||||
|
||||
@subsection Options
|
||||
@table @option
|
||||
|
||||
@item server
|
||||
Connect to a specific PulseAudio server, specified by an IP address.
|
||||
Default server is used when not provided.
|
||||
|
||||
@item name
|
||||
Specify the application name PulseAudio will use when showing active clients,
|
||||
by default it is the @code{LIBAVFORMAT_IDENT} string.
|
||||
|
||||
@item stream_name
|
||||
Specify the stream name PulseAudio will use when showing active streams,
|
||||
by default it is set to the specified output name.
|
||||
|
||||
@item device
|
||||
Specify the device to use. Default device is used when not provided.
|
||||
List of output devices can be obtained with command @command{pactl list sinks}.
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
Play a file on default device on default server:
|
||||
@example
|
||||
ffmpeg -i INPUT -f pulse "stream name"
|
||||
@end example
|
||||
|
||||
@section sdl
|
||||
|
||||
SDL (Simple DirectMedia Layer) output device.
|
||||
@@ -203,10 +139,6 @@ Set the SDL window size, can be a string of the form
|
||||
@var{width}x@var{height} or a video size abbreviation.
|
||||
If not specified it defaults to the size of the input video,
|
||||
downscaled according to the aspect ratio.
|
||||
|
||||
@item window_fullscreen
|
||||
Set fullscreen mode when non-zero value is provided.
|
||||
Zero is a default.
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
|
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Anton Khirnov
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
#include <float.h>
|
||||
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavformat/options_table.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/options_table.h"
|
||||
#include "libavutil/opt.h"
|
||||
|
||||
static void print_usage(void)
|
||||
@@ -98,14 +96,18 @@ static void show_opts(const AVOption *opts, int per_stream)
|
||||
|
||||
static void show_format_opts(void)
|
||||
{
|
||||
#include "libavformat/options_table.h"
|
||||
|
||||
printf("@section Format AVOptions\n");
|
||||
show_opts(avformat_options, 0);
|
||||
show_opts(options, 0);
|
||||
}
|
||||
|
||||
static void show_codec_opts(void)
|
||||
{
|
||||
#include "libavcodec/options_table.h"
|
||||
|
||||
printf("@section Codec AVOptions\n");
|
||||
show_opts(avcodec_options, 1);
|
||||
show_opts(options, 1);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@@ -1,8 +1,8 @@
|
||||
@chapter Protocols
|
||||
@c man begin PROTOCOLS
|
||||
|
||||
Protocols are configured elements in FFmpeg that enable access to
|
||||
resources that require specific protocols.
|
||||
Protocols are configured elements in FFmpeg which allow to access
|
||||
resources which require the use of a particular protocol.
|
||||
|
||||
When you configure your FFmpeg build, all the supported protocols are
|
||||
enabled by default. You can list all available ones using the
|
||||
@@ -129,20 +129,6 @@ The ff* tools default to the file protocol, that is a resource
|
||||
specified with the name "FILE.mpeg" is interpreted as the URL
|
||||
"file:FILE.mpeg".
|
||||
|
||||
This protocol accepts the following options:
|
||||
|
||||
@table @option
|
||||
@item truncate
|
||||
Truncate existing files on write, if set to 1. A value of 0 prevents
|
||||
truncating. Default value is 1.
|
||||
|
||||
@item blocksize
|
||||
Set I/O operation maximum block size, in bytes. Default value is
|
||||
@code{INT_MAX}, which results in not limiting the requested block size.
|
||||
Setting this value reasonably low improves user termination request reaction
|
||||
time, which is valuable for files on slow medium.
|
||||
@end table
|
||||
|
||||
@section ftp
|
||||
|
||||
FTP (File Transfer Protocol).
|
||||
@@ -339,16 +325,6 @@ ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
||||
ffmpeg -i test.wav -f avi pipe: | cat > test.avi
|
||||
@end example
|
||||
|
||||
This protocol accepts the following options:
|
||||
|
||||
@table @option
|
||||
@item blocksize
|
||||
Set I/O operation maximum block size, in bytes. Default value is
|
||||
@code{INT_MAX}, which results in not limiting the requested block size.
|
||||
Setting this value reasonably low improves user termination request reaction
|
||||
time, which is valuable if data transmission is slow.
|
||||
@end table
|
||||
|
||||
Note that some formats (typically MOV), require the output protocol to
|
||||
be seekable, so they will fail with the pipe output protocol.
|
||||
|
||||
@@ -361,18 +337,12 @@ content across a TCP/IP network.
|
||||
|
||||
The required syntax is:
|
||||
@example
|
||||
rtmp://[@var{username}:@var{password}@@]@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
|
||||
rtmp://@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
|
||||
@end example
|
||||
|
||||
The accepted parameters are:
|
||||
@table @option
|
||||
|
||||
@item username
|
||||
An optional username (mostly for publishing).
|
||||
|
||||
@item password
|
||||
An optional password (mostly for publishing).
|
||||
|
||||
@item server
|
||||
The address of the RTMP server.
|
||||
|
||||
@@ -423,8 +393,7 @@ times to construct arbitrary AMF sequences.
|
||||
|
||||
@item rtmp_flashver
|
||||
Version of the Flash plugin used to run the SWF player. The default
|
||||
is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
|
||||
<libavformat version>).)
|
||||
is LNX 9,0,124,2.
|
||||
|
||||
@item rtmp_flush_interval
|
||||
Number of packets flushed in the same request (RTMPT only). The default
|
||||
@@ -474,12 +443,6 @@ For example to read with @command{ffplay} a multimedia resource named
|
||||
ffplay rtmp://myserver/vod/sample
|
||||
@end example
|
||||
|
||||
To publish to a password protected server, passing the playpath and
|
||||
app names separately:
|
||||
@example
|
||||
ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@@myserver/
|
||||
@end example
|
||||
|
||||
@section rtmpe
|
||||
|
||||
Encrypted Real-Time Messaging Protocol.
|
||||
@@ -520,39 +483,7 @@ The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
|
||||
for streaming multimedia content within HTTPS requests to traverse
|
||||
firewalls.
|
||||
|
||||
@section libssh
|
||||
|
||||
Secure File Transfer Protocol via libssh
|
||||
|
||||
Allow to read from or write to remote resources using SFTP protocol.
|
||||
|
||||
Following syntax is required.
|
||||
|
||||
@example
|
||||
sftp://[user[:password]@@]server[:port]/path/to/remote/resource.mpeg
|
||||
@end example
|
||||
|
||||
This protocol accepts the following options.
|
||||
|
||||
@table @option
|
||||
@item timeout
|
||||
Set timeout of socket I/O operations used by the underlying low level
|
||||
operation. By default it is set to -1, which means that the timeout
|
||||
is not specified.
|
||||
|
||||
@item truncate
|
||||
Truncate existing files on write, if set to 1. A value of 0 prevents
|
||||
truncating. Default value is 1.
|
||||
|
||||
@end table
|
||||
|
||||
Example: Play a file stored on remote server.
|
||||
|
||||
@example
|
||||
ffplay sftp://user:password@@server_address:22/home/user/resource.mpeg
|
||||
@end example
|
||||
|
||||
@section librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
|
||||
@section rtmp, rtmpe, rtmps, rtmpt, rtmpte
|
||||
|
||||
Real-Time Messaging Protocol and its variants supported through
|
||||
librtmp.
|
||||
@@ -594,70 +525,7 @@ ffplay "rtmp://myserver/live/mystream live=1"
|
||||
|
||||
@section rtp
|
||||
|
||||
Real-time Transport Protocol.
|
||||
|
||||
The required syntax for an RTP URL is:
|
||||
rtp://@var{hostname}[:@var{port}][?@var{option}=@var{val}...]
|
||||
|
||||
@var{port} specifies the RTP port to use.
|
||||
|
||||
The following URL options are supported:
|
||||
|
||||
@table @option
|
||||
|
||||
@item ttl=@var{n}
|
||||
Set the TTL (Time-To-Live) value (for multicast only).
|
||||
|
||||
@item rtcpport=@var{n}
|
||||
Set the remote RTCP port to @var{n}.
|
||||
|
||||
@item localrtpport=@var{n}
|
||||
Set the local RTP port to @var{n}.
|
||||
|
||||
@item localrtcpport=@var{n}'
|
||||
Set the local RTCP port to @var{n}.
|
||||
|
||||
@item pkt_size=@var{n}
|
||||
Set max packet size (in bytes) to @var{n}.
|
||||
|
||||
@item connect=0|1
|
||||
Do a @code{connect()} on the UDP socket (if set to 1) or not (if set
|
||||
to 0).
|
||||
|
||||
@item sources=@var{ip}[,@var{ip}]
|
||||
List allowed source IP addresses.
|
||||
|
||||
@item block=@var{ip}[,@var{ip}]
|
||||
List disallowed (blocked) source IP addresses.
|
||||
|
||||
@item write_to_source=0|1
|
||||
Send packets to the source address of the latest received packet (if
|
||||
set to 1) or to a default remote address (if set to 0).
|
||||
|
||||
@item localport=@var{n}
|
||||
Set the local RTP port to @var{n}.
|
||||
|
||||
This is a deprecated option. Instead, @option{localrtpport} should be
|
||||
used.
|
||||
|
||||
@end table
|
||||
|
||||
Important notes:
|
||||
|
||||
@enumerate
|
||||
|
||||
@item
|
||||
If @option{rtcpport} is not set the RTCP port will be set to the RTP
|
||||
port value plus 1.
|
||||
|
||||
@item
|
||||
If @option{localrtpport} (the local RTP port) is not set any available
|
||||
port will be used for the local RTP and RTCP ports.
|
||||
|
||||
@item
|
||||
If @option{localrtcpport} (the local RTCP port) is not set it will be
|
||||
set to the the local RTP port value plus 1.
|
||||
@end enumerate
|
||||
Real-Time Protocol.
|
||||
|
||||
@section rtsp
|
||||
|
||||
@@ -916,48 +784,29 @@ ffplay tcp://@var{hostname}:@var{port}
|
||||
|
||||
@section tls
|
||||
|
||||
Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
|
||||
Transport Layer Security/Secure Sockets Layer
|
||||
|
||||
The required syntax for a TLS/SSL url is:
|
||||
@example
|
||||
tls://@var{hostname}:@var{port}[?@var{options}]
|
||||
@end example
|
||||
|
||||
The following parameters can be set via command line options
|
||||
(or in code via @code{AVOption}s):
|
||||
|
||||
@table @option
|
||||
|
||||
@item ca_file, cafile=@var{filename}
|
||||
A file containing certificate authority (CA) root certificates to treat
|
||||
as trusted. If the linked TLS library contains a default this might not
|
||||
need to be specified for verification to work, but not all libraries and
|
||||
setups have defaults built in.
|
||||
The file must be in OpenSSL PEM format.
|
||||
@item listen
|
||||
Act as a server, listening for an incoming connection.
|
||||
|
||||
@item tls_verify=@var{1|0}
|
||||
If enabled, try to verify the peer that we are communicating with.
|
||||
Note, if using OpenSSL, this currently only makes sure that the
|
||||
peer certificate is signed by one of the root certificates in the CA
|
||||
database, but it does not validate that the certificate actually
|
||||
matches the host name we are trying to connect to. (With GnuTLS,
|
||||
the host name is validated as well.)
|
||||
@item cafile=@var{filename}
|
||||
Certificate authority file. The file must be in OpenSSL PEM format.
|
||||
|
||||
This is disabled by default since it requires a CA database to be
|
||||
provided by the caller in many cases.
|
||||
@item cert=@var{filename}
|
||||
Certificate file. The file must be in OpenSSL PEM format.
|
||||
|
||||
@item cert_file, cert=@var{filename}
|
||||
A file containing a certificate to use in the handshake with the peer.
|
||||
(When operating as server, in listen mode, this is more often required
|
||||
by the peer, while client certificates only are mandated in certain
|
||||
setups.)
|
||||
@item key=@var{filename}
|
||||
Private key file.
|
||||
|
||||
@item key_file, key=@var{filename}
|
||||
A file containing the private key for the certificate.
|
||||
|
||||
@item listen=@var{1|0}
|
||||
If enabled, listen for connections on the provided port, and assume
|
||||
the server role in the handshake instead of the client role.
|
||||
@item verify=@var{0|1}
|
||||
Verify the peer's certificate.
|
||||
|
||||
@end table
|
||||
|
||||
@@ -1064,24 +913,4 @@ To receive over UDP from a remote endpoint:
|
||||
ffmpeg -i udp://[@var{multicast-address}]:@var{port}
|
||||
@end example
|
||||
|
||||
@section unix
|
||||
|
||||
Unix local socket
|
||||
|
||||
The required syntax for a Unix socket URL is:
|
||||
|
||||
@example
|
||||
unix://@var{filepath}
|
||||
@end example
|
||||
|
||||
The following parameters can be set via command line options
|
||||
(or in code via @code{AVOption}s):
|
||||
|
||||
@table @option
|
||||
@item timeout
|
||||
Timeout in ms.
|
||||
@item listen
|
||||
Create the Unix socket in listening mode.
|
||||
@end table
|
||||
|
||||
@c man end PROTOCOLS
|
||||
|
@@ -42,11 +42,10 @@ Set the internal sample format. Default value is @code{none}.
|
||||
This will automatically be chosen when it is not explicitly set.
|
||||
|
||||
@item icl, in_channel_layout
|
||||
@item ocl, out_channel_layout
|
||||
Set the input/output channel layout.
|
||||
Set the input channel layout.
|
||||
|
||||
See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils}
|
||||
for the required syntax.
|
||||
@item ocl, out_channel_layout
|
||||
Set the output channel layout.
|
||||
|
||||
@item clev, center_mix_level
|
||||
Set the center mix level. It is a value expressed in deciBel, and must be
|
||||
@@ -64,11 +63,6 @@ be in the interval [-32,32].
|
||||
@item rmvol, rematrix_volume
|
||||
Set rematrix volume. Default value is 1.0.
|
||||
|
||||
@item rematrix_maxval
|
||||
Set maximum output value for rematrixing.
|
||||
This can be used to prevent clipping vs. preventing volumn reduction
|
||||
A value of 1.0 prevents cliping.
|
||||
|
||||
@item flags, swr_flags
|
||||
Set flags used by the converter. Default value is 0.
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
@anchor{scaler_options}
|
||||
@chapter Scaler Options
|
||||
@c man begin SCALER OPTIONS
|
||||
|
||||
@@ -10,7 +9,6 @@ FFmpeg tools. For programmatic use, they can be set explicitly in the
|
||||
|
||||
@table @option
|
||||
|
||||
@anchor{sws_flags}
|
||||
@item sws_flags
|
||||
Set the scaler flags. This is also used to set the scaling
|
||||
algorithm. Only a single algorithm should be selected.
|
||||
@@ -96,24 +94,6 @@ Set scaling algorithm parameters. The specified values are specific of
|
||||
some scaling algorithms and ignored by others. The specified values
|
||||
are floating point number values.
|
||||
|
||||
@item sws_dither
|
||||
Set the dithering algorithm. Accepts one of the following
|
||||
values. Default value is @samp{auto}.
|
||||
|
||||
@table @samp
|
||||
@item auto
|
||||
automatic choice
|
||||
|
||||
@item none
|
||||
no dithering
|
||||
|
||||
@item bayer
|
||||
bayer dither
|
||||
|
||||
@item ed
|
||||
error diffusion dither
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@c man end SCALER OPTIONS
|
||||
|
24
doc/snow.txt
24
doc/snow.txt
@@ -50,10 +50,8 @@ header:
|
||||
temporal_decomposition_count u header_state
|
||||
spatial_decomposition_count u header_state
|
||||
colorspace_type u header_state
|
||||
if (nb_planes > 2) {
|
||||
chroma_h_shift u header_state
|
||||
chroma_v_shift u header_state
|
||||
}
|
||||
chroma_h_shift u header_state
|
||||
chroma_v_shift u header_state
|
||||
spatial_scalability b header_state
|
||||
max_ref_frames-1 u header_state
|
||||
qlogs
|
||||
@@ -61,7 +59,7 @@ header:
|
||||
if(!keyframe){
|
||||
update_mc b header_state
|
||||
if(update_mc){
|
||||
for(plane=0; plane<nb_plane_types; plane++){
|
||||
for(plane=0; plane<2; plane++){
|
||||
diag_mc b header_state
|
||||
htaps/2-1 u header_state
|
||||
for(i= p->htaps/2; i; i--)
|
||||
@@ -82,7 +80,7 @@ header:
|
||||
block_max_depth s header_state
|
||||
|
||||
qlogs:
|
||||
for(plane=0; plane<nb_plane_types; plane++){
|
||||
for(plane=0; plane<2; plane++){
|
||||
quant_table[plane][0][0] s header_state
|
||||
for(level=0; level < spatial_decomposition_count; level++){
|
||||
quant_table[plane][level][1]s header_state
|
||||
@@ -133,10 +131,8 @@ block(level):
|
||||
|
||||
residual:
|
||||
residual2(luma)
|
||||
if (nb_planes > 2) {
|
||||
residual2(chroma_cr)
|
||||
residual2(chroma_cb)
|
||||
}
|
||||
residual2(chroma_cr)
|
||||
residual2(chroma_cb)
|
||||
|
||||
residual2:
|
||||
for(level=0; level<spatial_decomposition_count; level++){
|
||||
@@ -150,7 +146,7 @@ residual2:
|
||||
subband:
|
||||
FIXME
|
||||
|
||||
nb_plane_types = gray ? 1 : 2;
|
||||
|
||||
|
||||
Tag description:
|
||||
----------------
|
||||
@@ -172,11 +168,7 @@ spatial_decomposition_count
|
||||
FIXME
|
||||
|
||||
colorspace_type
|
||||
0 unspecified YcbCr
|
||||
1 Gray
|
||||
2 Gray + Alpha
|
||||
3 GBR
|
||||
4 GBRA
|
||||
0
|
||||
this MUST NOT change within a bitstream
|
||||
|
||||
chroma_h_shift
|
||||
|
@@ -17,7 +17,6 @@ my $TEMPLATE_HEADER = $ENV{"FFMPEG_HEADER"} || <<EOT;
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="body">
|
||||
EOT
|
||||
|
||||
$PRE_BODY_CLOSE = '</div></div>';
|
||||
@@ -33,7 +32,7 @@ sub FFmpeg_print_page_foot($$)
|
||||
T2H_DEFAULT_program_string() : program_string();
|
||||
print $fh '<footer class="footer pagination-right">' . "\n";
|
||||
print $fh '<span class="label label-info">' . $program_string;
|
||||
print $fh "</span></footer></div></div></body>\n";
|
||||
print $fh "</span></footer></div>\n";
|
||||
}
|
||||
|
||||
$float = \&FFmpeg_float;
|
||||
@@ -93,6 +92,8 @@ $Texi2HTML::THISDOC{program_authors}
|
||||
|
||||
$description
|
||||
<meta name="keywords" content="$longtitle">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
|
||||
$encoding
|
||||
$CSS_LINES
|
||||
|
494
doc/utils.texi
494
doc/utils.texi
@@ -96,42 +96,14 @@ year-month-day.
|
||||
@anchor{time duration syntax}
|
||||
@section Time duration
|
||||
|
||||
There are two accepted syntaxes for expressing time duration.
|
||||
|
||||
The accepted syntax is:
|
||||
@example
|
||||
[-][@var{HH}:]@var{MM}:@var{SS}[.@var{m}...]
|
||||
[-][HH:]MM:SS[.m...]
|
||||
[-]S+[.m...]
|
||||
@end example
|
||||
|
||||
@var{HH} expresses the number of hours, @var{MM} the number of minutes
|
||||
for a maximum of 2 digits, and @var{SS} the number of seconds for a
|
||||
maximum of 2 digits. The @var{m} at the end expresses decimal value for
|
||||
@var{SS}.
|
||||
|
||||
@emph{or}
|
||||
|
||||
@example
|
||||
[-]@var{S}+[.@var{m}...]
|
||||
@end example
|
||||
|
||||
@var{S} expresses the number of seconds, with the optional decimal part
|
||||
@var{m}.
|
||||
|
||||
In both expressions, the optional @samp{-} indicates negative duration.
|
||||
|
||||
@subsection Examples
|
||||
|
||||
The following examples are all valid time duration:
|
||||
|
||||
@table @samp
|
||||
@item 55
|
||||
55 seconds
|
||||
|
||||
@item 12:03:45
|
||||
12 hours, 03 minutes and 45 seconds
|
||||
|
||||
@item 23.189
|
||||
23.189 seconds
|
||||
@end table
|
||||
@var{HH} expresses the number of hours, @var{MM} the number a of minutes
|
||||
and @var{SS} the number of seconds.
|
||||
|
||||
@anchor{video size syntax}
|
||||
@section Video size
|
||||
@@ -226,18 +198,6 @@ The following abbreviations are recognized:
|
||||
3996x2160
|
||||
@item 4kscope
|
||||
4096x1716
|
||||
@item nhd
|
||||
640x360
|
||||
@item hqvga
|
||||
240x160
|
||||
@item wqvga
|
||||
400x240
|
||||
@item fwqvga
|
||||
432x240
|
||||
@item hvga
|
||||
480x320
|
||||
@item qhd
|
||||
960x540
|
||||
@end table
|
||||
|
||||
@anchor{video rate syntax}
|
||||
@@ -283,450 +243,18 @@ The undefined value can be expressed using the "0:0" string.
|
||||
@anchor{color syntax}
|
||||
@section Color
|
||||
|
||||
It can be the name of a color as defined below (case insensitive match) or a
|
||||
@code{[0x|#]RRGGBB[AA]} sequence, possibly followed by @@ and a string
|
||||
It can be the name of a color (case insensitive match) or a
|
||||
[0x|#]RRGGBB[AA] sequence, possibly followed by "@@" and a string
|
||||
representing the alpha component.
|
||||
|
||||
The alpha component may be a string composed by "0x" followed by an
|
||||
hexadecimal number or a decimal number between 0.0 and 1.0, which
|
||||
represents the opacity value (@samp{0x00} or @samp{0.0} means completely
|
||||
transparent, @samp{0xff} or @samp{1.0} completely opaque). If the alpha
|
||||
component is not specified then @samp{0xff} is assumed.
|
||||
represents the opacity value (0x00/0.0 means completely transparent,
|
||||
0xff/1.0 completely opaque).
|
||||
If the alpha component is not specified then 0xff is assumed.
|
||||
|
||||
The string @samp{random} will result in a random color.
|
||||
The string "random" will result in a random color.
|
||||
|
||||
The following names of colors are recognized:
|
||||
@table @samp
|
||||
@item AliceBlue
|
||||
0xF0F8FF
|
||||
@item AntiqueWhite
|
||||
0xFAEBD7
|
||||
@item Aqua
|
||||
0x00FFFF
|
||||
@item Aquamarine
|
||||
0x7FFFD4
|
||||
@item Azure
|
||||
0xF0FFFF
|
||||
@item Beige
|
||||
0xF5F5DC
|
||||
@item Bisque
|
||||
0xFFE4C4
|
||||
@item Black
|
||||
0x000000
|
||||
@item BlanchedAlmond
|
||||
0xFFEBCD
|
||||
@item Blue
|
||||
0x0000FF
|
||||
@item BlueViolet
|
||||
0x8A2BE2
|
||||
@item Brown
|
||||
0xA52A2A
|
||||
@item BurlyWood
|
||||
0xDEB887
|
||||
@item CadetBlue
|
||||
0x5F9EA0
|
||||
@item Chartreuse
|
||||
0x7FFF00
|
||||
@item Chocolate
|
||||
0xD2691E
|
||||
@item Coral
|
||||
0xFF7F50
|
||||
@item CornflowerBlue
|
||||
0x6495ED
|
||||
@item Cornsilk
|
||||
0xFFF8DC
|
||||
@item Crimson
|
||||
0xDC143C
|
||||
@item Cyan
|
||||
0x00FFFF
|
||||
@item DarkBlue
|
||||
0x00008B
|
||||
@item DarkCyan
|
||||
0x008B8B
|
||||
@item DarkGoldenRod
|
||||
0xB8860B
|
||||
@item DarkGray
|
||||
0xA9A9A9
|
||||
@item DarkGreen
|
||||
0x006400
|
||||
@item DarkKhaki
|
||||
0xBDB76B
|
||||
@item DarkMagenta
|
||||
0x8B008B
|
||||
@item DarkOliveGreen
|
||||
0x556B2F
|
||||
@item Darkorange
|
||||
0xFF8C00
|
||||
@item DarkOrchid
|
||||
0x9932CC
|
||||
@item DarkRed
|
||||
0x8B0000
|
||||
@item DarkSalmon
|
||||
0xE9967A
|
||||
@item DarkSeaGreen
|
||||
0x8FBC8F
|
||||
@item DarkSlateBlue
|
||||
0x483D8B
|
||||
@item DarkSlateGray
|
||||
0x2F4F4F
|
||||
@item DarkTurquoise
|
||||
0x00CED1
|
||||
@item DarkViolet
|
||||
0x9400D3
|
||||
@item DeepPink
|
||||
0xFF1493
|
||||
@item DeepSkyBlue
|
||||
0x00BFFF
|
||||
@item DimGray
|
||||
0x696969
|
||||
@item DodgerBlue
|
||||
0x1E90FF
|
||||
@item FireBrick
|
||||
0xB22222
|
||||
@item FloralWhite
|
||||
0xFFFAF0
|
||||
@item ForestGreen
|
||||
0x228B22
|
||||
@item Fuchsia
|
||||
0xFF00FF
|
||||
@item Gainsboro
|
||||
0xDCDCDC
|
||||
@item GhostWhite
|
||||
0xF8F8FF
|
||||
@item Gold
|
||||
0xFFD700
|
||||
@item GoldenRod
|
||||
0xDAA520
|
||||
@item Gray
|
||||
0x808080
|
||||
@item Green
|
||||
0x008000
|
||||
@item GreenYellow
|
||||
0xADFF2F
|
||||
@item HoneyDew
|
||||
0xF0FFF0
|
||||
@item HotPink
|
||||
0xFF69B4
|
||||
@item IndianRed
|
||||
0xCD5C5C
|
||||
@item Indigo
|
||||
0x4B0082
|
||||
@item Ivory
|
||||
0xFFFFF0
|
||||
@item Khaki
|
||||
0xF0E68C
|
||||
@item Lavender
|
||||
0xE6E6FA
|
||||
@item LavenderBlush
|
||||
0xFFF0F5
|
||||
@item LawnGreen
|
||||
0x7CFC00
|
||||
@item LemonChiffon
|
||||
0xFFFACD
|
||||
@item LightBlue
|
||||
0xADD8E6
|
||||
@item LightCoral
|
||||
0xF08080
|
||||
@item LightCyan
|
||||
0xE0FFFF
|
||||
@item LightGoldenRodYellow
|
||||
0xFAFAD2
|
||||
@item LightGreen
|
||||
0x90EE90
|
||||
@item LightGrey
|
||||
0xD3D3D3
|
||||
@item LightPink
|
||||
0xFFB6C1
|
||||
@item LightSalmon
|
||||
0xFFA07A
|
||||
@item LightSeaGreen
|
||||
0x20B2AA
|
||||
@item LightSkyBlue
|
||||
0x87CEFA
|
||||
@item LightSlateGray
|
||||
0x778899
|
||||
@item LightSteelBlue
|
||||
0xB0C4DE
|
||||
@item LightYellow
|
||||
0xFFFFE0
|
||||
@item Lime
|
||||
0x00FF00
|
||||
@item LimeGreen
|
||||
0x32CD32
|
||||
@item Linen
|
||||
0xFAF0E6
|
||||
@item Magenta
|
||||
0xFF00FF
|
||||
@item Maroon
|
||||
0x800000
|
||||
@item MediumAquaMarine
|
||||
0x66CDAA
|
||||
@item MediumBlue
|
||||
0x0000CD
|
||||
@item MediumOrchid
|
||||
0xBA55D3
|
||||
@item MediumPurple
|
||||
0x9370D8
|
||||
@item MediumSeaGreen
|
||||
0x3CB371
|
||||
@item MediumSlateBlue
|
||||
0x7B68EE
|
||||
@item MediumSpringGreen
|
||||
0x00FA9A
|
||||
@item MediumTurquoise
|
||||
0x48D1CC
|
||||
@item MediumVioletRed
|
||||
0xC71585
|
||||
@item MidnightBlue
|
||||
0x191970
|
||||
@item MintCream
|
||||
0xF5FFFA
|
||||
@item MistyRose
|
||||
0xFFE4E1
|
||||
@item Moccasin
|
||||
0xFFE4B5
|
||||
@item NavajoWhite
|
||||
0xFFDEAD
|
||||
@item Navy
|
||||
0x000080
|
||||
@item OldLace
|
||||
0xFDF5E6
|
||||
@item Olive
|
||||
0x808000
|
||||
@item OliveDrab
|
||||
0x6B8E23
|
||||
@item Orange
|
||||
0xFFA500
|
||||
@item OrangeRed
|
||||
0xFF4500
|
||||
@item Orchid
|
||||
0xDA70D6
|
||||
@item PaleGoldenRod
|
||||
0xEEE8AA
|
||||
@item PaleGreen
|
||||
0x98FB98
|
||||
@item PaleTurquoise
|
||||
0xAFEEEE
|
||||
@item PaleVioletRed
|
||||
0xD87093
|
||||
@item PapayaWhip
|
||||
0xFFEFD5
|
||||
@item PeachPuff
|
||||
0xFFDAB9
|
||||
@item Peru
|
||||
0xCD853F
|
||||
@item Pink
|
||||
0xFFC0CB
|
||||
@item Plum
|
||||
0xDDA0DD
|
||||
@item PowderBlue
|
||||
0xB0E0E6
|
||||
@item Purple
|
||||
0x800080
|
||||
@item Red
|
||||
0xFF0000
|
||||
@item RosyBrown
|
||||
0xBC8F8F
|
||||
@item RoyalBlue
|
||||
0x4169E1
|
||||
@item SaddleBrown
|
||||
0x8B4513
|
||||
@item Salmon
|
||||
0xFA8072
|
||||
@item SandyBrown
|
||||
0xF4A460
|
||||
@item SeaGreen
|
||||
0x2E8B57
|
||||
@item SeaShell
|
||||
0xFFF5EE
|
||||
@item Sienna
|
||||
0xA0522D
|
||||
@item Silver
|
||||
0xC0C0C0
|
||||
@item SkyBlue
|
||||
0x87CEEB
|
||||
@item SlateBlue
|
||||
0x6A5ACD
|
||||
@item SlateGray
|
||||
0x708090
|
||||
@item Snow
|
||||
0xFFFAFA
|
||||
@item SpringGreen
|
||||
0x00FF7F
|
||||
@item SteelBlue
|
||||
0x4682B4
|
||||
@item Tan
|
||||
0xD2B48C
|
||||
@item Teal
|
||||
0x008080
|
||||
@item Thistle
|
||||
0xD8BFD8
|
||||
@item Tomato
|
||||
0xFF6347
|
||||
@item Turquoise
|
||||
0x40E0D0
|
||||
@item Violet
|
||||
0xEE82EE
|
||||
@item Wheat
|
||||
0xF5DEB3
|
||||
@item White
|
||||
0xFFFFFF
|
||||
@item WhiteSmoke
|
||||
0xF5F5F5
|
||||
@item Yellow
|
||||
0xFFFF00
|
||||
@item YellowGreen
|
||||
0x9ACD32
|
||||
@end table
|
||||
|
||||
@anchor{channel layout syntax}
|
||||
@section Channel Layout
|
||||
|
||||
A channel layout specifies the spatial disposition of the channels in
|
||||
a multi-channel audio stream. To specify a channel layout, FFmpeg
|
||||
makes use of a special syntax.
|
||||
|
||||
Individual channels are identified by an id, as given by the table
|
||||
below:
|
||||
@table @samp
|
||||
@item FL
|
||||
front left
|
||||
@item FR
|
||||
front right
|
||||
@item FC
|
||||
front center
|
||||
@item LFE
|
||||
low frequency
|
||||
@item BL
|
||||
back left
|
||||
@item BR
|
||||
back right
|
||||
@item FLC
|
||||
front left-of-center
|
||||
@item FRC
|
||||
front right-of-center
|
||||
@item BC
|
||||
back center
|
||||
@item SL
|
||||
side left
|
||||
@item SR
|
||||
side right
|
||||
@item TC
|
||||
top center
|
||||
@item TFL
|
||||
top front left
|
||||
@item TFC
|
||||
top front center
|
||||
@item TFR
|
||||
top front right
|
||||
@item TBL
|
||||
top back left
|
||||
@item TBC
|
||||
top back center
|
||||
@item TBR
|
||||
top back right
|
||||
@item DL
|
||||
downmix left
|
||||
@item DR
|
||||
downmix right
|
||||
@item WL
|
||||
wide left
|
||||
@item WR
|
||||
wide right
|
||||
@item SDL
|
||||
surround direct left
|
||||
@item SDR
|
||||
surround direct right
|
||||
@item LFE2
|
||||
low frequency 2
|
||||
@end table
|
||||
|
||||
Standard channel layout compositions can be specified by using the
|
||||
following identifiers:
|
||||
@table @samp
|
||||
@item mono
|
||||
FC
|
||||
@item stereo
|
||||
FL+FR
|
||||
@item 2.1
|
||||
FL+FR+LFE
|
||||
@item 3.0
|
||||
FL+FR+FC
|
||||
@item 3.0(back)
|
||||
FL+FR+BC
|
||||
@item 4.0
|
||||
FL+FR+FC+BC
|
||||
@item quad
|
||||
FL+FR+BL+BR
|
||||
@item quad(side)
|
||||
FL+FR+SL+SR
|
||||
@item 3.1
|
||||
FL+FR+FC+LFE
|
||||
@item 5.0
|
||||
FL+FR+FC+BL+BR
|
||||
@item 5.0(side)
|
||||
FL+FR+FC+SL+SR
|
||||
@item 4.1
|
||||
FL+FR+FC+LFE+BC
|
||||
@item 5.1
|
||||
FL+FR+FC+LFE+BL+BR
|
||||
@item 5.1(side)
|
||||
FL+FR+FC+LFE+SL+SR
|
||||
@item 6.0
|
||||
FL+FR+FC+BC+SL+SR
|
||||
@item 6.0(front)
|
||||
FL+FR+FLC+FRC+SL+SR
|
||||
@item hexagonal
|
||||
FL+FR+FC+BL+BR+BC
|
||||
@item 6.1
|
||||
FL+FR+FC+LFE+BC+SL+SR
|
||||
@item 6.1
|
||||
FL+FR+FC+LFE+BL+BR+BC
|
||||
@item 6.1(front)
|
||||
FL+FR+LFE+FLC+FRC+SL+SR
|
||||
@item 7.0
|
||||
FL+FR+FC+BL+BR+SL+SR
|
||||
@item 7.0(front)
|
||||
FL+FR+FC+FLC+FRC+SL+SR
|
||||
@item 7.1
|
||||
FL+FR+FC+LFE+BL+BR+SL+SR
|
||||
@item 7.1(wide)
|
||||
FL+FR+FC+LFE+BL+BR+FLC+FRC
|
||||
@item 7.1(wide-side)
|
||||
FL+FR+FC+LFE+FLC+FRC+SL+SR
|
||||
@item octagonal
|
||||
FL+FR+FC+BL+BR+BC+SL+SR
|
||||
@item downmix
|
||||
DL+DR
|
||||
@end table
|
||||
|
||||
A custom channel layout can be specified as a sequence of terms, separated by
|
||||
'+' or '|'. Each term can be:
|
||||
@itemize
|
||||
@item
|
||||
the name of a standard channel layout (e.g. @samp{mono},
|
||||
@samp{stereo}, @samp{4.0}, @samp{quad}, @samp{5.0}, etc.)
|
||||
|
||||
@item
|
||||
the name of a single channel (e.g. @samp{FL}, @samp{FR}, @samp{FC}, @samp{LFE}, etc.)
|
||||
|
||||
@item
|
||||
a number of channels, in decimal, optionally followed by 'c', yielding
|
||||
the default channel layout for that number of channels (see the
|
||||
function @code{av_get_default_channel_layout})
|
||||
|
||||
@item
|
||||
a channel layout mask, in hexadecimal starting with "0x" (see the
|
||||
@code{AV_CH_*} macros in @file{libavutil/channel_layout.h}.
|
||||
@end itemize
|
||||
|
||||
Starting from libavutil version 53 the trailing character "c" to
|
||||
specify a number of channels will be required, while a channel layout
|
||||
mask could also be specified as a decimal number (if and only if not
|
||||
followed by "c").
|
||||
|
||||
See also the function @code{av_get_channel_layout} defined in
|
||||
@file{libavutil/channel_layout.h}.
|
||||
@c man end SYNTAX
|
||||
|
||||
@chapter Expression Evaluation
|
||||
|
98
ffmpeg.c
98
ffmpeg.c
@@ -751,9 +751,7 @@ static void do_subtitle_out(AVFormatContext *s,
|
||||
nb = 1;
|
||||
|
||||
/* shift timestamp to honor -ss and make check_recording_time() work with -t */
|
||||
pts = sub->pts;
|
||||
if (output_files[ost->file_index]->start_time != AV_NOPTS_VALUE)
|
||||
pts -= output_files[ost->file_index]->start_time;
|
||||
pts = sub->pts - output_files[ost->file_index]->start_time;
|
||||
for (i = 0; i < nb; i++) {
|
||||
ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base);
|
||||
if (!check_recording_time(ost))
|
||||
@@ -817,26 +815,10 @@ static void do_video_out(AVFormatContext *s,
|
||||
nb_frames = 1;
|
||||
|
||||
format_video_sync = video_sync_method;
|
||||
if (format_video_sync == VSYNC_AUTO) {
|
||||
if (format_video_sync == VSYNC_AUTO)
|
||||
format_video_sync = (s->oformat->flags & AVFMT_VARIABLE_FPS) ? ((s->oformat->flags & AVFMT_NOTIMESTAMPS) ? VSYNC_PASSTHROUGH : VSYNC_VFR) : VSYNC_CFR;
|
||||
if ( ist
|
||||
&& format_video_sync == VSYNC_CFR
|
||||
&& input_files[ist->file_index]->ctx->nb_streams == 1
|
||||
&& input_files[ist->file_index]->input_ts_offset == 0) {
|
||||
format_video_sync = VSYNC_VSCFR;
|
||||
}
|
||||
if (format_video_sync == VSYNC_CFR && copy_ts) {
|
||||
format_video_sync = VSYNC_VSCFR;
|
||||
}
|
||||
}
|
||||
|
||||
switch (format_video_sync) {
|
||||
case VSYNC_VSCFR:
|
||||
if (ost->frame_number == 0 && delta - duration >= 0.5) {
|
||||
av_log(NULL, AV_LOG_DEBUG, "Not duplicating %d initial frames\n", (int)lrintf(delta - duration));
|
||||
delta = duration;
|
||||
ost->sync_opts = lrint(sync_ipts);
|
||||
}
|
||||
case VSYNC_CFR:
|
||||
// FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
|
||||
if (delta < -1.1)
|
||||
@@ -1088,11 +1070,10 @@ static int reap_filters(void)
|
||||
}
|
||||
frame_pts = AV_NOPTS_VALUE;
|
||||
if (filtered_frame->pts != AV_NOPTS_VALUE) {
|
||||
int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;
|
||||
filtered_frame->pts = frame_pts = av_rescale_q(filtered_frame->pts,
|
||||
ost->filter->filter->inputs[0]->time_base,
|
||||
ost->st->codec->time_base) -
|
||||
av_rescale_q(start_time,
|
||||
av_rescale_q(of->start_time,
|
||||
AV_TIME_BASE_Q,
|
||||
ost->st->codec->time_base);
|
||||
}
|
||||
@@ -1396,7 +1377,7 @@ static int check_output_constraints(InputStream *ist, OutputStream *ost)
|
||||
if (ost->source_index != ist_index)
|
||||
return 0;
|
||||
|
||||
if (of->start_time != AV_NOPTS_VALUE && ist->pts < of->start_time)
|
||||
if (of->start_time && ist->pts < of->start_time)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
@@ -1405,10 +1386,8 @@ static int check_output_constraints(InputStream *ist, OutputStream *ost)
|
||||
static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt)
|
||||
{
|
||||
OutputFile *of = output_files[ost->file_index];
|
||||
InputFile *f = input_files [ist->file_index];
|
||||
int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;
|
||||
int64_t ost_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ost->st->time_base);
|
||||
int64_t ist_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ist->st->time_base);
|
||||
int64_t ost_tb_start_time = av_rescale_q(of->start_time, AV_TIME_BASE_Q, ost->st->time_base);
|
||||
int64_t ist_tb_start_time = av_rescale_q(of->start_time, AV_TIME_BASE_Q, ist->st->time_base);
|
||||
AVPicture pict;
|
||||
AVPacket opkt;
|
||||
|
||||
@@ -1419,7 +1398,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
|
||||
return;
|
||||
|
||||
if (pkt->pts == AV_NOPTS_VALUE) {
|
||||
if (!ost->frame_number && ist->pts < start_time &&
|
||||
if (!ost->frame_number && ist->pts < of->start_time &&
|
||||
!ost->copy_prior_start)
|
||||
return;
|
||||
} else {
|
||||
@@ -1429,21 +1408,11 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
|
||||
}
|
||||
|
||||
if (of->recording_time != INT64_MAX &&
|
||||
ist->pts >= of->recording_time + start_time) {
|
||||
ist->pts >= of->recording_time + of->start_time) {
|
||||
close_output_stream(ost);
|
||||
return;
|
||||
}
|
||||
|
||||
if (f->recording_time != INT64_MAX) {
|
||||
start_time = f->ctx->start_time;
|
||||
if (f->start_time != AV_NOPTS_VALUE)
|
||||
start_time += f->start_time;
|
||||
if (ist->pts >= f->recording_time + start_time) {
|
||||
close_output_stream(ost);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* force the input stream PTS */
|
||||
if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
audio_size += pkt->size;
|
||||
@@ -2120,21 +2089,6 @@ static int transcode_init(void)
|
||||
char error[1024];
|
||||
int want_sdp = 1;
|
||||
|
||||
for (i = 0; i < nb_filtergraphs; i++) {
|
||||
FilterGraph *fg = filtergraphs[i];
|
||||
for (j = 0; j < fg->nb_outputs; j++) {
|
||||
OutputFilter *ofilter = fg->outputs[j];
|
||||
if (!ofilter->ost || ofilter->ost->source_index >= 0)
|
||||
continue;
|
||||
if (fg->nb_inputs != 1)
|
||||
continue;
|
||||
for (k = nb_input_streams-1; k >= 0 ; k--)
|
||||
if (fg->inputs[0]->ist == input_streams[k])
|
||||
break;
|
||||
ofilter->ost->source_index = k;
|
||||
}
|
||||
}
|
||||
|
||||
/* init framerate emulation */
|
||||
for (i = 0; i < nb_input_files; i++) {
|
||||
InputFile *ifile = input_files[i];
|
||||
@@ -2176,15 +2130,6 @@ static int transcode_init(void)
|
||||
ost->st->disposition = ist->st->disposition;
|
||||
codec->bits_per_raw_sample = icodec->bits_per_raw_sample;
|
||||
codec->chroma_sample_location = icodec->chroma_sample_location;
|
||||
} else {
|
||||
for (j=0; j<oc->nb_streams; j++) {
|
||||
AVStream *st = oc->streams[j];
|
||||
if (st != ost->st && st->codec->codec_type == codec->codec_type)
|
||||
break;
|
||||
}
|
||||
if (j == oc->nb_streams)
|
||||
if (codec->codec_type == AVMEDIA_TYPE_AUDIO || codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
ost->st->disposition = AV_DISPOSITION_DEFAULT;
|
||||
}
|
||||
|
||||
if (ost->stream_copy) {
|
||||
@@ -2373,7 +2318,7 @@ static int transcode_init(void)
|
||||
if (ost->filter && !(codec->time_base.num && codec->time_base.den))
|
||||
codec->time_base = ost->filter->filter->inputs[0]->time_base;
|
||||
if ( av_q2d(codec->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH
|
||||
&& (video_sync_method == VSYNC_CFR || video_sync_method == VSYNC_VSCFR || (video_sync_method == VSYNC_AUTO && !(oc->oformat->flags & AVFMT_VARIABLE_FPS)))){
|
||||
&& (video_sync_method == VSYNC_CFR || (video_sync_method == VSYNC_AUTO && !(oc->oformat->flags & AVFMT_VARIABLE_FPS)))){
|
||||
av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
|
||||
"Please consider specifying a lower framerate, a different muxer or -vsync 2\n");
|
||||
}
|
||||
@@ -2391,17 +2336,10 @@ static int transcode_init(void)
|
||||
if (!strncmp(ost->enc->name, "libx264", 7) &&
|
||||
codec->pix_fmt == AV_PIX_FMT_NONE &&
|
||||
ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P)
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
av_log(NULL, AV_LOG_INFO,
|
||||
"No pixel format specified, %s for H.264 encoding chosen.\n"
|
||||
"Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
|
||||
av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format));
|
||||
if (!strncmp(ost->enc->name, "mpeg2video", 10) &&
|
||||
codec->pix_fmt == AV_PIX_FMT_NONE &&
|
||||
ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P)
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
"No pixel format specified, %s for MPEG-2 encoding chosen.\n"
|
||||
"Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
|
||||
av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format));
|
||||
codec->pix_fmt = ost->filter->filter->inputs[0]->format;
|
||||
|
||||
if (!icodec ||
|
||||
@@ -2721,7 +2659,7 @@ static int check_keyboard_interaction(int64_t cur_time)
|
||||
char buf[4096], target[64], command[256], arg[256] = {0};
|
||||
double time;
|
||||
int k, n = 0;
|
||||
fprintf(stderr, "\nEnter command: <target>|all <time>|-1 <command>[ <argument>]\n");
|
||||
fprintf(stderr, "\nEnter command: <target> <time> <command>[ <argument>]\n");
|
||||
i = 0;
|
||||
while ((k = read_key()) != '\n' && k != '\r' && i < sizeof(buf)-1)
|
||||
if (k > 0)
|
||||
@@ -2737,10 +2675,7 @@ static int check_keyboard_interaction(int64_t cur_time)
|
||||
if (time < 0) {
|
||||
ret = avfilter_graph_send_command(fg->graph, target, command, arg, buf, sizeof(buf),
|
||||
key == 'c' ? AVFILTER_CMD_FLAG_ONE : 0);
|
||||
fprintf(stderr, "Command reply for stream %d: ret:%d res:\n%s", i, ret, buf);
|
||||
} else if (key == 'c') {
|
||||
fprintf(stderr, "Queing commands only on filters supporting the specific command is unsupported\n");
|
||||
ret = AVERROR_PATCHWELCOME;
|
||||
fprintf(stderr, "Command reply for stream %d: ret:%d res:%s\n", i, ret, buf);
|
||||
} else {
|
||||
ret = avfilter_graph_queue_command(fg->graph, target, command, arg, 0, time);
|
||||
}
|
||||
@@ -2777,8 +2712,7 @@ static int check_keyboard_interaction(int64_t cur_time)
|
||||
"? show this help\n"
|
||||
"+ increase verbosity\n"
|
||||
"- decrease verbosity\n"
|
||||
"c Send command to first matching filter supporting it\n"
|
||||
"C Send/Que command to all matching filters\n"
|
||||
"c Send command to filtergraph\n"
|
||||
"D cycle through available debug modes\n"
|
||||
"h dump packets/hex press to cycle through the 3 states\n"
|
||||
"q quit\n"
|
||||
@@ -3083,7 +3017,7 @@ static int process_input(int file_index)
|
||||
if(delta < -1LL*dts_delta_threshold*AV_TIME_BASE ||
|
||||
(delta > 1LL*dts_delta_threshold*AV_TIME_BASE &&
|
||||
ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) ||
|
||||
pkt_dts + AV_TIME_BASE/10 < ist->pts){
|
||||
pkt_dts+1<ist->pts){
|
||||
ifile->ts_offset -= delta;
|
||||
av_log(NULL, AV_LOG_DEBUG,
|
||||
"timestamp discontinuity %"PRId64", new offset= %"PRId64"\n",
|
||||
@@ -3460,8 +3394,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" frames successfully decoded, %"PRIu64" decoding errors\n",
|
||||
decode_error_stat[0], decode_error_stat[1]);
|
||||
if ((decode_error_stat[0] + decode_error_stat[1]) * max_error_rate < decode_error_stat[1])
|
||||
exit_program(69);
|
||||
if (2*decode_error_stat[0] < decode_error_stat[1])
|
||||
exit_program(254);
|
||||
|
||||
exit_program(received_nb_signals ? 255 : 0);
|
||||
return 0;
|
||||
|
7
ffmpeg.h
7
ffmpeg.h
@@ -51,7 +51,6 @@
|
||||
#define VSYNC_PASSTHROUGH 0
|
||||
#define VSYNC_CFR 1
|
||||
#define VSYNC_VFR 2
|
||||
#define VSYNC_VSCFR 0xfe
|
||||
#define VSYNC_DROP 0xff
|
||||
|
||||
#define MAX_STREAMS 1024 /* arbitrary sanity check value */
|
||||
@@ -94,7 +93,6 @@ typedef struct OptionsContext {
|
||||
/* input options */
|
||||
int64_t input_ts_offset;
|
||||
int rate_emu;
|
||||
int accurate_seek;
|
||||
|
||||
SpecifierOpt *ts_scale;
|
||||
int nb_ts_scale;
|
||||
@@ -282,16 +280,12 @@ typedef struct InputFile {
|
||||
int eof_reached; /* true if eof reached */
|
||||
int eagain; /* true if last read attempt returned EAGAIN */
|
||||
int ist_index; /* index of first stream in input_streams */
|
||||
int64_t input_ts_offset;
|
||||
int64_t ts_offset;
|
||||
int64_t last_ts;
|
||||
int64_t start_time; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */
|
||||
int64_t recording_time;
|
||||
int nb_streams; /* number of stream that ffmpeg is aware of; may be different
|
||||
from ctx.nb_streams if new streams appear during av_read_frame() */
|
||||
int nb_streams_warn; /* number of streams that the user was warned of */
|
||||
int rate_emu;
|
||||
int accurate_seek;
|
||||
|
||||
#if HAVE_PTHREADS
|
||||
pthread_t thread; /* thread reading from this file */
|
||||
@@ -422,7 +416,6 @@ extern int qp_hist;
|
||||
extern int stdin_interaction;
|
||||
extern int frame_bits_per_raw_sample;
|
||||
extern AVIOContext *progress_avio;
|
||||
extern float max_error_rate;
|
||||
|
||||
extern const AVIOInterruptCB int_cb;
|
||||
|
||||
|
114
ffmpeg_filter.c
114
ffmpeg_filter.c
@@ -92,11 +92,6 @@ void choose_sample_fmt(AVStream *st, AVCodec *codec)
|
||||
|
||||
static char *choose_pix_fmts(OutputStream *ost)
|
||||
{
|
||||
AVDictionaryEntry *strict_dict = av_dict_get(ost->opts, "strict", NULL, 0);
|
||||
if (strict_dict)
|
||||
// used by choose_pixel_fmt() and below
|
||||
av_opt_set(ost->st->codec, "strict", strict_dict->value, 0);
|
||||
|
||||
if (ost->keep_pix_fmt) {
|
||||
if (ost->filter)
|
||||
avfilter_graph_set_auto_convert(ost->filter->graph->graph,
|
||||
@@ -281,18 +276,21 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
||||
ist->filters[ist->nb_filters - 1] = fg->inputs[fg->nb_inputs - 1];
|
||||
}
|
||||
|
||||
static int insert_trim(int64_t start_time, int64_t duration,
|
||||
AVFilterContext **last_filter, int *pad_idx,
|
||||
const char *filter_name)
|
||||
static int insert_trim(OutputStream *ost, AVFilterContext **last_filter, int *pad_idx)
|
||||
{
|
||||
OutputFile *of = output_files[ost->file_index];
|
||||
AVFilterGraph *graph = (*last_filter)->graph;
|
||||
AVFilterContext *ctx;
|
||||
const AVFilter *trim;
|
||||
enum AVMediaType type = avfilter_pad_get_type((*last_filter)->output_pads, *pad_idx);
|
||||
const char *name = (type == AVMEDIA_TYPE_VIDEO) ? "trim" : "atrim";
|
||||
const char *name = ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO ? "trim" : "atrim";
|
||||
char filter_name[128];
|
||||
int ret = 0;
|
||||
|
||||
if (duration == INT64_MAX && start_time == AV_NOPTS_VALUE)
|
||||
if (of->recording_time == INT64_MAX && !of->start_time)
|
||||
return 0;
|
||||
|
||||
// Use with duration and without output starttime is buggy with trim filters
|
||||
if (!of->start_time)
|
||||
return 0;
|
||||
|
||||
trim = avfilter_get_by_name(name);
|
||||
@@ -302,16 +300,18 @@ static int insert_trim(int64_t start_time, int64_t duration,
|
||||
return AVERROR_FILTER_NOT_FOUND;
|
||||
}
|
||||
|
||||
snprintf(filter_name, sizeof(filter_name), "%s for output stream %d:%d",
|
||||
name, ost->file_index, ost->index);
|
||||
ctx = avfilter_graph_alloc_filter(graph, trim, filter_name);
|
||||
if (!ctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (duration != INT64_MAX) {
|
||||
ret = av_opt_set_int(ctx, "durationi", duration,
|
||||
if (of->recording_time != INT64_MAX) {
|
||||
ret = av_opt_set_double(ctx, "duration", (double)of->recording_time / 1e6,
|
||||
AV_OPT_SEARCH_CHILDREN);
|
||||
}
|
||||
if (ret >= 0 && start_time != AV_NOPTS_VALUE) {
|
||||
ret = av_opt_set_int(ctx, "starti", start_time,
|
||||
if (ret >= 0 && of->start_time) {
|
||||
ret = av_opt_set_double(ctx, "start", (double)of->start_time / 1e6,
|
||||
AV_OPT_SEARCH_CHILDREN);
|
||||
}
|
||||
if (ret < 0) {
|
||||
@@ -336,7 +336,6 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
{
|
||||
char *pix_fmts;
|
||||
OutputStream *ost = ofilter->ost;
|
||||
OutputFile *of = output_files[ost->file_index];
|
||||
AVCodecContext *codec = ost->st->codec;
|
||||
AVFilterContext *last_filter = out->filter_ctx;
|
||||
int pad_idx = out->pad_idx;
|
||||
@@ -409,10 +408,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
pad_idx = 0;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "trim for output stream %d:%d",
|
||||
ost->file_index, ost->index);
|
||||
ret = insert_trim(of->start_time, of->recording_time,
|
||||
&last_filter, &pad_idx, name);
|
||||
ret = insert_trim(ost, &last_filter, &pad_idx);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -426,9 +422,9 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
|
||||
{
|
||||
OutputStream *ost = ofilter->ost;
|
||||
OutputFile *of = output_files[ost->file_index];
|
||||
AVCodecContext *codec = ost->st->codec;
|
||||
AVFilterContext *last_filter = out->filter_ctx;
|
||||
OutputFile *of = output_files[ost->file_index];
|
||||
int pad_idx = out->pad_idx;
|
||||
char *sample_fmts, *sample_rates, *channel_layouts;
|
||||
char name[255];
|
||||
@@ -538,10 +534,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "trim for output stream %d:%d",
|
||||
ost->file_index, ost->index);
|
||||
ret = insert_trim(of->start_time, of->recording_time,
|
||||
&last_filter, &pad_idx, name);
|
||||
ret = insert_trim(ost, &last_filter, &pad_idx);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -555,7 +548,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
{ \
|
||||
AVFilterContext *ctx = inout->filter_ctx; \
|
||||
AVFilterPad *pads = in ? ctx->input_pads : ctx->output_pads; \
|
||||
int nb_pads = in ? ctx->nb_inputs : ctx->nb_outputs; \
|
||||
int nb_pads = in ? ctx->input_count : ctx->output_count; \
|
||||
AVIOContext *pb; \
|
||||
\
|
||||
if (avio_open_dyn_buf(&pb) < 0) \
|
||||
@@ -619,22 +612,17 @@ static int sub2video_prepare(InputStream *ist)
|
||||
static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
AVFilterInOut *in)
|
||||
{
|
||||
AVFilterContext *last_filter;
|
||||
const AVFilter *buffer_filt = avfilter_get_by_name("buffer");
|
||||
AVFilterContext *first_filter = in->filter_ctx;
|
||||
AVFilter *filter = avfilter_get_by_name("buffer");
|
||||
InputStream *ist = ifilter->ist;
|
||||
InputFile *f = input_files[ist->file_index];
|
||||
AVRational tb = ist->framerate.num ? av_inv_q(ist->framerate) :
|
||||
ist->st->time_base;
|
||||
AVRational fr = ist->framerate;
|
||||
AVRational sar;
|
||||
AVBPrint args;
|
||||
char name[255];
|
||||
int ret, pad_idx = 0;
|
||||
|
||||
if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Cannot connect video filter to audio input\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
int pad_idx = in->pad_idx;
|
||||
int ret;
|
||||
|
||||
if (!fr.num)
|
||||
fr = av_guess_frame_rate(input_files[ist->file_index]->ctx, ist->st, NULL);
|
||||
@@ -662,10 +650,9 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
||||
ist->file_index, ist->st->index);
|
||||
|
||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, buffer_filt, name,
|
||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, filter, name,
|
||||
args.str, NULL, fg->graph)) < 0)
|
||||
return ret;
|
||||
last_filter = ifilter->filter;
|
||||
|
||||
if (ist->framerate.num) {
|
||||
AVFilterContext *setpts;
|
||||
@@ -678,10 +665,11 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
fg->graph)) < 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = avfilter_link(last_filter, 0, setpts, 0)) < 0)
|
||||
if ((ret = avfilter_link(setpts, 0, first_filter, pad_idx)) < 0)
|
||||
return ret;
|
||||
|
||||
last_filter = setpts;
|
||||
first_filter = setpts;
|
||||
pad_idx = 0;
|
||||
}
|
||||
|
||||
if (do_deinterlace) {
|
||||
@@ -695,20 +683,14 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
fg->graph)) < 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = avfilter_link(last_filter, 0, yadif, 0)) < 0)
|
||||
if ((ret = avfilter_link(yadif, 0, first_filter, pad_idx)) < 0)
|
||||
return ret;
|
||||
|
||||
last_filter = yadif;
|
||||
first_filter = yadif;
|
||||
pad_idx = 0;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "trim for input stream %d:%d",
|
||||
ist->file_index, ist->st->index);
|
||||
ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ?
|
||||
AV_NOPTS_VALUE : 0, f->recording_time, &last_filter, &pad_idx, name);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = avfilter_link(last_filter, 0, in->filter_ctx, in->pad_idx)) < 0)
|
||||
if ((ret = avfilter_link(ifilter->filter, 0, first_filter, pad_idx)) < 0)
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
@@ -716,18 +698,13 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
AVFilterInOut *in)
|
||||
{
|
||||
AVFilterContext *last_filter;
|
||||
const AVFilter *abuffer_filt = avfilter_get_by_name("abuffer");
|
||||
AVFilterContext *first_filter = in->filter_ctx;
|
||||
AVFilter *filter = avfilter_get_by_name("abuffer");
|
||||
InputStream *ist = ifilter->ist;
|
||||
InputFile *f = input_files[ist->file_index];
|
||||
int pad_idx = in->pad_idx;
|
||||
AVBPrint args;
|
||||
char name[255];
|
||||
int ret, pad_idx = 0;
|
||||
|
||||
if (ist->st->codec->codec_type != AVMEDIA_TYPE_AUDIO) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Cannot connect audio filter to non audio input\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
int ret;
|
||||
|
||||
av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
||||
av_bprintf(&args, "time_base=%d/%d:sample_rate=%d:sample_fmt=%s",
|
||||
@@ -742,11 +719,10 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
||||
ist->file_index, ist->st->index);
|
||||
|
||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, abuffer_filt,
|
||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, filter,
|
||||
name, args.str, NULL,
|
||||
fg->graph)) < 0)
|
||||
return ret;
|
||||
last_filter = ifilter->filter;
|
||||
|
||||
#define AUTO_INSERT_FILTER_INPUT(opt_name, filter_name, arg) do { \
|
||||
AVFilterContext *filt_ctx; \
|
||||
@@ -762,11 +738,11 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
if (ret < 0) \
|
||||
return ret; \
|
||||
\
|
||||
ret = avfilter_link(last_filter, 0, filt_ctx, 0); \
|
||||
ret = avfilter_link(filt_ctx, 0, first_filter, pad_idx); \
|
||||
if (ret < 0) \
|
||||
return ret; \
|
||||
\
|
||||
last_filter = filt_ctx; \
|
||||
first_filter = filt_ctx; \
|
||||
} while (0)
|
||||
|
||||
if (audio_sync_method > 0) {
|
||||
@@ -802,15 +778,7 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||
snprintf(args, sizeof(args), "%f", audio_volume / 256.);
|
||||
AUTO_INSERT_FILTER_INPUT("-vol", "volume", args);
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "trim for input stream %d:%d",
|
||||
ist->file_index, ist->st->index);
|
||||
ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ?
|
||||
AV_NOPTS_VALUE : 0, f->recording_time, &last_filter, &pad_idx, name);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = avfilter_link(last_filter, 0, in->filter_ctx, in->pad_idx)) < 0)
|
||||
if ((ret = avfilter_link(ifilter->filter, 0, first_filter, pad_idx)) < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
@@ -865,10 +833,6 @@ int configure_filtergraph(FilterGraph *fg)
|
||||
if (strlen(args))
|
||||
args[strlen(args) - 1] = '\0';
|
||||
fg->graph->resample_lavr_opts = av_strdup(args);
|
||||
|
||||
e = av_dict_get(ost->opts, "threads", NULL, 0);
|
||||
if (e)
|
||||
av_opt_set(fg->graph, "threads", e->value, 0);
|
||||
}
|
||||
|
||||
if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)
|
||||
|
73
ffmpeg_opt.c
73
ffmpeg_opt.c
@@ -84,7 +84,6 @@ int print_stats = -1;
|
||||
int qp_hist = 0;
|
||||
int stdin_interaction = 1;
|
||||
int frame_bits_per_raw_sample = 0;
|
||||
float max_error_rate = 2.0/3;
|
||||
|
||||
|
||||
static int intra_only = 0;
|
||||
@@ -96,7 +95,9 @@ static int do_psnr = 0;
|
||||
static int input_sync;
|
||||
static int override_ffserver = 0;
|
||||
|
||||
static void uninit_options(OptionsContext *o)
|
||||
static int64_t recording_time = INT64_MAX;
|
||||
|
||||
static void uninit_options(OptionsContext *o, int is_input)
|
||||
{
|
||||
const OptionDef *po = options;
|
||||
int i;
|
||||
@@ -126,19 +127,28 @@ static void uninit_options(OptionsContext *o)
|
||||
av_freep(&o->audio_channel_maps);
|
||||
av_freep(&o->streamid_map);
|
||||
av_freep(&o->attachments);
|
||||
|
||||
if (is_input)
|
||||
recording_time = o->recording_time;
|
||||
else
|
||||
recording_time = INT64_MAX;
|
||||
}
|
||||
|
||||
static void init_options(OptionsContext *o)
|
||||
static void init_options(OptionsContext *o, int is_input)
|
||||
{
|
||||
memset(o, 0, sizeof(*o));
|
||||
|
||||
if (!is_input && recording_time != INT64_MAX) {
|
||||
o->recording_time = recording_time;
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
"-t is not an input option, keeping it for the next output;"
|
||||
" consider fixing your command line.\n");
|
||||
} else
|
||||
o->recording_time = INT64_MAX;
|
||||
o->stop_time = INT64_MAX;
|
||||
o->mux_max_delay = 0.7;
|
||||
o->start_time = AV_NOPTS_VALUE;
|
||||
o->recording_time = INT64_MAX;
|
||||
o->limit_filesize = UINT64_MAX;
|
||||
o->chapters_input_file = INT_MAX;
|
||||
o->accurate_seek = 1;
|
||||
}
|
||||
|
||||
/* return a copy of the input with the stream specifiers removed from the keys */
|
||||
@@ -593,7 +603,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
if(!ist->dec)
|
||||
ist->dec = avcodec_find_decoder(dec->codec_id);
|
||||
if (av_codec_get_lowres(dec)) {
|
||||
if (dec->lowres) {
|
||||
dec->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
}
|
||||
|
||||
@@ -649,16 +659,11 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
|
||||
|
||||
static void assert_file_overwrite(const char *filename)
|
||||
{
|
||||
if (file_overwrite && no_file_overwrite) {
|
||||
fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
|
||||
exit_program(1);
|
||||
}
|
||||
|
||||
if (!file_overwrite &&
|
||||
if ((!file_overwrite || no_file_overwrite) &&
|
||||
(strchr(filename, ':') == NULL || filename[1] == ':' ||
|
||||
av_strstart(filename, "file:", NULL))) {
|
||||
if (avio_check(filename, 0) == 0) {
|
||||
if (stdin_interaction && !no_file_overwrite) {
|
||||
if (stdin_interaction && (!no_file_overwrite || file_overwrite)) {
|
||||
fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
|
||||
fflush(stderr);
|
||||
term_exit();
|
||||
@@ -786,14 +791,6 @@ static int open_input_file(OptionsContext *o, const char *filename)
|
||||
find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0)->id : AV_CODEC_ID_NONE;
|
||||
ic->subtitle_codec_id= subtitle_codec_name ?
|
||||
find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0)->id : AV_CODEC_ID_NONE;
|
||||
|
||||
if (video_codec_name)
|
||||
av_format_set_video_codec (ic, find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0));
|
||||
if (audio_codec_name)
|
||||
av_format_set_audio_codec (ic, find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0));
|
||||
if (subtitle_codec_name)
|
||||
av_format_set_subtitle_codec(ic, find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0));
|
||||
|
||||
ic->flags |= AVFMT_FLAG_NONBLOCK;
|
||||
ic->interrupt_callback = int_cb;
|
||||
|
||||
@@ -822,13 +819,13 @@ static int open_input_file(OptionsContext *o, const char *filename)
|
||||
exit_program(1);
|
||||
}
|
||||
|
||||
timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time;
|
||||
timestamp = o->start_time;
|
||||
/* add the stream start time */
|
||||
if (ic->start_time != AV_NOPTS_VALUE)
|
||||
timestamp += ic->start_time;
|
||||
|
||||
/* if seeking requested, we execute it */
|
||||
if (o->start_time != AV_NOPTS_VALUE) {
|
||||
if (o->start_time != 0) {
|
||||
ret = avformat_seek_file(ic, -1, INT64_MIN, timestamp, timestamp, 0);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_WARNING, "%s: could not seek to position %0.3f\n",
|
||||
@@ -850,13 +847,9 @@ static int open_input_file(OptionsContext *o, const char *filename)
|
||||
|
||||
f->ctx = ic;
|
||||
f->ist_index = nb_input_streams - ic->nb_streams;
|
||||
f->start_time = o->start_time;
|
||||
f->recording_time = o->recording_time;
|
||||
f->input_ts_offset = o->input_ts_offset;
|
||||
f->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp);
|
||||
f->nb_streams = ic->nb_streams;
|
||||
f->rate_emu = o->rate_emu;
|
||||
f->accurate_seek = o->accurate_seek;
|
||||
|
||||
/* check if all codec options have been used */
|
||||
unused_opts = strip_specifiers(o->g->codec_opts);
|
||||
@@ -1453,8 +1446,7 @@ static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata)
|
||||
|
||||
for (i = 0; i < is->nb_chapters; i++) {
|
||||
AVChapter *in_ch = is->chapters[i], *out_ch;
|
||||
int64_t start_time = (ofile->start_time == AV_NOPTS_VALUE) ? 0 : ofile->start_time;
|
||||
int64_t ts_off = av_rescale_q(start_time - ifile->ts_offset,
|
||||
int64_t ts_off = av_rescale_q(ofile->start_time - ifile->ts_offset,
|
||||
AV_TIME_BASE_Q, in_ch->time_base);
|
||||
int64_t rt = (ofile->recording_time == INT64_MAX) ? INT64_MAX :
|
||||
av_rescale_q(ofile->recording_time, AV_TIME_BASE_Q, in_ch->time_base);
|
||||
@@ -1589,12 +1581,11 @@ static int open_output_file(OptionsContext *o, const char *filename)
|
||||
}
|
||||
|
||||
if (o->stop_time != INT64_MAX && o->recording_time == INT64_MAX) {
|
||||
int64_t start_time = o->start_time == AV_NOPTS_VALUE ? 0 : o->start_time;
|
||||
if (o->stop_time <= start_time) {
|
||||
if (o->stop_time <= o->start_time) {
|
||||
av_log(NULL, AV_LOG_WARNING, "-to value smaller than -ss; ignoring -to.\n");
|
||||
o->stop_time = INT64_MAX;
|
||||
} else {
|
||||
o->recording_time = o->stop_time - start_time;
|
||||
o->recording_time = o->stop_time - o->start_time;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2458,9 +2449,7 @@ void show_help_default(const char *opt, const char *arg)
|
||||
int flags = AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM;
|
||||
show_help_children(avcodec_get_class(), flags);
|
||||
show_help_children(avformat_get_class(), flags);
|
||||
#if CONFIG_SWSCALE
|
||||
show_help_children(sws_get_class(), flags);
|
||||
#endif
|
||||
show_help_children(swr_get_class(), AV_OPT_FLAG_AUDIO_PARAM);
|
||||
show_help_children(avfilter_get_class(), AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM);
|
||||
}
|
||||
@@ -2492,7 +2481,7 @@ static int open_files(OptionGroupList *l, const char *inout,
|
||||
OptionGroup *g = &l->groups[i];
|
||||
OptionsContext o;
|
||||
|
||||
init_options(&o);
|
||||
init_options(&o, !strcmp(inout, "input"));
|
||||
o.g = g;
|
||||
|
||||
ret = parse_optgroup(&o, g);
|
||||
@@ -2504,7 +2493,7 @@ static int open_files(OptionGroupList *l, const char *inout,
|
||||
|
||||
av_log(NULL, AV_LOG_DEBUG, "Opening an %s file: %s.\n", inout, g->arg);
|
||||
ret = open_file(&o, g->arg);
|
||||
uninit_options(&o);
|
||||
uninit_options(&o, !strcmp(inout, "input"));
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Error opening %s file %s.\n",
|
||||
inout, g->arg);
|
||||
@@ -2589,7 +2578,7 @@ const OptionDef options[] = {
|
||||
{ "y", OPT_BOOL, { &file_overwrite },
|
||||
"overwrite output files" },
|
||||
{ "n", OPT_BOOL, { &no_file_overwrite },
|
||||
"never overwrite output files" },
|
||||
"do not overwrite output files" },
|
||||
{ "c", HAS_ARG | OPT_STRING | OPT_SPEC |
|
||||
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(codec_names) },
|
||||
"codec name", "codec" },
|
||||
@@ -2612,8 +2601,7 @@ const OptionDef options[] = {
|
||||
{ "map_chapters", HAS_ARG | OPT_INT | OPT_EXPERT | OPT_OFFSET |
|
||||
OPT_OUTPUT, { .off = OFFSET(chapters_input_file) },
|
||||
"set chapters mapping", "input_file_index" },
|
||||
{ "t", HAS_ARG | OPT_TIME | OPT_OFFSET |
|
||||
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(recording_time) },
|
||||
{ "t", HAS_ARG | OPT_TIME | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(recording_time) },
|
||||
"record or transcode \"duration\" seconds of audio/video",
|
||||
"duration" },
|
||||
{ "to", HAS_ARG | OPT_TIME | OPT_OFFSET | OPT_OUTPUT, { .off = OFFSET(stop_time) },
|
||||
@@ -2623,9 +2611,6 @@ const OptionDef options[] = {
|
||||
{ "ss", HAS_ARG | OPT_TIME | OPT_OFFSET |
|
||||
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(start_time) },
|
||||
"set the start time offset", "time_off" },
|
||||
{ "accurate_seek", OPT_BOOL | OPT_OFFSET | OPT_EXPERT |
|
||||
OPT_INPUT, { .off = OFFSET(accurate_seek) },
|
||||
"enable/disable accurate seeking with -ss" },
|
||||
{ "itsoffset", HAS_ARG | OPT_TIME | OPT_OFFSET |
|
||||
OPT_EXPERT | OPT_INPUT, { .off = OFFSET(input_ts_offset) },
|
||||
"set the input ts offset", "time_off" },
|
||||
@@ -2721,8 +2706,6 @@ const OptionDef options[] = {
|
||||
"extract an attachment into a file", "filename" },
|
||||
{ "debug_ts", OPT_BOOL | OPT_EXPERT, { &debug_ts },
|
||||
"print timestamp debugging info" },
|
||||
{ "max_error_rate", HAS_ARG | OPT_FLOAT, { &max_error_rate },
|
||||
"maximum error rate", "ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success." },
|
||||
|
||||
/* video options */
|
||||
{ "vframes", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_video_frames },
|
||||
|
190
ffplay.c
190
ffplay.c
@@ -177,8 +177,6 @@ typedef struct VideoState {
|
||||
int read_pause_return;
|
||||
AVFormatContext *ic;
|
||||
int realtime;
|
||||
int audio_finished;
|
||||
int video_finished;
|
||||
|
||||
Clock audclk;
|
||||
Clock vidclk;
|
||||
@@ -218,7 +216,6 @@ typedef struct VideoState {
|
||||
int frame_drops_early;
|
||||
int frame_drops_late;
|
||||
AVFrame *frame;
|
||||
int64_t audio_frame_next_pts;
|
||||
|
||||
enum ShowMode {
|
||||
SHOW_MODE_NONE = -1, SHOW_MODE_VIDEO = 0, SHOW_MODE_WAVES, SHOW_MODE_RDFT, SHOW_MODE_NB
|
||||
@@ -308,6 +305,7 @@ static int workaround_bugs = 1;
|
||||
static int fast = 0;
|
||||
static int genpts = 0;
|
||||
static int lowres = 0;
|
||||
static int idct = FF_IDCT_AUTO;
|
||||
static int error_concealment = 3;
|
||||
static int decoder_reorder_pts = -1;
|
||||
static int autoexit;
|
||||
@@ -407,16 +405,6 @@ static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int packet_queue_put_nullpacket(PacketQueue *q, int stream_index)
|
||||
{
|
||||
AVPacket pkt1, *pkt = &pkt1;
|
||||
av_init_packet(pkt);
|
||||
pkt->data = NULL;
|
||||
pkt->size = 0;
|
||||
pkt->stream_index = stream_index;
|
||||
return packet_queue_put(q, pkt);
|
||||
}
|
||||
|
||||
/* packet queue handling */
|
||||
static void packet_queue_init(PacketQueue *q)
|
||||
{
|
||||
@@ -785,14 +773,6 @@ static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw,
|
||||
}
|
||||
}
|
||||
|
||||
static void free_picture(VideoPicture *vp)
|
||||
{
|
||||
if (vp->bmp) {
|
||||
SDL_FreeYUVOverlay(vp->bmp);
|
||||
vp->bmp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void free_subpicture(SubPicture *sp)
|
||||
{
|
||||
avsubtitle_free(&sp->sub);
|
||||
@@ -995,8 +975,7 @@ static void video_audio_display(VideoState *s)
|
||||
}
|
||||
av_rdft_calc(s->rdft, data[ch]);
|
||||
}
|
||||
/* Least efficient way to do this, we should of course
|
||||
* directly access it but it is more than fast enough. */
|
||||
// least efficient way to do this, we should of course directly access it but its more than fast enough
|
||||
for (y = 0; y < s->height; y++) {
|
||||
double w = 1 / sqrt(nb_freq);
|
||||
int a = sqrt(w * sqrt(data[0][2 * y + 0] * data[0][2 * y + 0] + data[0][2 * y + 1] * data[0][2 * y + 1]));
|
||||
@@ -1021,6 +1000,7 @@ static void video_audio_display(VideoState *s)
|
||||
|
||||
static void stream_close(VideoState *is)
|
||||
{
|
||||
VideoPicture *vp;
|
||||
int i;
|
||||
/* XXX: use a special url_shutdown call to abort parse cleanly */
|
||||
is->abort_request = 1;
|
||||
@@ -1030,10 +1010,13 @@ static void stream_close(VideoState *is)
|
||||
packet_queue_destroy(&is->subtitleq);
|
||||
|
||||
/* free all pictures */
|
||||
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++)
|
||||
free_picture(&is->pictq[i]);
|
||||
for (i = 0; i < SUBPICTURE_QUEUE_SIZE; i++)
|
||||
free_subpicture(&is->subpq[i]);
|
||||
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) {
|
||||
vp = &is->pictq[i];
|
||||
if (vp->bmp) {
|
||||
SDL_FreeYUVOverlay(vp->bmp);
|
||||
vp->bmp = NULL;
|
||||
}
|
||||
}
|
||||
SDL_DestroyMutex(is->pictq_mutex);
|
||||
SDL_DestroyCond(is->pictq_cond);
|
||||
SDL_DestroyMutex(is->subpq_mutex);
|
||||
@@ -1507,7 +1490,8 @@ static void alloc_picture(VideoState *is)
|
||||
|
||||
vp = &is->pictq[is->pictq_windex];
|
||||
|
||||
free_picture(vp);
|
||||
if (vp->bmp)
|
||||
SDL_FreeYUVOverlay(vp->bmp);
|
||||
|
||||
video_open(is, 0, vp);
|
||||
|
||||
@@ -1686,9 +1670,6 @@ static int get_video_frame(VideoState *is, AVFrame *frame, AVPacket *pkt, int *s
|
||||
if(avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt) < 0)
|
||||
return 0;
|
||||
|
||||
if (!got_picture && !pkt->data)
|
||||
is->video_finished = *serial;
|
||||
|
||||
if (got_picture) {
|
||||
int ret = 1;
|
||||
double dpts = NAN;
|
||||
@@ -1715,7 +1696,7 @@ static int get_video_frame(VideoState *is, AVFrame *frame, AVPacket *pkt, int *s
|
||||
!isnan(ptsdiff) && ptsdiff > 0 && ptsdiff < AV_NOSYNC_THRESHOLD &&
|
||||
clockdiff + ptsdiff - is->frame_last_filter_delay < 0 &&
|
||||
is->videoq.nb_packets) {
|
||||
is->frame_last_dropped_pos = av_frame_get_pkt_pos(frame);
|
||||
is->frame_last_dropped_pos = pkt->pos;
|
||||
is->frame_last_dropped_pts = dpts;
|
||||
is->frame_last_dropped_serial = *serial;
|
||||
is->frame_drops_early++;
|
||||
@@ -1833,8 +1814,6 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
|
||||
int64_t channel_layouts[2] = { 0, -1 };
|
||||
int channels[2] = { 0, -1 };
|
||||
AVFilterContext *filt_asrc = NULL, *filt_asink = NULL;
|
||||
char aresample_swr_opts[512] = "";
|
||||
AVDictionaryEntry *e = NULL;
|
||||
char asrc_args[256];
|
||||
int ret;
|
||||
|
||||
@@ -1842,12 +1821,6 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
|
||||
if (!(is->agraph = avfilter_graph_alloc()))
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
while ((e = av_dict_get(swr_opts, "", e, AV_DICT_IGNORE_SUFFIX)))
|
||||
av_strlcatf(aresample_swr_opts, sizeof(aresample_swr_opts), "%s=%s:", e->key, e->value);
|
||||
if (strlen(aresample_swr_opts))
|
||||
aresample_swr_opts[strlen(aresample_swr_opts)-1] = '\0';
|
||||
av_opt_set(is->agraph, "aresample_swr_opts", aresample_swr_opts, 0);
|
||||
|
||||
ret = snprintf(asrc_args, sizeof(asrc_args),
|
||||
"sample_rate=%d:sample_fmt=%s:channels=%d:time_base=%d/%d",
|
||||
is->audio_filter_src.freq, av_get_sample_fmt_name(is->audio_filter_src.fmt),
|
||||
@@ -1975,8 +1948,6 @@ static int video_thread(void *arg)
|
||||
|
||||
ret = av_buffersink_get_frame_flags(filt_out, frame, 0);
|
||||
if (ret < 0) {
|
||||
if (ret == AVERROR_EOF)
|
||||
is->video_finished = serial;
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
@@ -1991,7 +1962,7 @@ static int video_thread(void *arg)
|
||||
}
|
||||
#else
|
||||
pts = (frame->pts == AV_NOPTS_VALUE) ? NAN : frame->pts * av_q2d(is->video_st->time_base);
|
||||
ret = queue_picture(is, frame, pts, av_frame_get_pkt_pos(frame), serial);
|
||||
ret = queue_picture(is, frame, pts, pkt.pos, serial);
|
||||
av_frame_unref(frame);
|
||||
#endif
|
||||
|
||||
@@ -2074,8 +2045,6 @@ static int subtitle_thread(void *arg)
|
||||
SDL_LockMutex(is->subpq_mutex);
|
||||
is->subpq_size++;
|
||||
SDL_UnlockMutex(is->subpq_mutex);
|
||||
} else if (got_subtitle) {
|
||||
avsubtitle_free(&sp->sub);
|
||||
}
|
||||
av_free_packet(pkt);
|
||||
}
|
||||
@@ -2160,6 +2129,8 @@ static int audio_decode_frame(VideoState *is)
|
||||
int64_t dec_channel_layout;
|
||||
int got_frame;
|
||||
av_unused double audio_clock0;
|
||||
int new_packet = 0;
|
||||
int flush_complete = 0;
|
||||
int wanted_nb_samples;
|
||||
AVRational tb;
|
||||
int ret;
|
||||
@@ -2167,7 +2138,7 @@ static int audio_decode_frame(VideoState *is)
|
||||
|
||||
for (;;) {
|
||||
/* NOTE: the audio packet can contain several frames */
|
||||
while (pkt_temp->stream_index != -1 || is->audio_buf_frames_pending) {
|
||||
while (pkt_temp->size > 0 || (!pkt_temp->data && new_packet) || is->audio_buf_frames_pending) {
|
||||
if (!is->frame) {
|
||||
if (!(is->frame = avcodec_alloc_frame()))
|
||||
return AVERROR(ENOMEM);
|
||||
@@ -2183,6 +2154,9 @@ static int audio_decode_frame(VideoState *is)
|
||||
return -1;
|
||||
|
||||
if (!is->audio_buf_frames_pending) {
|
||||
if (flush_complete)
|
||||
break;
|
||||
new_packet = 0;
|
||||
len1 = avcodec_decode_audio4(dec, is->frame, &got_frame, pkt_temp);
|
||||
if (len1 < 0) {
|
||||
/* if error, we skip the frame */
|
||||
@@ -2190,32 +2164,23 @@ static int audio_decode_frame(VideoState *is)
|
||||
break;
|
||||
}
|
||||
|
||||
pkt_temp->dts =
|
||||
pkt_temp->pts = AV_NOPTS_VALUE;
|
||||
pkt_temp->data += len1;
|
||||
pkt_temp->size -= len1;
|
||||
if (pkt_temp->data && pkt_temp->size <= 0 || !pkt_temp->data && !got_frame)
|
||||
pkt_temp->stream_index = -1;
|
||||
if (!pkt_temp->data && !got_frame)
|
||||
is->audio_finished = is->audio_pkt_temp_serial;
|
||||
|
||||
if (!got_frame)
|
||||
if (!got_frame) {
|
||||
/* stop sending empty packets if the decoder is finished */
|
||||
if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY)
|
||||
flush_complete = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
tb = (AVRational){1, is->frame->sample_rate};
|
||||
if (is->frame->pts != AV_NOPTS_VALUE)
|
||||
is->frame->pts = av_rescale_q(is->frame->pts, dec->time_base, tb);
|
||||
else if (is->frame->pkt_pts != AV_NOPTS_VALUE)
|
||||
is->frame->pts = av_rescale_q(is->frame->pkt_pts, is->audio_st->time_base, tb);
|
||||
else if (is->audio_frame_next_pts != AV_NOPTS_VALUE)
|
||||
#if CONFIG_AVFILTER
|
||||
is->frame->pts = av_rescale_q(is->audio_frame_next_pts, (AVRational){1, is->audio_filter_src.freq}, tb);
|
||||
#else
|
||||
is->frame->pts = av_rescale_q(is->audio_frame_next_pts, (AVRational){1, is->audio_src.freq}, tb);
|
||||
#endif
|
||||
|
||||
if (is->frame->pts != AV_NOPTS_VALUE)
|
||||
is->audio_frame_next_pts = is->frame->pts + is->frame->nb_samples;
|
||||
if (pkt_temp->pts != AV_NOPTS_VALUE)
|
||||
pkt_temp->pts += (double) is->frame->nb_samples / is->frame->sample_rate / av_q2d(is->audio_st->time_base);
|
||||
|
||||
#if CONFIG_AVFILTER
|
||||
dec_channel_layout = get_valid_channel_layout(is->frame->channel_layout, av_frame_get_channels(is->frame));
|
||||
@@ -2257,8 +2222,6 @@ static int audio_decode_frame(VideoState *is)
|
||||
is->audio_buf_frames_pending = 0;
|
||||
continue;
|
||||
}
|
||||
if (ret == AVERROR_EOF)
|
||||
is->audio_finished = is->audio_pkt_temp_serial;
|
||||
return ret;
|
||||
}
|
||||
is->audio_buf_frames_pending = 1;
|
||||
@@ -2355,7 +2318,6 @@ static int audio_decode_frame(VideoState *is)
|
||||
if (pkt->data)
|
||||
av_free_packet(pkt);
|
||||
memset(pkt_temp, 0, sizeof(*pkt_temp));
|
||||
pkt_temp->stream_index = -1;
|
||||
|
||||
if (is->audioq.abort_request) {
|
||||
return -1;
|
||||
@@ -2365,15 +2327,13 @@ static int audio_decode_frame(VideoState *is)
|
||||
SDL_CondSignal(is->continue_read_thread);
|
||||
|
||||
/* read next packet */
|
||||
if ((packet_queue_get(&is->audioq, pkt, 1, &is->audio_pkt_temp_serial)) < 0)
|
||||
if ((new_packet = packet_queue_get(&is->audioq, pkt, 1, &is->audio_pkt_temp_serial)) < 0)
|
||||
return -1;
|
||||
|
||||
if (pkt->data == flush_pkt.data) {
|
||||
avcodec_flush_buffers(dec);
|
||||
flush_complete = 0;
|
||||
is->audio_buf_frames_pending = 0;
|
||||
is->audio_frame_next_pts = AV_NOPTS_VALUE;
|
||||
if ((is->ic->iformat->flags & (AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK)) && !is->ic->iformat->read_seek)
|
||||
is->audio_frame_next_pts = is->audio_st->start_time;
|
||||
}
|
||||
|
||||
*pkt_temp = *pkt;
|
||||
@@ -2425,7 +2385,7 @@ static int audio_open(void *opaque, int64_t wanted_channel_layout, int wanted_nb
|
||||
{
|
||||
SDL_AudioSpec wanted_spec, spec;
|
||||
const char *env;
|
||||
static const int next_nb_channels[] = {0, 0, 1, 6, 2, 6, 4, 6};
|
||||
const int next_nb_channels[] = {0, 0, 1, 6, 2, 6, 4, 6};
|
||||
|
||||
env = SDL_getenv("SDL_AUDIO_CHANNELS");
|
||||
if (env) {
|
||||
@@ -2490,7 +2450,6 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
int sample_rate, nb_channels;
|
||||
int64_t channel_layout;
|
||||
int ret;
|
||||
int stream_lowres = lowres;
|
||||
|
||||
if (stream_index < 0 || stream_index >= ic->nb_streams)
|
||||
return -1;
|
||||
@@ -2515,15 +2474,16 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
|
||||
avctx->codec_id = codec->id;
|
||||
avctx->workaround_bugs = workaround_bugs;
|
||||
if(stream_lowres > av_codec_get_max_lowres(codec)){
|
||||
avctx->lowres = lowres;
|
||||
if(avctx->lowres > codec->max_lowres){
|
||||
av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n",
|
||||
av_codec_get_max_lowres(codec));
|
||||
stream_lowres = av_codec_get_max_lowres(codec);
|
||||
codec->max_lowres);
|
||||
avctx->lowres= codec->max_lowres;
|
||||
}
|
||||
av_codec_set_lowres(avctx, stream_lowres);
|
||||
avctx->idct_algo = idct;
|
||||
avctx->error_concealment = error_concealment;
|
||||
|
||||
if(stream_lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
if(avctx->lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
if (fast) avctx->flags2 |= CODEC_FLAG2_FAST;
|
||||
if(codec->capabilities & CODEC_CAP_DR1)
|
||||
avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
@@ -2531,8 +2491,8 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec);
|
||||
if (!av_dict_get(opts, "threads", NULL, 0))
|
||||
av_dict_set(&opts, "threads", "auto", 0);
|
||||
if (stream_lowres)
|
||||
av_dict_set(&opts, "lowres", av_asprintf("%d", stream_lowres), AV_DICT_DONT_STRDUP_VAL);
|
||||
if (avctx->lowres)
|
||||
av_dict_set(&opts, "lowres", av_asprintf("%d", avctx->lowres), AV_DICT_DONT_STRDUP_VAL);
|
||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
av_dict_set(&opts, "refcounted_frames", "1", 0);
|
||||
if (avcodec_open2(avctx, codec, &opts) < 0)
|
||||
@@ -2583,7 +2543,6 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
|
||||
memset(&is->audio_pkt, 0, sizeof(is->audio_pkt));
|
||||
memset(&is->audio_pkt_temp, 0, sizeof(is->audio_pkt_temp));
|
||||
is->audio_pkt_temp.stream_index = -1;
|
||||
|
||||
is->audio_stream = stream_index;
|
||||
is->audio_st = ic->streams[stream_index];
|
||||
@@ -2842,8 +2801,7 @@ static int read_thread(void *arg)
|
||||
}
|
||||
|
||||
if (is->video_stream < 0 && is->audio_stream < 0) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Failed to open file '%s' or configure filtergraph\n",
|
||||
is->filename);
|
||||
av_log(NULL, AV_LOG_FATAL, "%s: could not open codecs\n", is->filename);
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
@@ -2913,7 +2871,6 @@ static int read_thread(void *arg)
|
||||
if ((ret = av_copy_packet(©, &is->video_st->attached_pic)) < 0)
|
||||
goto fail;
|
||||
packet_queue_put(&is->videoq, ©);
|
||||
packet_queue_put_nullpacket(&is->videoq, is->video_stream);
|
||||
}
|
||||
is->queue_attachments_req = 0;
|
||||
}
|
||||
@@ -2931,22 +2888,30 @@ static int read_thread(void *arg)
|
||||
SDL_UnlockMutex(wait_mutex);
|
||||
continue;
|
||||
}
|
||||
if (!is->paused &&
|
||||
(!is->audio_st || is->audio_finished == is->audioq.serial) &&
|
||||
(!is->video_st || (is->video_finished == is->videoq.serial && is->pictq_size == 0))) {
|
||||
if (loop != 1 && (!loop || --loop)) {
|
||||
stream_seek(is, start_time != AV_NOPTS_VALUE ? start_time : 0, 0, 0);
|
||||
} else if (autoexit) {
|
||||
ret = AVERROR_EOF;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
if (eof) {
|
||||
if (is->video_stream >= 0)
|
||||
packet_queue_put_nullpacket(&is->videoq, is->video_stream);
|
||||
if (is->audio_stream >= 0)
|
||||
packet_queue_put_nullpacket(&is->audioq, is->audio_stream);
|
||||
if (is->video_stream >= 0) {
|
||||
av_init_packet(pkt);
|
||||
pkt->data = NULL;
|
||||
pkt->size = 0;
|
||||
pkt->stream_index = is->video_stream;
|
||||
packet_queue_put(&is->videoq, pkt);
|
||||
}
|
||||
if (is->audio_stream >= 0) {
|
||||
av_init_packet(pkt);
|
||||
pkt->data = NULL;
|
||||
pkt->size = 0;
|
||||
pkt->stream_index = is->audio_stream;
|
||||
packet_queue_put(&is->audioq, pkt);
|
||||
}
|
||||
SDL_Delay(10);
|
||||
if (is->audioq.size + is->videoq.size + is->subtitleq.size == 0) {
|
||||
if (loop != 1 && (!loop || --loop)) {
|
||||
stream_seek(is, start_time != AV_NOPTS_VALUE ? start_time : 0, 0, 0);
|
||||
} else if (autoexit) {
|
||||
ret = AVERROR_EOF;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
eof=0;
|
||||
continue;
|
||||
}
|
||||
@@ -3053,8 +3018,6 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
int start_index, stream_index;
|
||||
int old_index;
|
||||
AVStream *st;
|
||||
AVProgram *p = NULL;
|
||||
int nb_streams = is->ic->nb_streams;
|
||||
|
||||
if (codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
start_index = is->last_video_stream;
|
||||
@@ -3067,22 +3030,8 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
old_index = is->subtitle_stream;
|
||||
}
|
||||
stream_index = start_index;
|
||||
|
||||
if (codec_type != AVMEDIA_TYPE_VIDEO && is->video_stream != -1) {
|
||||
p = av_find_program_from_stream(ic, NULL, is->video_stream);
|
||||
if (p) {
|
||||
nb_streams = p->nb_stream_indexes;
|
||||
for (start_index = 0; start_index < nb_streams; start_index++)
|
||||
if (p->stream_index[start_index] == stream_index)
|
||||
break;
|
||||
if (start_index == nb_streams)
|
||||
start_index = -1;
|
||||
stream_index = start_index;
|
||||
}
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
if (++stream_index >= nb_streams)
|
||||
if (++stream_index >= is->ic->nb_streams)
|
||||
{
|
||||
if (codec_type == AVMEDIA_TYPE_SUBTITLE)
|
||||
{
|
||||
@@ -3096,7 +3045,7 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
}
|
||||
if (stream_index == start_index)
|
||||
return;
|
||||
st = is->ic->streams[p ? p->stream_index[stream_index] : stream_index];
|
||||
st = ic->streams[stream_index];
|
||||
if (st->codec->codec_type == codec_type) {
|
||||
/* check that parameters are OK */
|
||||
switch (codec_type) {
|
||||
@@ -3114,8 +3063,6 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
}
|
||||
}
|
||||
the_end:
|
||||
if (p && stream_index != -1)
|
||||
stream_index = p->stream_index[stream_index];
|
||||
stream_component_close(is, old_index);
|
||||
stream_component_open(is, stream_index);
|
||||
}
|
||||
@@ -3203,11 +3150,6 @@ static void event_loop(VideoState *cur_stream)
|
||||
case SDLK_v:
|
||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO);
|
||||
break;
|
||||
case SDLK_c:
|
||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO);
|
||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO);
|
||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE);
|
||||
break;
|
||||
case SDLK_t:
|
||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE);
|
||||
break;
|
||||
@@ -3460,6 +3402,7 @@ static const OptionDef options[] = {
|
||||
{ "genpts", OPT_BOOL | OPT_EXPERT, { &genpts }, "generate pts", "" },
|
||||
{ "drp", OPT_INT | HAS_ARG | OPT_EXPERT, { &decoder_reorder_pts }, "let decoder reorder pts 0=off 1=on -1=auto", ""},
|
||||
{ "lowres", OPT_INT | HAS_ARG | OPT_EXPERT, { &lowres }, "", "" },
|
||||
{ "idct", OPT_INT | HAS_ARG | OPT_EXPERT, { &idct }, "set idct algo", "algo" },
|
||||
{ "ec", OPT_INT | HAS_ARG | OPT_EXPERT, { &error_concealment }, "set error concealment options", "bit_mask" },
|
||||
{ "sync", HAS_ARG | OPT_EXPERT, { .func_arg = opt_sync }, "set audio-video sync. type (type=audio/video/ext)", "type" },
|
||||
{ "autoexit", OPT_BOOL | OPT_EXPERT, { &autoexit }, "exit at the end", "" },
|
||||
@@ -3509,10 +3452,9 @@ void show_help_default(const char *opt, const char *arg)
|
||||
"q, ESC quit\n"
|
||||
"f toggle full screen\n"
|
||||
"p, SPC pause\n"
|
||||
"a cycle audio channel in the current program\n"
|
||||
"a cycle audio channel\n"
|
||||
"v cycle video channel\n"
|
||||
"t cycle subtitle channel in the current program\n"
|
||||
"c cycle program\n"
|
||||
"t cycle subtitle channel\n"
|
||||
"w show audio waves\n"
|
||||
"s activate frame-step mode\n"
|
||||
"left/right seek backward/forward 10 seconds\n"
|
||||
|
398
ffprobe.c
398
ffprobe.c
@@ -37,9 +37,7 @@
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/libm.h"
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "libavutil/timecode.h"
|
||||
#include "libavutil/timestamp.h"
|
||||
#include "libavdevice/avdevice.h"
|
||||
#include "libswscale/swscale.h"
|
||||
#include "libswresample/swresample.h"
|
||||
@@ -59,7 +57,6 @@ static int do_show_error = 0;
|
||||
static int do_show_format = 0;
|
||||
static int do_show_frames = 0;
|
||||
static int do_show_packets = 0;
|
||||
static int do_show_programs = 0;
|
||||
static int do_show_streams = 0;
|
||||
static int do_show_stream_disposition = 0;
|
||||
static int do_show_data = 0;
|
||||
@@ -75,17 +72,6 @@ static int show_private_data = 1;
|
||||
static char *print_format;
|
||||
static char *stream_specifier;
|
||||
|
||||
typedef struct {
|
||||
int id; ///< identifier
|
||||
int64_t start, end; ///< start, end in second/AV_TIME_BASE units
|
||||
int has_start, has_end;
|
||||
int start_is_offset, end_is_offset;
|
||||
int duration_frames;
|
||||
} ReadInterval;
|
||||
|
||||
static ReadInterval *read_intervals;
|
||||
static int read_intervals_nb = 0;
|
||||
|
||||
/* section structure definition */
|
||||
|
||||
#define SECTION_MAX_NB_CHILDREN 10
|
||||
@@ -122,14 +108,7 @@ typedef enum {
|
||||
SECTION_ID_PACKET,
|
||||
SECTION_ID_PACKETS,
|
||||
SECTION_ID_PACKETS_AND_FRAMES,
|
||||
SECTION_ID_PROGRAM_STREAM_DISPOSITION,
|
||||
SECTION_ID_PROGRAM_STREAM_TAGS,
|
||||
SECTION_ID_PROGRAM,
|
||||
SECTION_ID_PROGRAM_STREAMS,
|
||||
SECTION_ID_PROGRAM_STREAM,
|
||||
SECTION_ID_PROGRAM_TAGS,
|
||||
SECTION_ID_PROGRAM_VERSION,
|
||||
SECTION_ID_PROGRAMS,
|
||||
SECTION_ID_ROOT,
|
||||
SECTION_ID_STREAM,
|
||||
SECTION_ID_STREAM_DISPOSITION,
|
||||
@@ -152,17 +131,10 @@ static struct section sections[] = {
|
||||
[SECTION_ID_PACKETS] = { SECTION_ID_PACKETS, "packets", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} },
|
||||
[SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, "packets_and_frames", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} },
|
||||
[SECTION_ID_PACKET] = { SECTION_ID_PACKET, "packet", 0, { -1 } },
|
||||
[SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "program_stream_disposition" },
|
||||
[SECTION_ID_PROGRAM_STREAM_TAGS] = { SECTION_ID_PROGRAM_STREAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_stream_tags" },
|
||||
[SECTION_ID_PROGRAM] = { SECTION_ID_PROGRAM, "program", 0, { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_STREAMS, -1 } },
|
||||
[SECTION_ID_PROGRAM_STREAMS] = { SECTION_ID_PROGRAM_STREAMS, "streams", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM_STREAM, -1 }, .unique_name = "program_streams" },
|
||||
[SECTION_ID_PROGRAM_STREAM] = { SECTION_ID_PROGRAM_STREAM, "stream", 0, { SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, -1 }, .unique_name = "program_stream" },
|
||||
[SECTION_ID_PROGRAM_TAGS] = { SECTION_ID_PROGRAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_tags" },
|
||||
[SECTION_ID_PROGRAM_VERSION] = { SECTION_ID_PROGRAM_VERSION, "program_version", 0, { -1 } },
|
||||
[SECTION_ID_PROGRAMS] = { SECTION_ID_PROGRAMS, "programs", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM, -1 } },
|
||||
[SECTION_ID_ROOT] = { SECTION_ID_ROOT, "root", SECTION_FLAG_IS_WRAPPER,
|
||||
{ SECTION_ID_CHAPTERS, SECTION_ID_FORMAT, SECTION_ID_FRAMES, SECTION_ID_PROGRAMS, SECTION_ID_STREAMS,
|
||||
SECTION_ID_PACKETS, SECTION_ID_ERROR, SECTION_ID_PROGRAM_VERSION, SECTION_ID_LIBRARY_VERSIONS, -1} },
|
||||
{ SECTION_ID_CHAPTERS, SECTION_ID_FORMAT, SECTION_ID_FRAMES, SECTION_ID_STREAMS, SECTION_ID_PACKETS,
|
||||
SECTION_ID_ERROR, SECTION_ID_PROGRAM_VERSION, SECTION_ID_LIBRARY_VERSIONS, -1} },
|
||||
[SECTION_ID_STREAMS] = { SECTION_ID_STREAMS, "streams", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM, -1 } },
|
||||
[SECTION_ID_STREAM] = { SECTION_ID_STREAM, "stream", 0, { SECTION_ID_STREAM_DISPOSITION, SECTION_ID_STREAM_TAGS, -1 } },
|
||||
[SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_disposition" },
|
||||
@@ -703,8 +675,6 @@ typedef struct CompactContext {
|
||||
char *escape_mode_str;
|
||||
const char * (*escape_str)(AVBPrint *dst, const char *src, const char sep, void *log_ctx);
|
||||
int nested_section[SECTION_MAX_NB_LEVELS];
|
||||
int has_nested_elems[SECTION_MAX_NB_LEVELS];
|
||||
int terminate_line[SECTION_MAX_NB_LEVELS];
|
||||
} CompactContext;
|
||||
|
||||
#undef OFFSET
|
||||
@@ -752,28 +722,18 @@ static void compact_print_section_header(WriterContext *wctx)
|
||||
const struct section *section = wctx->section[wctx->level];
|
||||
const struct section *parent_section = wctx->level ?
|
||||
wctx->section[wctx->level-1] : NULL;
|
||||
compact->terminate_line[wctx->level] = 1;
|
||||
compact->has_nested_elems[wctx->level] = 0;
|
||||
|
||||
av_bprint_clear(&wctx->section_pbuf[wctx->level]);
|
||||
if (!(section->flags & SECTION_FLAG_IS_ARRAY) && parent_section &&
|
||||
if (parent_section &&
|
||||
!(parent_section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY))) {
|
||||
compact->nested_section[wctx->level] = 1;
|
||||
compact->has_nested_elems[wctx->level-1] = 1;
|
||||
av_bprintf(&wctx->section_pbuf[wctx->level], "%s%s:",
|
||||
wctx->section_pbuf[wctx->level-1].str,
|
||||
(char *)av_x_if_null(section->element_name, section->name));
|
||||
wctx->nb_item[wctx->level] = wctx->nb_item[wctx->level-1];
|
||||
} else {
|
||||
if (parent_section && compact->has_nested_elems[wctx->level-1] &&
|
||||
(section->flags & SECTION_FLAG_IS_ARRAY)) {
|
||||
compact->terminate_line[wctx->level-1] = 0;
|
||||
printf("\n");
|
||||
}
|
||||
if (compact->print_section &&
|
||||
!(section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
||||
printf("%s%c", section->name, compact->item_sep);
|
||||
}
|
||||
} else if (compact->print_section &&
|
||||
!(section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
||||
printf("%s%c", section->name, compact->item_sep);
|
||||
}
|
||||
|
||||
static void compact_print_section_footer(WriterContext *wctx)
|
||||
@@ -781,7 +741,6 @@ static void compact_print_section_footer(WriterContext *wctx)
|
||||
CompactContext *compact = wctx->priv;
|
||||
|
||||
if (!compact->nested_section[wctx->level] &&
|
||||
compact->terminate_line[wctx->level] &&
|
||||
!(wctx->section[wctx->level]->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
||||
printf("\n");
|
||||
}
|
||||
@@ -1580,6 +1539,7 @@ static av_always_inline int process_frame(WriterContext *w,
|
||||
AVCodecContext *dec_ctx = fmt_ctx->streams[pkt->stream_index]->codec;
|
||||
int ret = 0, got_frame = 0;
|
||||
|
||||
avcodec_get_frame_defaults(frame);
|
||||
if (dec_ctx->codec) {
|
||||
switch (dec_ctx->codec_type) {
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
@@ -1605,98 +1565,16 @@ static av_always_inline int process_frame(WriterContext *w,
|
||||
return got_frame;
|
||||
}
|
||||
|
||||
static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
|
||||
{
|
||||
av_log(log_ctx, log_level, "id:%d", interval->id);
|
||||
|
||||
if (interval->has_start) {
|
||||
av_log(log_ctx, log_level, " start:%s%s", interval->start_is_offset ? "+" : "",
|
||||
av_ts2timestr(interval->start, &AV_TIME_BASE_Q));
|
||||
} else {
|
||||
av_log(log_ctx, log_level, " start:N/A");
|
||||
}
|
||||
|
||||
if (interval->has_end) {
|
||||
av_log(log_ctx, log_level, " end:%s", interval->end_is_offset ? "+" : "");
|
||||
if (interval->duration_frames)
|
||||
av_log(log_ctx, log_level, "#%"PRId64, interval->end);
|
||||
else
|
||||
av_log(log_ctx, log_level, "%s", av_ts2timestr(interval->end, &AV_TIME_BASE_Q));
|
||||
} else {
|
||||
av_log(log_ctx, log_level, " end:N/A");
|
||||
}
|
||||
|
||||
av_log(log_ctx, log_level, "\n");
|
||||
}
|
||||
|
||||
static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx,
|
||||
const ReadInterval *interval, int64_t *cur_ts)
|
||||
static void read_packets(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
{
|
||||
AVPacket pkt, pkt1;
|
||||
AVFrame *frame = NULL;
|
||||
int ret = 0, i = 0, frame_count = 0;
|
||||
int64_t start = -INT64_MAX, end = interval->end;
|
||||
int has_start = 0, has_end = interval->has_end && !interval->end_is_offset;
|
||||
AVFrame frame;
|
||||
int i = 0;
|
||||
|
||||
av_init_packet(&pkt);
|
||||
|
||||
av_log(NULL, AV_LOG_VERBOSE, "Processing read interval ");
|
||||
log_read_interval(interval, NULL, AV_LOG_VERBOSE);
|
||||
|
||||
if (interval->has_start) {
|
||||
int64_t target;
|
||||
if (interval->start_is_offset) {
|
||||
if (*cur_ts == AV_NOPTS_VALUE) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Could not seek to relative position since current "
|
||||
"timestamp is not defined\n");
|
||||
ret = AVERROR(EINVAL);
|
||||
goto end;
|
||||
}
|
||||
target = *cur_ts + interval->start;
|
||||
} else {
|
||||
target = interval->start;
|
||||
}
|
||||
|
||||
av_log(NULL, AV_LOG_VERBOSE, "Seeking to read interval start point %s\n",
|
||||
av_ts2timestr(target, &AV_TIME_BASE_Q));
|
||||
if ((ret = avformat_seek_file(fmt_ctx, -1, -INT64_MAX, target, INT64_MAX, 0)) < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Could not seek to position %"PRId64": %s\n",
|
||||
interval->start, av_err2str(ret));
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
frame = av_frame_alloc();
|
||||
if (!frame) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
while (!av_read_frame(fmt_ctx, &pkt)) {
|
||||
if (selected_streams[pkt.stream_index]) {
|
||||
AVRational tb = fmt_ctx->streams[pkt.stream_index]->time_base;
|
||||
|
||||
if (pkt.pts != AV_NOPTS_VALUE)
|
||||
*cur_ts = av_rescale_q(pkt.pts, tb, AV_TIME_BASE_Q);
|
||||
|
||||
if (!has_start && *cur_ts != AV_NOPTS_VALUE) {
|
||||
start = *cur_ts;
|
||||
has_start = 1;
|
||||
}
|
||||
|
||||
if (has_start && !has_end && interval->end_is_offset) {
|
||||
end = start + interval->end;
|
||||
has_end = 1;
|
||||
}
|
||||
|
||||
if (interval->end_is_offset && interval->duration_frames) {
|
||||
if (frame_count >= interval->end)
|
||||
break;
|
||||
} else if (has_end && *cur_ts != AV_NOPTS_VALUE && *cur_ts >= end) {
|
||||
break;
|
||||
}
|
||||
|
||||
frame_count++;
|
||||
if (do_read_packets) {
|
||||
if (do_show_packets)
|
||||
show_packet(w, fmt_ctx, &pkt, i++);
|
||||
@@ -1704,7 +1582,7 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx,
|
||||
}
|
||||
if (do_read_frames) {
|
||||
pkt1 = pkt;
|
||||
while (pkt1.size && process_frame(w, fmt_ctx, frame, &pkt1) > 0);
|
||||
while (pkt1.size && process_frame(w, fmt_ctx, &frame, &pkt1) > 0);
|
||||
}
|
||||
}
|
||||
av_free_packet(&pkt);
|
||||
@@ -1716,36 +1594,11 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx,
|
||||
for (i = 0; i < fmt_ctx->nb_streams; i++) {
|
||||
pkt.stream_index = i;
|
||||
if (do_read_frames)
|
||||
while (process_frame(w, fmt_ctx, frame, &pkt) > 0);
|
||||
}
|
||||
|
||||
end:
|
||||
av_frame_free(&frame);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Could not read packets in interval ");
|
||||
log_read_interval(interval, NULL, AV_LOG_ERROR);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void read_packets(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
{
|
||||
int i, ret = 0;
|
||||
int64_t cur_ts = fmt_ctx->start_time;
|
||||
|
||||
if (read_intervals_nb == 0) {
|
||||
ReadInterval interval = (ReadInterval) { .has_start = 0, .has_end = 0 };
|
||||
ret = read_interval_packets(w, fmt_ctx, &interval, &cur_ts);
|
||||
} else {
|
||||
for (i = 0; i < read_intervals_nb; i++) {
|
||||
ret = read_interval_packets(w, fmt_ctx, &read_intervals[i], &cur_ts);
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
while (process_frame(w, fmt_ctx, &frame, &pkt) > 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx, int in_program)
|
||||
static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
|
||||
{
|
||||
AVStream *stream = fmt_ctx->streams[stream_idx];
|
||||
AVCodecContext *dec_ctx;
|
||||
@@ -1757,7 +1610,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
||||
|
||||
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
|
||||
|
||||
writer_print_section_header(w, in_program ? SECTION_ID_PROGRAM_STREAM : SECTION_ID_STREAM);
|
||||
writer_print_section_header(w, SECTION_ID_STREAM);
|
||||
|
||||
print_int("index", stream->index);
|
||||
|
||||
@@ -1828,28 +1681,8 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
||||
else print_str_opt("sample_fmt", "unknown");
|
||||
print_val("sample_rate", dec_ctx->sample_rate, unit_hertz_str);
|
||||
print_int("channels", dec_ctx->channels);
|
||||
|
||||
if (dec_ctx->channel_layout) {
|
||||
av_bprint_clear(&pbuf);
|
||||
av_bprint_channel_layout(&pbuf, dec_ctx->channels, dec_ctx->channel_layout);
|
||||
print_str ("channel_layout", pbuf.str);
|
||||
} else {
|
||||
print_str_opt("channel_layout", "unknown");
|
||||
}
|
||||
|
||||
print_int("bits_per_sample", av_get_bits_per_sample(dec_ctx->codec_id));
|
||||
break;
|
||||
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
if (dec_ctx->width)
|
||||
print_int("width", dec_ctx->width);
|
||||
else
|
||||
print_str_opt("width", "N/A");
|
||||
if (dec_ctx->height)
|
||||
print_int("height", dec_ctx->height);
|
||||
else
|
||||
print_str_opt("height", "N/A");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
print_str_opt("codec_type", "unknown");
|
||||
@@ -1893,7 +1726,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
||||
} while (0)
|
||||
|
||||
if (do_show_stream_disposition) {
|
||||
writer_print_section_header(w, in_program ? SECTION_ID_PROGRAM_STREAM_DISPOSITION : SECTION_ID_STREAM_DISPOSITION);
|
||||
writer_print_section_header(w, SECTION_ID_STREAM_DISPOSITION);
|
||||
PRINT_DISPOSITION(DEFAULT, "default");
|
||||
PRINT_DISPOSITION(DUB, "dub");
|
||||
PRINT_DISPOSITION(ORIGINAL, "original");
|
||||
@@ -1908,7 +1741,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
||||
writer_print_section_footer(w);
|
||||
}
|
||||
|
||||
show_tags(w, stream->metadata, in_program ? SECTION_ID_PROGRAM_STREAM_TAGS : SECTION_ID_STREAM_TAGS);
|
||||
show_tags(w, stream->metadata, SECTION_ID_STREAM_TAGS);
|
||||
|
||||
writer_print_section_footer(w);
|
||||
av_bprint_finalize(&pbuf, NULL);
|
||||
@@ -1921,47 +1754,7 @@ static void show_streams(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
writer_print_section_header(w, SECTION_ID_STREAMS);
|
||||
for (i = 0; i < fmt_ctx->nb_streams; i++)
|
||||
if (selected_streams[i])
|
||||
show_stream(w, fmt_ctx, i, 0);
|
||||
writer_print_section_footer(w);
|
||||
}
|
||||
|
||||
static void show_program(WriterContext *w, AVFormatContext *fmt_ctx, AVProgram *program)
|
||||
{
|
||||
int i;
|
||||
|
||||
writer_print_section_header(w, SECTION_ID_PROGRAM);
|
||||
print_int("program_id", program->id);
|
||||
print_int("program_num", program->program_num);
|
||||
print_int("nb_streams", program->nb_stream_indexes);
|
||||
print_int("pmt_pid", program->pmt_pid);
|
||||
print_int("pcr_pid", program->pcr_pid);
|
||||
print_ts("start_pts", program->start_time);
|
||||
print_time("start_time", program->start_time, &AV_TIME_BASE_Q);
|
||||
print_ts("end_pts", program->end_time);
|
||||
print_time("end_time", program->end_time, &AV_TIME_BASE_Q);
|
||||
show_tags(w, program->metadata, SECTION_ID_PROGRAM_TAGS);
|
||||
|
||||
writer_print_section_header(w, SECTION_ID_PROGRAM_STREAMS);
|
||||
for (i = 0; i < program->nb_stream_indexes; i++) {
|
||||
if (selected_streams[program->stream_index[i]])
|
||||
show_stream(w, fmt_ctx, program->stream_index[i], 1);
|
||||
}
|
||||
writer_print_section_footer(w);
|
||||
|
||||
writer_print_section_footer(w);
|
||||
}
|
||||
|
||||
static void show_programs(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
{
|
||||
int i;
|
||||
|
||||
writer_print_section_header(w, SECTION_ID_PROGRAMS);
|
||||
for (i = 0; i < fmt_ctx->nb_programs; i++) {
|
||||
AVProgram *program = fmt_ctx->programs[i];
|
||||
if (!program)
|
||||
continue;
|
||||
show_program(w, fmt_ctx, program);
|
||||
}
|
||||
show_stream(w, fmt_ctx, i);
|
||||
writer_print_section_footer(w);
|
||||
}
|
||||
|
||||
@@ -1994,7 +1787,6 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
writer_print_section_header(w, SECTION_ID_FORMAT);
|
||||
print_str("filename", fmt_ctx->filename);
|
||||
print_int("nb_streams", fmt_ctx->nb_streams);
|
||||
print_int("nb_programs", fmt_ctx->nb_programs);
|
||||
print_str("format_name", fmt_ctx->iformat->name);
|
||||
if (!do_bitexact) {
|
||||
if (fmt_ctx->iformat->long_name) print_str ("format_long_name", fmt_ctx->iformat->long_name);
|
||||
@@ -2006,7 +1798,6 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||
else print_str_opt("size", "N/A");
|
||||
if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
|
||||
else print_str_opt("bit_rate", "N/A");
|
||||
print_int("probe_score", av_format_get_probe_score(fmt_ctx));
|
||||
show_tags(w, fmt_ctx->metadata, SECTION_ID_FORMAT_TAGS);
|
||||
|
||||
writer_print_section_footer(w);
|
||||
@@ -2064,18 +1855,18 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
||||
AVCodec *codec;
|
||||
|
||||
if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Failed to probe codec for input stream %d\n",
|
||||
stream->index);
|
||||
} else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
|
||||
av_log(NULL, AV_LOG_WARNING,
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Unsupported codec with id %d for input stream %d\n",
|
||||
stream->codec->codec_id, stream->index);
|
||||
} else {
|
||||
AVDictionary *opts = filter_codec_opts(codec_opts, stream->codec->codec_id,
|
||||
fmt_ctx, stream, codec);
|
||||
if (avcodec_open2(stream->codec, codec, &opts) < 0) {
|
||||
av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",
|
||||
av_log(NULL, AV_LOG_ERROR, "Error while opening codec for input stream %d\n",
|
||||
stream->index);
|
||||
}
|
||||
if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
|
||||
@@ -2149,8 +1940,6 @@ static int probe_file(WriterContext *wctx, const char *filename)
|
||||
if (do_show_frames || do_show_packets)
|
||||
writer_print_section_footer(wctx);
|
||||
}
|
||||
if (do_show_programs)
|
||||
show_programs(wctx, fmt_ctx);
|
||||
if (do_show_streams)
|
||||
show_streams(wctx, fmt_ctx);
|
||||
if (do_show_chapters)
|
||||
@@ -2357,145 +2146,6 @@ void show_help_default(const char *opt, const char *arg)
|
||||
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse interval specification, according to the format:
|
||||
* INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]]
|
||||
* INTERVALS ::= INTERVAL[,INTERVALS]
|
||||
*/
|
||||
static int parse_read_interval(const char *interval_spec,
|
||||
ReadInterval *interval)
|
||||
{
|
||||
int ret = 0;
|
||||
char *next, *p, *spec = av_strdup(interval_spec);
|
||||
if (!spec)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (!*spec) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Invalid empty interval specification\n");
|
||||
ret = AVERROR(EINVAL);
|
||||
goto end;
|
||||
}
|
||||
|
||||
p = spec;
|
||||
next = strchr(spec, '%');
|
||||
if (next)
|
||||
*next++ = 0;
|
||||
|
||||
/* parse first part */
|
||||
if (*p) {
|
||||
interval->has_start = 1;
|
||||
|
||||
if (*p == '+') {
|
||||
interval->start_is_offset = 1;
|
||||
p++;
|
||||
} else {
|
||||
interval->start_is_offset = 0;
|
||||
}
|
||||
|
||||
ret = av_parse_time(&interval->start, p, 1);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Invalid interval start specification '%s'\n", p);
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
interval->has_start = 0;
|
||||
}
|
||||
|
||||
/* parse second part */
|
||||
p = next;
|
||||
if (p && *p) {
|
||||
int64_t us;
|
||||
interval->has_end = 1;
|
||||
|
||||
if (*p == '+') {
|
||||
interval->end_is_offset = 1;
|
||||
p++;
|
||||
} else {
|
||||
interval->end_is_offset = 0;
|
||||
}
|
||||
|
||||
if (interval->end_is_offset && *p == '#') {
|
||||
long long int lli;
|
||||
char *tail;
|
||||
interval->duration_frames = 1;
|
||||
p++;
|
||||
lli = strtoll(p, &tail, 10);
|
||||
if (*tail || lli < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Invalid or negative value '%s' for duration number of frames\n", p);
|
||||
goto end;
|
||||
}
|
||||
interval->end = lli;
|
||||
} else {
|
||||
ret = av_parse_time(&us, p, 1);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Invalid interval end/duration specification '%s'\n", p);
|
||||
goto end;
|
||||
}
|
||||
interval->end = us;
|
||||
}
|
||||
} else {
|
||||
interval->has_end = 0;
|
||||
}
|
||||
|
||||
end:
|
||||
av_free(spec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int parse_read_intervals(const char *intervals_spec)
|
||||
{
|
||||
int ret, n, i;
|
||||
char *p, *spec = av_strdup(intervals_spec);
|
||||
if (!spec)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
/* preparse specification, get number of intervals */
|
||||
for (n = 0, p = spec; *p; p++)
|
||||
if (*p == ',')
|
||||
n++;
|
||||
n++;
|
||||
|
||||
read_intervals = av_malloc(n * sizeof(*read_intervals));
|
||||
if (!read_intervals) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
read_intervals_nb = n;
|
||||
|
||||
/* parse intervals */
|
||||
p = spec;
|
||||
for (i = 0; p; i++) {
|
||||
char *next;
|
||||
|
||||
av_assert0(i < read_intervals_nb);
|
||||
next = strchr(p, ',');
|
||||
if (next)
|
||||
*next++ = 0;
|
||||
|
||||
read_intervals[i].id = i;
|
||||
ret = parse_read_interval(p, &read_intervals[i]);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Error parsing read interval #%d '%s'\n",
|
||||
i, p);
|
||||
goto end;
|
||||
}
|
||||
av_log(NULL, AV_LOG_VERBOSE, "Parsed log interval ");
|
||||
log_read_interval(&read_intervals[i], NULL, AV_LOG_VERBOSE);
|
||||
p = next;
|
||||
}
|
||||
av_assert0(i == read_intervals_nb);
|
||||
|
||||
end:
|
||||
av_free(spec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int opt_read_intervals(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
return parse_read_intervals(arg);
|
||||
}
|
||||
|
||||
static int opt_pretty(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
show_value_unit = 1;
|
||||
@@ -2556,7 +2206,6 @@ DEFINE_OPT_SHOW_SECTION(library_versions, LIBRARY_VERSIONS);
|
||||
DEFINE_OPT_SHOW_SECTION(packets, PACKETS);
|
||||
DEFINE_OPT_SHOW_SECTION(program_version, PROGRAM_VERSION);
|
||||
DEFINE_OPT_SHOW_SECTION(streams, STREAMS);
|
||||
DEFINE_OPT_SHOW_SECTION(programs, PROGRAMS);
|
||||
|
||||
static const OptionDef real_options[] = {
|
||||
#include "cmdutils_common_opts.h"
|
||||
@@ -2583,7 +2232,6 @@ static const OptionDef real_options[] = {
|
||||
{ "show_entries", HAS_ARG, {.func_arg = opt_show_entries},
|
||||
"show a set of specified entries", "entry_list" },
|
||||
{ "show_packets", 0, {(void*)&opt_show_packets}, "show packets info" },
|
||||
{ "show_programs", 0, {(void*)&opt_show_programs}, "show programs info" },
|
||||
{ "show_streams", 0, {(void*)&opt_show_streams}, "show streams info" },
|
||||
{ "show_chapters", 0, {(void*)&opt_show_chapters}, "show chapters info" },
|
||||
{ "count_frames", OPT_BOOL, {(void*)&do_count_frames}, "count the number of frames per stream" },
|
||||
@@ -2594,7 +2242,6 @@ static const OptionDef real_options[] = {
|
||||
{ "show_private_data", OPT_BOOL, {(void*)&show_private_data}, "show private data" },
|
||||
{ "private", OPT_BOOL, {(void*)&show_private_data}, "same as show_private_data" },
|
||||
{ "bitexact", OPT_BOOL, {&do_bitexact}, "force bitexact output" },
|
||||
{ "read_intervals", HAS_ARG, {.func_arg = opt_read_intervals}, "set read intervals", "read_intervals" },
|
||||
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {.func_arg = opt_default}, "generic catch all option", "" },
|
||||
{ "i", HAS_ARG, {.func_arg = opt_input_file_i}, "read specified file", "input_file"},
|
||||
{ NULL, },
|
||||
@@ -2648,10 +2295,8 @@ int main(int argc, char **argv)
|
||||
SET_DO_SHOW(LIBRARY_VERSIONS, library_versions);
|
||||
SET_DO_SHOW(PACKETS, packets);
|
||||
SET_DO_SHOW(PROGRAM_VERSION, program_version);
|
||||
SET_DO_SHOW(PROGRAMS, programs);
|
||||
SET_DO_SHOW(STREAMS, streams);
|
||||
SET_DO_SHOW(STREAM_DISPOSITION, stream_disposition);
|
||||
SET_DO_SHOW(PROGRAM_STREAM_DISPOSITION, stream_disposition);
|
||||
|
||||
if (do_bitexact && (do_show_program_version || do_show_library_versions)) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
@@ -2689,7 +2334,7 @@ int main(int argc, char **argv)
|
||||
ffprobe_show_library_versions(wctx);
|
||||
|
||||
if (!input_filename &&
|
||||
((do_show_format || do_show_programs || do_show_streams || do_show_chapters || do_show_packets || do_show_error) ||
|
||||
((do_show_format || do_show_streams || do_show_chapters || do_show_packets || do_show_error) ||
|
||||
(!do_show_program_version && !do_show_library_versions))) {
|
||||
show_usage();
|
||||
av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n");
|
||||
@@ -2707,7 +2352,6 @@ int main(int argc, char **argv)
|
||||
|
||||
end:
|
||||
av_freep(&print_format);
|
||||
av_freep(&read_intervals);
|
||||
|
||||
uninit_opts();
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(sections); i++)
|
||||
|
63
ffserver.c
63
ffserver.c
@@ -36,7 +36,6 @@
|
||||
#include "libavformat/network.h"
|
||||
#include "libavformat/os_support.h"
|
||||
#include "libavformat/rtpdec.h"
|
||||
#include "libavformat/rtpproto.h"
|
||||
#include "libavformat/rtsp.h"
|
||||
#include "libavformat/avio_internal.h"
|
||||
#include "libavformat/internal.h"
|
||||
@@ -48,7 +47,6 @@
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "libavutil/random_seed.h"
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "libavutil/opt.h"
|
||||
@@ -65,6 +63,9 @@
|
||||
#include <time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#if HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include "cmdutils.h"
|
||||
|
||||
@@ -327,14 +328,6 @@ static AVLFG random_state;
|
||||
|
||||
static FILE *logfile = NULL;
|
||||
|
||||
static void htmlstrip(char *s) {
|
||||
while (s && *s) {
|
||||
s += strspn(s, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,. ");
|
||||
if (*s)
|
||||
*s++ = '?';
|
||||
}
|
||||
}
|
||||
|
||||
static int64_t ffm_read_write_index(int fd)
|
||||
{
|
||||
uint8_t buf[8];
|
||||
@@ -1894,7 +1887,6 @@ static int http_parse_request(HTTPContext *c)
|
||||
send_error:
|
||||
c->http_error = 404;
|
||||
q = c->buffer;
|
||||
htmlstrip(msg);
|
||||
snprintf(q, c->buffer_size,
|
||||
"HTTP/1.0 404 Not Found\r\n"
|
||||
"Content-type: text/html\r\n"
|
||||
@@ -3914,7 +3906,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
|
||||
av->rc_buffer_aggressivity = 1.0;
|
||||
|
||||
if (!av->rc_eq)
|
||||
av->rc_eq = av_strdup("tex^qComp");
|
||||
av->rc_eq = "tex^qComp";
|
||||
if (!av->i_quant_factor)
|
||||
av->i_quant_factor = -0.8;
|
||||
if (!av->b_quant_factor)
|
||||
@@ -3962,6 +3954,33 @@ static enum AVCodecID opt_video_codec(const char *arg)
|
||||
return p->id;
|
||||
}
|
||||
|
||||
/* simplistic plugin support */
|
||||
|
||||
#if HAVE_DLOPEN
|
||||
static void load_module(const char *filename)
|
||||
{
|
||||
void *dll;
|
||||
void (*init_func)(void);
|
||||
dll = dlopen(filename, RTLD_NOW);
|
||||
if (!dll) {
|
||||
fprintf(stderr, "Could not load module '%s' - %s\n",
|
||||
filename, dlerror());
|
||||
return;
|
||||
}
|
||||
|
||||
init_func = dlsym(dll, "ffserver_module_init");
|
||||
if (!init_func) {
|
||||
fprintf(stderr,
|
||||
"%s: init function 'ffserver_module_init()' not found\n",
|
||||
filename);
|
||||
dlclose(dll);
|
||||
return;
|
||||
}
|
||||
|
||||
init_func();
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ffserver_opt_default(const char *opt, const char *arg,
|
||||
AVCodecContext *avctx, int type)
|
||||
{
|
||||
@@ -4435,14 +4454,6 @@ static int parse_ffconfig(const char *filename)
|
||||
video_enc.time_base.den = frame_rate.num;
|
||||
}
|
||||
}
|
||||
} else if (!av_strcasecmp(cmd, "PixelFormat")) {
|
||||
get_arg(arg, sizeof(arg), &p);
|
||||
if (stream) {
|
||||
video_enc.pix_fmt = av_get_pix_fmt(arg);
|
||||
if (video_enc.pix_fmt == AV_PIX_FMT_NONE) {
|
||||
ERROR("Unknown pixel format: %s\n", arg);
|
||||
}
|
||||
}
|
||||
} else if (!av_strcasecmp(cmd, "VideoGopSize")) {
|
||||
get_arg(arg, sizeof(arg), &p);
|
||||
if (stream)
|
||||
@@ -4626,7 +4637,12 @@ static int parse_ffconfig(const char *filename)
|
||||
redirect = NULL;
|
||||
}
|
||||
} else if (!av_strcasecmp(cmd, "LoadModule")) {
|
||||
ERROR("Loadable modules no longer supported\n");
|
||||
get_arg(arg, sizeof(arg), &p);
|
||||
#if HAVE_DLOPEN
|
||||
load_module(arg);
|
||||
#else
|
||||
ERROR("Module support not compiled into this version: '%s'\n", arg);
|
||||
#endif
|
||||
} else {
|
||||
ERROR("Incorrect keyword: '%s'\n", cmd);
|
||||
}
|
||||
@@ -4691,8 +4707,6 @@ int main(int argc, char **argv)
|
||||
{
|
||||
struct sigaction sigact = { { 0 } };
|
||||
|
||||
config_filename = av_strdup("/etc/ffserver.conf");
|
||||
|
||||
parse_loglevel(argc, argv, options);
|
||||
av_register_all();
|
||||
avformat_network_init();
|
||||
@@ -4703,6 +4717,9 @@ int main(int argc, char **argv)
|
||||
|
||||
parse_options(NULL, argc, argv, options, NULL);
|
||||
|
||||
if (!config_filename)
|
||||
config_filename = av_strdup("/etc/ffserver.conf");
|
||||
|
||||
unsetenv("http_proxy"); /* Kill the http_proxy */
|
||||
|
||||
av_lfg_init(&random_state, av_get_random_seed());
|
||||
|
@@ -49,12 +49,6 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_ERROR, "Width 1 not supported.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if ( avctx->codec_tag == MKTAG('0', '1', '2', 'v')
|
||||
&& avpkt->size % avctx->height == 0
|
||||
&& avpkt->size / avctx->height * 3 >= width * 8)
|
||||
stride = avpkt->size / avctx->height;
|
||||
|
||||
if (avpkt->size < avctx->height * stride) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Packet too small: %d instead of %d\n",
|
||||
avpkt->size, avctx->height * stride);
|
||||
@@ -150,10 +144,10 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
|
||||
|
||||
AVCodec ff_zero12v_decoder = {
|
||||
.name = "012v",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_012V,
|
||||
.init = zero12v_decode_init,
|
||||
.decode = zero12v_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
|
||||
};
|
||||
|
@@ -842,8 +842,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (buf_size < 20)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
av_assert0(avctx->width % 16 == 0 && avctx->height % 16 == 0);
|
||||
|
||||
if (buf_size < AV_RL32(buf + 4) + 8) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n",
|
||||
buf_size, AV_RL32(buf + 4));
|
||||
@@ -1020,7 +1018,6 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ff_fourxm_decoder = {
|
||||
.name = "4xm",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_4XM,
|
||||
.priv_data_size = sizeof(FourXContext),
|
||||
@@ -1028,4 +1025,5 @@ AVCodec ff_fourxm_decoder = {
|
||||
.close = decode_end,
|
||||
.decode = decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||
};
|
||||
|
@@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
unsigned char *pixptr, *pixptr_end;
|
||||
unsigned int height = avctx->height; // Real image height
|
||||
unsigned int dlen, p, row;
|
||||
const unsigned char *lp, *dp, *ep;
|
||||
const unsigned char *lp, *dp;
|
||||
unsigned char count;
|
||||
unsigned int planes = c->planes;
|
||||
unsigned char *planemap = c->planemap;
|
||||
@@ -73,8 +73,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
ep = encoded + buf_size;
|
||||
|
||||
/* Set data pointer after line lengths */
|
||||
dp = encoded + planes * (height << 1);
|
||||
|
||||
@@ -86,19 +84,19 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
for (row = 0; row < height; row++) {
|
||||
pixptr = frame->data[0] + row * frame->linesize[0] + planemap[p];
|
||||
pixptr_end = pixptr + frame->linesize[0];
|
||||
if (ep - lp < row * 2 + 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if(lp - encoded + row*2 + 1 >= buf_size)
|
||||
return -1;
|
||||
dlen = av_be2ne16(*(const unsigned short *)(lp + row * 2));
|
||||
/* Decode a row of this plane */
|
||||
while (dlen > 0) {
|
||||
if (ep - dp <= 1)
|
||||
if (dp + 1 >= buf + buf_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if ((count = *dp++) <= 127) {
|
||||
count++;
|
||||
dlen -= count + 1;
|
||||
if (pixptr_end - pixptr < count * planes)
|
||||
if (pixptr + count * planes > pixptr_end)
|
||||
break;
|
||||
if (ep - dp < count)
|
||||
if (dp + count > buf + buf_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
while (count--) {
|
||||
*pixptr = *dp++;
|
||||
@@ -106,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
} else {
|
||||
count = 257 - count;
|
||||
if (pixptr_end - pixptr < count * planes)
|
||||
if (pixptr + count * planes > pixptr_end)
|
||||
break;
|
||||
while (count--) {
|
||||
*pixptr = *dp;
|
||||
@@ -159,7 +157,17 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
case 32:
|
||||
avctx->pix_fmt = AV_PIX_FMT_RGB32;
|
||||
c->planes = 4;
|
||||
/* handle planemap setup later for decoding rgb24 data as rbg32 */
|
||||
#if HAVE_BIGENDIAN
|
||||
c->planemap[0] = 1; // 1st plane is red
|
||||
c->planemap[1] = 2; // 2nd plane is green
|
||||
c->planemap[2] = 3; // 3rd plane is blue
|
||||
c->planemap[3] = 0; // 4th plane is alpha
|
||||
#else
|
||||
c->planemap[0] = 2; // 1st plane is red
|
||||
c->planemap[1] = 1; // 2nd plane is green
|
||||
c->planemap[2] = 0; // 3rd plane is blue
|
||||
c->planemap[3] = 3; // 4th plane is alpha
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n",
|
||||
@@ -167,22 +175,16 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_RGB32) {
|
||||
c->planemap[0] = HAVE_BIGENDIAN ? 1 : 2; // 1st plane is red
|
||||
c->planemap[1] = HAVE_BIGENDIAN ? 2 : 1; // 2nd plane is green
|
||||
c->planemap[2] = HAVE_BIGENDIAN ? 3 : 0; // 3rd plane is blue
|
||||
c->planemap[3] = HAVE_BIGENDIAN ? 0 : 3; // 4th plane is alpha
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec ff_eightbps_decoder = {
|
||||
.name = "8bps",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_8BPS,
|
||||
.priv_data_size = sizeof(EightBpsContext),
|
||||
.init = decode_init,
|
||||
.decode = decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||
};
|
||||
|
@@ -187,7 +187,6 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
|
||||
#if CONFIG_EIGHTSVX_FIB_DECODER
|
||||
AVCodec ff_eightsvx_fib_decoder = {
|
||||
.name = "8svx_fib",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_8SVX_FIB,
|
||||
.priv_data_size = sizeof (EightSvxContext),
|
||||
@@ -195,6 +194,7 @@ AVCodec ff_eightsvx_fib_decoder = {
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
};
|
||||
@@ -202,7 +202,6 @@ AVCodec ff_eightsvx_fib_decoder = {
|
||||
#if CONFIG_EIGHTSVX_EXP_DECODER
|
||||
AVCodec ff_eightsvx_exp_decoder = {
|
||||
.name = "8svx_exp",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_8SVX_EXP,
|
||||
.priv_data_size = sizeof (EightSvxContext),
|
||||
@@ -210,6 +209,7 @@ AVCodec ff_eightsvx_exp_decoder = {
|
||||
.decode = eightsvx_decode_frame,
|
||||
.close = eightsvx_decode_close,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
};
|
||||
|
@@ -31,8 +31,6 @@ OBJS = allcodecs.o \
|
||||
resample2.o \
|
||||
utils.o \
|
||||
|
||||
OBJS-$(HAVE_MSVCRT) += file_open.o
|
||||
|
||||
# parts needed for many different codecs
|
||||
OBJS-$(CONFIG_AANDCTTABLES) += aandcttab.o
|
||||
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o
|
||||
@@ -44,10 +42,8 @@ OBJS-$(CONFIG_DSPUTIL) += dsputil.o faanidct.o \
|
||||
simple_idct.o jrevdct.o
|
||||
OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o
|
||||
OBJS-$(CONFIG_ERROR_RESILIENCE) += error_resilience.o
|
||||
OBJS-$(CONFIG_EXIF) += exif.o tiff_common.o
|
||||
FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o cos_fixed_tables.o
|
||||
OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
|
||||
fft_fixed_32.o fft_init_table.o \
|
||||
$(FFT-OBJS-yes)
|
||||
OBJS-$(CONFIG_GOLOMB) += golomb.o
|
||||
OBJS-$(CONFIG_H264CHROMA) += h264chroma.o
|
||||
@@ -59,7 +55,7 @@ OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
||||
OBJS-$(CONFIG_LIBXVID) += libxvid_rc.o
|
||||
OBJS-$(CONFIG_LPC) += lpc.o
|
||||
OBJS-$(CONFIG_LSP) += lsp.o
|
||||
OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o mdct_fixed_32.o
|
||||
OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o
|
||||
OBJS-$(CONFIG_MPEGAUDIO) += mpegaudio.o mpegaudiodata.o \
|
||||
mpegaudiodecheader.o
|
||||
OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
|
||||
@@ -233,10 +229,6 @@ OBJS-$(CONFIG_H264_DECODER) += h264.o \
|
||||
cabac.o h264_sei.o h264_ps.o \
|
||||
h264_refs.o h264_cavlc.o h264_cabac.o
|
||||
OBJS-$(CONFIG_H264_VDA_DECODER) += vda_h264_dec.o
|
||||
OBJS-$(CONFIG_HEVC_DECODER) += hevc.o hevc_mvs.o hevc_ps.o hevc_sei.o \
|
||||
hevc_cabac.o hevc_refs.o hevcpred.o \
|
||||
hevcdsp.o hevc_filter.o cabac.o
|
||||
|
||||
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o huffyuvdec.o
|
||||
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o huffyuvenc.o
|
||||
OBJS-$(CONFIG_IAC_DECODER) += imc.o
|
||||
@@ -268,8 +260,6 @@ OBJS-$(CONFIG_LOCO_DECODER) += loco.o
|
||||
OBJS-$(CONFIG_MACE3_DECODER) += mace.o
|
||||
OBJS-$(CONFIG_MACE6_DECODER) += mace.o
|
||||
OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o
|
||||
OBJS-$(CONFIG_METASOUND_DECODER) += metasound.o metasound_data.o \
|
||||
twinvq.o
|
||||
OBJS-$(CONFIG_MICRODVD_DECODER) += microdvddec.o ass.o
|
||||
OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o
|
||||
OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o
|
||||
@@ -331,23 +321,23 @@ OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o
|
||||
OBJS-$(CONFIG_PAF_VIDEO_DECODER) += paf.o
|
||||
OBJS-$(CONFIG_PAF_AUDIO_DECODER) += paf.o
|
||||
OBJS-$(CONFIG_PAM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PAM_ENCODER) += pamenc.o
|
||||
OBJS-$(CONFIG_PAM_ENCODER) += pamenc.o pnm.o
|
||||
OBJS-$(CONFIG_PBM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o
|
||||
OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PCX_DECODER) += pcx.o
|
||||
OBJS-$(CONFIG_PCX_ENCODER) += pcxenc.o
|
||||
OBJS-$(CONFIG_PGM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PGM_ENCODER) += pnmenc.o
|
||||
OBJS-$(CONFIG_PGM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PGMYUV_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PGMYUV_ENCODER) += pnmenc.o
|
||||
OBJS-$(CONFIG_PGMYUV_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PGSSUB_DECODER) += pgssubdec.o
|
||||
OBJS-$(CONFIG_PICTOR_DECODER) += pictordec.o cga_data.o
|
||||
OBJS-$(CONFIG_PJS_DECODER) += textdec.o ass.o
|
||||
OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o pngdsp.o
|
||||
OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
|
||||
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o
|
||||
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o proresdata.o
|
||||
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o
|
||||
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o proresdata.o
|
||||
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o
|
||||
OBJS-$(CONFIG_PRORES_AW_ENCODER) += proresenc_anatoliy.o
|
||||
@@ -431,7 +421,7 @@ OBJS-$(CONFIG_TARGA_Y216_DECODER) += targa_y216dec.o
|
||||
OBJS-$(CONFIG_THEORA_DECODER) += xiph.o
|
||||
OBJS-$(CONFIG_THP_DECODER) += mjpegdec.o mjpeg.o
|
||||
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
|
||||
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o tiff_data.o tiff_common.o
|
||||
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o tiff_data.o
|
||||
OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o tiff_data.o
|
||||
OBJS-$(CONFIG_TMV_DECODER) += tmv.o cga_data.o
|
||||
OBJS-$(CONFIG_TRUEHD_DECODER) += mlpdec.o mlpdsp.o
|
||||
@@ -442,7 +432,7 @@ OBJS-$(CONFIG_TSCC_DECODER) += tscc.o msrledec.o
|
||||
OBJS-$(CONFIG_TSCC2_DECODER) += tscc2.o
|
||||
OBJS-$(CONFIG_TTA_DECODER) += tta.o ttadata.o
|
||||
OBJS-$(CONFIG_TTA_ENCODER) += ttaenc.o ttadata.o
|
||||
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.o
|
||||
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o
|
||||
OBJS-$(CONFIG_TXD_DECODER) += txd.o s3tc.o
|
||||
OBJS-$(CONFIG_ULTI_DECODER) += ulti.o
|
||||
OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideo.o
|
||||
@@ -475,13 +465,10 @@ OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vp56dsp.o \
|
||||
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp56dsp.o \
|
||||
vp6dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VP9_DECODER) += vp9.o vp9dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_VPLAYER_DECODER) += textdec.o ass.o
|
||||
OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o
|
||||
OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o
|
||||
OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackenc.o
|
||||
OBJS-$(CONFIG_WEBP_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
||||
OBJS-$(CONFIG_WEBP_DECODER) += webp.o
|
||||
OBJS-$(CONFIG_WEBVTT_DECODER) += webvttdec.o
|
||||
OBJS-$(CONFIG_WMALOSSLESS_DECODER) += wmalosslessdec.o wma_common.o
|
||||
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o wma_common.o
|
||||
@@ -527,8 +514,8 @@ OBJS-$(CONFIG_ZMBV_ENCODER) += zmbvenc.o
|
||||
# (AD)PCM decoders/encoders
|
||||
OBJS-$(CONFIG_PCM_ALAW_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_ALAW_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_BLURAY_DECODER) += pcm-bluray.o
|
||||
OBJS-$(CONFIG_PCM_DVD_DECODER) += pcm-dvd.o
|
||||
OBJS-$(CONFIG_PCM_BLURAY_DECODER) += pcm-mpeg.o
|
||||
OBJS-$(CONFIG_PCM_DVD_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F32BE_DECODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F32BE_ENCODER) += pcm.o
|
||||
OBJS-$(CONFIG_PCM_F32LE_DECODER) += pcm.o
|
||||
@@ -627,7 +614,7 @@ OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_VIMA_DECODER) += vima.o adpcm_data.o
|
||||
|
||||
# hardware accelerators
|
||||
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o vaapi_mpeg.o
|
||||
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||
OBJS-$(CONFIG_H263_VDPAU_HWACCEL) += vdpau_mpeg4.o
|
||||
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
||||
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
||||
@@ -635,12 +622,12 @@ OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
|
||||
OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
|
||||
OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL) += vdpau_mpeg12.o
|
||||
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o
|
||||
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o vaapi_mpeg.o
|
||||
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o
|
||||
OBJS-$(CONFIG_MPEG2_VDPAU_HWACCEL) += vdpau_mpeg12.o
|
||||
OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o vaapi_mpeg.o
|
||||
OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||
OBJS-$(CONFIG_MPEG4_VDPAU_HWACCEL) += vdpau_mpeg4.o
|
||||
OBJS-$(CONFIG_VC1_DXVA2_HWACCEL) += dxva2_vc1.o
|
||||
OBJS-$(CONFIG_VC1_VAAPI_HWACCEL) += vaapi_vc1.o vaapi_mpeg.o
|
||||
OBJS-$(CONFIG_VC1_VAAPI_HWACCEL) += vaapi_vc1.o
|
||||
OBJS-$(CONFIG_VC1_VDPAU_HWACCEL) += vdpau_vc1.o
|
||||
|
||||
# libavformat dependencies
|
||||
@@ -690,7 +677,6 @@ OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_LIBAACPLUS_ENCODER) += libaacplus.o
|
||||
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
||||
OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
|
||||
OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o
|
||||
OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o
|
||||
OBJS-$(CONFIG_LIBGSM_DECODER) += libgsm.o
|
||||
OBJS-$(CONFIG_LIBGSM_ENCODER) += libgsm.o
|
||||
@@ -733,7 +719,6 @@ OBJS-$(CONFIG_LIBWAVPACK_ENCODER) += libwavpackenc.o
|
||||
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
|
||||
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
|
||||
OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o
|
||||
OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER) += libzvbi-teletextdec.o
|
||||
|
||||
# parsers
|
||||
OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
|
||||
@@ -748,7 +733,6 @@ OBJS-$(CONFIG_COOK_PARSER) += cook_parser.o
|
||||
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca.o
|
||||
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
|
||||
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o
|
||||
OBJS-$(CONFIG_DPX_PARSER) += dpx_parser.o
|
||||
OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
|
||||
OBJS-$(CONFIG_DVD_NAV_PARSER) += dvd_nav_parser.o
|
||||
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
|
||||
@@ -762,7 +746,6 @@ OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
|
||||
h264_refs.o h264_sei.o h264_direct.o \
|
||||
h264_loopfilter.o h264_cabac.o \
|
||||
h264_cavlc.o h264_ps.o
|
||||
OBJS-$(CONFIG_HEVC_PARSER) += hevc_parser.o
|
||||
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
|
||||
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o
|
||||
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
|
||||
@@ -822,19 +805,18 @@ SKIPHEADERS-$(CONFIG_LIBUTVIDEO) += libutvideo.h
|
||||
SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER) += xvmc.h
|
||||
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
|
||||
SKIPHEADERS-$(CONFIG_VDA) += vda.h
|
||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
|
||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
|
||||
|
||||
TESTPROGS = cabac \
|
||||
dct \
|
||||
fft \
|
||||
fft-fixed \
|
||||
fft-fixed32 \
|
||||
golomb \
|
||||
iirfilter \
|
||||
imgconvert \
|
||||
rangecoder \
|
||||
snowenc \
|
||||
|
||||
TESTPROGS-$(CONFIG_DCT) += dct
|
||||
TESTPROGS-$(HAVE_MMX) += motion
|
||||
TESTOBJS = dctref.o
|
||||
|
||||
|
@@ -40,6 +40,9 @@
|
||||
#define C64YRES 200
|
||||
|
||||
typedef struct A64Context {
|
||||
/* general variables */
|
||||
AVFrame picture;
|
||||
|
||||
/* variables for multicolor modes */
|
||||
AVLFG randctx;
|
||||
int mc_lifetime;
|
||||
@@ -186,7 +189,6 @@ static void render_charset(AVCodecContext *avctx, uint8_t *charset,
|
||||
static av_cold int a64multi_close_encoder(AVCodecContext *avctx)
|
||||
{
|
||||
A64Context *c = avctx->priv_data;
|
||||
av_frame_free(&avctx->coded_frame);
|
||||
av_free(c->mc_meta_charset);
|
||||
av_free(c->mc_best_cb);
|
||||
av_free(c->mc_charset);
|
||||
@@ -238,12 +240,8 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx)
|
||||
AV_WB32(avctx->extradata, c->mc_lifetime);
|
||||
AV_WB32(avctx->extradata + 16, INTERLACED);
|
||||
|
||||
avctx->coded_frame = av_frame_alloc();
|
||||
if (!avctx->coded_frame) {
|
||||
a64multi_close_encoder(avctx);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
avcodec_get_frame_defaults(&c->picture);
|
||||
avctx->coded_frame = &c->picture;
|
||||
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
||||
avctx->coded_frame->key_frame = 1;
|
||||
if (!avctx->codec_tag)
|
||||
@@ -273,7 +271,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
const AVFrame *pict, int *got_packet)
|
||||
{
|
||||
A64Context *c = avctx->priv_data;
|
||||
AVFrame *const p = avctx->coded_frame;
|
||||
AVFrame *const p = &c->picture;
|
||||
|
||||
int frame;
|
||||
int x, y;
|
||||
@@ -398,7 +396,6 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
#if CONFIG_A64MULTI_ENCODER
|
||||
AVCodec ff_a64multi_encoder = {
|
||||
.name = "a64multi",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_A64_MULTI,
|
||||
.priv_data_size = sizeof(A64Context),
|
||||
@@ -406,13 +403,13 @@ AVCodec ff_a64multi_encoder = {
|
||||
.encode2 = a64multi_encode_frame,
|
||||
.close = a64multi_close_encoder,
|
||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
||||
.capabilities = CODEC_CAP_DELAY,
|
||||
};
|
||||
#endif
|
||||
#if CONFIG_A64MULTI5_ENCODER
|
||||
AVCodec ff_a64multi5_encoder = {
|
||||
.name = "a64multi5",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_A64_MULTI5,
|
||||
.priv_data_size = sizeof(A64Context),
|
||||
@@ -420,6 +417,7 @@ AVCodec ff_a64multi5_encoder = {
|
||||
.encode2 = a64multi_encode_frame,
|
||||
.close = a64multi_close_encoder,
|
||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
||||
.capabilities = CODEC_CAP_DELAY,
|
||||
};
|
||||
#endif
|
||||
|
@@ -157,7 +157,7 @@ typedef struct LongTermPrediction {
|
||||
typedef struct IndividualChannelStream {
|
||||
uint8_t max_sfb; ///< number of scalefactor bands per group
|
||||
enum WindowSequence window_sequence[2];
|
||||
uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sine window.
|
||||
uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sinus window.
|
||||
int num_window_groups;
|
||||
uint8_t group_len[8];
|
||||
LongTermPrediction ltp;
|
||||
@@ -234,7 +234,7 @@ typedef struct SingleChannelElement {
|
||||
int sf_idx[128]; ///< scalefactor indices (used by encoder)
|
||||
uint8_t zeroes[128]; ///< band is not coded (used by encoder)
|
||||
DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT
|
||||
DECLARE_ALIGNED(32, float, saved)[1536]; ///< overlap
|
||||
DECLARE_ALIGNED(32, float, saved)[1024]; ///< overlap
|
||||
DECLARE_ALIGNED(32, float, ret_buf)[2048]; ///< PCM output buffer
|
||||
DECLARE_ALIGNED(16, float, ltp_state)[3072]; ///< time signal for LTP
|
||||
PredictorState predictor_state[MAX_PREDICTORS];
|
||||
@@ -290,7 +290,6 @@ struct AACContext {
|
||||
*/
|
||||
FFTContext mdct;
|
||||
FFTContext mdct_small;
|
||||
FFTContext mdct_ld;
|
||||
FFTContext mdct_ltp;
|
||||
FmtConvertContext fmt_conv;
|
||||
AVFloatDSPContext fdsp;
|
||||
|
@@ -28,13 +28,13 @@
|
||||
#include "parser.h"
|
||||
|
||||
typedef enum {
|
||||
AAC_AC3_PARSE_ERROR_SYNC = -0x1030c0a,
|
||||
AAC_AC3_PARSE_ERROR_BSID = -0x2030c0a,
|
||||
AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a,
|
||||
AAC_AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a,
|
||||
AAC_AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a,
|
||||
AAC_AC3_PARSE_ERROR_CRC = -0x6030c0a,
|
||||
AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -0x7030c0a,
|
||||
AAC_AC3_PARSE_ERROR_SYNC = -1,
|
||||
AAC_AC3_PARSE_ERROR_BSID = -2,
|
||||
AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -3,
|
||||
AAC_AC3_PARSE_ERROR_FRAME_SIZE = -4,
|
||||
AAC_AC3_PARSE_ERROR_FRAME_TYPE = -5,
|
||||
AAC_AC3_PARSE_ERROR_CRC = -6,
|
||||
AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -7,
|
||||
} AACAC3ParseError;
|
||||
|
||||
typedef struct AACAC3ParseContext {
|
||||
|
@@ -112,7 +112,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
||||
}
|
||||
|
||||
AVBitStreamFilter ff_aac_adtstoasc_bsf = {
|
||||
.name = "aac_adtstoasc",
|
||||
.priv_data_size = sizeof(AACBSFContext),
|
||||
.filter = aac_adtstoasc_filter,
|
||||
"aac_adtstoasc",
|
||||
sizeof(AACBSFContext),
|
||||
aac_adtstoasc_filter,
|
||||
};
|
||||
|
@@ -35,7 +35,7 @@ void ff_aac_tableinit(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 428; i++)
|
||||
ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.0);
|
||||
ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.);
|
||||
}
|
||||
#endif /* CONFIG_HARDCODED_TABLES */
|
||||
|
||||
|
@@ -1113,25 +1113,25 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
|
||||
}
|
||||
|
||||
AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
|
||||
[AAC_CODER_FAAC] = {
|
||||
{
|
||||
search_for_quantizers_faac,
|
||||
encode_window_bands_info,
|
||||
quantize_and_encode_band,
|
||||
search_for_ms,
|
||||
},
|
||||
[AAC_CODER_ANMR] = {
|
||||
{
|
||||
search_for_quantizers_anmr,
|
||||
encode_window_bands_info,
|
||||
quantize_and_encode_band,
|
||||
search_for_ms,
|
||||
},
|
||||
[AAC_CODER_TWOLOOP] = {
|
||||
{
|
||||
search_for_quantizers_twoloop,
|
||||
codebook_trellis_rate,
|
||||
quantize_and_encode_band,
|
||||
search_for_ms,
|
||||
},
|
||||
[AAC_CODER_FAST] = {
|
||||
{
|
||||
search_for_quantizers_fast,
|
||||
encode_window_bands_info,
|
||||
quantize_and_encode_band,
|
||||
|
@@ -2,7 +2,6 @@
|
||||
* AAC decoder
|
||||
* Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org )
|
||||
* Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com )
|
||||
* Copyright (c) 2008-2013 Alex Converse <alex.converse@gmail.com>
|
||||
*
|
||||
* AAC LATM decoder
|
||||
* Copyright (c) 2008-2010 Paul Kendall <paul@kcbbs.gen.nz>
|
||||
@@ -194,9 +193,6 @@ static int frame_configure_elements(AVCodecContext *avctx)
|
||||
|
||||
/* get output buffer */
|
||||
av_frame_unref(ac->frame);
|
||||
if (!avctx->channels)
|
||||
return 1;
|
||||
|
||||
ac->frame->nb_samples = 2048;
|
||||
if ((ret = ff_get_buffer(avctx, ac->frame, 0)) < 0)
|
||||
return ret;
|
||||
@@ -749,7 +745,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
|
||||
MPEG4AudioConfig *m4ac,
|
||||
int channel_config)
|
||||
{
|
||||
int extension_flag, ret, ep_config, res_flags;
|
||||
int extension_flag, ret;
|
||||
uint8_t layout_map[MAX_ELEM_ID*4][3];
|
||||
int tags = 0;
|
||||
|
||||
@@ -795,90 +791,14 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
|
||||
case AOT_ER_AAC_LTP:
|
||||
case AOT_ER_AAC_SCALABLE:
|
||||
case AOT_ER_AAC_LD:
|
||||
res_flags = get_bits(gb, 3);
|
||||
if (res_flags) {
|
||||
avpriv_report_missing_feature(avctx,
|
||||
"AAC data resilience (flags %x)",
|
||||
res_flags);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
skip_bits(gb, 3); /* aacSectionDataResilienceFlag
|
||||
* aacScalefactorDataResilienceFlag
|
||||
* aacSpectralDataResilienceFlag
|
||||
*/
|
||||
break;
|
||||
}
|
||||
skip_bits1(gb); // extensionFlag3 (TBD in version 3)
|
||||
}
|
||||
switch (m4ac->object_type) {
|
||||
case AOT_ER_AAC_LC:
|
||||
case AOT_ER_AAC_LTP:
|
||||
case AOT_ER_AAC_SCALABLE:
|
||||
case AOT_ER_AAC_LD:
|
||||
ep_config = get_bits(gb, 2);
|
||||
if (ep_config) {
|
||||
avpriv_report_missing_feature(avctx,
|
||||
"epConfig %d", ep_config);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int decode_eld_specific_config(AACContext *ac, AVCodecContext *avctx,
|
||||
GetBitContext *gb,
|
||||
MPEG4AudioConfig *m4ac,
|
||||
int channel_config)
|
||||
{
|
||||
int ret, ep_config, res_flags;
|
||||
uint8_t layout_map[MAX_ELEM_ID*4][3];
|
||||
int tags = 0;
|
||||
const int ELDEXT_TERM = 0;
|
||||
|
||||
m4ac->ps = 0;
|
||||
m4ac->sbr = 0;
|
||||
|
||||
if (get_bits1(gb)) { // frameLengthFlag
|
||||
avpriv_request_sample(avctx, "960/120 MDCT window");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
res_flags = get_bits(gb, 3);
|
||||
if (res_flags) {
|
||||
avpriv_report_missing_feature(avctx,
|
||||
"AAC data resilience (flags %x)",
|
||||
res_flags);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
if (get_bits1(gb)) { // ldSbrPresentFlag
|
||||
avpriv_report_missing_feature(avctx,
|
||||
"Low Delay SBR");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
while (get_bits(gb, 4) != ELDEXT_TERM) {
|
||||
int len = get_bits(gb, 4);
|
||||
if (len == 15)
|
||||
len += get_bits(gb, 8);
|
||||
if (len == 15 + 255)
|
||||
len += get_bits(gb, 16);
|
||||
if (get_bits_left(gb) < len * 8 + 4) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, overread_err);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
skip_bits_long(gb, 8 * len);
|
||||
}
|
||||
|
||||
if ((ret = set_default_channel_config(avctx, layout_map,
|
||||
&tags, channel_config)))
|
||||
return ret;
|
||||
|
||||
if (ac && (ret = output_configure(ac, layout_map, tags, OC_GLOBAL_HDR, 0)))
|
||||
return ret;
|
||||
|
||||
ep_config = get_bits(gb, 2);
|
||||
if (ep_config) {
|
||||
avpriv_report_missing_feature(avctx,
|
||||
"epConfig %d", ep_config);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -920,13 +840,6 @@ static int decode_audio_specific_config(AACContext *ac,
|
||||
m4ac->sampling_index);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (m4ac->object_type == AOT_ER_AAC_LD &&
|
||||
(m4ac->sampling_index < 3 || m4ac->sampling_index > 7)) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"invalid low delay sampling rate index %d\n",
|
||||
m4ac->sampling_index);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
skip_bits_long(&gb, i);
|
||||
|
||||
@@ -934,22 +847,15 @@ static int decode_audio_specific_config(AACContext *ac,
|
||||
case AOT_AAC_MAIN:
|
||||
case AOT_AAC_LC:
|
||||
case AOT_AAC_LTP:
|
||||
case AOT_ER_AAC_LC:
|
||||
case AOT_ER_AAC_LD:
|
||||
if ((ret = decode_ga_specific_config(ac, avctx, &gb,
|
||||
m4ac, m4ac->chan_config)) < 0)
|
||||
return ret;
|
||||
break;
|
||||
case AOT_ER_AAC_ELD:
|
||||
if ((ret = decode_eld_specific_config(ac, avctx, &gb,
|
||||
m4ac, m4ac->chan_config)) < 0)
|
||||
return ret;
|
||||
break;
|
||||
default:
|
||||
avpriv_report_missing_feature(avctx,
|
||||
"Audio object type %s%d",
|
||||
m4ac->sbr == 1 ? "SBR+" : "",
|
||||
m4ac->object_type);
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Audio object type %s%d is not supported.\n",
|
||||
m4ac->sbr == 1 ? "SBR+" : "",
|
||||
m4ac->object_type);
|
||||
return AVERROR(ENOSYS);
|
||||
}
|
||||
|
||||
@@ -1110,15 +1016,12 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
||||
352);
|
||||
|
||||
ff_mdct_init(&ac->mdct, 11, 1, 1.0 / (32768.0 * 1024.0));
|
||||
ff_mdct_init(&ac->mdct_ld, 10, 1, 1.0 / (32768.0 * 512.0));
|
||||
ff_mdct_init(&ac->mdct_small, 8, 1, 1.0 / (32768.0 * 128.0));
|
||||
ff_mdct_init(&ac->mdct_ltp, 11, 0, -2.0 * 32768.0);
|
||||
// window initialization
|
||||
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
|
||||
ff_kbd_window_init(ff_aac_kbd_long_512, 4.0, 512);
|
||||
ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
|
||||
ff_init_ff_sine_windows(10);
|
||||
ff_init_ff_sine_windows( 9);
|
||||
ff_init_ff_sine_windows( 7);
|
||||
|
||||
cbrt_tableinit();
|
||||
@@ -1185,25 +1088,14 @@ static void decode_ltp(LongTermPrediction *ltp,
|
||||
static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
|
||||
GetBitContext *gb)
|
||||
{
|
||||
int aot = ac->oc[1].m4ac.object_type;
|
||||
if (aot != AOT_ER_AAC_ELD) {
|
||||
if (get_bits1(gb)) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "Reserved bit set.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
ics->window_sequence[1] = ics->window_sequence[0];
|
||||
ics->window_sequence[0] = get_bits(gb, 2);
|
||||
if (aot == AOT_ER_AAC_LD &&
|
||||
ics->window_sequence[0] != ONLY_LONG_SEQUENCE) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"AAC LD is only defined for ONLY_LONG_SEQUENCE but "
|
||||
"window sequence %d found.\n", ics->window_sequence[0]);
|
||||
ics->window_sequence[0] = ONLY_LONG_SEQUENCE;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
ics->use_kb_window[1] = ics->use_kb_window[0];
|
||||
ics->use_kb_window[0] = get_bits1(gb);
|
||||
if (get_bits1(gb)) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "Reserved bit set.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
ics->window_sequence[1] = ics->window_sequence[0];
|
||||
ics->window_sequence[0] = get_bits(gb, 2);
|
||||
ics->use_kb_window[1] = ics->use_kb_window[0];
|
||||
ics->use_kb_window[0] = get_bits1(gb);
|
||||
ics->num_window_groups = 1;
|
||||
ics->group_len[0] = 1;
|
||||
if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
|
||||
@@ -1225,36 +1117,21 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
|
||||
} else {
|
||||
ics->max_sfb = get_bits(gb, 6);
|
||||
ics->num_windows = 1;
|
||||
if (aot == AOT_ER_AAC_LD || aot == AOT_ER_AAC_ELD) {
|
||||
ics->swb_offset = ff_swb_offset_512[ac->oc[1].m4ac.sampling_index];
|
||||
ics->num_swb = ff_aac_num_swb_512[ac->oc[1].m4ac.sampling_index];
|
||||
if (!ics->num_swb || !ics->swb_offset)
|
||||
return AVERROR_BUG;
|
||||
} else {
|
||||
ics->swb_offset = ff_swb_offset_1024[ac->oc[1].m4ac.sampling_index];
|
||||
ics->num_swb = ff_aac_num_swb_1024[ac->oc[1].m4ac.sampling_index];
|
||||
}
|
||||
ics->swb_offset = ff_swb_offset_1024[ac->oc[1].m4ac.sampling_index];
|
||||
ics->num_swb = ff_aac_num_swb_1024[ac->oc[1].m4ac.sampling_index];
|
||||
ics->tns_max_bands = ff_tns_max_bands_1024[ac->oc[1].m4ac.sampling_index];
|
||||
if (aot != AOT_ER_AAC_ELD) {
|
||||
ics->predictor_present = get_bits1(gb);
|
||||
ics->predictor_reset_group = 0;
|
||||
}
|
||||
ics->predictor_present = get_bits1(gb);
|
||||
ics->predictor_reset_group = 0;
|
||||
if (ics->predictor_present) {
|
||||
if (aot == AOT_AAC_MAIN) {
|
||||
if (ac->oc[1].m4ac.object_type == AOT_AAC_MAIN) {
|
||||
if (decode_prediction(ac, ics, gb)) {
|
||||
goto fail;
|
||||
}
|
||||
} else if (aot == AOT_AAC_LC ||
|
||||
aot == AOT_ER_AAC_LC) {
|
||||
} else if (ac->oc[1].m4ac.object_type == AOT_AAC_LC) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"Prediction is not allowed in AAC-LC.\n");
|
||||
goto fail;
|
||||
} else {
|
||||
if (aot == AOT_ER_AAC_LD) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"LTP in ER AAC LD not yet implemented.\n");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
if ((ics->ltp.present = get_bits(gb, 1)))
|
||||
decode_ltp(&ics->ltp, gb, ics->max_sfb);
|
||||
}
|
||||
@@ -1347,7 +1224,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb,
|
||||
int run_end = band_type_run_end[idx];
|
||||
if (band_type[idx] == ZERO_BT) {
|
||||
for (; i < run_end; i++, idx++)
|
||||
sf[idx] = 0.0;
|
||||
sf[idx] = 0.;
|
||||
} else if ((band_type[idx] == INTENSITY_BT) ||
|
||||
(band_type[idx] == INTENSITY_BT2)) {
|
||||
for (; i < run_end; i++, idx++) {
|
||||
@@ -1405,12 +1282,12 @@ static int decode_pulses(Pulse *pulse, GetBitContext *gb,
|
||||
return -1;
|
||||
pulse->pos[0] = swb_offset[pulse_swb];
|
||||
pulse->pos[0] += get_bits(gb, 5);
|
||||
if (pulse->pos[0] >= swb_offset[num_swb])
|
||||
if (pulse->pos[0] > 1023)
|
||||
return -1;
|
||||
pulse->amp[0] = get_bits(gb, 4);
|
||||
for (i = 1; i < pulse->num_pulse; i++) {
|
||||
pulse->pos[i] = get_bits(gb, 5) + pulse->pos[i - 1];
|
||||
if (pulse->pos[i] >= swb_offset[num_swb])
|
||||
if (pulse->pos[i] > 1023)
|
||||
return -1;
|
||||
pulse->amp[i] = get_bits(gb, 4);
|
||||
}
|
||||
@@ -1875,15 +1752,9 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
|
||||
TemporalNoiseShaping *tns = &sce->tns;
|
||||
IndividualChannelStream *ics = &sce->ics;
|
||||
float *out = sce->coeffs;
|
||||
int global_gain, eld_syntax, er_syntax, pulse_present = 0;
|
||||
int global_gain, pulse_present = 0;
|
||||
int ret;
|
||||
|
||||
eld_syntax = ac->oc[1].m4ac.object_type == AOT_ER_AAC_ELD;
|
||||
er_syntax = ac->oc[1].m4ac.object_type == AOT_ER_AAC_LC ||
|
||||
ac->oc[1].m4ac.object_type == AOT_ER_AAC_LTP ||
|
||||
ac->oc[1].m4ac.object_type == AOT_ER_AAC_LD ||
|
||||
ac->oc[1].m4ac.object_type == AOT_ER_AAC_ELD;
|
||||
|
||||
/* This assignment is to silence a GCC warning about the variable being used
|
||||
* uninitialized when in fact it always is.
|
||||
*/
|
||||
@@ -1905,7 +1776,7 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
|
||||
|
||||
pulse_present = 0;
|
||||
if (!scale_flag) {
|
||||
if (!eld_syntax && (pulse_present = get_bits1(gb))) {
|
||||
if ((pulse_present = get_bits1(gb))) {
|
||||
if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"Pulse tool not allowed in eight short sequence.\n");
|
||||
@@ -1917,19 +1788,12 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
tns->present = get_bits1(gb);
|
||||
if (tns->present && !er_syntax)
|
||||
if (decode_tns(ac, tns, gb, ics) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (!eld_syntax && get_bits1(gb)) {
|
||||
if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (get_bits1(gb)) {
|
||||
avpriv_request_sample(ac->avctx, "SSR");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
// I see no textual basis in the spec for this occuring after SSR gain
|
||||
// control, but this is what both reference and real implmentations do
|
||||
if (tns->present && er_syntax)
|
||||
if (decode_tns(ac, tns, gb, ics) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (decode_spectrum_and_dequant(ac, out, gb, sce->sf, pulse_present,
|
||||
@@ -2021,9 +1885,8 @@ static void apply_intensity_stereo(AACContext *ac,
|
||||
static int decode_cpe(AACContext *ac, GetBitContext *gb, ChannelElement *cpe)
|
||||
{
|
||||
int i, ret, common_window, ms_present = 0;
|
||||
int eld_syntax = ac->oc[1].m4ac.object_type == AOT_ER_AAC_ELD;
|
||||
|
||||
common_window = eld_syntax || get_bits1(gb);
|
||||
common_window = get_bits1(gb);
|
||||
if (common_window) {
|
||||
if (decode_ics_info(ac, &cpe->ch[0].ics, gb))
|
||||
return AVERROR_INVALIDDATA;
|
||||
@@ -2105,7 +1968,7 @@ static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che)
|
||||
int idx = 0;
|
||||
int cge = 1;
|
||||
int gain = 0;
|
||||
float gain_cache = 1.0;
|
||||
float gain_cache = 1.;
|
||||
if (c) {
|
||||
cge = coup->coupling_point == AFTER_IMDCT ? 1 : get_bits1(gb);
|
||||
gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0;
|
||||
@@ -2502,81 +2365,6 @@ static void imdct_and_windowing(AACContext *ac, SingleChannelElement *sce)
|
||||
}
|
||||
}
|
||||
|
||||
static void imdct_and_windowing_ld(AACContext *ac, SingleChannelElement *sce)
|
||||
{
|
||||
IndividualChannelStream *ics = &sce->ics;
|
||||
float *in = sce->coeffs;
|
||||
float *out = sce->ret;
|
||||
float *saved = sce->saved;
|
||||
const float *lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_512 : ff_sine_512;
|
||||
float *buf = ac->buf_mdct;
|
||||
|
||||
// imdct
|
||||
ac->mdct.imdct_half(&ac->mdct_ld, buf, in);
|
||||
|
||||
// window overlapping
|
||||
ac->fdsp.vector_fmul_window(out, saved, buf, lwindow_prev, 256);
|
||||
|
||||
// buffer update
|
||||
memcpy(saved, buf + 256, 256 * sizeof(float));
|
||||
}
|
||||
|
||||
static void imdct_and_windowing_eld(AACContext *ac, SingleChannelElement *sce)
|
||||
{
|
||||
float *in = sce->coeffs;
|
||||
float *out = sce->ret;
|
||||
float *saved = sce->saved;
|
||||
const float *const window = ff_aac_eld_window;
|
||||
float *buf = ac->buf_mdct;
|
||||
int i;
|
||||
const int n = 512;
|
||||
const int n2 = n >> 1;
|
||||
const int n4 = n >> 2;
|
||||
|
||||
// Inverse transform, mapped to the conventional IMDCT by
|
||||
// Chivukula, R.K.; Reznik, Y.A.; Devarajan, V.,
|
||||
// "Efficient algorithms for MPEG-4 AAC-ELD, AAC-LD and AAC-LC filterbanks,"
|
||||
// Audio, Language and Image Processing, 2008. ICALIP 2008. International Conference on
|
||||
// URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4590245&isnumber=4589950
|
||||
for (i = 0; i < n2; i+=2) {
|
||||
float temp;
|
||||
temp = in[i ]; in[i ] = -in[n - 1 - i]; in[n - 1 - i] = temp;
|
||||
temp = -in[i + 1]; in[i + 1] = in[n - 2 - i]; in[n - 2 - i] = temp;
|
||||
}
|
||||
ac->mdct.imdct_half(&ac->mdct_ld, buf, in);
|
||||
for (i = 0; i < n; i+=2) {
|
||||
buf[i] = -buf[i];
|
||||
}
|
||||
// Like with the regular IMDCT at this point we still have the middle half
|
||||
// of a transform but with even symmetry on the left and odd symmetry on
|
||||
// the right
|
||||
|
||||
// window overlapping
|
||||
// The spec says to use samples [0..511] but the reference decoder uses
|
||||
// samples [128..639].
|
||||
for (i = n4; i < n2; i ++) {
|
||||
out[i - n4] = buf[n2 - 1 - i] * window[i - n4] +
|
||||
saved[ i + n2] * window[i + n - n4] +
|
||||
-saved[ n + n2 - 1 - i] * window[i + 2*n - n4] +
|
||||
-saved[2*n + n2 + i] * window[i + 3*n - n4];
|
||||
}
|
||||
for (i = 0; i < n2; i ++) {
|
||||
out[n4 + i] = buf[i] * window[i + n2 - n4] +
|
||||
-saved[ n - 1 - i] * window[i + n2 + n - n4] +
|
||||
-saved[ n + i] * window[i + n2 + 2*n - n4] +
|
||||
saved[2*n + n - 1 - i] * window[i + n2 + 3*n - n4];
|
||||
}
|
||||
for (i = 0; i < n4; i ++) {
|
||||
out[n2 + n4 + i] = buf[ i + n2] * window[i + n - n4] +
|
||||
-saved[ n2 - 1 - i] * window[i + 2*n - n4] +
|
||||
-saved[ n + n2 + i] * window[i + 3*n - n4];
|
||||
}
|
||||
|
||||
// buffer update
|
||||
memmove(saved + n, saved, 2 * n * sizeof(float));
|
||||
memcpy( saved, buf, n * sizeof(float));
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply dependent channel coupling (applied before IMDCT).
|
||||
*
|
||||
@@ -2673,17 +2461,6 @@ static void apply_channel_coupling(AACContext *ac, ChannelElement *cc,
|
||||
static void spectral_to_sample(AACContext *ac)
|
||||
{
|
||||
int i, type;
|
||||
void (*imdct_and_window)(AACContext *ac, SingleChannelElement *sce);
|
||||
switch (ac->oc[1].m4ac.object_type) {
|
||||
case AOT_ER_AAC_LD:
|
||||
imdct_and_window = imdct_and_windowing_ld;
|
||||
break;
|
||||
case AOT_ER_AAC_ELD:
|
||||
imdct_and_window = imdct_and_windowing_eld;
|
||||
break;
|
||||
default:
|
||||
imdct_and_window = ac->imdct_and_windowing;
|
||||
}
|
||||
for (type = 3; type >= 0; type--) {
|
||||
for (i = 0; i < MAX_ELEM_ID; i++) {
|
||||
ChannelElement *che = ac->che[type][i];
|
||||
@@ -2705,11 +2482,11 @@ static void spectral_to_sample(AACContext *ac)
|
||||
if (type <= TYPE_CPE)
|
||||
apply_channel_coupling(ac, che, type, i, BETWEEN_TNS_AND_IMDCT, apply_dependent_coupling);
|
||||
if (type != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) {
|
||||
imdct_and_window(ac, &che->ch[0]);
|
||||
ac->imdct_and_windowing(ac, &che->ch[0]);
|
||||
if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)
|
||||
ac->update_ltp(ac, &che->ch[0]);
|
||||
if (type == TYPE_CPE) {
|
||||
imdct_and_window(ac, &che->ch[1]);
|
||||
ac->imdct_and_windowing(ac, &che->ch[1]);
|
||||
if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)
|
||||
ac->update_ltp(ac, &che->ch[1]);
|
||||
}
|
||||
@@ -2729,7 +2506,7 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
|
||||
int size;
|
||||
AACADTSHeaderInfo hdr_info;
|
||||
uint8_t layout_map[MAX_ELEM_ID*4][3];
|
||||
int layout_map_tags, ret;
|
||||
int layout_map_tags;
|
||||
|
||||
size = avpriv_aac_parse_header(gb, &hdr_info);
|
||||
if (size > 0) {
|
||||
@@ -2743,15 +2520,12 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
|
||||
push_output_configuration(ac);
|
||||
if (hdr_info.chan_config) {
|
||||
ac->oc[1].m4ac.chan_config = hdr_info.chan_config;
|
||||
if ((ret = set_default_channel_config(ac->avctx,
|
||||
layout_map,
|
||||
&layout_map_tags,
|
||||
hdr_info.chan_config)) < 0)
|
||||
return ret;
|
||||
if ((ret = output_configure(ac, layout_map, layout_map_tags,
|
||||
FFMAX(ac->oc[1].status,
|
||||
OC_TRIAL_FRAME), 0)) < 0)
|
||||
return ret;
|
||||
if (set_default_channel_config(ac->avctx, layout_map,
|
||||
&layout_map_tags, hdr_info.chan_config))
|
||||
return -7;
|
||||
if (output_configure(ac, layout_map, layout_map_tags,
|
||||
FFMAX(ac->oc[1].status, OC_TRIAL_FRAME), 0))
|
||||
return -7;
|
||||
} else {
|
||||
ac->oc[1].m4ac.chan_config = 0;
|
||||
/**
|
||||
@@ -2785,66 +2559,6 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
|
||||
return size;
|
||||
}
|
||||
|
||||
static int aac_decode_er_frame(AVCodecContext *avctx, void *data,
|
||||
int *got_frame_ptr, GetBitContext *gb)
|
||||
{
|
||||
AACContext *ac = avctx->priv_data;
|
||||
ChannelElement *che;
|
||||
int err, i;
|
||||
int samples = 1024;
|
||||
int chan_config = ac->oc[1].m4ac.chan_config;
|
||||
int aot = ac->oc[1].m4ac.object_type;
|
||||
|
||||
if (aot == AOT_ER_AAC_LD || aot == AOT_ER_AAC_ELD)
|
||||
samples >>= 1;
|
||||
|
||||
ac->frame = data;
|
||||
|
||||
if ((err = frame_configure_elements(avctx)) < 0)
|
||||
return err;
|
||||
|
||||
ac->tags_mapped = 0;
|
||||
|
||||
if (chan_config < 0 || chan_config >= 8) {
|
||||
avpriv_request_sample(avctx, "Unknown ER channel configuration %d",
|
||||
ac->oc[1].m4ac.chan_config);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
for (i = 0; i < tags_per_config[chan_config]; i++) {
|
||||
const int elem_type = aac_channel_layout_map[chan_config-1][i][0];
|
||||
const int elem_id = aac_channel_layout_map[chan_config-1][i][1];
|
||||
if (!(che=get_che(ac, elem_type, elem_id))) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR,
|
||||
"channel element %d.%d is not allocated\n",
|
||||
elem_type, elem_id);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (aot != AOT_ER_AAC_ELD)
|
||||
skip_bits(gb, 4);
|
||||
switch (elem_type) {
|
||||
case TYPE_SCE:
|
||||
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
|
||||
break;
|
||||
case TYPE_CPE:
|
||||
err = decode_cpe(ac, gb, che);
|
||||
break;
|
||||
case TYPE_LFE:
|
||||
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
|
||||
break;
|
||||
}
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
||||
spectral_to_sample(ac);
|
||||
|
||||
ac->frame->nb_samples = samples;
|
||||
*got_frame_ptr = 1;
|
||||
|
||||
skip_bits_long(gb, get_bits_left(gb));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
int *got_frame_ptr, GetBitContext *gb, AVPacket *avpkt)
|
||||
{
|
||||
@@ -2858,19 +2572,22 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
ac->frame = data;
|
||||
|
||||
if (show_bits(gb, 12) == 0xfff) {
|
||||
if ((err = parse_adts_frame_header(ac, gb)) < 0) {
|
||||
if (parse_adts_frame_header(ac, gb) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error decoding AAC frame header.\n");
|
||||
err = -1;
|
||||
goto fail;
|
||||
}
|
||||
if (ac->oc[1].m4ac.sampling_index > 12) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->oc[1].m4ac.sampling_index);
|
||||
err = AVERROR_INVALIDDATA;
|
||||
err = -1;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
if ((err = frame_configure_elements(avctx)) < 0)
|
||||
if (frame_configure_elements(avctx) < 0) {
|
||||
err = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ac->tags_mapped = 0;
|
||||
// parse
|
||||
@@ -2881,7 +2598,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
if (!(che=get_che(ac, elem_type, elem_id))) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",
|
||||
elem_type, elem_id);
|
||||
err = AVERROR_INVALIDDATA;
|
||||
err = -1;
|
||||
goto fail;
|
||||
}
|
||||
samples = 1024;
|
||||
@@ -2939,7 +2656,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
elem_id += get_bits(gb, 8) - 1;
|
||||
if (get_bits_left(gb) < 8 * elem_id) {
|
||||
av_log(avctx, AV_LOG_ERROR, "TYPE_FIL: "overread_err);
|
||||
err = AVERROR_INVALIDDATA;
|
||||
err = -1;
|
||||
goto fail;
|
||||
}
|
||||
while (elem_id > 0)
|
||||
@@ -2948,7 +2665,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
break;
|
||||
|
||||
default:
|
||||
err = AVERROR_BUG; /* should not happen, but keeps compiler happy */
|
||||
err = -1; /* should not happen, but keeps compiler happy */
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2960,7 +2677,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
|
||||
if (get_bits_left(gb) < 3) {
|
||||
av_log(avctx, AV_LOG_ERROR, overread_err);
|
||||
err = AVERROR_INVALIDDATA;
|
||||
err = -1;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
@@ -3049,20 +2766,9 @@ static int aac_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (INT_MAX / 8 <= buf_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((err = init_get_bits(&gb, buf, buf_size * 8)) < 0)
|
||||
return err;
|
||||
init_get_bits(&gb, buf, buf_size * 8);
|
||||
|
||||
switch (ac->oc[1].m4ac.object_type) {
|
||||
case AOT_ER_AAC_LC:
|
||||
case AOT_ER_AAC_LTP:
|
||||
case AOT_ER_AAC_LD:
|
||||
case AOT_ER_AAC_ELD:
|
||||
err = aac_decode_er_frame(avctx, data, got_frame_ptr, &gb);
|
||||
break;
|
||||
default:
|
||||
err = aac_decode_frame_int(avctx, data, got_frame_ptr, &gb, avpkt);
|
||||
}
|
||||
if (err < 0)
|
||||
if ((err = aac_decode_frame_int(avctx, data, got_frame_ptr, &gb, avpkt)) < 0)
|
||||
return err;
|
||||
|
||||
buf_consumed = (get_bits_count(&gb) + 7) >> 3;
|
||||
@@ -3088,7 +2794,6 @@ static av_cold int aac_decode_close(AVCodecContext *avctx)
|
||||
|
||||
ff_mdct_end(&ac->mdct);
|
||||
ff_mdct_end(&ac->mdct_small);
|
||||
ff_mdct_end(&ac->mdct_ld);
|
||||
ff_mdct_end(&ac->mdct_ltp);
|
||||
return 0;
|
||||
}
|
||||
@@ -3401,13 +3106,13 @@ static const AVClass aac_decoder_class = {
|
||||
|
||||
AVCodec ff_aac_decoder = {
|
||||
.name = "aac",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_AAC,
|
||||
.priv_data_size = sizeof(AACContext),
|
||||
.init = aac_decode_init,
|
||||
.close = aac_decode_close,
|
||||
.decode = aac_decode_frame,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
|
||||
},
|
||||
@@ -3424,13 +3129,13 @@ AVCodec ff_aac_decoder = {
|
||||
*/
|
||||
AVCodec ff_aac_latm_decoder = {
|
||||
.name = "aac_latm",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_AAC_LATM,
|
||||
.priv_data_size = sizeof(struct LATMContext),
|
||||
.init = latm_decode_init,
|
||||
.close = aac_decode_close,
|
||||
.decode = latm_decode_frame,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
||||
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
|
||||
},
|
||||
|
@@ -791,11 +791,7 @@ static const AVOption aacenc_options[] = {
|
||||
{"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"ms_off", "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||
{"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.i64 = AAC_CODER_TWOLOOP}, 0, AAC_CODER_NB-1, AACENC_FLAGS, "aac_coder"},
|
||||
{"faac", "FAAC-inspired method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_FAAC}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
||||
{"anmr", "ANMR method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_ANMR}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
||||
{"twoloop", "Two loop searching method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_TWOLOOP}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
||||
{"fast", "Constant quantizer", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_FAST}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
||||
{"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.i64 = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
@@ -815,7 +811,6 @@ static const int mpeg4audio_sample_rates[16] = {
|
||||
|
||||
AVCodec ff_aac_encoder = {
|
||||
.name = "aac",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_AAC,
|
||||
.priv_data_size = sizeof(AACEncContext),
|
||||
@@ -827,5 +822,6 @@ AVCodec ff_aac_encoder = {
|
||||
CODEC_CAP_EXPERIMENTAL,
|
||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||
.priv_class = &aacenc_class,
|
||||
};
|
||||
|
@@ -30,14 +30,7 @@
|
||||
#include "audio_frame_queue.h"
|
||||
#include "psymodel.h"
|
||||
|
||||
typedef enum AACCoder {
|
||||
AAC_CODER_FAAC = 0,
|
||||
AAC_CODER_ANMR,
|
||||
AAC_CODER_TWOLOOP,
|
||||
AAC_CODER_FAST,
|
||||
|
||||
AAC_CODER_NB,
|
||||
}AACCoder;
|
||||
#define AAC_CODER_NB 4
|
||||
|
||||
typedef struct AACEncOptions {
|
||||
int stereo_mode;
|
||||
|
@@ -192,7 +192,7 @@ static void ps_tableinit(void)
|
||||
for (k = 0; k < NR_ALLPASS_BANDS34; k++) {
|
||||
double f_center, theta;
|
||||
if (k < FF_ARRAY_ELEMS(f_center_34))
|
||||
f_center = f_center_34[k] / 24.0;
|
||||
f_center = f_center_34[k] / 24.;
|
||||
else
|
||||
f_center = k - 26.5f;
|
||||
for (m = 0; m < PS_AP_LINKS; m++) {
|
||||
|
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Mans Rullgard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
@@ -34,17 +34,12 @@
|
||||
#include <stdint.h>
|
||||
|
||||
DECLARE_ALIGNED(32, float, ff_aac_kbd_long_1024)[1024];
|
||||
DECLARE_ALIGNED(32, float, ff_aac_kbd_long_512 )[512];
|
||||
DECLARE_ALIGNED(32, float, ff_aac_kbd_short_128)[128];
|
||||
|
||||
const uint8_t ff_aac_num_swb_1024[] = {
|
||||
41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40, 40
|
||||
};
|
||||
|
||||
const uint8_t ff_aac_num_swb_512[] = {
|
||||
0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
const uint8_t ff_aac_num_swb_128[] = {
|
||||
12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
|
||||
};
|
||||
@@ -1119,14 +1114,6 @@ static const uint16_t swb_offset_1024_48[] = {
|
||||
928, 1024
|
||||
};
|
||||
|
||||
static const uint16_t swb_offset_512_48[] = {
|
||||
0, 4, 8, 12, 16, 20, 24, 28,
|
||||
32, 36, 40, 44, 48, 52, 56, 60,
|
||||
68, 76, 84, 92, 100, 112, 124, 136,
|
||||
148, 164, 184, 208, 236, 268, 300, 332,
|
||||
364, 396, 428, 460, 512
|
||||
};
|
||||
|
||||
static const uint16_t swb_offset_128_48[] = {
|
||||
0, 4, 8, 12, 16, 20, 28, 36,
|
||||
44, 56, 68, 80, 96, 112, 128
|
||||
@@ -1142,14 +1129,6 @@ static const uint16_t swb_offset_1024_32[] = {
|
||||
928, 960, 992, 1024
|
||||
};
|
||||
|
||||
static const uint16_t swb_offset_512_32[] = {
|
||||
0, 4, 8, 12, 16, 20, 24, 28,
|
||||
32, 36, 40, 44, 48, 52, 56, 64,
|
||||
72, 80, 88, 96, 108, 120, 132, 144,
|
||||
160, 176, 192, 212, 236, 260, 288, 320,
|
||||
352, 384, 416, 448, 480, 512
|
||||
};
|
||||
|
||||
static const uint16_t swb_offset_1024_24[] = {
|
||||
0, 4, 8, 12, 16, 20, 24, 28,
|
||||
32, 36, 40, 44, 52, 60, 68, 76,
|
||||
@@ -1159,13 +1138,6 @@ static const uint16_t swb_offset_1024_24[] = {
|
||||
600, 652, 704, 768, 832, 896, 960, 1024
|
||||
};
|
||||
|
||||
static const uint16_t swb_offset_512_24[] = {
|
||||
0, 4, 8, 12, 16, 20, 24, 28,
|
||||
32, 36, 40, 44, 52, 60, 68, 80,
|
||||
92, 104, 120, 140, 164, 192, 224, 256,
|
||||
288, 320, 352, 384, 416, 448, 480, 512,
|
||||
};
|
||||
|
||||
static const uint16_t swb_offset_128_24[] = {
|
||||
0, 4, 8, 12, 16, 20, 24, 28,
|
||||
36, 44, 52, 64, 76, 92, 108, 128
|
||||
@@ -1207,14 +1179,6 @@ const uint16_t * const ff_swb_offset_1024[] = {
|
||||
swb_offset_1024_8
|
||||
};
|
||||
|
||||
const uint16_t * const ff_swb_offset_512[] = {
|
||||
NULL, NULL, NULL,
|
||||
swb_offset_512_48, swb_offset_512_48, swb_offset_512_32,
|
||||
swb_offset_512_24, swb_offset_512_24, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const uint16_t * const ff_swb_offset_128[] = {
|
||||
/* The last entry on the following row is swb_offset_128_64 but is a
|
||||
duplicate of swb_offset_128_96. */
|
||||
@@ -1241,486 +1205,3 @@ const uint8_t ff_tns_max_bands_128[] = {
|
||||
9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
|
||||
};
|
||||
// @}
|
||||
|
||||
const DECLARE_ALIGNED(32, float, ff_aac_eld_window)[1920] = {
|
||||
0.00338834, 0.00567745, 0.00847677, 0.01172641,
|
||||
0.01532555, 0.01917664, 0.02318809, 0.02729259,
|
||||
0.03144503, 0.03560261, 0.03972499, 0.04379783,
|
||||
0.04783094, 0.05183357, 0.05581342, 0.05977723,
|
||||
0.06373173, 0.06768364, 0.07163937, 0.07559976,
|
||||
0.07956096, 0.08352024, 0.08747623, 0.09143035,
|
||||
0.09538618, 0.09934771, 0.10331917, 0.10730456,
|
||||
0.11130697, 0.11532867, 0.11937133, 0.12343922,
|
||||
0.12753911, 0.13167705, 0.13585812, 0.14008529,
|
||||
0.14435986, 0.14868291, 0.15305531, 0.15747594,
|
||||
0.16194193, 0.16645070, 0.17099991, 0.17558633,
|
||||
0.18020600, 0.18485548, 0.18953191, 0.19423322,
|
||||
0.19895800, 0.20370512, 0.20847374, 0.21326312,
|
||||
0.21807244, 0.22290083, 0.22774742, 0.23261210,
|
||||
0.23749542, 0.24239767, 0.24731889, 0.25225887,
|
||||
0.25721719, 0.26219330, 0.26718648, 0.27219630,
|
||||
0.27722262, 0.28226514, 0.28732336, 0.29239628,
|
||||
0.29748247, 0.30258055, 0.30768914, 0.31280508,
|
||||
0.31792385, 0.32304172, 0.32815579, 0.33326397,
|
||||
0.33836470, 0.34345661, 0.34853868, 0.35361188,
|
||||
0.35867865, 0.36374072, 0.36879900, 0.37385347,
|
||||
0.37890349, 0.38394836, 0.38898730, 0.39401912,
|
||||
0.39904236, 0.40405575, 0.40905820, 0.41404819,
|
||||
0.41902398, 0.42398423, 0.42892805, 0.43385441,
|
||||
0.43876210, 0.44365014, 0.44851786, 0.45336632,
|
||||
0.45819759, 0.46301302, 0.46781309, 0.47259722,
|
||||
0.47736435, 0.48211365, 0.48684450, 0.49155594,
|
||||
0.49624679, 0.50091636, 0.50556440, 0.51019132,
|
||||
0.51479771, 0.51938391, 0.52394998, 0.52849587,
|
||||
0.53302151, 0.53752680, 0.54201160, 0.54647575,
|
||||
0.55091916, 0.55534181, 0.55974376, 0.56412513,
|
||||
0.56848615, 0.57282710, 0.57714834, 0.58145030,
|
||||
0.58492489, 0.58918511, 0.59342326, 0.59763936,
|
||||
0.60183347, 0.60600561, 0.61015581, 0.61428412,
|
||||
0.61839056, 0.62247517, 0.62653799, 0.63057912,
|
||||
0.63459872, 0.63859697, 0.64257403, 0.64653001,
|
||||
0.65046495, 0.65437887, 0.65827181, 0.66214383,
|
||||
0.66599499, 0.66982535, 0.67363499, 0.67742394,
|
||||
0.68119219, 0.68493972, 0.68866653, 0.69237258,
|
||||
0.69605778, 0.69972207, 0.70336537, 0.70698758,
|
||||
0.71058862, 0.71416837, 0.71772674, 0.72126361,
|
||||
0.72477889, 0.72827246, 0.73174419, 0.73519392,
|
||||
0.73862141, 0.74202643, 0.74540874, 0.74876817,
|
||||
0.75210458, 0.75541785, 0.75870785, 0.76197437,
|
||||
0.76521709, 0.76843570, 0.77162988, 0.77479939,
|
||||
0.77794403, 0.78106359, 0.78415789, 0.78722670,
|
||||
0.79026979, 0.79328694, 0.79627791, 0.79924244,
|
||||
0.80218027, 0.80509112, 0.80797472, 0.81083081,
|
||||
0.81365915, 0.81645949, 0.81923160, 0.82197528,
|
||||
0.82469037, 0.82737673, 0.83003419, 0.83266262,
|
||||
0.83526186, 0.83783176, 0.84037217, 0.84288297,
|
||||
0.84536401, 0.84781517, 0.85023632, 0.85262739,
|
||||
0.85498836, 0.85731921, 0.85961993, 0.86189052,
|
||||
0.86413101, 0.86634140, 0.86852173, 0.87067211,
|
||||
0.87279275, 0.87488384, 0.87694559, 0.87897824,
|
||||
0.88098206, 0.88295729, 0.88490423, 0.88682332,
|
||||
0.88871519, 0.89058048, 0.89241983, 0.89423391,
|
||||
0.89602338, 0.89778893, 0.89953126, 0.90125142,
|
||||
0.90295086, 0.90463104, 0.90629341, 0.90793946,
|
||||
0.90957067, 0.91118856, 0.91279464, 0.91439073,
|
||||
0.91597898, 0.91756153, 0.91914049, 0.92071690,
|
||||
0.92229070, 0.92386182, 0.92542993, 0.92698946,
|
||||
0.92852960, 0.93003929, 0.93150727, 0.93291739,
|
||||
0.93424863, 0.93547974, 0.93658982, 0.93756587,
|
||||
0.93894072, 0.93922780, 0.93955477, 0.93991290,
|
||||
0.94029104, 0.94067794, 0.94106258, 0.94144084,
|
||||
0.94181549, 0.94218963, 0.94256628, 0.94294662,
|
||||
0.94332998, 0.94371562, 0.94410280, 0.94449122,
|
||||
0.94488106, 0.94527249, 0.94566568, 0.94606074,
|
||||
0.94645772, 0.94685665, 0.94725759, 0.94766054,
|
||||
0.94806547, 0.94847234, 0.94888115, 0.94929190,
|
||||
0.94970469, 0.95011960, 0.95053672, 0.95095604,
|
||||
0.95137751, 0.95180105, 0.95222658, 0.95265413,
|
||||
0.95308380, 0.95351571, 0.95394994, 0.95438653,
|
||||
0.95482538, 0.95526643, 0.95570958, 0.95615486,
|
||||
0.95660234, 0.95705214, 0.95750433, 0.95795892,
|
||||
0.95841582, 0.95887493, 0.95933616, 0.95979949,
|
||||
0.96026500, 0.96073277, 0.96120286, 0.96167526,
|
||||
0.96214986, 0.96262655, 0.96310522, 0.96358586,
|
||||
0.96406853, 0.96455330, 0.96504026, 0.96552936,
|
||||
0.96602051, 0.96651360, 0.96700850, 0.96750520,
|
||||
0.96800376, 0.96850424, 0.96900670, 0.96951112,
|
||||
0.97001738, 0.97052533, 0.97103488, 0.97154597,
|
||||
0.97205867, 0.97257304, 0.97308915, 0.97360694,
|
||||
0.97412631, 0.97464711, 0.97516923, 0.97569262,
|
||||
0.97621735, 0.97674350, 0.97727111, 0.97780016,
|
||||
0.97833051, 0.97886205, 0.97939463, 0.97992823,
|
||||
0.98046291, 0.98099875, 0.98153580, 0.98207405,
|
||||
0.98261337, 0.98315364, 0.98369474, 0.98423664,
|
||||
0.98477941, 0.98532311, 0.98586780, 0.98641348,
|
||||
0.98696003, 0.98750734, 0.98805530, 0.98860389,
|
||||
0.98915320, 0.98970328, 0.99025423, 0.99080602,
|
||||
0.99135855, 0.99191171, 0.99246541, 0.99301962,
|
||||
0.99357443, 0.99412992, 0.99468617, 0.99524320,
|
||||
0.99580092, 0.99635926, 0.99691814, 0.99747748,
|
||||
0.99803721, 0.99859725, 0.99915752, 0.99971793,
|
||||
1.00028215, 1.00084319, 1.00140472, 1.00196665,
|
||||
1.00252889, 1.00309139, 1.00365404, 1.00421679,
|
||||
1.00477954, 1.00534221, 1.00590474, 1.00646713,
|
||||
1.00702945, 1.00759179, 1.00815424, 1.00871678,
|
||||
1.00927930, 1.00984169, 1.01040384, 1.01096575,
|
||||
1.01152747, 1.01208910, 1.01265070, 1.01321226,
|
||||
1.01377365, 1.01433478, 1.01489551, 1.01545584,
|
||||
1.01601582, 1.01657553, 1.01713502, 1.01769427,
|
||||
1.01825316, 1.01881154, 1.01936929, 1.01992639,
|
||||
1.02048289, 1.02103888, 1.02159441, 1.02214945,
|
||||
1.02270387, 1.02325751, 1.02381025, 1.02436204,
|
||||
1.02491295, 1.02546304, 1.02601238, 1.02656092,
|
||||
1.02710853, 1.02765508, 1.02820041, 1.02874449,
|
||||
1.02928737, 1.02982913, 1.03036981, 1.03090937,
|
||||
1.03144768, 1.03198460, 1.03252000, 1.03305384,
|
||||
1.03358617, 1.03411707, 1.03464659, 1.03517470,
|
||||
1.03570128, 1.03622620, 1.03674934, 1.03727066,
|
||||
1.03779024, 1.03830815, 1.03882446, 1.03933914,
|
||||
1.03985206, 1.04036312, 1.04087217, 1.04137920,
|
||||
1.04188428, 1.04238748, 1.04288888, 1.04338845,
|
||||
1.04388610, 1.04438170, 1.04487515, 1.04536645,
|
||||
1.04585569, 1.04634297, 1.04682838, 1.04731192,
|
||||
1.04779350, 1.04827303, 1.04875042, 1.04922568,
|
||||
1.04969891, 1.05017022, 1.05063974, 1.05110746,
|
||||
1.05157332, 1.05203721, 1.05249907, 1.05295889,
|
||||
1.05341676, 1.05387277, 1.05432700, 1.05477948,
|
||||
1.05523018, 1.05567906, 1.05612608, 1.05657124,
|
||||
1.05701459, 1.05745616, 1.05789601, 1.05833426,
|
||||
1.05877109, 1.05920669, 1.05964125, 1.06007444,
|
||||
1.06050542, 1.06093335, 1.06135746, 1.06177909,
|
||||
1.06220164, 1.06262858, 1.06306309, 1.06350050,
|
||||
1.06392837, 1.06433391, 1.06470443, 1.06502996,
|
||||
1.06481076, 1.06469765, 1.06445004, 1.06408002,
|
||||
1.06361382, 1.06307719, 1.06249453, 1.06188365,
|
||||
1.06125612, 1.06062291, 1.05999418, 1.05937132,
|
||||
1.05874726, 1.05811486, 1.05746728, 1.05680000,
|
||||
1.05611070, 1.05539715, 1.05465735, 1.05389329,
|
||||
1.05311083, 1.05231578, 1.05151372, 1.05070811,
|
||||
1.04990044, 1.04909210, 1.04828434, 1.04747647,
|
||||
1.04666590, 1.04585003, 1.04502628, 1.04419009,
|
||||
1.04333499, 1.04245452, 1.04154244, 1.04059452,
|
||||
1.03960846, 1.03858207, 1.03751326, 1.03640189,
|
||||
1.03524976, 1.03405868, 1.03283047, 1.03156812,
|
||||
1.03027574, 1.02895743, 1.02761717, 1.02625804,
|
||||
1.02488222, 1.02349184, 1.02208892, 1.02067450,
|
||||
1.01924861, 1.01781123, 1.01636229, 1.01490045,
|
||||
1.01342315, 1.01192778, 1.01041175, 1.00887284,
|
||||
1.00730915, 1.00571882, 1.00409996, 1.00245032,
|
||||
1.00076734, 0.99904842, 0.99729101, 0.99549380,
|
||||
0.99365664, 0.99177946, 0.98986234, 0.98791024,
|
||||
0.98593294, 0.98394037, 0.98194226, 0.97994532,
|
||||
0.97795324, 0.97596955, 0.97399748, 0.97203326,
|
||||
0.97006624, 0.96808546, 0.96608018, 0.96404416,
|
||||
0.96197556, 0.95987276, 0.95773420, 0.95556018,
|
||||
0.95335291, 0.95111462, 0.94884764, 0.94655663,
|
||||
0.94424858, 0.94193055, 0.93960953, 0.93729154,
|
||||
0.93498157, 0.93268456, 0.93040503, 0.92813771,
|
||||
0.92586755, 0.92357910, 0.92125731, 0.91889642,
|
||||
0.91649998, 0.91407191, 0.91161623, 0.90913975,
|
||||
0.90665202, 0.90416271, 0.90168115, 0.89920934,
|
||||
0.89674189, 0.89427312, 0.89179743, 0.88931147,
|
||||
0.88681415, 0.88430445, 0.88178141, 0.87924528,
|
||||
0.87669753, 0.87413966, 0.87157318, 0.86899958,
|
||||
0.86642037, 0.86383703, 0.86125106, 0.85866393,
|
||||
0.85604236, 0.85344385, 0.85083093, 0.84820550,
|
||||
0.84556943, 0.84292458, 0.84027278, 0.83761586,
|
||||
0.83495565, 0.83229393, 0.82963243, 0.82697135,
|
||||
0.82430933, 0.82164496, 0.81897669, 0.81630017,
|
||||
0.81360822, 0.81089355, 0.80814924, 0.80537741,
|
||||
0.80258920, 0.79979611, 0.79700954, 0.79423813,
|
||||
0.79148780, 0.78876432, 0.78607290, 0.78340590,
|
||||
0.78074288, 0.77806279, 0.77534514, 0.77258187,
|
||||
0.76977737, 0.76693654, 0.76406441, 0.76116851,
|
||||
0.75825892, 0.75534582, 0.75243924, 0.74954634,
|
||||
0.74667135, 0.74381840, 0.74099145, 0.73819147,
|
||||
0.73541641, 0.73266408, 0.72993193, 0.72720913,
|
||||
0.72447661, 0.72171494, 0.71890515, 0.71603932,
|
||||
0.71312056, 0.71015250, 0.70713900, 0.70409084,
|
||||
0.70102565, 0.69796137, 0.69491556, 0.69189772,
|
||||
0.68890931, 0.68595141, 0.68302498, 0.68012852,
|
||||
0.67725801, 0.67440936, 0.67157841, 0.66876081,
|
||||
0.66595195, 0.66314722, 0.66034194, 0.65753027,
|
||||
0.65470525, 0.65185984, 0.64898709, 0.64608214,
|
||||
0.64314221, 0.64016460, 0.63714680, 0.63409034,
|
||||
0.63100082, 0.62788400, 0.62474577, 0.62159473,
|
||||
0.61844225, 0.61529977, 0.61217866, 0.60908811,
|
||||
0.60603510, 0.60302654, 0.60006916, 0.59716588,
|
||||
0.59431580, 0.59151787, 0.58877068, 0.58606495,
|
||||
0.58338353, 0.58070891, 0.57802356, 0.57530864,
|
||||
0.57254404, 0.56970958, 0.56678577, 0.56376860,
|
||||
0.56066951, 0.55750064, 0.55427451, 0.55101301,
|
||||
0.54774732, 0.54450907, 0.54132936, 0.53822744,
|
||||
0.53521072, 0.53228613, 0.52945979, 0.52671997,
|
||||
0.52403708, 0.52138072, 0.51872085, 0.51603570,
|
||||
0.51331170, 0.51053560, 0.50769466, 0.50478931,
|
||||
0.50183308, 0.49884001, 0.49582406, 0.49279905,
|
||||
0.48985748, 0.48679641, 0.48379429, 0.48085363,
|
||||
0.47796576, 0.47512151, 0.47231151, 0.46952402,
|
||||
0.46674486, 0.46395978, 0.46115496, 0.45832607,
|
||||
0.45547830, 0.45261727, 0.44974866, 0.44688011,
|
||||
0.44402125, 0.44118178, 0.43837094, 0.43558772,
|
||||
0.43282082, 0.43005847, 0.42728913, 0.42450572,
|
||||
0.42170567, 0.41888658, 0.41604633, 0.41318897,
|
||||
0.41032472, 0.40746405, 0.40461724, 0.40178943,
|
||||
0.39898066, 0.39619073, 0.39341940, 0.39066519,
|
||||
0.38792536, 0.38519713, 0.38247773, 0.37976476,
|
||||
0.37705620, 0.37435006, 0.37164438, 0.36893869,
|
||||
0.36623396, 0.36353124, 0.36083153, 0.35813533,
|
||||
0.35544262, 0.35275338, 0.35006755, 0.34738530,
|
||||
0.34470699, 0.34203296, 0.33936359, 0.33669922,
|
||||
0.33404027, 0.33138711, 0.32874013, 0.32609944,
|
||||
0.32346493, 0.32083645, 0.31821388, 0.31559703,
|
||||
0.31298573, 0.31037987, 0.30777941, 0.30518446,
|
||||
0.30259525, 0.30001202, 0.29743499, 0.29486428,
|
||||
0.29229989, 0.28974179, 0.28718997, 0.28464452,
|
||||
0.28210562, 0.27957346, 0.27704820, 0.27452992,
|
||||
0.27201854, 0.26951399, 0.26701622, 0.26452533,
|
||||
0.26204158, 0.25956526, 0.25709662, 0.25463583,
|
||||
0.25218294, 0.24973798, 0.24730100, 0.24487207,
|
||||
0.24245133, 0.24003893, 0.23763500, 0.23523959,
|
||||
0.23285262, 0.23047401, 0.22810369, 0.22574170,
|
||||
0.22338818, 0.22104329, 0.21870719, 0.21637986,
|
||||
0.21406117, 0.21175095, 0.20944904, 0.20715535,
|
||||
0.20486987, 0.20259261, 0.20032356, 0.19806259,
|
||||
0.19580944, 0.19356385, 0.19132556, 0.18909442,
|
||||
0.18687040, 0.18465350, 0.18244372, 0.18024164,
|
||||
0.17804841, 0.17586521, 0.17369322, 0.17153360,
|
||||
0.16938755, 0.16725622, 0.16514081, 0.16304247,
|
||||
0.16098974, 0.15896561, 0.15696026, 0.15497259,
|
||||
0.15300151, 0.15104590, 0.14910466, 0.14717666,
|
||||
0.14526081, 0.14335599, 0.14146111, 0.13957570,
|
||||
0.13769993, 0.13583399, 0.13397806, 0.13213229,
|
||||
0.13029682, 0.12847178, 0.12665729, 0.12485353,
|
||||
0.12306074, 0.12127916, 0.11950900, 0.11775043,
|
||||
0.11600347, 0.11426820, 0.11254464, 0.11083292,
|
||||
0.10913318, 0.10744559, 0.10577028, 0.10410733,
|
||||
0.10245672, 0.10081842, 0.09919240, 0.09757872,
|
||||
0.09597750, 0.09438884, 0.09281288, 0.09124964,
|
||||
0.08969907, 0.08816111, 0.08663570, 0.08512288,
|
||||
0.08362274, 0.08213540, 0.08066096, 0.07919944,
|
||||
0.07775076, 0.07631484, 0.07489161, 0.07348108,
|
||||
0.07208335, 0.07069851, 0.06932666, 0.06796781,
|
||||
0.06662187, 0.06528874, 0.06396833, 0.06266065,
|
||||
0.06136578, 0.06008380, 0.05881480, 0.05755876,
|
||||
0.05631557, 0.05508511, 0.05386728, 0.05266206,
|
||||
0.05146951, 0.05028971, 0.04912272, 0.04796855,
|
||||
0.04682709, 0.04569825, 0.04458194, 0.04347817,
|
||||
0.04238704, 0.04130868, 0.04024318, 0.03919056,
|
||||
0.03815071, 0.03712352, 0.03610890, 0.03510679,
|
||||
0.03411720, 0.03314013, 0.03217560, 0.03122343,
|
||||
0.03028332, 0.02935494, 0.02843799, 0.02753230,
|
||||
0.02663788, 0.02575472, 0.02488283, 0.02402232,
|
||||
0.02317341, 0.02233631, 0.02151124, 0.02069866,
|
||||
0.01989922, 0.01911359, 0.01834241, 0.01758563,
|
||||
0.01684248, 0.01611219, 0.01539397, 0.01468726,
|
||||
0.01399167, 0.01330687, 0.01263250, 0.01196871,
|
||||
0.01131609, 0.01067527, 0.01004684, 0.00943077,
|
||||
0.00882641, 0.00823307, 0.00765011, 0.00707735,
|
||||
0.00651513, 0.00596377, 0.00542364, 0.00489514,
|
||||
0.00437884, 0.00387530, 0.00338509, 0.00290795,
|
||||
0.00244282, 0.00198860, 0.00154417, 0.00110825,
|
||||
0.00067934, 0.00025589, -0.00016357, -0.00057897,
|
||||
-0.00098865, -0.00139089, -0.00178397, -0.00216547,
|
||||
-0.00253230, -0.00288133, -0.00320955, -0.00351626,
|
||||
-0.00380315, -0.00407198, -0.00432457, -0.00456373,
|
||||
-0.00479326, -0.00501699, -0.00523871, -0.00546066,
|
||||
-0.00568360, -0.00590821, -0.00613508, -0.00636311,
|
||||
-0.00658944, -0.00681117, -0.00702540, -0.00722982,
|
||||
-0.00742268, -0.00760226, -0.00776687, -0.00791580,
|
||||
-0.00804933, -0.00816774, -0.00827139, -0.00836122,
|
||||
-0.00843882, -0.00850583, -0.00856383, -0.00861430,
|
||||
-0.00865853, -0.00869781, -0.00873344, -0.00876633,
|
||||
-0.00879707, -0.00882622, -0.00885433, -0.00888132,
|
||||
-0.00890652, -0.00892925, -0.00894881, -0.00896446,
|
||||
-0.00897541, -0.00898088, -0.00898010, -0.00897234,
|
||||
-0.00895696, -0.00893330, -0.00890076, -0.00885914,
|
||||
-0.00880875, -0.00874987, -0.00868282, -0.00860825,
|
||||
-0.00852716, -0.00844055, -0.00834941, -0.00825485,
|
||||
-0.00815807, -0.00806025, -0.00796253, -0.00786519,
|
||||
-0.00776767, -0.00766937, -0.00756971, -0.00746790,
|
||||
-0.00736305, -0.00725422, -0.00714055, -0.00702161,
|
||||
-0.00689746, -0.00676816, -0.00663381, -0.00649489,
|
||||
-0.00635230, -0.00620694, -0.00605969, -0.00591116,
|
||||
-0.00576167, -0.00561155, -0.00546110, -0.00531037,
|
||||
-0.00515917, -0.00500732, -0.00485462, -0.00470075,
|
||||
-0.00454530, -0.00438786, -0.00422805, -0.00406594,
|
||||
-0.00390204, -0.00373686, -0.00357091, -0.00340448,
|
||||
-0.00323770, -0.00307066, -0.00290344, -0.00273610,
|
||||
-0.00256867, -0.00240117, -0.00223365, -0.00206614,
|
||||
-0.00189866, -0.00173123, -0.00156390, -0.00139674,
|
||||
-0.00122989, -0.00106351, -0.00089772, -0.00073267,
|
||||
-0.00056849, -0.00040530, -0.00024324, -0.00008241,
|
||||
0.00008214, 0.00024102, 0.00039922, 0.00055660,
|
||||
0.00071299, 0.00086826, 0.00102224, 0.00117480,
|
||||
0.00132579, 0.00147507, 0.00162252, 0.00176804,
|
||||
0.00191161, 0.00205319, 0.00219277, 0.00233029,
|
||||
0.00246567, 0.00259886, 0.00272975, 0.00285832,
|
||||
0.00298453, 0.00310839, 0.00322990, 0.00334886,
|
||||
0.00346494, 0.00357778, 0.00368706, 0.00379273,
|
||||
0.00389501, 0.00399411, 0.00409020, 0.00418350,
|
||||
0.00427419, 0.00436249, 0.00444858, 0.00453250,
|
||||
0.00461411, 0.00469328, 0.00476988, 0.00484356,
|
||||
0.00491375, 0.00497987, 0.00504139, 0.00509806,
|
||||
0.00514990, 0.00519693, 0.00523920, 0.00527700,
|
||||
0.00531083, 0.00534122, 0.00536864, 0.00539357,
|
||||
0.00541649, 0.00543785, 0.00545809, 0.00547713,
|
||||
0.00549441, 0.00550936, 0.00552146, 0.00553017,
|
||||
0.00553494, 0.00553524, 0.00553058, 0.00552065,
|
||||
0.00550536, 0.00548459, 0.00545828, 0.00542662,
|
||||
0.00539007, 0.00534910, 0.00530415, 0.00525568,
|
||||
0.00520417, 0.00515009, 0.00509387, 0.00503595,
|
||||
0.00497674, 0.00491665, 0.00485605, 0.00479503,
|
||||
0.00473336, 0.00467082, 0.00460721, 0.00454216,
|
||||
0.00447517, 0.00440575, 0.00433344, 0.00425768,
|
||||
0.00417786, 0.00409336, 0.00400363, 0.00390837,
|
||||
0.00380759, 0.00370130, 0.00358952, 0.00347268,
|
||||
0.00335157, 0.00322699, 0.00309975, 0.00297088,
|
||||
0.00284164, 0.00271328, 0.00258700, 0.00246328,
|
||||
0.00234195, 0.00222281, 0.00210562, 0.00198958,
|
||||
0.00187331, 0.00175546, 0.00163474, 0.00151020,
|
||||
0.00138130, 0.00124750, 0.00110831, 0.00096411,
|
||||
0.00081611, 0.00066554, 0.00051363, 0.00036134,
|
||||
0.00020940, 0.00005853, -0.00009058, -0.00023783,
|
||||
-0.00038368, -0.00052861, -0.00067310, -0.00081757,
|
||||
-0.00096237, -0.00110786, -0.00125442, -0.00140210,
|
||||
-0.00155065, -0.00169984, -0.00184940, -0.00199910,
|
||||
-0.00214872, -0.00229798, -0.00244664, -0.00259462,
|
||||
-0.00274205, -0.00288912, -0.00303596, -0.00318259,
|
||||
-0.00332890, -0.00347480, -0.00362024, -0.00376519,
|
||||
-0.00390962, -0.00405345, -0.00419658, -0.00433902,
|
||||
-0.00448085, -0.00462219, -0.00476309, -0.00490357,
|
||||
-0.00504361, -0.00518321, -0.00532243, -0.00546132,
|
||||
-0.00559988, -0.00573811, -0.00587602, -0.00601363,
|
||||
-0.00615094, -0.00628795, -0.00642466, -0.00656111,
|
||||
-0.00669737, -0.00683352, -0.00696963, -0.00710578,
|
||||
-0.00724208, -0.00737862, -0.00751554, -0.00765295,
|
||||
-0.00779098, -0.00792976, -0.00806941, -0.00821006,
|
||||
-0.00835183, -0.00849485, -0.00863926, -0.00878522,
|
||||
-0.00893293, -0.00908260, -0.00923444, -0.00938864,
|
||||
-0.00954537, -0.00970482, -0.00986715, -0.01003173,
|
||||
-0.01019711, -0.01036164, -0.01052357, -0.01068184,
|
||||
-0.01083622, -0.01098652, -0.01113252, -0.01127409,
|
||||
-0.01141114, -0.01154358, -0.01167135, -0.01179439,
|
||||
-0.01191268, -0.01202619, -0.01213493, -0.01223891,
|
||||
-0.01233817, -0.01243275, -0.01252272, -0.01260815,
|
||||
-0.01268915, -0.01276583, -0.01283832, -0.01290685,
|
||||
-0.01297171, -0.01303320, -0.01309168, -0.01314722,
|
||||
-0.01319969, -0.01324889, -0.01329466, -0.01333693,
|
||||
-0.01337577, -0.01341125, -0.01344345, -0.01347243,
|
||||
-0.01349823, -0.01352089, -0.01354045, -0.01355700,
|
||||
-0.01357068, -0.01358164, -0.01359003, -0.01359587,
|
||||
-0.01359901, -0.01359931, -0.01359661, -0.01359087,
|
||||
-0.01358219, -0.01357065, -0.01355637, -0.01353935,
|
||||
-0.01351949, -0.01349670, -0.01347088, -0.01344214,
|
||||
-0.01341078, -0.01337715, -0.01334158, -0.01330442,
|
||||
-0.01326601, -0.01322671, -0.01318689, -0.01314692,
|
||||
-0.01310123, -0.01306470, -0.01302556, -0.01298381,
|
||||
-0.01293948, -0.01289255, -0.01284305, -0.01279095,
|
||||
-0.01273625, -0.01267893, -0.01261897, -0.01255632,
|
||||
-0.01249096, -0.01242283, -0.01235190, -0.01227827,
|
||||
-0.01220213, -0.01212366, -0.01204304, -0.01196032,
|
||||
-0.01187543, -0.01178829, -0.01169884, -0.01160718,
|
||||
-0.01151352, -0.01141809, -0.01132111, -0.01122272,
|
||||
-0.01112304, -0.01102217, -0.01092022, -0.01081730,
|
||||
-0.01071355, -0.01060912, -0.01050411, -0.01039854,
|
||||
-0.01029227, -0.01018521, -0.01007727, -0.00996859,
|
||||
-0.00985959, -0.00975063, -0.00964208, -0.00953420,
|
||||
-0.00942723, -0.00932135, -0.00921677, -0.00911364,
|
||||
-0.00901208, -0.00891220, -0.00881412, -0.00871792,
|
||||
-0.00862369, -0.00853153, -0.00844149, -0.00835360,
|
||||
-0.00826785, -0.00818422, -0.00810267, -0.00802312,
|
||||
-0.00794547, -0.00786959, -0.00779533, -0.00772165,
|
||||
-0.00764673, -0.00756886, -0.00748649, -0.00739905,
|
||||
-0.00730681, -0.00721006, -0.00710910, -0.00700419,
|
||||
-0.00689559, -0.00678354, -0.00666829, -0.00655007,
|
||||
-0.00642916, -0.00630579, -0.00618022, -0.00605267,
|
||||
-0.00592333, -0.00579240, -0.00566006, -0.00552651,
|
||||
-0.00539194, -0.00525653, -0.00512047, -0.00498390,
|
||||
-0.00484693, -0.00470969, -0.00457228, -0.00443482,
|
||||
-0.00429746, -0.00416034, -0.00402359, -0.00388738,
|
||||
-0.00375185, -0.00361718, -0.00348350, -0.00335100,
|
||||
-0.00321991, -0.00309043, -0.00296276, -0.00283698,
|
||||
-0.00271307, -0.00259098, -0.00247066, -0.00235210,
|
||||
-0.00223531, -0.00212030, -0.00200709, -0.00189576,
|
||||
-0.00178647, -0.00167936, -0.00157457, -0.00147216,
|
||||
-0.00137205, -0.00127418, -0.00117849, -0.00108498,
|
||||
-0.00099375, -0.00090486, -0.00081840, -0.00073444,
|
||||
-0.00065309, -0.00057445, -0.00049860, -0.00042551,
|
||||
-0.00035503, -0.00028700, -0.00022125, -0.00015761,
|
||||
-0.00009588, -0.00003583, 0.00002272, 0.00007975,
|
||||
0.00013501, 0.00018828, 0.00023933, 0.00028784,
|
||||
0.00033342, 0.00037572, 0.00041438, 0.00044939,
|
||||
0.00048103, 0.00050958, 0.00053533, 0.00055869,
|
||||
0.00058015, 0.00060022, 0.00061935, 0.00063781,
|
||||
0.00065568, 0.00067303, 0.00068991, 0.00070619,
|
||||
0.00072155, 0.00073567, 0.00074826, 0.00075912,
|
||||
0.00076811, 0.00077509, 0.00077997, 0.00078275,
|
||||
0.00078351, 0.00078237, 0.00077943, 0.00077484,
|
||||
0.00076884, 0.00076160, 0.00075335, 0.00074423,
|
||||
0.00073442, 0.00072404, 0.00071323, 0.00070209,
|
||||
0.00069068, 0.00067906, 0.00066728, 0.00065534,
|
||||
0.00064321, 0.00063086, 0.00061824, 0.00060534,
|
||||
0.00059211, 0.00057855, 0.00056462, 0.00055033,
|
||||
0.00053566, 0.00052063, 0.00050522, 0.00048949,
|
||||
0.00047349, 0.00045728, 0.00044092, 0.00042447,
|
||||
0.00040803, 0.00039166, 0.00037544, 0.00035943,
|
||||
0.00034371, 0.00032833, 0.00031333, 0.00029874,
|
||||
0.00028452, 0.00027067, 0.00025715, 0.00024395,
|
||||
0.00023104, 0.00021842, 0.00020606, 0.00019398,
|
||||
0.00018218, 0.00017069, 0.00015953, 0.00014871,
|
||||
0.00013827, 0.00012823, 0.00011861, 0.00010942,
|
||||
0.00010067, 0.00009236, 0.00008448, 0.00007703,
|
||||
0.00006999, 0.00006337, 0.00005714, 0.00005129,
|
||||
0.00004583, 0.00004072, 0.00003597, 0.00003157,
|
||||
0.00002752, 0.00002380, 0.00002042, 0.00001736,
|
||||
0.00001461, 0.00001215, 0.00000998, 0.00000807,
|
||||
0.00000641, 0.00000499, 0.00000378, 0.00000278,
|
||||
0.00000196, 0.00000132, 0.00000082, 0.00000046,
|
||||
0.00000020, 0.00000005, -0.00000003, -0.00000006,
|
||||
-0.00000004, -0.00000001, 0.00000001, 0.00000001,
|
||||
0.00000001, 0.00000001, -0.00000001, -0.00000004,
|
||||
-0.00000005, -0.00000003, 0.00000005, 0.00000020,
|
||||
0.00000043, 0.00000077, 0.00000123, 0.00000183,
|
||||
0.00000257, 0.00000348, 0.00000455, 0.00000581,
|
||||
0.00000727, 0.00000893, 0.00001080, 0.00001290,
|
||||
0.00001522, 0.00001778, 0.00002057, 0.00002362,
|
||||
0.00002691, 0.00003044, 0.00003422, 0.00003824,
|
||||
0.00004250, 0.00004701, 0.00005176, 0.00005676,
|
||||
0.00006200, 0.00006749, 0.00007322, 0.00007920,
|
||||
0.00008541, 0.00009186, 0.00009854, 0.00010543,
|
||||
0.00011251, 0.00011975, 0.00012714, 0.00013465,
|
||||
0.00014227, 0.00014997, 0.00015775, 0.00016558,
|
||||
0.00017348, 0.00018144, 0.00018947, 0.00019756,
|
||||
0.00020573, 0.00021399, 0.00022233, 0.00023076,
|
||||
0.00023924, 0.00024773, 0.00025621, 0.00026462,
|
||||
0.00027293, 0.00028108, 0.00028904, 0.00029675,
|
||||
0.00030419, 0.00031132, 0.00031810, 0.00032453,
|
||||
0.00033061, 0.00033632, 0.00034169, 0.00034672,
|
||||
0.00035142, 0.00035580, 0.00035988, 0.00036369,
|
||||
0.00036723, 0.00037053, 0.00037361, 0.00037647,
|
||||
0.00037909, 0.00038145, 0.00038352, 0.00038527,
|
||||
0.00038663, 0.00038757, 0.00038801, 0.00038790,
|
||||
0.00038717, 0.00038572, 0.00038350, 0.00038044,
|
||||
0.00037651, 0.00037170, 0.00036597, 0.00035936,
|
||||
0.00035191, 0.00034370, 0.00033480, 0.00032531,
|
||||
0.00031537, 0.00030512, 0.00029470, 0.00028417,
|
||||
0.00027354, 0.00026279, 0.00025191, 0.00024081,
|
||||
0.00022933, 0.00021731, 0.00020458, 0.00019101,
|
||||
0.00017654, 0.00016106, 0.00014452, 0.00012694,
|
||||
0.00010848, 0.00008929, 0.00006953, 0.00004935,
|
||||
0.00002884, 0.00000813, -0.00001268, -0.00003357,
|
||||
-0.00005457, -0.00007574, -0.00009714, -0.00011882,
|
||||
-0.00014082, -0.00016318, -0.00018595, -0.00020912,
|
||||
-0.00023265, -0.00025650, -0.00028060, -0.00030492,
|
||||
-0.00032941, -0.00035400, -0.00037865, -0.00040333,
|
||||
-0.00042804, -0.00045279, -0.00047759, -0.00050243,
|
||||
-0.00052728, -0.00055209, -0.00057685, -0.00060153,
|
||||
-0.00062611, -0.00065056, -0.00067485, -0.00069895,
|
||||
-0.00072287, -0.00074660, -0.00077013, -0.00079345,
|
||||
-0.00081653, -0.00083936, -0.00086192, -0.00088421,
|
||||
-0.00090619, -0.00092786, -0.00094919, -0.00097017,
|
||||
-0.00099077, -0.00101098, -0.00103077, -0.00105012,
|
||||
-0.00106904, -0.00108750, -0.00110549, -0.00112301,
|
||||
-0.00114005, -0.00115660, -0.00117265, -0.00118821,
|
||||
-0.00120325, -0.00121779, -0.00123180, -0.00124528,
|
||||
-0.00125822, -0.00127061, -0.00128243, -0.00129368,
|
||||
-0.00130435, -0.00131445, -0.00132395, -0.00133285,
|
||||
-0.00134113, -0.00134878, -0.00135577, -0.00136215,
|
||||
-0.00136797, -0.00137333, -0.00137834, -0.00138305,
|
||||
-0.00138748, -0.00139163, -0.00139551, -0.00139913,
|
||||
-0.00140249, -0.00140559, -0.00140844, -0.00141102,
|
||||
-0.00141334, -0.00141538, -0.00141714, -0.00141861,
|
||||
-0.00141978, -0.00142064, -0.00142117, -0.00142138,
|
||||
-0.00142125, -0.00142077, -0.00141992, -0.00141870,
|
||||
-0.00141710, -0.00141510, -0.00141268, -0.00140986,
|
||||
-0.00140663, -0.00140301, -0.00139900, -0.00139460,
|
||||
-0.00138981, -0.00138464, -0.00137908, -0.00137313,
|
||||
-0.00136680, -0.00136010, -0.00135301, -0.00134555,
|
||||
-0.00133772, -0.00132952, -0.00132095, -0.00131201,
|
||||
-0.00130272, -0.00129307, -0.00128309, -0.00127277,
|
||||
-0.00126211, -0.00125113, -0.00123981, -0.00122817,
|
||||
-0.00121622, -0.00120397, -0.00119141, -0.00117859,
|
||||
-0.00116552, -0.00115223, -0.00113877, -0.00112517,
|
||||
-0.00111144, -0.00109764, -0.00108377, -0.00106989,
|
||||
};
|
||||
|
@@ -45,16 +45,13 @@
|
||||
* @{
|
||||
*/
|
||||
DECLARE_ALIGNED(32, extern float, ff_aac_kbd_long_1024)[1024];
|
||||
DECLARE_ALIGNED(32, extern float, ff_aac_kbd_long_512 )[512];
|
||||
DECLARE_ALIGNED(32, extern float, ff_aac_kbd_short_128)[128];
|
||||
const DECLARE_ALIGNED(32, extern float, ff_aac_eld_window)[1920];
|
||||
// @}
|
||||
|
||||
/* @name number of scalefactor window bands for long and short transform windows respectively
|
||||
* @{
|
||||
*/
|
||||
extern const uint8_t ff_aac_num_swb_1024[];
|
||||
extern const uint8_t ff_aac_num_swb_512 [];
|
||||
extern const uint8_t ff_aac_num_swb_128 [];
|
||||
// @}
|
||||
|
||||
@@ -72,7 +69,6 @@ extern const float *ff_aac_codebook_vector_vals[];
|
||||
extern const uint16_t *ff_aac_codebook_vector_idx[];
|
||||
|
||||
extern const uint16_t * const ff_swb_offset_1024[13];
|
||||
extern const uint16_t * const ff_swb_offset_512 [13];
|
||||
extern const uint16_t * const ff_swb_offset_128 [13];
|
||||
|
||||
extern const uint8_t ff_tns_max_bands_1024[13];
|
||||
|
@@ -107,9 +107,11 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
switch (compr) {
|
||||
case 0:
|
||||
stride = (avctx->width * psize + psize) & ~psize;
|
||||
if (buf_size < stride * avctx->height)
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (i = avctx->height - 1; i >= 0; i--) {
|
||||
if (avctx->width * psize > buf_size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Next line is beyond buffer bounds\n");
|
||||
break;
|
||||
}
|
||||
memcpy(s->frame->data[0] + i * s->frame->linesize[0], buf, avctx->width * psize);
|
||||
buf += stride;
|
||||
buf_size -= stride;
|
||||
@@ -151,7 +153,6 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ff_aasc_decoder = {
|
||||
.name = "aasc",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_AASC,
|
||||
.priv_data_size = sizeof(AascContext),
|
||||
@@ -159,4 +160,5 @@ AVCodec ff_aasc_decoder = {
|
||||
.close = aasc_decode_end,
|
||||
.decode = aasc_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
||||
};
|
||||
|
@@ -290,7 +290,7 @@ static int parse_frame_header(AC3DecodeContext *s)
|
||||
return ff_eac3_parse_header(s);
|
||||
} else {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "E-AC-3 support not compiled in\n");
|
||||
return AVERROR(ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ static void ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, ma
|
||||
int end_freq = s->end_freq[ch_index];
|
||||
uint8_t *baps = s->bap[ch_index];
|
||||
int8_t *exps = s->dexps[ch_index];
|
||||
int32_t *coeffs = s->fixed_coeffs[ch_index];
|
||||
int32_t *coeffs = s->fixed_coeffs[ch_index];
|
||||
int dither = (ch_index == CPL_CH) || s->dither_flag[ch_index];
|
||||
GetBitContext *gbc = &s->gbc;
|
||||
int freq;
|
||||
@@ -488,10 +488,6 @@ static void ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, ma
|
||||
break;
|
||||
default: /* 6 to 15 */
|
||||
/* Shift mantissa and sign-extend it. */
|
||||
if (bap > 15) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "bap %d is invalid in plain AC-3\n", bap);
|
||||
bap = 15;
|
||||
}
|
||||
mantissa = get_sbits(gbc, quantization_tab[bap]);
|
||||
mantissa <<= 24 - quantization_tab[bap];
|
||||
break;
|
||||
@@ -790,12 +786,12 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
if (start_subband >= end_subband) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "invalid spectral extension "
|
||||
"range (%d >= %d)\n", start_subband, end_subband);
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
if (dst_start_freq >= src_start_freq) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "invalid spectral extension "
|
||||
"copy start bin (%d >= %d)\n", dst_start_freq, src_start_freq);
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
|
||||
s->spx_dst_start_freq = dst_start_freq;
|
||||
@@ -872,7 +868,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
|
||||
if (channel_mode < AC3_CHMODE_STEREO) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "coupling not allowed in mono or dual-mono\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* check for enhanced coupling */
|
||||
@@ -902,7 +898,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
if (cpl_start_subband >= cpl_end_subband) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d >= %d)\n",
|
||||
cpl_start_subband, cpl_end_subband);
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
s->start_freq[CPL_CH] = cpl_start_subband * 12 + 37;
|
||||
s->end_freq[CPL_CH] = cpl_end_subband * 12 + 37;
|
||||
@@ -924,7 +920,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
if (!blk) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must "
|
||||
"be present in block 0\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
} else {
|
||||
s->cpl_in_use[blk] = s->cpl_in_use[blk-1];
|
||||
}
|
||||
@@ -954,7 +950,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
} else if (!blk) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "new coupling coordinates must "
|
||||
"be present in block 0\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
/* channel not in coupling */
|
||||
@@ -1009,7 +1005,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
int bandwidth_code = get_bits(gbc, 6);
|
||||
if (bandwidth_code > 60) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "bandwidth code = %d > 60\n", bandwidth_code);
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
s->end_freq[ch] = bandwidth_code * 3 + 73;
|
||||
}
|
||||
@@ -1032,7 +1028,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
s->num_exp_groups[ch], s->dexps[ch][0],
|
||||
&s->dexps[ch][s->start_freq[ch]+!!ch])) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "exponent out-of-range\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
if (ch != CPL_CH && ch != s->lfe_ch)
|
||||
skip_bits(gbc, 2); /* skip gainrng */
|
||||
@@ -1052,7 +1048,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
} else if (!blk) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "new bit allocation info must "
|
||||
"be present in block 0\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1083,7 +1079,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
}
|
||||
} else if (!s->eac3 && !blk) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "new snr offsets must be present in block 0\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1122,7 +1118,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
} else if (!s->eac3 && !blk) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "new coupling leak info must "
|
||||
"be present in block 0\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
s->first_cpl_leak = 0;
|
||||
}
|
||||
@@ -1134,7 +1130,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
s->dba_mode[ch] = get_bits(gbc, 2);
|
||||
if (s->dba_mode[ch] == DBA_RESERVED) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "delta bit allocation strategy reserved\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2);
|
||||
}
|
||||
@@ -1175,7 +1171,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
||||
s->dba_offsets[ch], s->dba_lengths[ch],
|
||||
s->dba_values[ch], s->mask[ch])) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "error in bit allocation\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (bit_alloc_stages[ch] > 0) {
|
||||
@@ -1295,7 +1291,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
|
||||
switch (err) {
|
||||
case AAC_AC3_PARSE_ERROR_SYNC:
|
||||
av_log(avctx, AV_LOG_ERROR, "frame sync error\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
return -1;
|
||||
case AAC_AC3_PARSE_ERROR_BSID:
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid bitstream id\n");
|
||||
break;
|
||||
@@ -1309,20 +1305,17 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
|
||||
/* skip frame if CRC is ok. otherwise use error concealment. */
|
||||
/* TODO: add support for substreams and dependent frames */
|
||||
if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT || s->substreamid) {
|
||||
av_log(avctx, AV_LOG_WARNING, "unsupported frame type : "
|
||||
av_log(avctx, AV_LOG_ERROR, "unsupported frame type : "
|
||||
"skipping frame\n");
|
||||
*got_frame_ptr = 0;
|
||||
return buf_size;
|
||||
return s->frame_size;
|
||||
} else {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid frame type\n");
|
||||
}
|
||||
break;
|
||||
case AAC_AC3_PARSE_ERROR_CRC:
|
||||
case AAC_AC3_PARSE_ERROR_CHANNEL_CFG:
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid header\n");
|
||||
break;
|
||||
default: // Normal AVERROR do not try to recover.
|
||||
*got_frame_ptr = 0;
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
/* check that reported frame size fits in input buffer */
|
||||
@@ -1381,7 +1374,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
|
||||
avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
|
||||
|
||||
/* get output buffer */
|
||||
frame->nb_samples = s->num_blocks * AC3_BLOCK_SIZE;
|
||||
frame->nb_samples = s->num_blocks * 256;
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
@@ -1402,7 +1395,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
|
||||
}
|
||||
if (err)
|
||||
for (ch = 0; ch < s->out_channels; ch++)
|
||||
memcpy(((float*)frame->data[ch]) + AC3_BLOCK_SIZE*blk, output[ch], sizeof(**output) * AC3_BLOCK_SIZE);
|
||||
memcpy(((float*)frame->data[ch]) + AC3_BLOCK_SIZE*blk, output[ch], 1024);
|
||||
for (ch = 0; ch < s->out_channels; ch++)
|
||||
output[ch] = s->outptr[channel_map[ch]];
|
||||
for (ch = 0; ch < s->out_channels; ch++) {
|
||||
@@ -1415,7 +1408,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
|
||||
|
||||
/* keep last block for error concealment in next frame */
|
||||
for (ch = 0; ch < s->out_channels; ch++)
|
||||
memcpy(s->output[ch], output[ch], sizeof(**output) * AC3_BLOCK_SIZE);
|
||||
memcpy(s->output[ch], output[ch], 1024);
|
||||
|
||||
*got_frame_ptr = 1;
|
||||
|
||||
@@ -1457,7 +1450,6 @@ static const AVClass ac3_decoder_class = {
|
||||
|
||||
AVCodec ff_ac3_decoder = {
|
||||
.name = "ac3",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_AC3,
|
||||
.priv_data_size = sizeof (AC3DecodeContext),
|
||||
@@ -1465,6 +1457,7 @@ AVCodec ff_ac3_decoder = {
|
||||
.close = ac3_decode_end,
|
||||
.decode = ac3_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.priv_class = &ac3_decoder_class,
|
||||
@@ -1480,7 +1473,6 @@ static const AVClass eac3_decoder_class = {
|
||||
|
||||
AVCodec ff_eac3_decoder = {
|
||||
.name = "eac3",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_EAC3,
|
||||
.priv_data_size = sizeof (AC3DecodeContext),
|
||||
@@ -1488,6 +1480,7 @@ AVCodec ff_eac3_decoder = {
|
||||
.close = ac3_decode_end,
|
||||
.decode = ac3_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.priv_class = &eac3_decoder_class,
|
||||
|
@@ -3,20 +3,20 @@
|
||||
* Copyright (c) 2000 Fabrice Bellard
|
||||
* Copyright (c) 2006-2010 Justin Ruggles <justin.ruggles@gmail.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
@@ -154,7 +154,6 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ff_ac3_fixed_encoder = {
|
||||
.name = "ac3_fixed",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_AC3,
|
||||
.priv_data_size = sizeof(AC3EncodeContext),
|
||||
@@ -163,6 +162,7 @@ AVCodec ff_ac3_fixed_encoder = {
|
||||
.close = ff_ac3_encode_close,
|
||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16P,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||
.priv_class = &ac3enc_class,
|
||||
.channel_layouts = ff_ac3_channel_layouts,
|
||||
.defaults = ac3_defaults,
|
||||
|
@@ -152,7 +152,6 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
|
||||
#if CONFIG_AC3_ENCODER
|
||||
AVCodec ff_ac3_encoder = {
|
||||
.name = "ac3",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_AC3,
|
||||
.priv_data_size = sizeof(AC3EncodeContext),
|
||||
@@ -161,6 +160,7 @@ AVCodec ff_ac3_encoder = {
|
||||
.close = ff_ac3_encode_close,
|
||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||
.priv_class = &ac3enc_class,
|
||||
.channel_layouts = ff_ac3_channel_layouts,
|
||||
.defaults = ac3_defaults,
|
||||
|
@@ -2,20 +2,20 @@
|
||||
* AC-3 encoder options
|
||||
* Copyright (c) 2011 Justin Ruggles <justin.ruggles@gmail.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
@@ -361,7 +361,7 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
|
||||
}
|
||||
|
||||
for (bnd = 0; bnd < block->num_rematrixing_bands; bnd++) {
|
||||
/* calculate sum of squared coeffs for one band in one block */
|
||||
/* calculate calculate sum of squared coeffs for one band in one block */
|
||||
int start = ff_ac3_rematrix_band_tab[bnd];
|
||||
int end = FFMIN(nb_coefs, ff_ac3_rematrix_band_tab[bnd+1]);
|
||||
CoefSumType sum[4];
|
||||
|
@@ -114,7 +114,7 @@ const uint8_t ff_ac3_enc_channel_map[8][2][6] = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Table to remap channels from AC-3 order to SMPTE order.
|
||||
* Table to remap channels from from AC-3 order to SMPTE order.
|
||||
* [channel_mode][lfe][ch]
|
||||
*/
|
||||
const uint8_t ff_ac3_dec_channel_map[8][2][6] = {
|
||||
|
@@ -114,10 +114,10 @@ const float ff_b60_sinc[61] = {
|
||||
0.898529 , 0.865051 , 0.769257 , 0.624054 , 0.448639 , 0.265289 ,
|
||||
0.0959167 , -0.0412598 , -0.134338 , -0.178986 , -0.178528 , -0.142609 ,
|
||||
-0.0849304 , -0.0205078 , 0.0369568 , 0.0773926 , 0.0955200 , 0.0912781 ,
|
||||
0.0689392 , 0.0357056 , 0.0 , -0.0305481 , -0.0504150 , -0.0570068 ,
|
||||
0.0689392 , 0.0357056 , 0. , -0.0305481 , -0.0504150 , -0.0570068 ,
|
||||
-0.0508423 , -0.0350037 , -0.0141602 , 0.00665283, 0.0230713 , 0.0323486 ,
|
||||
0.0335388 , 0.0275879 , 0.0167847 , 0.00411987, -0.00747681, -0.0156860 ,
|
||||
-0.0193481 , -0.0183716 , -0.0137634 , -0.00704956, 0.0 , 0.00582886 ,
|
||||
-0.0193481 , -0.0183716 , -0.0137634 , -0.00704956, 0. , 0.00582886 ,
|
||||
0.00939941, 0.0103760 , 0.00903320, 0.00604248, 0.00238037, -0.00109863 ,
|
||||
-0.00366211, -0.00497437, -0.00503540, -0.00402832, -0.00241089, -0.000579834,
|
||||
0.00103760, 0.00222778, 0.00277710, 0.00271606, 0.00213623, 0.00115967 ,
|
||||
|
@@ -1532,13 +1532,13 @@ static const enum AVSampleFormat sample_fmts_both[] = { AV_SAMPLE_FMT_S16,
|
||||
#define ADPCM_DECODER(id_, sample_fmts_, name_, long_name_) \
|
||||
AVCodec ff_ ## name_ ## _decoder = { \
|
||||
.name = #name_, \
|
||||
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
||||
.type = AVMEDIA_TYPE_AUDIO, \
|
||||
.id = id_, \
|
||||
.priv_data_size = sizeof(ADPCMDecodeContext), \
|
||||
.init = adpcm_decode_init, \
|
||||
.decode = adpcm_decode_frame, \
|
||||
.capabilities = CODEC_CAP_DR1, \
|
||||
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
||||
.sample_fmts = sample_fmts_, \
|
||||
}
|
||||
|
||||
|
@@ -708,7 +708,6 @@ static const enum AVSampleFormat sample_fmts_p[] = {
|
||||
#define ADPCM_ENCODER(id_, name_, sample_fmts_, long_name_) \
|
||||
AVCodec ff_ ## name_ ## _encoder = { \
|
||||
.name = #name_, \
|
||||
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
||||
.type = AVMEDIA_TYPE_AUDIO, \
|
||||
.id = id_, \
|
||||
.priv_data_size = sizeof(ADPCMEncodeContext), \
|
||||
@@ -716,6 +715,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
|
||||
.encode2 = adpcm_encode_frame, \
|
||||
.close = adpcm_encode_close, \
|
||||
.sample_fmts = sample_fmts_, \
|
||||
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
||||
}
|
||||
|
||||
ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, sample_fmts_p, "ADPCM IMA QuickTime");
|
||||
|
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Justin Ruggles
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Justin Ruggles
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
* This file is part of Libav.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* Libav 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,
|
||||
* Libav 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
|
||||
* License along with Libav; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
@@ -174,7 +174,6 @@ static void adx_decode_flush(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ff_adpcm_adx_decoder = {
|
||||
.name = "adpcm_adx",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_ADPCM_ADX,
|
||||
.priv_data_size = sizeof(ADXContext),
|
||||
@@ -182,6 +181,7 @@ AVCodec ff_adpcm_adx_decoder = {
|
||||
.decode = adx_decode_frame,
|
||||
.flush = adx_decode_flush,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
};
|
||||
|
@@ -158,7 +158,6 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
|
||||
AVCodec ff_adpcm_adx_encoder = {
|
||||
.name = "adpcm_adx",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_ADPCM_ADX,
|
||||
.priv_data_size = sizeof(ADXContext),
|
||||
@@ -166,4 +165,5 @@ AVCodec ff_adpcm_adx_encoder = {
|
||||
.encode2 = adx_encode_frame,
|
||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||
};
|
||||
|
@@ -470,7 +470,6 @@ static av_cold int aic_decode_close(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ff_aic_decoder = {
|
||||
.name = "aic",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_AIC,
|
||||
.priv_data_size = sizeof(AICContext),
|
||||
@@ -478,4 +477,5 @@ AVCodec ff_aic_decoder = {
|
||||
.close = aic_decode_close,
|
||||
.decode = aic_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec")
|
||||
};
|
||||
|
@@ -320,9 +320,6 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
|
||||
rice_history_mult[ch] = get_bits(&alac->gb, 3);
|
||||
lpc_order[ch] = get_bits(&alac->gb, 5);
|
||||
|
||||
if (lpc_order[ch] >= alac->max_samples_per_frame)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
/* read the predictor table */
|
||||
for (i = lpc_order[ch] - 1; i >= 0; i--)
|
||||
lpc_coefs[ch][i] = get_sbits(&alac->gb, 16);
|
||||
@@ -466,8 +463,9 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
channels = (element == TYPE_CPE) ? 2 : 1;
|
||||
if (ch + channels > alac->channels ||
|
||||
ff_alac_channel_layout_offsets[alac->channels - 1][ch] + channels > alac->channels) {
|
||||
if ( ch + channels > alac->channels
|
||||
|| ff_alac_channel_layout_offsets[alac->channels - 1][ch] + channels > alac->channels
|
||||
) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid element channel count\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -490,8 +488,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
|
||||
avpkt->size * 8 - get_bits_count(&alac->gb));
|
||||
}
|
||||
|
||||
if (alac->channels == ch)
|
||||
*got_frame_ptr = 1;
|
||||
*got_frame_ptr = 1;
|
||||
|
||||
return avpkt->size;
|
||||
}
|
||||
@@ -514,7 +511,11 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
|
||||
static int allocate_buffers(ALACContext *alac)
|
||||
{
|
||||
int ch;
|
||||
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
|
||||
int buf_size;
|
||||
|
||||
if (alac->max_samples_per_frame > INT_MAX / sizeof(int32_t))
|
||||
goto buf_alloc_fail;
|
||||
buf_size = alac->max_samples_per_frame * sizeof(int32_t);
|
||||
|
||||
for (ch = 0; ch < FFMIN(alac->channels, 2); ch++) {
|
||||
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
|
||||
@@ -545,8 +546,7 @@ static int alac_set_info(ALACContext *alac)
|
||||
bytestream2_skipu(&gb, 12); // size:4, alac:4, version:4
|
||||
|
||||
alac->max_samples_per_frame = bytestream2_get_be32u(&gb);
|
||||
if (!alac->max_samples_per_frame ||
|
||||
alac->max_samples_per_frame > INT_MAX / sizeof(int32_t)) {
|
||||
if (!alac->max_samples_per_frame || alac->max_samples_per_frame > INT_MAX) {
|
||||
av_log(alac->avctx, AV_LOG_ERROR, "max samples per frame invalid: %u\n",
|
||||
alac->max_samples_per_frame);
|
||||
return AVERROR_INVALIDDATA;
|
||||
@@ -627,7 +627,6 @@ static int init_thread_copy(AVCodecContext *avctx)
|
||||
|
||||
AVCodec ff_alac_decoder = {
|
||||
.name = "alac",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
.id = AV_CODEC_ID_ALAC,
|
||||
.priv_data_size = sizeof(ALACContext),
|
||||
@@ -636,4 +635,5 @@ AVCodec ff_alac_decoder = {
|
||||
.decode = alac_decode_frame,
|
||||
.init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
|
||||
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user