Commit Graph

1232 Commits

Author SHA1 Message Date
Anton Khirnov
e4a7b2177d vf_showinfo: remove its useless init function
Filter private data is memset to 0 so there is no point in explicitly
initing anything to 0.
2013-03-16 05:36:14 +01:00
Anton Khirnov
dd74e3ef33 avfiltergraph: use sizeof(var) instead of sizeof(type) 2013-03-16 05:34:20 +01:00
Anton Khirnov
42c7c61ab2 avfiltergraph: replace AVFilterGraph.filter_count with nb_filters
This is more consistent with the naming in the rest of Libav.
2013-03-16 05:33:23 +01:00
Anton Khirnov
556aab8f11 lavfi: use designated initializers in avfilter_class 2013-03-16 05:33:06 +01:00
Loren Merritt
5b3c1aecb2 hqdn3d: Fix out of array read in LOWPASS
CC:libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-13 09:14:59 +01:00
Anton Khirnov
d0a863ac89 vf_hqdn3d: fix uninitialized variable use
CC:libav-stable@libav.org
2013-03-11 18:28:35 +01:00
Anton Khirnov
887d31d455 vf_gradfun: fix uninitialized variable use
CC:libav-stable@libav.org
2013-03-11 18:28:34 +01:00
Xi Wang
5d639b2b4a vf_pad: fix a & instead of && typo
Avoid buffer overflow in buffer_needs_copy()

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-10 11:16:10 +01:00
Anton Khirnov
0651e892e1 Replace remaining includes of audioconvert.h with channel_layout.h 2013-03-08 07:42:13 +01:00
Anton Khirnov
d8b31be6ca Add the bumps and APIchanges entries for reference counted buffers changes. 2013-03-08 07:41:49 +01:00
Anton Khirnov
7e350379f8 lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
2013-03-08 07:37:18 +01:00
Reimar Döffinger
efa7f42020 Use the avstring.h locale-independent character type functions
Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:36 +02:00
Justin Ruggles
9f1223562e lavfi: connect libavresample options to af_resample via AVFilterGraph 2013-02-23 17:07:54 -05:00
Anton Khirnov
64ed397635 vf_yadif: fix out-of line reads
Some changes in the border pixels, visually indistinguishable.
2013-02-15 16:08:33 +01:00
Anton Khirnov
ccd70d9c16 vf_yadif: factorize initializing the filtering callbacks
Do it all in config_props().
2013-02-15 16:08:00 +01:00
Anton Khirnov
99162f8d46 vf_yadif: silence a warning.
clang says:
libavfilter/vf_yadif.c:192:28: warning: incompatible pointer types assigning to
'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)'
from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)'
2013-02-06 10:21:51 +01:00
Diego Biurrun
e66240f22e avfilter: x86: consistent filenames for filter optimizations 2013-02-04 15:00:47 +01:00
Diego Biurrun
76d90125cd vf_hqdn3d: x86: Add proper arch optimization initialization 2013-02-01 13:11:45 +01:00
Anton Khirnov
7194330bcd vf_delogo: fix copying the input frame.
CC:libav-stable@libav.org
2013-01-29 07:33:02 +01:00
Anton Khirnov
f81c37e40f vf_delogo: fix an uninitialized read.
CC:libav-stable@libav.org
2013-01-29 07:32:54 +01:00
Vladimir Pantelic
0b55b16abc avfilter: allow setpts filter to use wallclock time for calculations
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 10:50:09 +01:00
Justin Ruggles
23098bbd50 vf_fps: add final flushed frames to the dropped frame count 2013-01-15 11:26:46 -05:00
Daniel Kang
67360ccd51 yadif: x86: fix build for compilers without aligned stack
Manually load registers to avoid using 8 registers on x86_32 with
compilers that do not align the stack (e.g. MSVC).

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-14 09:51:52 +01:00
Daniel Kang
899157b308 yadif: Port inline assembly to yasm
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-09 18:41:02 +01:00
Diego Biurrun
bcb8d9eb8f Drop unnecessary 'l' length modifier when printfing double values.
%f denotes a double argument and 'l' does nothing in this case
according to the C spec.
2012-12-31 11:20:45 +01:00
Diego Biurrun
c73c87b412 cosmetics: Prettyprint codec/format/filter registration files 2012-12-28 19:18:13 +01:00
Diego Biurrun
69583bd3b1 avfilter: Refactor unconditional filter registration 2012-12-28 19:18:13 +01:00
Diego Biurrun
5af53731d9 avfilter: Compile FIFO filters unconditionally
Building libavfilter without that functionality makes little sense.
2012-12-23 18:57:01 +01:00
Diego Biurrun
69f086e0f9 build: avfilter: Remove duplicate compilation entry for vf_scale
vf_scale should not be unconditionally compiled even if disabled.
2012-12-21 00:18:34 +01:00
Justin Ruggles
4e5a8878d5 asyncts: ignore min_delta only if first_pts is set 2012-12-13 18:51:56 -05:00
Justin Ruggles
c0dc57f126 asyncts: merge two conditions 2012-12-13 18:51:56 -05:00
Justin Ruggles
0ee440fe38 asyncts: cosmetics: reindent 2012-12-13 13:02:21 -05:00
Justin Ruggles
c143de40c3 asyncts: fix the asyncts behavior when using the first_pts option
Currently it will do padding, but it does not properly handle
start-of-stream trimming as documented.
2012-12-13 13:02:21 -05:00
Justin Ruggles
8083332c2d asyncts: use clipped delta value when setting resample compensation
The max_comp option is supposed to limit maximum compensation, but
currently the clipped value is not actually used.
2012-12-13 13:02:21 -05:00
Justin Ruggles
f266486b2e asyncts: fix flushing of final samples at EOF 2012-12-13 13:02:21 -05:00
Justin Ruggles
b30a363331 x86: af_volume: add SSE2/SSSE3/AVX-optimized s32 volume scaling 2012-12-05 11:23:37 -05:00
Justin Ruggles
f96f1e06a4 x86: af_volume: add SSE2-optimized s16 volume scaling 2012-12-05 11:23:37 -05:00
Justin Ruggles
b384e031da lavfi: add volume filter
Based on the volume filter in FFmpeg written by Stefano Sabatini
<stefasab@gmail.com>.
2012-12-05 11:23:37 -05:00
Anton Khirnov
cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Anton Khirnov
4c973de9a5 vf_fieldorder: require write permissions
This filter modifies the input frame.
2012-11-28 08:50:24 +01:00
Anton Khirnov
49dd71a6f1 vf_fieldorder: reindent 2012-11-28 08:50:24 +01:00
Anton Khirnov
565e4993c6 lavfi: merge start_frame/draw_slice/end_frame
Any alleged performance benefits gained from the split are purely
mythological and do not justify added code complexity.
2012-11-28 08:50:19 +01:00
Anton Khirnov
bb6c67bb36 lavfi: remove vf_slicify
The following commit will make it useless.

The crop_scale_vflip FATE test changes because of off-by-one differences
in output when vflipped slices are passed to sws.
2012-11-28 08:44:01 +01:00
Anton Khirnov
af7d13ee4a asink_nullsink: plug a memory leak. 2012-11-28 08:43:54 +01:00
Justin Ruggles
a903f8f087 Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Anton Khirnov
b68aac7ea3 vf_drawtext: do not use deprecated av_tree_node_size 2012-11-02 18:28:55 +01:00
Diego Biurrun
d8eda37080 x86: mmx2 ---> mmxext in function names 2012-10-31 17:53:57 +01:00
Diego Biurrun
04581c8c77 x86: yasm: Use complete source path for macro helper %includes
This is more consistent with the way we handle C #includes and
it simplifies the build system.
2012-10-31 00:37:42 +01:00
Diego Biurrun
6860b4081d x86: include x86inc.asm in x86util.asm
This is necessary to allow refactoring some x86util macros with cpuflags.
2012-10-31 00:37:42 +01:00
Anton Khirnov
20dd41af85 lavfi: add ashowinfo filter
It can be useful for debugging.

Based on a patch by Stefano Sabatini <stefano.sabatini-lala@poste.it>
2012-10-29 21:29:58 +01:00
Mans Rullgard
67a68dcec2 af_channelmap: remove stray enum declaration
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:06:43 +01:00
Mans Rullgard
6b776c61da buffersink: remove stray semicolon after function definition
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:06:27 +01:00
Janne Grunau
285b706b55 avfilter: fix graphparser memleaks on error paths
Fixes CID700635, CID700636 and CID732274.
2012-10-25 15:00:15 +02:00
Diego Biurrun
f6c38c5f4e avfilter: call x86 init functions under if (ARCH_X86), not if (HAVE_MMX) 2012-10-12 19:58:51 +02:00
Anton Khirnov
59ee9f78b0 lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Mans Rullgard
568c70e79e lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on
these initialisers.  The current style is also quite ugly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-10 22:26:12 +01:00
Janne Grunau
79e6e8eba2 avfilter: correct memcpy size avfilter_copy_buf_props()
Does not make a difference in this case since sizeof(uint8_t*) ==
sizeof(uint8_t**). Fixes CID703814.
2012-10-09 21:05:14 +02:00
Janne Grunau
ac9a89562a af_resample: unref out_buf when avresample_convert returns 0
Fixes CID732273.
2012-10-09 18:43:30 +02:00
Janne Grunau
8501c09868 af_amix: prevent memory leak on error path
Fixes CID732272.
2012-10-09 16:15:15 +02:00
Janne Grunau
1afd7a118f af_channelmap: free old extended_data on reallocation
Prevents writes to freed memory and the leak of the old extended data.
Fixes CID732303.
2012-10-09 15:41:24 +02:00
Anton Khirnov
716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Justin Ruggles
7b556be673 af_resample: avoid conversion of identical sample formats for 1 channel
When there is only 1 channel, the planar and interleaved formats of the same
data type should be treated as identical.
2012-10-07 16:45:50 -04:00
Diego Biurrun
e4cbf7529b Give all anonymously typedeffed structs in headers a name
Anonymous structs cannot be forward declared and have no benefit.
2012-10-06 09:27:11 +02:00
Anton Khirnov
ba04177eeb vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203.

CC:libav-stable@libav.org
2012-10-06 07:27:53 +02:00
Anton Khirnov
e7ba5b1de0 lavr: change the type of the data buffers to uint8_t**.
This is more consistent with what the rest of Libav does.

This breaks API.
2012-10-05 13:49:44 +02:00
Anton Khirnov
4673a5a761 vf_overlay: properly sync inputs.
Right now it incorrectly assumes that the frames are sent in the proper
order, which worked with old ffmpeg and avconv versions by accident.
2012-10-04 10:23:25 +02:00
Anton Khirnov
ab35ec29a4 vf_overlay: get rid of pointless messing with timebase.
Output frames correspond 1:1 to input frames on the main input.
So use the main input timebase for output.
2012-10-04 10:21:58 +02:00
Anton Khirnov
11d1ca4b2c Use avcodec_free_frame() to free AVFrames. 2012-09-24 12:31:25 +02:00
Anton Khirnov
e3496e5dbe avfiltergraph: silence an uninitialized variable warning
The warning is:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:528:9: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
libavfilter/avfiltergraph.c:479:13: note: ‘best_idx’ was declared here

Initialize it to an invalid value and add an assert that it's properly
set later.
2012-09-17 15:48:20 +02:00
Anton Khirnov
4e48aa8656 buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame() 2012-09-17 15:48:20 +02:00
Mans Rullgard
1fce361d70 lavfi: replace empty input/output lists with null pointers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-17 14:35:06 +01:00
Luca Barbato
28165fee1b yadif: cosmetics 2012-09-09 15:31:18 +02:00
Anton Khirnov
91a84a5247 af_asyncts: check return value from lavr when flushing.
Fixes an infinite loop on flush when avresample_get_delay() still
reports some samples but avresample_convert() doesn't return any data.
2012-09-07 09:06:48 +02:00
Martin Storsjö
21bc440384 avopt: Explicitly store rational option defaults in .dbl
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:55 +03:00
Martin Storsjö
c7b610aa0b avopt: Explicitly store float/double option defaults in .dbl
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:51 +03:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Martin Storsjö
235f74db59 Rename missed cases of FF_OPT_TYPE_* to AV_OPT_TYPE_*
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-31 23:27:21 +02:00
Diego Biurrun
17337f54c0 x86: Split inline and external assembly #ifdefs 2012-08-31 01:53:25 +02:00
Diego Biurrun
cdaec0b240 avfilter: x86: Use more precise compile template names 2012-08-30 18:51:51 +02:00
Martin Storsjö
b441a4517b vf_hqdn3d: Remove a duplicate inline declaration
Compilation seems to fail on GCC 3.4 due to this duplicate
declaration.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-27 16:40:59 +03:00
Martin Storsjö
2bd67175c7 vf_hqdn3d: Don't declare the loop variable within the for loop
This C99 feature is generally not used in the libav codebase,
since it breaks building with some fringe compilers (GCC 2.95,
MSVC).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-27 15:29:39 +03:00
Loren Merritt
7a1944b907 vf_hqdn3d: x86 asm
13% faster on penryn, 16% on sandybridge, 15% on bulldozer
Not simd; a compiler should have generated this, but gcc didn't.
2012-08-26 10:49:14 +00:00
Loren Merritt
566858a770 vf_hqdn3d: support 16bit colordepth 2012-08-26 10:49:14 +00:00
Anton Khirnov
4d7adec8bd AVOptions: store defaults for INT64 options in int64 union member.
Double does not have enough precision to represent all int64 numbers
exactly.
2012-08-24 11:25:06 +02:00
Martin Storsjö
7ebe3962f3 Add missing includes for code relying on external libraries
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 16:47:02 +03:00
Martin Storsjö
33e112847d Add more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 10:49:54 +03:00
Martin Storsjö
70766c2182 Add some more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 23:48:48 +03:00
Martin Storsjö
1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Mans Rullgard
480178a295 x86: yadif: fix asm with suncc
Under some circumstances, suncc will use a single register for the
address of all memory operands, inserting lea instructions loading
the correct address prior to each memory operand being used in the
code. In the yadif code, the branch in the asm block bypasses such
an lea instruction, causing an incorrect address to be used in the
following load.

This patch replaces the tmpX arrays with a single array and uses a
register operand to hold its address. Although this prevents using
offsets from the stack pointer to access these locations, the code
still builds as 32-bit PIC even with old compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-13 14:51:52 +01:00
Diego Biurrun
804d7a1aa6 doxygen: Fix function parameter names to match the code 2012-08-09 20:05:55 +02:00
Mans Rullgard
c318626ce2 x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h
This puts x86-specific things in the x86/ subdirectory where they
belong.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-09 00:58:20 +01:00
Reinhard Tartler
800750417f lavfi: properly signal out-of-memory error in ff_filter_samples
Found with a clang-scan report on http://fate.libav.org/csa/
2012-08-05 10:26:49 +02:00
Derek Buitenhuis
8b8750e061 cosmetics: Fix a few switched periods and linebreaks
Based on a patch by Piotr Bandurski.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-08-04 16:39:27 -04:00
Diego Biurrun
239fdf1b4a x86: build: replace mmx2 by mmxext
Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
2012-08-03 22:51:05 +02:00
Diego Biurrun
d1505db067 x86: yadif: Mark mmxext optimizations as such
The yadif mmx optimizations contain the pmaxsw and pmaxub mmxext
instructions, causing sigills on CPUs that do not support mmxext.
2012-07-31 13:54:06 +02:00
Justin Ruggles
be51e589cd af_asyncts: avoid overflow in out_size with large delta values 2012-07-29 14:31:54 -04:00
Justin Ruggles
70d71b5801 af_asyncts: add first_pts option
This allows for padding/trimming at the start of stream. By default, no
assumption is made about the first frame's expected pts, so no padding or
trimming is done.
2012-07-29 14:31:54 -04:00
Loren Merritt
1ad715dbf3 vf_hqdn3d: support 9 and 10bit colordepth
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-07-28 14:20:06 -07:00