summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-22 22:10:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-22 22:18:18 +0200
commit9023de342f88e961a3741753aff68925eebf884e (patch)
treec45518b146273fb14210f02cd41fa2c52624e39d
parent4f4eb380f0f96dbb7cdd2b812fa92b8b47a0f27c (diff)
parent1470ce21cec5ee26e106e2a884c26bbf84e5aaea (diff)
Merge commit '1470ce21cec5ee26e106e2a884c26bbf84e5aaea'
* commit '1470ce21cec5ee26e106e2a884c26bbf84e5aaea': Bump libavcodec and libavformat minor versions for G.723.1 decoder and demuxer G.723.1 demuxer and decoder Add a shift parameter to celp_lp_synthesis_filter() libopenjpeg: K&R formatting cosmetics yadif: use emms_c() instead of inline assembly for emms invocations. ac3: don't use different names for option tables in the template file. lavfi: use const for AVFilterPad declarations in all filters. adpcm: don't duplicate identical AVSampleFmt array for each encoder. configure: cosmetics: Group test dependencies together configure: add more passthrough flags in tms470 filter configure: move flag filtering functions out of if/else blocks Conflicts: Changelog configure doc/general.texi libavcodec/Makefile libavcodec/ac3enc_fixed.c libavcodec/allcodecs.c libavcodec/eac3enc.c libavcodec/g723_1.c libavcodec/g723_1_data.h libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/v210dec.h libavcodec/version.h libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_settb.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_boxblur.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_format.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hflip.c libavfilter/vf_hqdn3d.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_pixdesctest.c libavfilter/vf_scale.c libavfilter/vf_select.c libavfilter/vf_setpts.c libavfilter/vf_showinfo.c libavfilter/vf_slicify.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/vsrc_color.c libavfilter/vsrc_testsrc.c libavformat/Makefile libavformat/allformats.c libavformat/g723_1.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure168
-rw-r--r--libavcodec/ac3enc_fixed.c2
-rw-r--r--libavcodec/ac3enc_opts_template.c6
-rw-r--r--libavcodec/adpcmenc.c6
-rw-r--r--libavcodec/eac3enc.c2
-rw-r--r--libavcodec/g723_1.c91
-rw-r--r--libavcodec/g723_1_data.h22
-rw-r--r--libavcodec/libopenjpegdec.c97
-rw-r--r--libavcodec/libopenjpegenc.c36
-rw-r--r--libavcodec/version.h2
-rw-r--r--libavfilter/af_aformat.c12
-rw-r--r--libavfilter/af_anull.c14
-rw-r--r--libavfilter/af_channelmap.c16
-rw-r--r--libavfilter/asrc_anullsrc.c8
-rw-r--r--libavfilter/buffersink.c28
-rw-r--r--libavfilter/buffersrc.c28
-rw-r--r--libavfilter/fifo.c44
-rw-r--r--libavfilter/split.c16
-rw-r--r--libavfilter/src_movie.c10
-rw-r--r--libavfilter/vf_aspect.c44
-rw-r--r--libavfilter/vf_blackframe.c14
-rw-r--r--libavfilter/vf_boxblur.c20
-rw-r--r--libavfilter/vf_copy.c20
-rw-r--r--libavfilter/vf_crop.c24
-rw-r--r--libavfilter/vf_cropdetect.c22
-rw-r--r--libavfilter/vf_delogo.c24
-rw-r--r--libavfilter/vf_drawbox.c26
-rw-r--r--libavfilter/vf_drawtext.c28
-rw-r--r--libavfilter/vf_fade.c26
-rw-r--r--libavfilter/vf_fieldorder.c26
-rw-r--r--libavfilter/vf_format.c40
-rw-r--r--libavfilter/vf_fps.c22
-rw-r--r--libavfilter/vf_frei0r.c32
-rw-r--r--libavfilter/vf_gradfun.c22
-rw-r--r--libavfilter/vf_hflip.c20
-rw-r--r--libavfilter/vf_hqdn3d.c20
-rw-r--r--libavfilter/vf_libopencv.c20
-rw-r--r--libavfilter/vf_lut.c24
-rw-r--r--libavfilter/vf_null.c18
-rw-r--r--libavfilter/vf_overlay.c46
-rw-r--r--libavfilter/vf_pad.c24
-rw-r--r--libavfilter/vf_pixdesctest.c22
-rw-r--r--libavfilter/vf_scale.c20
-rw-r--r--libavfilter/vf_select.c26
-rw-r--r--libavfilter/vf_setpts.c18
-rw-r--r--libavfilter/vf_showinfo.c20
-rw-r--r--libavfilter/vf_slicify.c22
-rw-r--r--libavfilter/vf_transpose.c22
-rw-r--r--libavfilter/vf_unsharp.c22
-rw-r--r--libavfilter/vf_vflip.c20
-rw-r--r--libavfilter/vf_yadif.c35
-rw-r--r--libavfilter/vsrc_color.c10
-rw-r--r--libavfilter/vsrc_testsrc.c16
-rw-r--r--libavformat/g723_1.c17
-rw-r--r--libavformat/version.h2
55 files changed, 732 insertions, 710 deletions
diff --git a/configure b/configure
index 31c13d1004..293298855a 100755
--- a/configure
+++ b/configure
@@ -1810,6 +1810,20 @@ ffserver_extralibs='$ldl'
doc_deps_any="texi2html makeinfo pod2man"
# tests
+colormatrix1_test_deps="colormatrix_filter"
+colormatrix2_test_deps="colormatrix_filter"
+flashsv2_test_deps="zlib"
+mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
+mpng_test_deps="zlib"
+pp_test_deps="mp_filter"
+pp2_test_deps="mp_filter"
+pp3_test_deps="mp_filter"
+pp4_test_deps="mp_filter"
+pp5_test_deps="mp_filter"
+pp6_test_deps="mp_filter"
+seek_lavf_mxf_d10_test_deps="mxf_d10_test"
+zlib_test_deps="zlib"
+zmbv_test_deps="zlib"
test_deps(){
suf1=$1
@@ -1824,8 +1838,6 @@ test_deps(){
done
}
-seek_lavf_mxf_d10_test_deps="mxf_d10_test"
-
test_deps _muxer _demuxer \
aiff \
pcm_alaw=alaw \
@@ -1851,20 +1863,6 @@ test_deps _muxer _demuxer \
wav \
yuv4mpegpipe=yuv4mpeg \
-colormatrix1_test_deps="colormatrix_filter"
-colormatrix2_test_deps="colormatrix_filter"
-flashsv2_test_deps="zlib"
-mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
-mpng_test_deps="zlib"
-pp_test_deps="mp_filter"
-pp2_test_deps="mp_filter"
-pp3_test_deps="mp_filter"
-pp4_test_deps="mp_filter"
-pp5_test_deps="mp_filter"
-pp6_test_deps="mp_filter"
-zlib_test_deps="zlib"
-zmbv_test_deps="zlib"
-
# default parameters
logfile="config.log"
@@ -2238,6 +2236,78 @@ EOF
die "Sanity test failed."
fi
+pgi_flags(){
+ for flag; do
+ case $flag in
+ -fomit-frame-pointer) echo -Mnoframe ;;
+ -g) echo -gopt ;;
+ *) echo $flag ;;
+ esac
+ done
+}
+
+suncc_flags(){
+ for flag; do
+ case $flag in
+ -march=*|-mcpu=*)
+ case "${flag#*=}" in
+ native) echo -xtarget=native ;;
+ v9|niagara) echo -xarch=sparc ;;
+ ultrasparc) echo -xarch=sparcvis ;;
+ ultrasparc3|niagara2) echo -xarch=sparcvis2 ;;
+ i586|pentium) echo -xchip=pentium ;;
+ i686|pentiumpro|pentium2) echo -xtarget=pentium_pro ;;
+ pentium3*|c3-2) echo -xtarget=pentium3 ;;
+ pentium-m) echo -xarch=sse2 -xchip=pentium3 ;;
+ pentium4*) echo -xtarget=pentium4 ;;
+ prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;;
+ *-sse3) echo -xarch=sse3 ;;
+ core2) echo -xarch=ssse3 -xchip=core2 ;;
+ amdfam10|barcelona) echo -xarch=sse4_1 ;;
+ athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
+ k8|opteron|athlon64|athlon-fx)
+ echo -xarch=sse2a ;;
+ athlon*) echo -xarch=pentium_proa ;;
+ esac
+ ;;
+ -std=c99) echo -xc99 ;;
+ -fomit-frame-pointer) echo -xregs=frameptr ;;
+ -fPIC) echo -KPIC -xcode=pic32 ;;
+ -W*,*) echo $flag ;;
+ -f*-*|-W*) ;;
+ *) echo $flag ;;
+ esac
+ done
+}
+
+tms470_flags(){
+ for flag; do
+ case $flag in
+ -march=*|-mcpu=*)
+ case "${flag#*=}" in
+ armv7-a|cortex-a*) echo -mv=7a8 ;;
+ armv7-r|cortex-r*) echo -mv=7r4 ;;
+ armv7-m|cortex-m*) echo -mv=7m3 ;;
+ armv6*|arm11*) echo -mv=6 ;;
+ armv5*e|arm[79]*e*|arm9[24]6*|arm96*|arm102[26])
+ echo -mv=5e ;;
+ armv4*|arm7*|arm9[24]*) echo -mv=4 ;;
+ esac
+ ;;
+ -mfpu=neon) echo --float_support=vfpv3 --neon ;;
+ -mfpu=vfp) echo --float_support=vfpv2 ;;
+ -mfpu=vfpv3) echo --float_support=vfpv3 ;;
+ -msoft-float) echo --float_support=vfplib ;;
+ -O[0-3]|-mf=*) echo $flag ;;
+ -g) echo -g -mn ;;
+ -pds=*) echo $flag ;;
+ -D*|-I*) echo $flag ;;
+ --gcc|--abi=*) echo $flag ;;
+ -me) echo $flag ;;
+ esac
+ done
+}
+
if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
cc_type=llvm_gcc
gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
@@ -2313,30 +2383,6 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then
cflags_speed='-O3 -mf=5'
cflags_size='-O3 -mf=2'
cflags_filter=tms470_flags
- tms470_flags(){
- for flag; do
- case $flag in
- -march=*|-mcpu=*)
- case "${flag#*=}" in
- armv7-a|cortex-a*) echo -mv=7a8 ;;
- armv7-r|cortex-r*) echo -mv=7r4 ;;
- armv7-m|cortex-m*) echo -mv=7m3 ;;
- armv6*|arm11*) echo -mv=6 ;;
- armv5*e|arm[79]*e*|arm9[24]6*|arm96*|arm102[26])
- echo -mv=5e ;;
- armv4*|arm7*|arm9[24]*) echo -mv=4 ;;
- esac
- ;;
- -mfpu=neon) echo --float_support=vfpv3 --neon ;;
- -mfpu=vfp) echo --float_support=vfpv2 ;;
- -mfpu=vfpv3) echo --float_support=vfpv3 ;;
- -msoft-float) echo --float_support=vfplib ;;
- -O[0-3]|-mf=*) echo $flag ;;
- -g) echo -g -mn ;;
- -pds=*) echo $flag ;;
- esac
- done
- }
elif $cc -v 2>&1 | grep -q clang; then
cc_type=clang
cc_ident=$($cc --version | head -n1)
@@ -2353,39 +2399,6 @@ elif $cc -V 2>&1 | grep -q Sun; then
cflags_speed='-O5'
cflags_size='-O5 -xspace'
cflags_filter=suncc_flags
- suncc_flags(){
- for flag; do
- case $flag in
- -march=*|-mcpu=*)
- case "${flag#*=}" in
- native) echo -xtarget=native ;;
- v9|niagara) echo -xarch=sparc ;;
- ultrasparc) echo -xarch=sparcvis ;;
- ultrasparc3|niagara2) echo -xarch=sparcvis2 ;;
- i586|pentium) echo -xchip=pentium ;;
- i686|pentiumpro|pentium2) echo -xtarget=pentium_pro ;;
- pentium3*|c3-2) echo -xtarget=pentium3 ;;
- pentium-m) echo -xarch=sse2 -xchip=pentium3 ;;
- pentium4*) echo -xtarget=pentium4 ;;
- prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;;
- *-sse3) echo -xarch=sse3 ;;
- core2) echo -xarch=ssse3 -xchip=core2 ;;
- amdfam10|barcelona) echo -xarch=sse4_1 ;;
- athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
- k8|opteron|athlon64|athlon-fx)
- echo -xarch=sse2a ;;
- athlon*) echo -xarch=pentium_proa ;;
- esac
- ;;
- -std=c99) echo -xc99 ;;
- -fomit-frame-pointer) echo -xregs=frameptr ;;
- -fPIC) echo -KPIC -xcode=pic32 ;;
- -W*,*) echo $flag ;;
- -f*-*|-W*) ;;
- *) echo $flag ;;
- esac
- done
- }
elif $cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
cc_type=pathscale
cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :)
@@ -2410,15 +2423,6 @@ elif $cc -V 2>&1 | grep -q Portland; then
cflags_size="-O2 -Munroll=c:1 $opt_common"
cflags_noopt="-O1"
cflags_filter=pgi_flags
- pgi_flags(){
- for flag; do
- case $flag in
- -fomit-frame-pointer) echo -Mnoframe ;;
- -g) echo -gopt ;;
- *) echo $flag ;;
- esac
- done
- }
fi
test -n "$cc_type" && enable $cc_type ||
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 399b238800..8293ecd34d 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -38,7 +38,7 @@
static const AVClass ac3enc_class = {
.class_name = "Fixed-Point AC-3 Encoder",
.item_name = av_default_item_name,
- .option = ac3fixed_options,
+ .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT,
};
diff --git a/libavcodec/ac3enc_opts_template.c b/libavcodec/ac3enc_opts_template.c
index fa8984476e..1c67aa4164 100644
--- a/libavcodec/ac3enc_opts_template.c
+++ b/libavcodec/ac3enc_opts_template.c
@@ -23,13 +23,7 @@
#include "internal.h"
#include "ac3.h"
-#if AC3ENC_TYPE == AC3ENC_TYPE_AC3_FIXED
-static const AVOption ac3fixed_options[] = {
-#elif AC3ENC_TYPE == AC3ENC_TYPE_AC3
static const AVOption ac3_options[] = {
-#else /* AC3ENC_TYPE_EAC3 */
-static const AVOption eac3_options[] = {
-#endif
/* Metadata Options */
{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM},
#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 6dde9e71a7..4a0023231e 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -717,6 +717,9 @@ error:
return AVERROR(ENOMEM);
}
+static const enum AVSampleFormat sample_fmts[] = {
+ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
+};
#define ADPCM_ENCODER(id_, name_, long_name_) \
AVCodec ff_ ## name_ ## _encoder = { \
@@ -727,8 +730,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
.init = adpcm_encode_init, \
.encode2 = adpcm_encode_frame, \
.close = adpcm_encode_close, \
- .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \
- AV_SAMPLE_FMT_NONE }, \
+ .sample_fmts = sample_fmts, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
}
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index 9f4a6a78f0..e11b29c161 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -36,7 +36,7 @@
static const AVClass eac3enc_class = {
.class_name = "E-AC-3 Encoder",
.item_name = av_default_item_name,
- .option = eac3_options,
+ .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT,
};
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index ce3793dffe..8c5407e9d8 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -25,23 +25,27 @@
* G.723.1 compatible decoder
*/
-#include "avcodec.h"
#define BITSTREAM_READER_LE
+#include "libavutil/audioconvert.h"
+#include "libavutil/lzo.h"
+#include "libavutil/opt.h"
+#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "acelp_vectors.h"
#include "celp_filters.h"
#include "celp_math.h"
#include "lsp.h"
-#include "libavutil/lzo.h"
#include "g723_1_data.h"
typedef struct g723_1_context {
+ AVClass *class;
AVFrame frame;
+
G723_1_Subframe subframe[4];
- FrameType cur_frame_type;
- FrameType past_frame_type;
- Rate cur_rate;
+ enum FrameType cur_frame_type;
+ enum FrameType past_frame_type;
+ enum Rate cur_rate;
uint8_t lsp_index[LSP_BANDS];
int pitch_lag[2];
int erased_frames;
@@ -62,6 +66,7 @@ typedef struct g723_1_context {
int pf_gain; ///< formant postfilter
///< gain scaling unit memory
+ int postfilter;
int16_t prev_data[HALF_FRAME_LEN];
int16_t prev_weight_sig[PITCH_MAX];
@@ -80,11 +85,12 @@ static av_cold int g723_1_decode_init(AVCodecContext *avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
p->pf_gain = 1 << 12;
- memcpy(p->prev_lsp, dc_lsp, LPC_ORDER * sizeof(int16_t));
avcodec_get_frame_defaults(&p->frame);
avctx->coded_frame = &p->frame;
+ memcpy(p->prev_lsp, dc_lsp, LPC_ORDER * sizeof(*p->prev_lsp));
+
return 0;
}
@@ -108,7 +114,7 @@ static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf,
info_bits = get_bits(&gb, 2);
if (info_bits == 3) {
- p->cur_frame_type = UntransmittedFrame;
+ p->cur_frame_type = UNTRANSMITTED_FRAME;
return 0;
}
@@ -118,14 +124,14 @@ static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf,
p->lsp_index[0] = get_bits(&gb, 8);
if (info_bits == 2) {
- p->cur_frame_type = SIDFrame;
+ p->cur_frame_type = SID_FRAME;
p->subframe[0].amp_index = get_bits(&gb, 6);
return 0;
}
/* Extract the info common to both rates */
- p->cur_rate = info_bits ? Rate5k3 : Rate6k3;
- p->cur_frame_type = ActiveFrame;
+ p->cur_rate = info_bits ? RATE_5300 : RATE_6300;
+ p->cur_frame_type = ACTIVE_FRAME;
p->pitch_lag[0] = get_bits(&gb, 7);
if (p->pitch_lag[0] > 123) /* test if forbidden code */
@@ -146,9 +152,9 @@ static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf,
temp = get_bits(&gb, 12);
ad_cb_len = 170;
p->subframe[i].dirac_train = 0;
- if (p->cur_rate == Rate6k3 && p->pitch_lag[i >> 1] < SUBFRAME_LEN - 2) {
+ if (p->cur_rate == RATE_6300 && p->pitch_lag[i >> 1] < SUBFRAME_LEN - 2) {
p->subframe[i].dirac_train = temp >> 11;
- temp &= 0x7ff;
+ temp &= 0x7FF;
ad_cb_len = 85;
}
p->subframe[i].ad_cb_gain = FASTDIV(temp, GAIN_LEVELS);
@@ -165,7 +171,7 @@ static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf,
p->subframe[2].grid_index = get_bits1(&gb);
p->subframe[3].grid_index = get_bits1(&gb);
- if (p->cur_rate == Rate6k3) {
+ if (p->cur_rate == RATE_6300) {
skip_bits1(&gb); /* skip reserved bit */
/* Compute pulse_pos index using the 13-bit combined position index */
@@ -192,7 +198,7 @@ static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf,
p->subframe[1].pulse_sign = get_bits(&gb, 5);
p->subframe[2].pulse_sign = get_bits(&gb, 6);
p->subframe[3].pulse_sign = get_bits(&gb, 5);
- } else { /* Rate5k3 */
+ } else { /* 5300 bps */
p->subframe[0].pulse_pos = get_bits(&gb, 12);
p->subframe[1].pulse_pos = get_bits(&gb, 12);
p->subframe[2].pulse_pos = get_bits(&gb, 12);
@@ -333,7 +339,7 @@ static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
break;
}
if (!stable)
- memcpy(cur_lsp, prev_lsp, LPC_ORDER * sizeof(int16_t));
+ memcpy(cur_lsp, prev_lsp, LPC_ORDER * sizeof(*cur_lsp));
}
/**
@@ -432,7 +438,7 @@ static void lsp_interpolate(int16_t *lpc, int16_t *cur_lsp, int16_t *prev_lsp)
8192, 8192, 1 << 13, 14, LPC_ORDER);
ff_acelp_weighted_vector_sum(lpc + 2 * LPC_ORDER, cur_lsp, prev_lsp,
12288, 4096, 1 << 13, 14, LPC_ORDER);
- memcpy(lpc + 3 * LPC_ORDER, cur_lsp, LPC_ORDER * sizeof(int16_t));
+ memcpy(lpc + 3 * LPC_ORDER, cur_lsp, LPC_ORDER * sizeof(*lpc));
for (i = 0; i < SUBFRAMES; i++) {
lsp2lpc(lpc_ptr);
@@ -448,7 +454,7 @@ static void gen_dirac_train(int16_t *buf, int pitch_lag)
int16_t vector[SUBFRAME_LEN];
int i, j;
- memcpy(vector, buf, SUBFRAME_LEN * sizeof(int16_t));
+ memcpy(vector, buf, SUBFRAME_LEN * sizeof(*vector));
for (i = pitch_lag; i < SUBFRAME_LEN; i += pitch_lag) {
for (j = 0; j < SUBFRAME_LEN - i; j++)
buf[i + j] += vector[j];
@@ -465,13 +471,13 @@ static void gen_dirac_train(int16_t *buf, int pitch_lag)
* @param index current subframe index
*/
static void gen_fcb_excitation(int16_t *vector, G723_1_Subframe subfrm,
- Rate cur_rate, int pitch_lag, int index)
+ enum Rate cur_rate, int pitch_lag, int index)
{
int temp, i, j;
- memset(vector, 0, SUBFRAME_LEN * sizeof(int16_t));
+ memset(vector, 0, SUBFRAME_LEN * sizeof(*vector));
- if (cur_rate == Rate6k3) {
+ if (cur_rate == RATE_6300) {
if (subfrm.pulse_pos >= max_pos[index])
return;
@@ -495,7 +501,7 @@ static void gen_fcb_excitation(int16_t *vector, G723_1_Subframe subfrm,
}
if (subfrm.dirac_train == 1)
gen_dirac_train(vector, pitch_lag);
- } else { /* Rate5k3 */
+ } else { /* 5300 bps */
int cb_gain = fixed_cb_gain[subfrm.amp_index];
int cb_shift = subfrm.grid_index;
int cb_sign = subfrm.pulse_sign;
@@ -554,7 +560,7 @@ static void gen_acb_excitation(int16_t *vector, int16_t *prev_excitation,
get_residual(residual, prev_excitation, lag);
/* Select quantization table */
- if (cur_rate == Rate6k3 && pitch_lag < SUBFRAME_LEN - 2) {
+ if (cur_rate == RATE_6300 && pitch_lag < SUBFRAME_LEN - 2) {
cb_ptr = adaptive_cb_gain85;
} else
cb_ptr = adaptive_cb_gain170;
@@ -608,7 +614,7 @@ static int autocorr_max(G723_1_Context *p, int offset, int *ccr_max,
* @param ccr cross-correlation
* @param res_eng residual energy
*/
-static void comp_ppf_gains(int lag, PPFParam *ppf, Rate cur_rate,
+static void comp_ppf_gains(int lag, PPFParam *ppf, enum Rate cur_rate,
int tgt_eng, int ccr, int res_eng)
{
int pf_residual; /* square of postfiltered residual */
@@ -657,7 +663,7 @@ static void comp_ppf_gains(int lag, PPFParam *ppf, Rate cur_rate,
* @param cur_rate current bitrate
*/
static void comp_ppf_coeff(G723_1_Context *p, int offset, int pitch_lag,
- PPFParam *ppf, Rate cur_rate)
+ PPFParam *ppf, enum Rate cur_rate)
{
int16_t scale;
@@ -795,15 +801,15 @@ static void residual_interp(int16_t *buf, int16_t *out, int lag,
/* Attenuate */
for (i = 0; i < lag; i++)
vector_ptr[i - lag] = vector_ptr[i - lag] * 3 >> 2;
- av_memcpy_backptr((uint8_t*)vector_ptr, lag * sizeof(int16_t),
- FRAME_LEN * sizeof(int16_t));
- memcpy(out, vector_ptr, FRAME_LEN * sizeof(int16_t));
+ av_memcpy_backptr((uint8_t*)vector_ptr, lag * sizeof(*vector_ptr),
+ FRAME_LEN * sizeof(*vector_ptr));
+ memcpy(out, vector_ptr, FRAME_LEN * sizeof(*vector_ptr));
} else { /* Unvoiced */
for (i = 0; i < FRAME_LEN; i++) {
*rseed = *rseed * 521 + 259;
out[i] = gain * *rseed >> 15;
}
- memset(buf, 0, (FRAME_LEN + PITCH_MAX) * sizeof(int16_t));
+ memset(buf, 0, (FRAME_LEN + PITCH_MAX) * sizeof(*buf));
}
}
@@ -889,8 +895,8 @@ static void formant_postfilter(G723_1_Context *p, int16_t *lpc, int16_t *buf)
int filter_signal[LPC_ORDER + FRAME_LEN], *signal_ptr;
int i, j, k;
- memcpy(buf, p->fir_mem, LPC_ORDER * sizeof(int16_t));
- memcpy(filter_signal, p->iir_mem, LPC_ORDER * sizeof(int));
+ memcpy(buf, p->fir_mem, LPC_ORDER * sizeof(*buf));
+ memcpy(filter_signal, p->iir_mem, LPC_ORDER * sizeof(*filter_signal));
for (i = LPC_ORDER, j = 0; j < SUBFRAMES; i += SUBFRAME_LEN, j++) {
for (k = 0; k < LPC_ORDER; k++) {
@@ -977,8 +983,8 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
if (unpack_bitstream(p, buf, buf_size) < 0) {
bad_frame = 1;
- p->cur_frame_type = p->past_frame_type == ActiveFrame ?
- ActiveFrame : UntransmittedFrame;
+ p->cur_frame_type = p->past_frame_type == ACTIVE_FRAME ?
+ ACTIVE_FRAME : UNTRANSMITTED_FRAME;
}
p->frame.nb_samples = FRAME_LEN + LPC_ORDER;
@@ -989,20 +995,21 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
out= (int16_t*)p->frame.data[0];
- if(p->cur_frame_type == ActiveFrame) {
- if (!bad_frame) {
+ if(p->cur_frame_type == ACTIVE_FRAME) {
+ if (!bad_frame)
p->erased_frames = 0;
- } else if(p->erased_frames != 3)
+ else if(p->erased_frames != 3)
p->erased_frames++;
inverse_quant(cur_lsp, p->prev_lsp, p->lsp_index, bad_frame);
lsp_interpolate(lpc, cur_lsp, p->prev_lsp);
/* Save the lsp_vector for the next frame */
- memcpy(p->prev_lsp, cur_lsp, LPC_ORDER * sizeof(int16_t));
+ memcpy(p->prev_lsp, cur_lsp, LPC_ORDER * sizeof(*p->prev_lsp));
/* Generate the excitation for the frame */
- memcpy(p->excitation, p->prev_excitation, PITCH_MAX * sizeof(int16_t));
+ memcpy(p->excitation, p->prev_excitation,
+ PITCH_MAX * sizeof(*p->excitation));
vector_ptr = p->excitation + PITCH_MAX;
if (!p->erased_frames) {
/* Update interpolation gain memory */
@@ -1118,7 +1125,7 @@ static av_cold int g723_1_encode_init(AVCodecContext *avctx)
}
if (avctx->bit_rate == 6300) {
- p->cur_rate = Rate6k3;
+ p->cur_rate = RATE_6300;
} else if (avctx->bit_rate == 5300) {
av_log(avctx, AV_LOG_ERROR, "Bitrate not supported yet, use 6.3k\n");
return AVERROR_PATCHWELCOME;
@@ -2041,7 +2048,7 @@ static int pack_bitstream(G723_1_Context *p, unsigned char *frame, int size)
init_put_bits(&pb, frame, size);
- if (p->cur_rate == Rate6k3) {
+ if (p->cur_rate == RATE_6300) {
info_bits = 0;
put_bits(&pb, 2, info_bits);
}
@@ -2059,7 +2066,7 @@ static int pack_bitstream(G723_1_Context *p, unsigned char *frame, int size)
for (i = 0; i < SUBFRAMES; i++) {
temp = p->subframe[i].ad_cb_gain * GAIN_LEVELS +
p->subframe[i].amp_index;
- if (p->cur_rate == Rate6k3)
+ if (p->cur_rate == RATE_6300)
temp += p->subframe[i].dirac_train << 11;
put_bits(&pb, 12, temp);
}
@@ -2069,7 +2076,7 @@ static int pack_bitstream(G723_1_Context *p, unsigned char *frame, int size)
put_bits(&pb, 1, p->subframe[2].grid_index);
put_bits(&pb, 1, p->subframe[3].grid_index);
- if (p->cur_rate == Rate6k3) {
+ if (p->cur_rate == RATE_6300) {
skip_put_bits(&pb, 1); /* reserved bit */
/* Write 13 bit combined position index */
@@ -2192,7 +2199,7 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
/* Reconstruct the excitation */
gen_acb_excitation(impulse_resp, p->prev_excitation, p->pitch_lag[i >> 1],
- p->subframe[i], Rate6k3);
+ p->subframe[i], RATE_6300);
memmove(p->prev_excitation, p->prev_excitation + SUBFRAME_LEN,
sizeof(int16_t) * (PITCH_MAX - SUBFRAME_LEN));
diff --git a/libavcodec/g723_1_data.h b/libavcodec/g723_1_data.h
index 34221e3349..66a032490b 100644
--- a/libavcodec/g723_1_data.h
+++ b/libavcodec/g723_1_data.h
@@ -25,8 +25,8 @@
* G723.1 compatible decoder data tables
*/
-#ifndef AVCODEC_G729_DATA_H
-#define AVCODEC_G729_DATA_H
+#ifndef AVCODEC_G729_1_DATA_H
+#define AVCODEC_G729_1_DATA_H
#include <stdint.h>
@@ -49,23 +49,23 @@
/**
* G723.1 frame types
*/
-typedef enum {
- ActiveFrame, ///< Active speech
- SIDFrame, ///< Silence Insertion Descriptor frame
- UntransmittedFrame
+typedef enum FrameType {
+ ACTIVE_FRAME, ///< Active speech
+ SID_FRAME, ///< Silence Insertion Descriptor frame
+ UNTRANSMITTED_FRAME
} FrameType;
static const uint8_t frame_size[4] = {24, 20, 4, 1};
-typedef enum {
- Rate6k3,
- Rate5k3
+typedef enum Rate {
+ RATE_6300,
+ RATE_5300
} Rate;
/**
* G723.1 unpacked data subframe
*/
-typedef struct {
+typedef struct G723_1_Subframe {
int ad_cb_lag; ///< adaptive codebook lag
int ad_cb_gain;
int dirac_train;
@@ -1319,4 +1319,4 @@ static const int16_t percept_flt_tbl[2][LPC_ORDER] = {
{16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32}
};
-#endif /* AVCODEC_G729_DATA_H */
+#endif /* AVCODEC_G729_1_DATA_H */
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index e7a7d8d8d4..333955feb0 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -20,18 +20,19 @@
*/
/**
-* @file
-* JPEG 2000 decoder using libopenjpeg
-*/
+ * @file
+ * JPEG 2000 decoder using libopenjpeg
+ */
+
+#define OPJ_STATIC
+#include <openjpeg.h>
-#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
-#include "avcodec.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/opt.h"
+#include "avcodec.h"
#include "thread.h"
-#define OPJ_STATIC
-#include <openjpeg.h>
#define JP2_SIG_TYPE 0x6A502020
#define JP2_SIG_VALUE 0x0D0A870A
@@ -61,7 +62,8 @@ typedef struct {
int lowqual;
} LibOpenJPEGContext;
-static inline int libopenjpeg_matches_pix_fmt(const opj_image_t *image, enum PixelFormat pix_fmt){
+static inline int libopenjpeg_matches_pix_fmt(const opj_image_t *image, enum PixelFormat pix_fmt)
+{
AVPixFmtDescriptor descriptor = av_pix_fmt_descriptors[pix_fmt];
int match = 1;
@@ -129,7 +131,7 @@ static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) {
return 0;
component_plane = av_pix_fmt_descriptors[pix_fmt].comp[0].plane;
- for(i = 1; i < av_pix_fmt_descriptors[pix_fmt].nb_components; i++) {
+ for (i = 1; i < av_pix_fmt_descriptors[pix_fmt].nb_components; i++) {
if (component_plane != av_pix_fmt_descriptors[pix_fmt].comp[i].plane)
return 0;
}
@@ -139,11 +141,11 @@ static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) {
static inline void libopenjpeg_copy_to_packed8(AVFrame *picture, opj_image_t *image) {
uint8_t *img_ptr;
int index, x, y, c;
- for(y = 0; y < picture->height; y++) {
+ for (y = 0; y < picture->height; y++) {
index = y*picture->width;
img_ptr = picture->data[0] + y*picture->linesize[0];
- for(x = 0; x < picture->width; x++, index++) {
- for(c = 0; c < image->numcomps; c++) {
+ for (x = 0; x < picture->width; x++, index++) {
+ for (c = 0; c < image->numcomps; c++) {
*img_ptr++ = image->comps[c].data[index];
}
}
@@ -154,9 +156,9 @@ static inline void libopenjpeg_copy_to_packed16(AVFrame *picture, opj_image_t *i
uint16_t *img_ptr;
int index, x, y, c;
int adjust[4];
- for (x = 0; x < image->numcomps; x++) {
+ for (x = 0; x < image->numcomps; x++)
adjust[x] = FFMAX(FFMIN(16 - image->comps[x].prec, 8), 0);
- }
+
for (y = 0; y < picture->height; y++) {
index = y*picture->width;
img_ptr = (uint16_t*) (picture->data[0] + y*picture->linesize[0]);
@@ -173,11 +175,11 @@ static inline void libopenjpeg_copyto8(AVFrame *picture, opj_image_t *image) {
uint8_t *img_ptr;
int index, x, y;
- for(index = 0; index < image->numcomps; index++) {
+ for (index = 0; index < image->numcomps; index++) {
comp_data = image->comps[index].data;
- for(y = 0; y < image->comps[index].h; y++) {
+ for (y = 0; y < image->comps[index].h; y++) {
img_ptr = picture->data[index] + y * picture->linesize[index];
- for(x = 0; x < image->comps[index].w; x++) {
+ for (x = 0; x < image->comps[index].w; x++) {
*img_ptr = (uint8_t) *comp_data;
img_ptr++;
comp_data++;
@@ -190,11 +192,11 @@ static inline void libopenjpeg_copyto16(AVFrame *picture, opj_image_t *image) {
int *comp_data;
uint16_t *img_ptr;
int index, x, y;
- for(index = 0; index < image->numcomps; index++) {
+ for (index = 0; index < image->numcomps; index++) {
comp_data = image->comps[index].data;
- for(y = 0; y < image->comps[index].h; y++) {
+ for (y = 0; y < image->comps[index].h; y++) {
img_ptr = (uint16_t*) (picture->data[index] + y * picture->linesize[index]);
- for(x = 0; x < image->comps[index].w; x++) {
+ for (x = 0; x < image->comps[index].w; x++) {
*img_ptr = *comp_data;
img_ptr++;
comp_data++;
@@ -240,49 +242,55 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
*data_size = 0;
// Check if input is a raw jpeg2k codestream or in jp2 wrapping
- if((AV_RB32(buf) == 12) &&
- (AV_RB32(buf + 4) == JP2_SIG_TYPE) &&
- (AV_RB32(buf + 8) == JP2_SIG_VALUE)) {
+ if ((AV_RB32(buf) == 12) &&
+ (AV_RB32(buf + 4) == JP2_SIG_TYPE) &&
+ (AV_RB32(buf + 8) == JP2_SIG_VALUE)) {
dec = opj_create_decompress(CODEC_JP2);
} else {
- // If the AVPacket contains a jp2c box, then skip to
- // the starting byte of the codestream.
+ /* If the AVPacket contains a jp2c box, then skip to
+ * the starting byte of the codestream. */
if (AV_RB32(buf + 4) == AV_RB32("jp2c"))
buf += 8;
dec = opj_create_decompress(CODEC_J2K);
}
- if(!dec) {
+ if (!dec) {
av_log(avctx, AV_LOG_ERROR, "Error initializing decoder.\n");
return -1;
}
opj_set_event_mgr((opj_common_ptr)dec, NULL, NULL);
ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
- ctx->dec_params.cp_layer = ctx->lowqual;
+ ctx->dec_params.cp_layer = ctx->lowqual;
// Tie decoder with decoding parameters
opj_setup_decoder(dec, &ctx->dec_params);
stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size);
- if(!stream) {
- av_log(avctx, AV_LOG_ERROR, "Codestream could not be opened for reading.\n");
+
+ if (!stream) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Codestream could not be opened for reading.\n");
opj_destroy_decompress(dec);
return -1;
}
- // Decode the header only
+ // Decode the header only.
image = opj_decode_with_info(dec, stream, NULL);
opj_cio_close(stream);
- if(!image) {
+
+ if (!image) {
av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n");
opj_destroy_decompress(dec);
return -1;
}
+
width = image->x1 - image->x0;
height = image->y1 - image->y0;
- if(av_image_check_size(width, height, 0, avctx) < 0) {
- av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height);
+ if (av_image_check_size(width, height, 0, avctx) < 0) {
+ av_log(avctx, AV_LOG_ERROR,
+ "%dx%d dimension invalid.\n", width, height);
goto done;
}
+
avcodec_set_dimensions(avctx, width, height);
if (avctx->pix_fmt != PIX_FMT_NONE) {
@@ -303,29 +311,30 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
if (image->comps[i].prec > avctx->bits_per_raw_sample)
avctx->bits_per_raw_sample = image->comps[i].prec;
- if(picture->data[0])
+ if (picture->data[0])
ff_thread_release_buffer(avctx, picture);
- if(ff_thread_get_buffer(avctx, picture) < 0){
+ if (ff_thread_get_buffer(avctx, picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "ff_thread_get_buffer() failed\n");
goto done;
}
ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
ctx->dec_params.cp_reduce = avctx->lowres;
- // Tie decoder with decoding parameters
+ // Tie decoder with decoding parameters.
opj_setup_decoder(dec, &ctx->dec_params);
stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size);
- if(!stream) {
- av_log(avctx, AV_LOG_ERROR, "Codestream could not be opened for reading.\n");
+ if (!stream) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Codestream could not be opened for reading.\n");
goto done;
}
opj_image_destroy(image);
- // Decode the codestream
+ // Decode the codestream.
image = opj_decode_with_info(dec, stream, NULL);
opj_cio_close(stream);
- if(!image) {
+ if (!image) {
av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n");
goto done;
}
@@ -367,7 +376,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
*output = ctx->image;
*data_size = sizeof(AVPicture);
- ret = buf_size;
+ ret = buf_size;
done:
opj_image_destroy(image);
@@ -379,16 +388,16 @@ static av_cold int libopenjpeg_decode_close(AVCodecContext *avctx)
{
LibOpenJPEGContext *ctx = avctx->priv_data;
- if(ctx->image.data[0])
+ if (ctx->image.data[0])
ff_thread_release_buffer(avctx, &ctx->image);
- return 0 ;
+ return 0;
}
#define OFFSET(x) offsetof(LibOpenJPEGContext, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static const AVOption options[] = {
- { "lowqual", "Limit the number of layers used for decoding", OFFSET(lowqual), AV_OPT_TYPE_INT, { 0 }, 0, INT_MAX, VD },
+ { "lowqual", "Limit the number of layers used for decoding", OFFSET(lowqual), AV_OPT_TYPE_INT, { 0 }, 0, INT_MAX, VD },
{ NULL },
};
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index bd741df985..82d28665b5 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -20,18 +20,18 @@
*/
/**
-* @file
-* JPEG 2000 encoder using libopenjpeg
-*/
+ * @file
+ * JPEG 2000 encoder using libopenjpeg
+ */
#define OPJ_STATIC
#include <openjpeg.h>
-#include "libavutil/opt.h"
-#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
-#include "avcodec.h"
+#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/opt.h"
+#include "avcodec.h"
#include "internal.h"
typedef struct {
@@ -284,9 +284,8 @@ static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, const AVFrame *fram
for (y = 0; y < height; ++y) {
image_index = y * width;
frame_index = y * frame->linesize[compno];
- for (x = 0; x < width; ++x) {
+ for (x = 0; x < width; ++x)
image->comps[compno].data[image_index++] = frame->data[compno][frame_index++];
- }
}
}
@@ -319,9 +318,8 @@ static int libopenjpeg_copy_unpacked16(AVCodecContext *avctx, const AVFrame *fra
for (y = 0; y < height; ++y) {
image_index = y * width;
frame_index = y * (frame->linesize[compno] / 2);
- for (x = 0; x < width; ++x) {
+ for (x = 0; x < width; ++x)
image->comps[compno].data[image_index++] = frame_ptr[frame_index++];
- }
}
}
@@ -333,7 +331,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{
LibOpenJPEGContext *ctx = avctx->priv_data;
opj_cinfo_t *compress = ctx->compress;
- opj_image_t *image = ctx->image;
+ opj_image_t *image = ctx->image;
opj_cio_t *stream;
int cpyresult = 0;
int ret, len;
@@ -342,7 +340,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
// x1, y1 is the width, height of the reference grid
image->x0 = 0;
image->y0 = 0;
- image->x1 = (avctx->width - 1) * ctx->enc_params.subsampling_dx + 1;
+ image->x1 = (avctx->width - 1) * ctx->enc_params.subsampling_dx + 1;
image->y1 = (avctx->height - 1) * ctx->enc_params.subsampling_dy + 1;
switch (avctx->pix_fmt) {
@@ -432,7 +430,7 @@ static av_cold int libopenjpeg_encode_close(AVCodecContext *avctx)
opj_destroy_compress(ctx->compress);
opj_image_destroy(ctx->image);
av_freep(&avctx->coded_frame);
- return 0 ;
+ return 0;
}
#define OFFSET(x) offsetof(LibOpenJPEGContext, x)
@@ -456,11 +454,11 @@ static const AVOption options[] = {
{ "rpcl", NULL, 0, AV_OPT_TYPE_CONST, { RPCL }, 0, 0, VE, "prog_order" },
{ "pcrl", NULL, 0, AV_OPT_TYPE_CONST, { PCRL }, 0, 0, VE, "prog_order" },
{ "cprl", NULL, 0, AV_OPT_TYPE_CONST, { CPRL }, 0, 0, VE, "prog_order" },
- { "numresolution", NULL, OFFSET(numresolution), AV_OPT_TYPE_INT, { 6 }, 1, 10, VE },
- { "numlayers", NULL, OFFSET(numlayers), AV_OPT_TYPE_INT, { 1 }, 1, 10, VE },
- { "disto_alloc", NULL, OFFSET(disto_alloc), AV_OPT_TYPE_INT, { 1 }, 0, 1, VE },
- { "fixed_alloc", NULL, OFFSET(fixed_alloc), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
- { "fixed_quality", NULL, OFFSET(fixed_quality), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
+ { "numresolution", NULL, OFFSET(numresolution), AV_OPT_TYPE_INT, { 6 }, 1, 10, VE },
+ { "numlayers", NULL, OFFSET(numlayers), AV_OPT_TYPE_INT, { 1 }, 1, 10, VE },
+ { "disto_alloc", NULL, OFFSET(disto_alloc), AV_OPT_TYPE_INT, { 1 }, 0, 1, VE },
+ { "fixed_alloc", NULL, OFFSET(fixed_alloc), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
+ { "fixed_quality", NULL, OFFSET(fixed_quality), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
{ NULL },
};
@@ -480,7 +478,7 @@ AVCodec ff_libopenjpeg_encoder = {
.encode2 = libopenjpeg_encode_frame,
.close = libopenjpeg_encode_close,
.capabilities = 0,
- .pix_fmts = (const enum PixelFormat[]){
+ .pix_fmts = (const enum PixelFormat[]) {
PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_RGB48, PIX_FMT_RGBA64,
PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_GRAY16,
PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUVA420P,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 47e6ff938b..2e2d6979b3 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
*/
#define LIBAVCODEC_VERSION_MAJOR 54
-#define LIBAVCODEC_VERSION_MINOR 43
+#define LIBAVCODEC_VERSION_MINOR 44
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
index 59e41c0cfc..4e97942248 100644
--- a/libavfilter/af_aformat.c
+++ b/libavfilter/af_aformat.c
@@ -133,10 +133,10 @@ AVFilter avfilter_af_aformat = {
.query_formats = query_formats,
.priv_size = sizeof(AFormatContext),
- .inputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO, },
- { .name = NULL}},
- .outputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO},
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO},
+ { .name = NULL}},
};
diff --git a/libavfilter/af_anull.c b/libavfilter/af_anull.c
index f52db1e56d..0bf846d534 100644
--- a/libavfilter/af_anull.c
+++ b/libavfilter/af_anull.c
@@ -32,12 +32,12 @@ AVFilter avfilter_af_anull = {
.priv_size = 0,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .get_audio_buffer = ff_null_get_audio_buffer, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .get_audio_buffer = ff_null_get_audio_buffer, },
+ { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO, },
- { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 1c1837c3d4..9e2509c30e 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -392,12 +392,12 @@ AVFilter avfilter_af_channelmap = {
.query_formats = channelmap_query_formats,
.priv_size = sizeof(ChannelMapContext),
- .inputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .filter_samples = channelmap_filter_samples,
- .config_props = channelmap_config_input },
- { .name = NULL }},
- .outputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO },
- { .name = NULL }},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .filter_samples = channelmap_filter_samples,
+ .config_props = channelmap_config_input },
+ { .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO },
+ { .name = NULL }},
};
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 6541a394bd..3df542942b 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -127,8 +127,8 @@ AVFilter avfilter_asrc_anullsrc = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .config_props = config_props,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .type = AVMEDIA_TYPE_AUDIO,
+ .config_props = config_props,
+ .request_frame = request_frame, },
+ { .name = NULL}},
};
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 9e908adf6b..5e5e8e761d 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -149,13 +149,13 @@ AVFilter avfilter_vsink_buffer = {
.priv_size = sizeof(BufferSinkContext),
.uninit = uninit,
- .inputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .min_perms = AV_PERM_READ,
- .needs_fifo = 1 },
- { .name = NULL }},
- .outputs = (AVFilterPad[]) {{ .name = NULL }},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .min_perms = AV_PERM_READ,
+ .needs_fifo = 1 },
+ { .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = NULL }},
};
AVFilter avfilter_asink_abuffer = {
@@ -164,11 +164,11 @@ AVFilter avfilter_asink_abuffer = {
.priv_size = sizeof(BufferSinkContext),
.uninit = uninit,
- .inputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .filter_samples = filter_samples,
- .min_perms = AV_PERM_READ,
- .needs_fifo = 1 },
- { .name = NULL }},
- .outputs = (AVFilterPad[]) {{ .name = NULL }},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .filter_samples = filter_samples,
+ .min_perms = AV_PERM_READ,
+ .needs_fifo = 1 },
+ { .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = NULL }},
};
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index befefb8069..d60a1b8bb8 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -416,13 +416,13 @@ AVFilter avfilter_vsrc_buffer = {
.init = init_video,
.uninit = uninit,
- .inputs = (AVFilterPad[]) {{ .name = NULL }},
- .outputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = request_frame,
- .poll_frame = poll_frame,
- .config_props = config_props, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = request_frame,
+ .poll_frame = poll_frame,
+ .config_props = config_props, },
+ { .name = NULL}},
};
AVFilter avfilter_asrc_abuffer = {
@@ -434,11 +434,11 @@ AVFilter avfilter_asrc_abuffer = {
.init = init_audio,
.uninit = uninit,
- .inputs = (AVFilterPad[]) {{ .name = NULL }},
- .outputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .request_frame = request_frame,
- .poll_frame = poll_frame,
- .config_props = config_props, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .request_frame = request_frame,
+ .poll_frame = poll_frame,
+ .config_props = config_props, },
+ { .name = NULL}},
};
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index bb7f0fab85..df7962482e 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -269,18 +269,18 @@ AVFilter avfilter_vf_fifo = {
.priv_size = sizeof(FifoContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer= ff_null_get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame,
- .rej_perms = AV_PERM_REUSE2, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer= ff_null_get_video_buffer,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame,
+ .rej_perms = AV_PERM_REUSE2, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = request_frame, },
+ { .name = NULL}},
};
AVFilter avfilter_af_afifo = {
@@ -292,14 +292,14 @@ AVFilter avfilter_af_afifo = {
.priv_size = sizeof(FifoContext),
- .inputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .get_audio_buffer = ff_null_get_audio_buffer,
- .filter_samples = add_to_queue,
- .rej_perms = AV_PERM_REUSE2, },
- { .name = NULL}},
- .outputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .get_audio_buffer = ff_null_get_audio_buffer,
+ .filter_samples = add_to_queue,
+ .rej_perms = AV_PERM_REUSE2, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .request_frame = request_frame, },
+ { .name = NULL}},
};
diff --git a/libavfilter/split.c b/libavfilter/split.c
index c42a8abf8d..ce03a08275 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -98,14 +98,14 @@ AVFilter avfilter_vf_split = {
.init = split_init,
.uninit = split_uninit,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer= ff_null_get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame, },
- { .name = NULL}},
- .outputs = (AVFilterPad[]) {{ .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer= ff_null_get_video_buffer,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = NULL}},
};
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index b1d8fd31ad..ee68eca7d8 100644
--- a/libavfilter/src_movie.c
+++ b/libavfilter/src_movie.c
@@ -344,11 +344,11 @@ AVFilter avfilter_vsrc_movie = {
.query_formats = movie_query_formats,
.inputs = (const AVFilterPad[]) {{ .name = NULL }},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = movie_request_frame,
- .config_props = movie_config_output_props, },
- { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = movie_request_frame,
+ .config_props = movie_config_output_props, },
+ { .name = NULL}},
};
#endif /* CONFIG_MOVIE_FILTER */
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 6e639c1480..584ea9c96a 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -86,17 +86,17 @@ AVFilter avfilter_vf_setdar = {
.priv_size = sizeof(AspectContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = setdar_config_props,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = start_frame,
- .end_frame = ff_null_end_frame },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = setdar_config_props,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = start_frame,
+ .end_frame = ff_null_end_frame },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
#endif /* CONFIG_SETDAR_FILTER */
@@ -118,16 +118,16 @@ AVFilter avfilter_vf_setsar = {
.priv_size = sizeof(AspectContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = setsar_config_props,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = start_frame,
- .end_frame = ff_null_end_frame },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = setsar_config_props,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = start_frame,
+ .end_frame = ff_null_end_frame },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
#endif /* CONFIG_SETSAR_FILTER */
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c
index 2c842deeb7..7d0c2d6d51 100644
--- a/libavfilter/vf_blackframe.c
+++ b/libavfilter/vf_blackframe.c
@@ -126,13 +126,13 @@ AVFilter avfilter_vf_blackframe = {
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .draw_slice = draw_slice,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame_keep_ref,
- .end_frame = end_frame, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .draw_slice = draw_slice,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame_keep_ref,
+ .end_frame = end_frame, },
+ { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index 6e6949efb0..aee805ab1f 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -339,14 +339,14 @@ AVFilter avfilter_vf_boxblur = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c
index 111d315de6..399249283a 100644
--- a/libavfilter/vf_copy.c
+++ b/libavfilter/vf_copy.c
@@ -29,14 +29,14 @@ AVFilter avfilter_vf_copy = {
.name = "copy",
.description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .end_frame = ff_null_end_frame,
- .rej_perms = ~0 },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .end_frame = ff_null_end_frame,
+ .rej_perms = ~0 },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 18ad88f585..f9e17573a4 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -349,16 +349,16 @@ AVFilter avfilter_vf_crop = {
.init = init,
.uninit = uninit,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame,
- .get_video_buffer = ff_null_get_video_buffer,
- .config_props = config_input, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_output, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .config_props = config_input, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_output, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index 8ffbe70949..da2973223e 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -203,15 +203,15 @@ AVFilter avfilter_vf_cropdetect = {
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .end_frame = end_frame, },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .end_frame = end_frame, },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 35ceb35fd9..14158ed92d 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -264,16 +264,16 @@ AVFilter avfilter_vf_delogo = {
.init = init,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_WRITE | AV_PERM_READ,
- .rej_perms = AV_PERM_PRESERVE },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = start_frame,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_WRITE | AV_PERM_READ,
+ .rej_perms = AV_PERM_PRESERVE },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index c823b145aa..15f21fc961 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -130,17 +130,17 @@ AVFilter avfilter_vf_drawbox = {
.init = init,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .draw_slice = draw_slice,
- .end_frame = ff_null_end_frame,
- .min_perms = AV_PERM_WRITE | AV_PERM_READ,
- .rej_perms = AV_PERM_PRESERVE },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = ff_null_end_frame,
+ .min_perms = AV_PERM_WRITE | AV_PERM_READ,
+ .rej_perms = AV_PERM_PRESERVE },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index dbdcd39629..43e2b463f9 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -813,19 +813,19 @@ AVFilter avfilter_vf_drawtext = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .config_props = config_input,
- .min_perms = AV_PERM_WRITE |
- AV_PERM_READ,
- .rej_perms = AV_PERM_PRESERVE },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .config_props = config_input,
+ .min_perms = AV_PERM_WRITE |
+ AV_PERM_READ,
+ .rej_perms = AV_PERM_PRESERVE },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
.process_command = command,
};
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 0103ca290f..ecec1bc735 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -279,17 +279,17 @@ AVFilter avfilter_vf_fade = {
.priv_size = sizeof(FadeContext),
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_props,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ | AV_PERM_WRITE,
- .rej_perms = AV_PERM_PRESERVE, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_props,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ | AV_PERM_WRITE,
+ .rej_perms = AV_PERM_PRESERVE, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index be753be9dc..4da1195b65 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -221,17 +221,17 @@ AVFilter avfilter_vf_fieldorder = {
.init = init,
.priv_size = sizeof(FieldOrderContext),
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input,
- .start_frame = start_frame,
- .get_video_buffer = get_video_buffer,
- .draw_slice = draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ,
- .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE,},
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input,
+ .start_frame = start_frame,
+ .get_video_buffer = get_video_buffer,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ,
+ .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE,},
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index 9565daab5e..1a76183e18 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -103,16 +103,16 @@ AVFilter avfilter_vf_format = {
.priv_size = sizeof(FormatContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer= ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .draw_slice = ff_null_draw_slice,
- .end_frame = ff_null_end_frame, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer= ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .draw_slice = ff_null_draw_slice,
+ .end_frame = ff_null_end_frame, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO },
+ { .name = NULL}},
};
#endif /* CONFIG_FORMAT_FILTER */
@@ -133,15 +133,15 @@ AVFilter avfilter_vf_noformat = {
.priv_size = sizeof(FormatContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer= ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .draw_slice = ff_null_draw_slice,
- .end_frame = ff_null_end_frame, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer= ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .draw_slice = ff_null_draw_slice,
+ .end_frame = ff_null_end_frame, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO },
+ { .name = NULL}},
};
#endif /* CONFIG_NOFORMAT_FILTER */
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 16122def70..71c30ccdff 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -260,15 +260,15 @@ AVFilter avfilter_vf_fps = {
.priv_size = sizeof(FPSContext),
- .inputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = null_start_frame,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame, },
- { .name = NULL}},
- .outputs = (AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = request_frame,
- .config_props = config_props},
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = null_start_frame,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = request_frame,
+ .config_props = config_props},
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index f367264986..d165a5405a 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -366,17 +366,17 @@ AVFilter avfilter_vf_frei0r = {
.priv_size = sizeof(Frei0rContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .draw_slice = null_draw_slice,
- .config_props = config_input_props,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .draw_slice = null_draw_slice,
+ .config_props = config_input_props,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
static av_cold int source_init(AVFilterContext *ctx, const char *args)
@@ -458,9 +458,9 @@ AVFilter avfilter_vsrc_frei0r_src = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = source_request_frame,
- .config_props = source_config_props },
- { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = source_request_frame,
+ .config_props = source_config_props },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index a35e3b09cd..45699bcd89 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -235,15 +235,15 @@ AVFilter avfilter_vf_gradfun = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input,
- .start_frame = start_frame,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input,
+ .start_frame = start_frame,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 459cfab886..ebb732ca06 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -168,14 +168,14 @@ AVFilter avfilter_vf_hflip = {
.priv_size = sizeof(FlipContext),
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .config_props = config_props,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .config_props = config_props,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index c18bb8fb93..0b12ab4185 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -333,14 +333,14 @@ AVFilter avfilter_vf_hqdn3d = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .draw_slice = null_draw_slice,
- .config_props = config_input,
- .end_frame = end_frame },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .draw_slice = null_draw_slice,
+ .config_props = config_input,
+ .end_frame = end_frame },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index b7c73dbc20..ab33686b46 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -379,14 +379,14 @@ AVFilter avfilter_vf_ocv = {
.init = init,
.uninit = uninit,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 252aac18cc..7ceee514c9 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -335,6 +335,19 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
ff_draw_slice(outlink, y, h, slice_dir);
}
+static const AVFilterPad inputs[] = {
+ { .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .draw_slice = draw_slice,
+ .config_props = config_props,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}
+};
+static const AVFilterPad outputs[] = {
+ { .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}
+};
#define DEFINE_LUT_FILTER(name_, description_, init_) \
AVFilter avfilter_vf_##name_ = { \
.name = #name_, \
@@ -345,15 +358,8 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
.uninit = uninit, \
.query_formats = query_formats, \
\
- .inputs = (const AVFilterPad[]) {{ .name = "default", \
- .type = AVMEDIA_TYPE_VIDEO, \
- .draw_slice = draw_slice, \
- .config_props = config_props, \
- .min_perms = AV_PERM_READ, }, \
- { .name = NULL}}, \
- .outputs = (const AVFilterPad[]) {{ .name = "default", \
- .type = AVMEDIA_TYPE_VIDEO, }, \
- { .name = NULL}}, \
+ .inputs = inputs, \
+ .outputs = outputs, \
}
#if CONFIG_LUT_FILTER
diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c
index 935c92a1d0..5c4704e9a9 100644
--- a/libavfilter/vf_null.c
+++ b/libavfilter/vf_null.c
@@ -31,14 +31,14 @@ AVFilter avfilter_vf_null = {
.priv_size = 0,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame,
- .end_frame = ff_null_end_frame },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
+ .end_frame = ff_null_end_frame },
+ { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 9f8163d2bf..57cef6f1ea 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -610,27 +610,27 @@ AVFilter avfilter_vf_overlay = {
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "main",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer= get_video_buffer,
- .config_props = config_input_main,
- .start_frame = start_frame_main,
- .draw_slice = draw_slice_main,
- .end_frame = end_frame_main,
- .min_perms = AV_PERM_READ,
- .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE, },
- { .name = "overlay",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input_overlay,
- .start_frame = start_frame_over,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame_over,
- .min_perms = AV_PERM_READ,
- .rej_perms = AV_PERM_REUSE2, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_output,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "main",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer= get_video_buffer,
+ .config_props = config_input_main,
+ .start_frame = start_frame_main,
+ .draw_slice = draw_slice_main,
+ .end_frame = end_frame_main,
+ .min_perms = AV_PERM_READ,
+ .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE, },
+ { .name = "overlay",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input_overlay,
+ .start_frame = start_frame_over,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame_over,
+ .min_perms = AV_PERM_READ,
+ .rej_perms = AV_PERM_REUSE2, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_output,
+ .request_frame = request_frame, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index ba7020a0e9..e88ea1348b 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -370,16 +370,16 @@ AVFilter avfilter_vf_pad = {
.init = init,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_input,
- .get_video_buffer = get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice, },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_output, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_input,
+ .get_video_buffer = get_video_buffer,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice, },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_output, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index 73ae255bca..12a6a2f98a 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -118,15 +118,15 @@ AVFilter avfilter_vf_pixdesctest = {
.priv_size = sizeof(PixdescTestContext),
.uninit = uninit,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .config_props = config_props,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .config_props = config_props,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 7df03fc9bb..9b9ddaf8b2 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -385,14 +385,14 @@ AVFilter avfilter_vf_scale = {
.priv_size = sizeof(ScaleContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .config_props = config_props, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_props, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index b187fa3d7c..1fa395e055 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -402,17 +402,17 @@ AVFilter avfilter_vf_select = {
.priv_size = sizeof(SelectContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .config_props = config_input,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame },
- { .name = NULL }},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .poll_frame = poll_frame,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .config_props = config_input,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame },
+ { .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .poll_frame = poll_frame,
+ .request_frame = request_frame, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c
index 3fdbd96a32..cef467ac1a 100644
--- a/libavfilter/vf_setpts.c
+++ b/libavfilter/vf_setpts.c
@@ -139,13 +139,13 @@ AVFilter avfilter_vf_setpts = {
.priv_size = sizeof(SetPTSContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .config_props = config_input,
- .start_frame = start_frame, },
- { .name = NULL }},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .config_props = config_input,
+ .start_frame = start_frame, },
+ { .name = NULL }},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index fb522a343c..3622f09696 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -91,15 +91,15 @@ AVFilter avfilter_vf_showinfo = {
.priv_size = sizeof(ShowInfoContext),
.init = init,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = ff_null_start_frame_keep_ref,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame_keep_ref,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO },
- { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_slicify.c b/libavfilter/vf_slicify.c
index 0c924ac608..f1f6a0d455 100644
--- a/libavfilter/vf_slicify.c
+++ b/libavfilter/vf_slicify.c
@@ -106,15 +106,15 @@ AVFilter avfilter_vf_slicify = {
.priv_size = sizeof(SliceContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = ff_null_get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .config_props = config_props,
- .end_frame = ff_null_end_frame, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .config_props = config_props,
+ .end_frame = ff_null_end_frame, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index b5a742c161..bdd2eff1fd 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -204,15 +204,15 @@ AVFilter avfilter_vf_transpose = {
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .config_props = config_props_output,
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .config_props = config_props_output,
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 53381f5acf..40e1d3ac02 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -243,15 +243,15 @@ AVFilter avfilter_vf_unsharp = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .draw_slice = draw_slice,
- .end_frame = end_frame,
- .config_props = config_props,
- .min_perms = AV_PERM_READ, },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame,
+ .config_props = config_props,
+ .min_perms = AV_PERM_READ, },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index 11129b26d7..d7792670a6 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -95,14 +95,14 @@ AVFilter avfilter_vf_vflip = {
.priv_size = sizeof(FlipContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer = get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .config_props = config_input, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = get_video_buffer,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .config_props = config_input, },
+ { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 46ae1ddcce..ec096b8b7d 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -134,9 +134,8 @@ static void filter(AVFilterContext *ctx, AVFilterBufferRef *dstpic,
}
}
}
-#if HAVE_MMX
- __asm__ volatile("emms \n\t" : : : "memory");
-#endif
+
+ emms_c();
}
static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w, int h)
@@ -403,19 +402,19 @@ AVFilter avfilter_vf_yadif = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .start_frame = start_frame,
- .get_video_buffer = get_video_buffer,
- .draw_slice = null_draw_slice,
- .end_frame = end_frame,
- .rej_perms = AV_PERM_REUSE2, },
- { .name = NULL}},
-
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .poll_frame = poll_frame,
- .request_frame = request_frame,
- .config_props = config_props, },
- { .name = NULL}},
+ .inputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .start_frame = start_frame,
+ .get_video_buffer = get_video_buffer,
+ .draw_slice = null_draw_slice,
+ .end_frame = end_frame,
+ .rej_perms = AV_PERM_REUSE2, },
+ { .name = NULL}},
+
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .poll_frame = poll_frame,
+ .request_frame = request_frame,
+ .config_props = config_props, },
+ { .name = NULL}},
};
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index e9f7424a73..eee443ad1d 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -174,9 +174,9 @@ AVFilter avfilter_vsrc_color = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = color_request_frame,
- .config_props = color_config_props },
- { .name = NULL}},
+ .outputs = (const AVFilterPad[]) {{ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = color_request_frame,
+ .config_props = color_config_props },
+ { .name = NULL}},
};
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index e5681c8e70..511a546007 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -401,10 +401,10 @@ AVFilter avfilter_vsrc_testsrc = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = request_frame,
- .config_props = config_props, },
- { .name = NULL }},
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = request_frame,
+ .config_props = config_props, },
+ { .name = NULL }},
};
#endif /* CONFIG_TESTSRC_FILTER */
@@ -525,10 +525,10 @@ AVFilter avfilter_vsrc_rgbtestsrc = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = request_frame,
- .config_props = rgbtest_config_props, },
- { .name = NULL }},
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = request_frame,
+ .config_props = rgbtest_config_props, },
+ { .name = NULL }},
};
#endif /* CONFIG_RGBTESTSRC_FILTER */
diff --git a/libavformat/g723_1.c b/libavformat/g723_1.c
index 1e0fd07857..388283f80e 100644
--- a/libavformat/g723_1.c
+++ b/libavformat/g723_1.c
@@ -24,10 +24,11 @@
* G.723.1 demuxer
*/
+#include "libavutil/audioconvert.h"
#include "avformat.h"
#include "internal.h"
-static const uint8_t frame_size[4] = {24, 20, 4, 1};
+static const uint8_t frame_size[4] = { 24, 20, 4, 1 };
static int g723_1_init(AVFormatContext *s)
{
@@ -37,12 +38,14 @@ static int g723_1_init(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_G723_1;
- st->codec->channels = 1;
- st->codec->sample_rate = 8000;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codec->codec_id = CODEC_ID_G723_1;
+ st->codec->channel_layout = AV_CH_LAYOUT_MONO;
+ st->codec->channels = 1;
+ st->codec->sample_rate = 8000;
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ st->start_time = 0;
return 0;
}
@@ -77,6 +80,6 @@ AVInputFormat ff_g723_1_demuxer = {
.long_name = NULL_IF_CONFIG_SMALL("G.723.1 format"),
.read_header = g723_1_init,
.read_packet = g723_1_read_packet,
- .extensions = "tco,rco,g723_1",
- .flags = AVFMT_GENERIC_INDEX
+ .extensions = "tco,rco,g723_1",
+ .flags = AVFMT_GENERIC_INDEX
};
diff --git a/libavformat/version.h b/libavformat/version.h
index 0b977a401d..43af99ebc6 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 54
-#define LIBAVFORMAT_VERSION_MINOR 18
+#define LIBAVFORMAT_VERSION_MINOR 19
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \