Commit 9023de34 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '1470ce21'

* commit '1470ce21':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4f4eb380 1470ce21
...@@ -1810,6 +1810,20 @@ ffserver_extralibs='$ldl' ...@@ -1810,6 +1810,20 @@ ffserver_extralibs='$ldl'
doc_deps_any="texi2html makeinfo pod2man" doc_deps_any="texi2html makeinfo pod2man"
# tests # 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(){ test_deps(){
suf1=$1 suf1=$1
...@@ -1824,8 +1838,6 @@ test_deps(){ ...@@ -1824,8 +1838,6 @@ test_deps(){
done done
} }
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
test_deps _muxer _demuxer \ test_deps _muxer _demuxer \
aiff \ aiff \
pcm_alaw=alaw \ pcm_alaw=alaw \
...@@ -1851,20 +1863,6 @@ test_deps _muxer _demuxer \ ...@@ -1851,20 +1863,6 @@ test_deps _muxer _demuxer \
wav \ wav \
yuv4mpegpipe=yuv4mpeg \ 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 # default parameters
logfile="config.log" logfile="config.log"
...@@ -2238,6 +2236,78 @@ EOF ...@@ -2238,6 +2236,78 @@ EOF
die "Sanity test failed." die "Sanity test failed."
fi 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 if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
cc_type=llvm_gcc cc_type=llvm_gcc
gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)') gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
...@@ -2313,30 +2383,6 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then ...@@ -2313,30 +2383,6 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then
cflags_speed='-O3 -mf=5' cflags_speed='-O3 -mf=5'
cflags_size='-O3 -mf=2' cflags_size='-O3 -mf=2'
cflags_filter=tms470_flags 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 elif $cc -v 2>&1 | grep -q clang; then
cc_type=clang cc_type=clang
cc_ident=$($cc --version | head -n1) cc_ident=$($cc --version | head -n1)
...@@ -2353,39 +2399,6 @@ elif $cc -V 2>&1 | grep -q Sun; then ...@@ -2353,39 +2399,6 @@ elif $cc -V 2>&1 | grep -q Sun; then
cflags_speed='-O5' cflags_speed='-O5'
cflags_size='-O5 -xspace' cflags_size='-O5 -xspace'
cflags_filter=suncc_flags 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 elif $cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
cc_type=pathscale cc_type=pathscale
cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :) cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :)
...@@ -2410,15 +2423,6 @@ elif $cc -V 2>&1 | grep -q Portland; then ...@@ -2410,15 +2423,6 @@ elif $cc -V 2>&1 | grep -q Portland; then
cflags_size="-O2 -Munroll=c:1 $opt_common" cflags_size="-O2 -Munroll=c:1 $opt_common"
cflags_noopt="-O1" cflags_noopt="-O1"
cflags_filter=pgi_flags 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 fi
test -n "$cc_type" && enable $cc_type || test -n "$cc_type" && enable $cc_type ||
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
static const AVClass ac3enc_class = { static const AVClass ac3enc_class = {
.class_name = "Fixed-Point AC-3 Encoder", .class_name = "Fixed-Point AC-3 Encoder",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = ac3fixed_options, .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
......
...@@ -23,13 +23,7 @@ ...@@ -23,13 +23,7 @@
#include "internal.h" #include "internal.h"
#include "ac3.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[] = { static const AVOption ac3_options[] = {
#else /* AC3ENC_TYPE_EAC3 */
static const AVOption eac3_options[] = {
#endif
/* Metadata Options */ /* 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}, {"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 #if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
......
...@@ -717,6 +717,9 @@ error: ...@@ -717,6 +717,9 @@ error:
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
static const enum AVSampleFormat sample_fmts[] = {
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
};
#define ADPCM_ENCODER(id_, name_, long_name_) \ #define ADPCM_ENCODER(id_, name_, long_name_) \
AVCodec ff_ ## name_ ## _encoder = { \ AVCodec ff_ ## name_ ## _encoder = { \
...@@ -727,8 +730,7 @@ AVCodec ff_ ## name_ ## _encoder = { \ ...@@ -727,8 +730,7 @@ AVCodec ff_ ## name_ ## _encoder = { \
.init = adpcm_encode_init, \ .init = adpcm_encode_init, \
.encode2 = adpcm_encode_frame, \ .encode2 = adpcm_encode_frame, \
.close = adpcm_encode_close, \ .close = adpcm_encode_close, \
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \ .sample_fmts = sample_fmts, \
AV_SAMPLE_FMT_NONE }, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
static const AVClass eac3enc_class = { static const AVClass eac3enc_class = {
.class_name = "E-AC-3 Encoder", .class_name = "E-AC-3 Encoder",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = eac3_options, .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };
......
This diff is collapsed.
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
* G723.1 compatible decoder data tables * G723.1 compatible decoder data tables
*/ */
#ifndef AVCODEC_G729_DATA_H #ifndef AVCODEC_G729_1_DATA_H
#define AVCODEC_G729_DATA_H #define AVCODEC_G729_1_DATA_H
#include <stdint.h> #include <stdint.h>
...@@ -49,23 +49,23 @@ ...@@ -49,23 +49,23 @@
/** /**
* G723.1 frame types * G723.1 frame types
*/ */
typedef enum { typedef enum FrameType {
ActiveFrame, ///< Active speech ACTIVE_FRAME, ///< Active speech
SIDFrame, ///< Silence Insertion Descriptor frame SID_FRAME, ///< Silence Insertion Descriptor frame
UntransmittedFrame UNTRANSMITTED_FRAME
} FrameType; } FrameType;
static const uint8_t frame_size[4] = {24, 20, 4, 1}; static const uint8_t frame_size[4] = {24, 20, 4, 1};
typedef enum { typedef enum Rate {
Rate6k3, RATE_6300,
Rate5k3 RATE_5300
} Rate; } Rate;
/** /**
* G723.1 unpacked data subframe * G723.1 unpacked data subframe
*/ */
typedef struct { typedef struct G723_1_Subframe {
int ad_cb_lag; ///< adaptive codebook lag int ad_cb_lag; ///< adaptive codebook lag
int ad_cb_gain; int ad_cb_gain;
int dirac_train; int dirac_train;
...@@ -1319,4 +1319,4 @@ static const int16_t percept_flt_tbl[2][LPC_ORDER] = { ...@@ -1319,4 +1319,4 @@ static const int16_t percept_flt_tbl[2][LPC_ORDER] = {
{16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32} {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32}
}; };
#endif /* AVCODEC_G729_DATA_H */ #endif /* AVCODEC_G729_1_DATA_H */
...@@ -20,18 +20,19 @@ ...@@ -20,18 +20,19 @@
*/ */
/** /**
* @file * @file
* JPEG 2000 decoder using libopenjpeg * JPEG 2000 decoder using libopenjpeg
*/ */
#define OPJ_STATIC
#include <openjpeg.h>
#include "libavutil/opt.h"
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h" #include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "thread.h" #include "thread.h"
#define OPJ_STATIC
#include <openjpeg.h>
#define JP2_SIG_TYPE 0x6A502020 #define JP2_SIG_TYPE 0x6A502020
#define JP2_SIG_VALUE 0x0D0A870A #define JP2_SIG_VALUE 0x0D0A870A
...@@ -61,7 +62,8 @@ typedef struct { ...@@ -61,7 +62,8 @@ typedef struct {
int lowqual; int lowqual;
} LibOpenJPEGContext; } 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]; AVPixFmtDescriptor descriptor = av_pix_fmt_descriptors[pix_fmt];
int match = 1; int match = 1;
...@@ -129,7 +131,7 @@ static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) { ...@@ -129,7 +131,7 @@ static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) {
return 0; return 0;
component_plane = av_pix_fmt_descriptors[pix_fmt].comp[0].plane; 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) if (component_plane != av_pix_fmt_descriptors[pix_fmt].comp[i].plane)
return 0; return 0;
} }
...@@ -139,11 +141,11 @@ static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) { ...@@ -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) { static inline void libopenjpeg_copy_to_packed8(AVFrame *picture, opj_image_t *image) {
uint8_t *img_ptr; uint8_t *img_ptr;
int index, x, y, c; int index, x, y, c;
for(y = 0; y < picture->height; y++) { for (y = 0; y < picture->height; y++) {
index = y*picture->width; index = y*picture->width;
img_ptr = picture->data[0] + y*picture->linesize[0]; img_ptr = picture->data[0] + y*picture->linesize[0];
for(x = 0; x < picture->width; x++, index++) { for (x = 0; x < picture->width; x++, index++) {
for(c = 0; c < image->numcomps; c++) { for (c = 0; c < image->numcomps; c++) {
*img_ptr++ = image->comps[c].data[index]; *img_ptr++ = image->comps[c].data[index];
} }
} }
...@@ -154,9 +156,9 @@ static inline void libopenjpeg_copy_to_packed16(AVFrame *picture, opj_image_t *i ...@@ -154,9 +156,9 @@ static inline void libopenjpeg_copy_to_packed16(AVFrame *picture, opj_image_t *i
uint16_t *img_ptr; uint16_t *img_ptr;
int index, x, y, c; int index, x, y, c;
int adjust[4]; 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); adjust[x] = FFMAX(FFMIN(16 - image->comps[x].prec, 8), 0);
}
for (y = 0; y < picture->height; y++) { for (y = 0; y < picture->height; y++) {
index = y*picture->width; index = y*picture->width;
img_ptr = (uint16_t*) (picture->data[0] + y*picture->linesize[0]); 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) { ...@@ -173,11 +175,11 @@ static inline void libopenjpeg_copyto8(AVFrame *picture, opj_image_t *image) {
uint8_t *img_ptr; uint8_t *img_ptr;
int index, x, y; int index, x, y;
for(index = 0; index < image->numcomps; index++) { for (index = 0; index < image->numcomps; index++) {
comp_data = image->comps[index].data; 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]; 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 = (uint8_t) *comp_data;
img_ptr++; img_ptr++;
comp_data++; comp_data++;
...@@ -190,11 +192,11 @@ static inline void libopenjpeg_copyto16(AVFrame *picture, opj_image_t *image) { ...@@ -190,11 +192,11 @@ static inline void libopenjpeg_copyto16(AVFrame *picture, opj_image_t *image) {
int *comp_data; int *comp_data;
uint16_t *img_ptr; uint16_t *img_ptr;
int index, x, y; int index, x, y;
for(index = 0; index < image->numcomps; index++) { for (index = 0; index < image->numcomps; index++) {
comp_data = image->comps[index].data; 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]); 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;
img_ptr++; img_ptr++;
comp_data++; comp_data++;
...@@ -240,49 +242,55 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, ...@@ -240,49 +242,55 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
*data_size = 0; *data_size = 0;
// Check if input is a raw jpeg2k codestream or in jp2 wrapping // Check if input is a raw jpeg2k codestream or in jp2 wrapping
if((AV_RB32(buf) == 12) && if ((AV_RB32(buf) == 12) &&
(AV_RB32(buf + 4) == JP2_SIG_TYPE) && (AV_RB32(buf + 4) == JP2_SIG_TYPE) &&
(AV_RB32(buf + 8) == JP2_SIG_VALUE)) { (AV_RB32(buf + 8) == JP2_SIG_VALUE)) {
dec = opj_create_decompress(CODEC_JP2); dec = opj_create_decompress(CODEC_JP2);
} else { } else {
// If the AVPacket contains a jp2c box, then skip to /* If the AVPacket contains a jp2c box, then skip to
// the starting byte of the codestream. * the starting byte of the codestream. */
if (AV_RB32(buf + 4) == AV_RB32("jp2c")) if (AV_RB32(buf + 4) == AV_RB32("jp2c"))
buf += 8; buf += 8;
dec = opj_create_decompress(CODEC_J2K); dec = opj_create_decompress(CODEC_J2K);
} }
if(!dec) { if (!dec) {
av_log(avctx, AV_LOG_ERROR, "Error initializing decoder.\n"); av_log(avctx, AV_LOG_ERROR, "Error initializing decoder.\n");
return -1; return -1;
} }
opj_set_event_mgr((opj_common_ptr)dec, NULL, NULL); opj_set_event_mgr((opj_common_ptr)dec, NULL, NULL);
ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER; 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 // Tie decoder with decoding parameters
opj_setup_decoder(dec, &ctx->dec_params); opj_setup_decoder(dec, &ctx->dec_params);
stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size); 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); opj_destroy_decompress(dec);
return -1; return -1;
} }
// Decode the header only // Decode the header only.
image = opj_decode_with_info(dec, stream, NULL); image = opj_decode_with_info(dec, stream, NULL);
opj_cio_close(stream); opj_cio_close(stream);
if(!image) {
if (!image) {
av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n"); av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n");
opj_destroy_decompress(dec); opj_destroy_decompress(dec);
return -1; return -1;
} }
width = image->x1 - image->x0; width = image->x1 - image->x0;
height = image->y1 - image->y0; height = image->y1 - image->y0;
if(av_image_check_size(width, height, 0, avctx) < 0) { if (av_image_check_size(width, height, 0, avctx) < 0) {
av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height); av_log(avctx, AV_LOG_ERROR,
"%dx%d dimension invalid.\n", width, height);
goto done; goto done;
} }
avcodec_set_dimensions(avctx, width, height); avcodec_set_dimensions(avctx, width, height);
if (avctx->pix_fmt != PIX_FMT_NONE) { if (avctx->pix_fmt != PIX_FMT_NONE) {
...@@ -303,29 +311,30 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, ...@@ -303,29 +311,30 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
if (image->comps[i].prec > avctx->bits_per_raw_sample) if (image->comps[i].prec > avctx->bits_per_raw_sample)
avctx->bits_per_raw_sample = image->comps[i].prec; avctx->bits_per_raw_sample = image->comps[i].prec;
if(picture->data[0]) if (picture->data[0])
ff_thread_release_buffer(avctx, picture); 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"); av_log(avctx, AV_LOG_ERROR, "ff_thread_get_buffer() failed\n");
goto done; goto done;
} }
ctx->dec_params.cp_limit_decoding = NO_LIMITATION; ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
ctx->dec_params.cp_reduce = avctx->lowres; ctx->dec_params.cp_reduce = avctx->lowres;
// Tie decoder with decoding parameters // Tie decoder with decoding parameters.
opj_setup_decoder(dec, &ctx->dec_params); opj_setup_decoder(dec, &ctx->dec_params);
stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size); stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size);
if(!stream) { if (!stream) {
av_log(avctx, AV_LOG_ERROR, "Codestream could not be opened for reading.\n"); av_log(avctx, AV_LOG_ERROR,
"Codestream could not be opened for reading.\n");
goto done; goto done;
} }
opj_image_destroy(image); opj_image_destroy(image);
// Decode the codestream // Decode the codestream.
image = opj_decode_with_info(dec, stream, NULL); image = opj_decode_with_info(dec, stream, NULL);
opj_cio_close(stream); opj_cio_close(stream);
if(!image) { if (!image) {
av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n"); av_log(avctx, AV_LOG_ERROR, "Error decoding codestream.\n");
goto done; goto done;
} }
...@@ -367,7 +376,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, ...@@ -367,7 +376,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
*output = ctx->image; *output = ctx->image;
*data_size = sizeof(AVPicture); *data_size = sizeof(AVPicture);
ret = buf_size; ret = buf_size;
done: done:
opj_image_destroy(image); opj_image_destroy(image);
...@@ -379,16 +388,16 @@ static av_cold int libopenjpeg_decode_close(AVCodecContext *avctx) ...@@ -379,16 +388,16 @@ static av_cold int libopenjpeg_decode_close(AVCodecContext *avctx)
{ {
LibOpenJPEGContext *ctx = avctx->priv_data; LibOpenJPEGContext *ctx = avctx->priv_data;
if(ctx->image.data[0]) if (ctx->image.data[0])
ff_thread_release_buffer(avctx, &ctx->image); ff_thread_release_buffer(avctx, &ctx->image);
return 0 ; return 0;
} }
#define OFFSET(x) offsetof(LibOpenJPEGContext, x) #define OFFSET(x) offsetof(LibOpenJPEGContext, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static const AVOption options[] = { 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 }, { NULL },
}; };
......
...@@ -20,18 +20,18 @@ ...@@ -20,18 +20,18 @@
*/ */
/** /**
* @file * @file
* JPEG 2000 encoder using libopenjpeg * JPEG 2000 encoder using libopenjpeg
*/ */
#define OPJ_STATIC #define OPJ_STATIC
#include <openjpeg.h> #include <openjpeg.h>
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h" #include "libavutil/avassert.h"
#include "avcodec.h" #include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h" #include "internal.h"
typedef struct { typedef struct {
...@@ -284,9 +284,8 @@ static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, const AVFrame *fram ...@@ -284,9 +284,8 @@ static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, const AVFrame *fram
for (y = 0; y < height; ++y) { for (y = 0; y < height; ++y) {
image_index = y * width; image_index = y * width;
frame_index = y * frame->linesize[compno]; 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++]; 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 ...@@ -319,9 +318,8 @@ static int libopenjpeg_copy_unpacked16(AVCodecContext *avctx, const AVFrame *fra
for (y = 0; y < height; ++y) { for (y = 0; y < height; ++y) {
image_index = y * width; image_index = y * width;
frame_index = y * (frame->linesize[compno] / 2); 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++]; image->comps[compno].data[image_index++] = frame_ptr[frame_index++];
}
} }
} }
...@@ -333,7 +331,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -333,7 +331,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{ {
LibOpenJPEGContext *ctx = avctx->priv_data; LibOpenJPEGContext *ctx = avctx->priv_data;
opj_cinfo_t *compress = ctx->compress; opj_cinfo_t *compress = ctx->compress;
opj_image_t *image = ctx->image; opj_image_t *image = ctx->image;
opj_cio_t *stream; opj_cio_t *stream;
int cpyresult = 0; int cpyresult = 0;
int ret, len; int ret, len;
...@@ -342,7 +340,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -342,7 +340,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
// x1, y1 is the width, height of the reference grid // x1, y1 is the width, height of the reference grid
image->x0 = 0; image->x0 = 0;
image->y0 = 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; image->y1 = (avctx->height - 1) * ctx->enc_params.subsampling_dy + 1;
switch (avctx->pix_fmt) { switch (avctx->pix_fmt) {
...@@ -432,7 +430,7 @@ static av_cold int libopenjpeg_encode_close(AVCodecContext *avctx) ...@@ -432,7 +430,7 @@ static av_cold int libopenjpeg_encode_close(AVCodecContext *avctx)
opj_destroy_compress(ctx->compress); opj_destroy_compress(ctx->compress);
opj_image_destroy(ctx->image); opj_image_destroy(ctx->image);
av_freep(&avctx->coded_frame); av_freep(&avctx->coded_frame);
return 0 ; return 0;
} }
#define OFFSET(x) offsetof(LibOpenJPEGContext, x) #define OFFSET(x) offsetof(LibOpenJPEGContext, x)
...@@ -456,11 +454,11 @@ static const AVOption options[] = { ...@@ -456,11 +454,11 @@ static const AVOption options[] = {
{ "rpcl", NULL, 0, AV_OPT_TYPE_CONST, { RPCL }, 0, 0, VE, "prog_order" }, { "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" }, { "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" }, { "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 }, { "numresolution", NULL, OFFSET(numresolution), AV_OPT_TYPE_INT, { 6 }, 1, 10, VE },
{ "numlayers", NULL, OFFSET(numlayers), AV_OPT_TYPE_INT, { 1 }, 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 }, { "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_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 }, { "fixed_quality", NULL, OFFSET(fixed_quality), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
{ NULL }, { NULL },
}; };
...@@ -480,7 +478,7 @@ AVCodec ff_libopenjpeg_encoder = { ...@@ -480,7 +478,7 @@ AVCodec ff_libopenjpeg_encoder = {
.encode2 = libopenjpeg_encode_frame, .encode2 = libopenjpeg_encode_frame,
.close = libopenjpeg_encode_close, .close = libopenjpeg_encode_close,
.capabilities = 0, .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_RGB24, PIX_FMT_RGBA, PIX_FMT_RGB48, PIX_FMT_RGBA64,
PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_GRAY16, PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_GRAY16,
PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUVA420P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUVA420P,
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
*/ */
#define LIBAVCODEC_VERSION_MAJOR 54 #define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 43 #define LIBAVCODEC_VERSION_MINOR 44
#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
...@@ -133,10 +133,10 @@ AVFilter avfilter_af_aformat = { ...@@ -133,10 +133,10 @@ AVFilter avfilter_af_aformat = {
.query_formats = query_formats, .query_formats = query_formats,
.priv_size = sizeof(AFormatContext), .priv_size = sizeof(AFormatContext),
.inputs = (AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, }, .type = AVMEDIA_TYPE_AUDIO, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO}, .type = AVMEDIA_TYPE_AUDIO},
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -32,12 +32,12 @@ AVFilter avfilter_af_anull = { ...@@ -32,12 +32,12 @@ AVFilter avfilter_af_anull = {
.priv_size = 0, .priv_size = 0,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer, }, .get_audio_buffer = ff_null_get_audio_buffer, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, }, .type = AVMEDIA_TYPE_AUDIO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -392,12 +392,12 @@ AVFilter avfilter_af_channelmap = { ...@@ -392,12 +392,12 @@ AVFilter avfilter_af_channelmap = {
.query_formats = channelmap_query_formats, .query_formats = channelmap_query_formats,
.priv_size = sizeof(ChannelMapContext), .priv_size = sizeof(ChannelMapContext),
.inputs = (AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.filter_samples = channelmap_filter_samples, .filter_samples = channelmap_filter_samples,
.config_props = channelmap_config_input }, .config_props = channelmap_config_input },
{ .name = NULL }}, { .name = NULL }},
.outputs = (AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO }, .type = AVMEDIA_TYPE_AUDIO },
{ .name = NULL }}, { .name = NULL }},
}; };
...@@ -127,8 +127,8 @@ AVFilter avfilter_asrc_anullsrc = { ...@@ -127,8 +127,8 @@ AVFilter avfilter_asrc_anullsrc = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}}, .inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.config_props = config_props, .config_props = config_props,
.request_frame = request_frame, }, .request_frame = request_frame, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -149,13 +149,13 @@ AVFilter avfilter_vsink_buffer = { ...@@ -149,13 +149,13 @@ AVFilter avfilter_vsink_buffer = {
.priv_size = sizeof(BufferSinkContext), .priv_size = sizeof(BufferSinkContext),
.uninit = uninit, .uninit = uninit,
.inputs = (AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.min_perms = AV_PERM_READ, .min_perms = AV_PERM_READ,
.needs_fifo = 1 }, .needs_fifo = 1 },
{ .name = NULL }}, { .name = NULL }},
.outputs = (AVFilterPad[]) {{ .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = NULL }},
}; };
AVFilter avfilter_asink_abuffer = { AVFilter avfilter_asink_abuffer = {
...@@ -164,11 +164,11 @@ AVFilter avfilter_asink_abuffer = { ...@@ -164,11 +164,11 @@ AVFilter avfilter_asink_abuffer = {
.priv_size = sizeof(BufferSinkContext), .priv_size = sizeof(BufferSinkContext),
.uninit = uninit, .uninit = uninit,
.inputs = (AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples, .filter_samples = filter_samples,
.min_perms = AV_PERM_READ, .min_perms = AV_PERM_READ,
.needs_fifo = 1 }, .needs_fifo = 1 },
{ .name = NULL }}, { .name = NULL }},
.outputs = (AVFilterPad[]) {{ .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = NULL }},
}; };
...@@ -416,13 +416,13 @@ AVFilter avfilter_vsrc_buffer = { ...@@ -416,13 +416,13 @@ AVFilter avfilter_vsrc_buffer = {
.init = init_video, .init = init_video,
.uninit = uninit, .uninit = uninit,
.inputs = (AVFilterPad[]) {{ .name = NULL }}, .inputs = (const AVFilterPad[]) {{ .name = NULL }},
.outputs = (AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.poll_frame = poll_frame, .poll_frame = poll_frame,
.config_props = config_props, }, .config_props = config_props, },
{ .name = NULL}}, { .name = NULL}},
}; };
AVFilter avfilter_asrc_abuffer = { AVFilter avfilter_asrc_abuffer = {
...@@ -434,11 +434,11 @@ AVFilter avfilter_asrc_abuffer = { ...@@ -434,11 +434,11 @@ AVFilter avfilter_asrc_abuffer = {
.init = init_audio, .init = init_audio,
.uninit = uninit, .uninit = uninit,
.inputs = (AVFilterPad[]) {{ .name = NULL }}, .inputs = (const AVFilterPad[]) {{ .name = NULL }},
.outputs = (AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame, .request_frame = request_frame,
.poll_frame = poll_frame, .poll_frame = poll_frame,
.config_props = config_props, }, .config_props = config_props, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -269,18 +269,18 @@ AVFilter avfilter_vf_fifo = { ...@@ -269,18 +269,18 @@ AVFilter avfilter_vf_fifo = {
.priv_size = sizeof(FifoContext), .priv_size = sizeof(FifoContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer, .get_video_buffer= ff_null_get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.rej_perms = AV_PERM_REUSE2, }, .rej_perms = AV_PERM_REUSE2, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, }, .request_frame = request_frame, },
{ .name = NULL}}, { .name = NULL}},
}; };
AVFilter avfilter_af_afifo = { AVFilter avfilter_af_afifo = {
...@@ -292,14 +292,14 @@ AVFilter avfilter_af_afifo = { ...@@ -292,14 +292,14 @@ AVFilter avfilter_af_afifo = {
.priv_size = sizeof(FifoContext), .priv_size = sizeof(FifoContext),
.inputs = (AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer, .get_audio_buffer = ff_null_get_audio_buffer,
.filter_samples = add_to_queue, .filter_samples = add_to_queue,
.rej_perms = AV_PERM_REUSE2, }, .rej_perms = AV_PERM_REUSE2, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame, }, .request_frame = request_frame, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -98,14 +98,14 @@ AVFilter avfilter_vf_split = { ...@@ -98,14 +98,14 @@ AVFilter avfilter_vf_split = {
.init = split_init, .init = split_init,
.uninit = split_uninit, .uninit = split_uninit,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer, .get_video_buffer= ff_null_get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame, }, .end_frame = end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = NULL}}, .outputs = (const AVFilterPad[]) {{ .name = NULL}},
}; };
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
......
...@@ -344,11 +344,11 @@ AVFilter avfilter_vsrc_movie = { ...@@ -344,11 +344,11 @@ AVFilter avfilter_vsrc_movie = {
.query_formats = movie_query_formats, .query_formats = movie_query_formats,
.inputs = (const AVFilterPad[]) {{ .name = NULL }}, .inputs = (const AVFilterPad[]) {{ .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = movie_request_frame, .request_frame = movie_request_frame,
.config_props = movie_config_output_props, }, .config_props = movie_config_output_props, },
{ .name = NULL}}, { .name = NULL}},
}; };
#endif /* CONFIG_MOVIE_FILTER */ #endif /* CONFIG_MOVIE_FILTER */
......
...@@ -86,17 +86,17 @@ AVFilter avfilter_vf_setdar = { ...@@ -86,17 +86,17 @@ AVFilter avfilter_vf_setdar = {
.priv_size = sizeof(AspectContext), .priv_size = sizeof(AspectContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = setdar_config_props, .config_props = setdar_config_props,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.end_frame = ff_null_end_frame }, .end_frame = ff_null_end_frame },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
#endif /* CONFIG_SETDAR_FILTER */ #endif /* CONFIG_SETDAR_FILTER */
...@@ -118,16 +118,16 @@ AVFilter avfilter_vf_setsar = { ...@@ -118,16 +118,16 @@ AVFilter avfilter_vf_setsar = {
.priv_size = sizeof(AspectContext), .priv_size = sizeof(AspectContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = setsar_config_props, .config_props = setsar_config_props,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.end_frame = ff_null_end_frame }, .end_frame = ff_null_end_frame },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
#endif /* CONFIG_SETSAR_FILTER */ #endif /* CONFIG_SETSAR_FILTER */
...@@ -126,13 +126,13 @@ AVFilter avfilter_vf_blackframe = { ...@@ -126,13 +126,13 @@ AVFilter avfilter_vf_blackframe = {
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame_keep_ref, .start_frame = ff_null_start_frame_keep_ref,
.end_frame = end_frame, }, .end_frame = end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO }, .type = AVMEDIA_TYPE_VIDEO },
......
...@@ -339,14 +339,14 @@ AVFilter avfilter_vf_boxblur = { ...@@ -339,14 +339,14 @@ AVFilter avfilter_vf_boxblur = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input, .config_props = config_input,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ }, .min_perms = AV_PERM_READ },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -29,14 +29,14 @@ AVFilter avfilter_vf_copy = { ...@@ -29,14 +29,14 @@ AVFilter avfilter_vf_copy = {
.name = "copy", .name = "copy",
.description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.end_frame = ff_null_end_frame, .end_frame = ff_null_end_frame,
.rej_perms = ~0 }, .rej_perms = ~0 },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -349,16 +349,16 @@ AVFilter avfilter_vf_crop = { ...@@ -349,16 +349,16 @@ AVFilter avfilter_vf_crop = {
.init = init, .init = init,
.uninit = uninit, .uninit = uninit,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input, }, .config_props = config_input, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output, }, .config_props = config_output, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -203,15 +203,15 @@ AVFilter avfilter_vf_cropdetect = { ...@@ -203,15 +203,15 @@ AVFilter avfilter_vf_cropdetect = {
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input, .config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.end_frame = end_frame, }, .end_frame = end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO }, .type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -264,16 +264,16 @@ AVFilter avfilter_vf_delogo = { ...@@ -264,16 +264,16 @@ AVFilter avfilter_vf_delogo = {
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ, .min_perms = AV_PERM_WRITE | AV_PERM_READ,
.rej_perms = AV_PERM_PRESERVE }, .rej_perms = AV_PERM_PRESERVE },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -130,17 +130,17 @@ AVFilter avfilter_vf_drawbox = { ...@@ -130,17 +130,17 @@ AVFilter avfilter_vf_drawbox = {
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input, .config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = ff_null_end_frame, .end_frame = ff_null_end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ, .min_perms = AV_PERM_WRITE | AV_PERM_READ,
.rej_perms = AV_PERM_PRESERVE }, .rej_perms = AV_PERM_PRESERVE },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -813,19 +813,19 @@ AVFilter avfilter_vf_drawtext = { ...@@ -813,19 +813,19 @@ AVFilter avfilter_vf_drawtext = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.config_props = config_input, .config_props = config_input,
.min_perms = AV_PERM_WRITE | .min_perms = AV_PERM_WRITE |
AV_PERM_READ, AV_PERM_READ,
.rej_perms = AV_PERM_PRESERVE }, .rej_perms = AV_PERM_PRESERVE },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
.process_command = command, .process_command = command,
}; };
...@@ -279,17 +279,17 @@ AVFilter avfilter_vf_fade = { ...@@ -279,17 +279,17 @@ AVFilter avfilter_vf_fade = {
.priv_size = sizeof(FadeContext), .priv_size = sizeof(FadeContext),
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props, .config_props = config_props,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ | AV_PERM_WRITE, .min_perms = AV_PERM_READ | AV_PERM_WRITE,
.rej_perms = AV_PERM_PRESERVE, }, .rej_perms = AV_PERM_PRESERVE, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -221,17 +221,17 @@ AVFilter avfilter_vf_fieldorder = { ...@@ -221,17 +221,17 @@ AVFilter avfilter_vf_fieldorder = {
.init = init, .init = init,
.priv_size = sizeof(FieldOrderContext), .priv_size = sizeof(FieldOrderContext),
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input, .config_props = config_input,
.start_frame = start_frame, .start_frame = start_frame,
.get_video_buffer = get_video_buffer, .get_video_buffer = get_video_buffer,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ, .min_perms = AV_PERM_READ,
.rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE,}, .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE,},
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -103,16 +103,16 @@ AVFilter avfilter_vf_format = { ...@@ -103,16 +103,16 @@ AVFilter avfilter_vf_format = {
.priv_size = sizeof(FormatContext), .priv_size = sizeof(FormatContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer, .get_video_buffer= ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.draw_slice = ff_null_draw_slice, .draw_slice = ff_null_draw_slice,
.end_frame = ff_null_end_frame, }, .end_frame = ff_null_end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO }, .type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}}, { .name = NULL}},
}; };
#endif /* CONFIG_FORMAT_FILTER */ #endif /* CONFIG_FORMAT_FILTER */
...@@ -133,15 +133,15 @@ AVFilter avfilter_vf_noformat = { ...@@ -133,15 +133,15 @@ AVFilter avfilter_vf_noformat = {
.priv_size = sizeof(FormatContext), .priv_size = sizeof(FormatContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer, .get_video_buffer= ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.draw_slice = ff_null_draw_slice, .draw_slice = ff_null_draw_slice,
.end_frame = ff_null_end_frame, }, .end_frame = ff_null_end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO }, .type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}}, { .name = NULL}},
}; };
#endif /* CONFIG_NOFORMAT_FILTER */ #endif /* CONFIG_NOFORMAT_FILTER */
...@@ -260,15 +260,15 @@ AVFilter avfilter_vf_fps = { ...@@ -260,15 +260,15 @@ AVFilter avfilter_vf_fps = {
.priv_size = sizeof(FPSContext), .priv_size = sizeof(FPSContext),
.inputs = (AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = null_start_frame, .start_frame = null_start_frame,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, }, .end_frame = end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = config_props}, .config_props = config_props},
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -366,17 +366,17 @@ AVFilter avfilter_vf_frei0r = { ...@@ -366,17 +366,17 @@ AVFilter avfilter_vf_frei0r = {
.priv_size = sizeof(Frei0rContext), .priv_size = sizeof(Frei0rContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.config_props = config_input_props, .config_props = config_input_props,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ }, .min_perms = AV_PERM_READ },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
static av_cold int source_init(AVFilterContext *ctx, const char *args) static av_cold int source_init(AVFilterContext *ctx, const char *args)
...@@ -458,9 +458,9 @@ AVFilter avfilter_vsrc_frei0r_src = { ...@@ -458,9 +458,9 @@ AVFilter avfilter_vsrc_frei0r_src = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}}, .inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = source_request_frame, .request_frame = source_request_frame,
.config_props = source_config_props }, .config_props = source_config_props },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -235,15 +235,15 @@ AVFilter avfilter_vf_gradfun = { ...@@ -235,15 +235,15 @@ AVFilter avfilter_vf_gradfun = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input, .config_props = config_input,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -168,14 +168,14 @@ AVFilter avfilter_vf_hflip = { ...@@ -168,14 +168,14 @@ AVFilter avfilter_vf_hflip = {
.priv_size = sizeof(FlipContext), .priv_size = sizeof(FlipContext),
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.config_props = config_props, .config_props = config_props,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -333,14 +333,14 @@ AVFilter avfilter_vf_hqdn3d = { ...@@ -333,14 +333,14 @@ AVFilter avfilter_vf_hqdn3d = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.config_props = config_input, .config_props = config_input,
.end_frame = end_frame }, .end_frame = end_frame },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO }, .type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -379,14 +379,14 @@ AVFilter avfilter_vf_ocv = { ...@@ -379,14 +379,14 @@ AVFilter avfilter_vf_ocv = {
.init = init, .init = init,
.uninit = uninit, .uninit = uninit,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ }, .min_perms = AV_PERM_READ },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -335,6 +335,19 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) ...@@ -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); 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_) \ #define DEFINE_LUT_FILTER(name_, description_, init_) \
AVFilter avfilter_vf_##name_ = { \ AVFilter avfilter_vf_##name_ = { \
.name = #name_, \ .name = #name_, \
...@@ -345,15 +358,8 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) ...@@ -345,15 +358,8 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
.uninit = uninit, \ .uninit = uninit, \
.query_formats = query_formats, \ .query_formats = query_formats, \
\ \
.inputs = (const AVFilterPad[]) {{ .name = "default", \ .inputs = inputs, \
.type = AVMEDIA_TYPE_VIDEO, \ .outputs = outputs, \
.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}}, \
} }
#if CONFIG_LUT_FILTER #if CONFIG_LUT_FILTER
......
...@@ -31,14 +31,14 @@ AVFilter avfilter_vf_null = { ...@@ -31,14 +31,14 @@ AVFilter avfilter_vf_null = {
.priv_size = 0, .priv_size = 0,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .start_frame = ff_null_start_frame,
.end_frame = ff_null_end_frame }, .end_frame = ff_null_end_frame },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -610,27 +610,27 @@ AVFilter avfilter_vf_overlay = { ...@@ -610,27 +610,27 @@ AVFilter avfilter_vf_overlay = {
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "main", .inputs = (const AVFilterPad[]) {{ .name = "main",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= get_video_buffer, .get_video_buffer= get_video_buffer,
.config_props = config_input_main, .config_props = config_input_main,
.start_frame = start_frame_main, .start_frame = start_frame_main,
.draw_slice = draw_slice_main, .draw_slice = draw_slice_main,
.end_frame = end_frame_main, .end_frame = end_frame_main,
.min_perms = AV_PERM_READ, .min_perms = AV_PERM_READ,
.rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE, }, .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE, },
{ .name = "overlay", { .name = "overlay",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input_overlay, .config_props = config_input_overlay,
.start_frame = start_frame_over, .start_frame = start_frame_over,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame_over, .end_frame = end_frame_over,
.min_perms = AV_PERM_READ, .min_perms = AV_PERM_READ,
.rej_perms = AV_PERM_REUSE2, }, .rej_perms = AV_PERM_REUSE2, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output, .config_props = config_output,
.request_frame = request_frame, }, .request_frame = request_frame, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -370,16 +370,16 @@ AVFilter avfilter_vf_pad = { ...@@ -370,16 +370,16 @@ AVFilter avfilter_vf_pad = {
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input, .config_props = config_input,
.get_video_buffer = get_video_buffer, .get_video_buffer = get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, }, .draw_slice = draw_slice, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output, }, .config_props = config_output, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -118,15 +118,15 @@ AVFilter avfilter_vf_pixdesctest = { ...@@ -118,15 +118,15 @@ AVFilter avfilter_vf_pixdesctest = {
.priv_size = sizeof(PixdescTestContext), .priv_size = sizeof(PixdescTestContext),
.uninit = uninit, .uninit = uninit,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.config_props = config_props, .config_props = config_props,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -385,14 +385,14 @@ AVFilter avfilter_vf_scale = { ...@@ -385,14 +385,14 @@ AVFilter avfilter_vf_scale = {
.priv_size = sizeof(ScaleContext), .priv_size = sizeof(ScaleContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props, }, .config_props = config_props, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -402,17 +402,17 @@ AVFilter avfilter_vf_select = { ...@@ -402,17 +402,17 @@ AVFilter avfilter_vf_select = {
.priv_size = sizeof(SelectContext), .priv_size = sizeof(SelectContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input, .config_props = config_input,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame }, .end_frame = end_frame },
{ .name = NULL }}, { .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.poll_frame = poll_frame, .poll_frame = poll_frame,
.request_frame = request_frame, }, .request_frame = request_frame, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -139,13 +139,13 @@ AVFilter avfilter_vf_setpts = { ...@@ -139,13 +139,13 @@ AVFilter avfilter_vf_setpts = {
.priv_size = sizeof(SetPTSContext), .priv_size = sizeof(SetPTSContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input, .config_props = config_input,
.start_frame = start_frame, }, .start_frame = start_frame, },
{ .name = NULL }}, { .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -91,15 +91,15 @@ AVFilter avfilter_vf_showinfo = { ...@@ -91,15 +91,15 @@ AVFilter avfilter_vf_showinfo = {
.priv_size = sizeof(ShowInfoContext), .priv_size = sizeof(ShowInfoContext),
.init = init, .init = init,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame_keep_ref, .start_frame = ff_null_start_frame_keep_ref,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO }, .type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -106,15 +106,15 @@ AVFilter avfilter_vf_slicify = { ...@@ -106,15 +106,15 @@ AVFilter avfilter_vf_slicify = {
.priv_size = sizeof(SliceContext), .priv_size = sizeof(SliceContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.config_props = config_props, .config_props = config_props,
.end_frame = ff_null_end_frame, }, .end_frame = ff_null_end_frame, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -204,15 +204,15 @@ AVFilter avfilter_vf_transpose = { ...@@ -204,15 +204,15 @@ AVFilter avfilter_vf_transpose = {
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.config_props = config_props_output, .config_props = config_props_output,
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -243,15 +243,15 @@ AVFilter avfilter_vf_unsharp = { ...@@ -243,15 +243,15 @@ AVFilter avfilter_vf_unsharp = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.config_props = config_props, .config_props = config_props,
.min_perms = AV_PERM_READ, }, .min_perms = AV_PERM_READ, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -95,14 +95,14 @@ AVFilter avfilter_vf_vflip = { ...@@ -95,14 +95,14 @@ AVFilter avfilter_vf_vflip = {
.priv_size = sizeof(FlipContext), .priv_size = sizeof(FlipContext),
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = get_video_buffer, .get_video_buffer = get_video_buffer,
.start_frame = start_frame, .start_frame = start_frame,
.draw_slice = draw_slice, .draw_slice = draw_slice,
.config_props = config_input, }, .config_props = config_input, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, }, .type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -134,9 +134,8 @@ static void filter(AVFilterContext *ctx, AVFilterBufferRef *dstpic, ...@@ -134,9 +134,8 @@ static void filter(AVFilterContext *ctx, AVFilterBufferRef *dstpic,
} }
} }
} }
#if HAVE_MMX
__asm__ volatile("emms \n\t" : : : "memory"); emms_c();
#endif
} }
static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w, int h) static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w, int h)
...@@ -403,19 +402,19 @@ AVFilter avfilter_vf_yadif = { ...@@ -403,19 +402,19 @@ AVFilter avfilter_vf_yadif = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default", .inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame, .start_frame = start_frame,
.get_video_buffer = get_video_buffer, .get_video_buffer = get_video_buffer,
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.end_frame = end_frame, .end_frame = end_frame,
.rej_perms = AV_PERM_REUSE2, }, .rej_perms = AV_PERM_REUSE2, },
{ .name = NULL}}, { .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.poll_frame = poll_frame, .poll_frame = poll_frame,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = config_props, }, .config_props = config_props, },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -174,9 +174,9 @@ AVFilter avfilter_vsrc_color = { ...@@ -174,9 +174,9 @@ AVFilter avfilter_vsrc_color = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}}, .inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = color_request_frame, .request_frame = color_request_frame,
.config_props = color_config_props }, .config_props = color_config_props },
{ .name = NULL}}, { .name = NULL}},
}; };
...@@ -401,10 +401,10 @@ AVFilter avfilter_vsrc_testsrc = { ...@@ -401,10 +401,10 @@ AVFilter avfilter_vsrc_testsrc = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}}, .inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = config_props, }, .config_props = config_props, },
{ .name = NULL }}, { .name = NULL }},
}; };
#endif /* CONFIG_TESTSRC_FILTER */ #endif /* CONFIG_TESTSRC_FILTER */
...@@ -525,10 +525,10 @@ AVFilter avfilter_vsrc_rgbtestsrc = { ...@@ -525,10 +525,10 @@ AVFilter avfilter_vsrc_rgbtestsrc = {
.inputs = (const AVFilterPad[]) {{ .name = NULL}}, .inputs = (const AVFilterPad[]) {{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default", .outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, .request_frame = request_frame,
.config_props = rgbtest_config_props, }, .config_props = rgbtest_config_props, },
{ .name = NULL }}, { .name = NULL }},
}; };
#endif /* CONFIG_RGBTESTSRC_FILTER */ #endif /* CONFIG_RGBTESTSRC_FILTER */
...@@ -24,10 +24,11 @@ ...@@ -24,10 +24,11 @@
* G.723.1 demuxer * G.723.1 demuxer
*/ */
#include "libavutil/audioconvert.h"
#include "avformat.h" #include "avformat.h"
#include "internal.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) static int g723_1_init(AVFormatContext *s)
{ {
...@@ -37,12 +38,14 @@ static int g723_1_init(AVFormatContext *s) ...@@ -37,12 +38,14 @@ static int g723_1_init(AVFormatContext *s)
if (!st) if (!st)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_G723_1; st->codec->codec_id = CODEC_ID_G723_1;
st->codec->channels = 1; st->codec->channel_layout = AV_CH_LAYOUT_MONO;
st->codec->sample_rate = 8000; st->codec->channels = 1;
st->codec->sample_rate = 8000;
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
st->start_time = 0;
return 0; return 0;
} }
...@@ -77,6 +80,6 @@ AVInputFormat ff_g723_1_demuxer = { ...@@ -77,6 +80,6 @@ AVInputFormat ff_g723_1_demuxer = {
.long_name = NULL_IF_CONFIG_SMALL("G.723.1 format"), .long_name = NULL_IF_CONFIG_SMALL("G.723.1 format"),
.read_header = g723_1_init, .read_header = g723_1_init,
.read_packet = g723_1_read_packet, .read_packet = g723_1_read_packet,
.extensions = "tco,rco,g723_1", .extensions = "tco,rco,g723_1",
.flags = AVFMT_GENERIC_INDEX .flags = AVFMT_GENERIC_INDEX
}; };
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "libavutil/avutil.h" #include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 54 #define LIBAVFORMAT_VERSION_MAJOR 54
#define LIBAVFORMAT_VERSION_MINOR 18 #define LIBAVFORMAT_VERSION_MINOR 19
#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment