1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

6462 Commits

Author SHA1 Message Date
Nicolas George
cffea1b483 lavfi: copy framesync into framesync2.
framesync2 will be the base for the version using activate.
Most of the logic will be the same, but the code cannot be shared.
Copying the file initially without change will make the diff
easier to read.
2017-07-30 12:23:52 +02:00
Nicolas George
1daacba91f Revert "Revert "lavfi/buffersrc: push the frame deeper if requested.""
This reverts commit 04aa09c4bc
and reintroduces 0ff5567a30 that
was temporarily reverted due to minor regressions.

It also reverts e5bce8b4ce that fixed FATE refs.
The fate-ffm change is caused by field_order now being set
on the output format because the first frame arrives earlier.
The fate-mxf change is assumed to be the same.
2017-07-30 12:22:41 +02:00
Nicolas George
bbc7cfbf1e lavfi/testsrc2: fix completely transparent alpha. 2017-07-25 09:27:35 +02:00
Muhammad Faiz
7e9f550003 avfilter/w3fdif: do not write to line before start line
That line has been written by previous job.
Fix tsan warning.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-23 20:32:42 +07:00
Vittorio Giovara
2e91a96d7b zscale: Factor out graph building 2017-07-21 20:07:40 +02:00
Vittorio Giovara
0a243bedec zscale: Factor out format initialization 2017-07-21 20:07:40 +02:00
Paul B Mahol
12791ec5b0 avfilter/af_astats: measure dynamic range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 21:07:45 +02:00
Paul B Mahol
a17fcd8e04 avfilter/af_astats: do not overwrite already set values when doing reset
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 20:11:43 +02:00
George Boyle
6e156075b0 avfilter: Add blue and violet noise generation filters
For the blue and violet noise, I took the pink and brown noise
respectively and subtracted the offsets instead of adding them. When I
eyeball the frequency spectrum of the resulting outputs it looks correct
to me, i.e. the blue graph appears to be a mirror image of the pink, and
the same can be said of the violet and the brown. I did not do anything
else to confirm the correctness.
2017-07-19 19:51:04 +02:00
Muhammad Faiz
22b72de04b avfilter/pthread: use slice threading from avutil
Benchmark (with 2 cpus):
./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
    -filter_threads $threads -vf transpose=clock -f null null
threads=2:
  old: 31.129s 31.446s 31.574s
  new: 29.602s 29.636s 29.656s
threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation):
  old: 40.132s 40.279s 40.279s
  new: 39.308s 39.570s 39.693s
threads=4:
  old: 31.306s 31.366s 31.654s
  new: 30.231s 30.360s 30.451s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:51:38 +07:00
Ashish Singh
615479d51c avfilter: add LIBVMAF filter
This one changes the previous vmaf patch to libvmaf to keep it separate from the
native implementation of vmaf inside ffmpeg later.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-07-16 08:21:32 -04:00
James Almer
5688fd77b5 x86/vf_limiter: make limiter functions work on x86_32
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-13 18:17:17 -03:00
Paul B Mahol
01e545d046 avfilter: add limiter filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-08 11:49:54 +02:00
Derek Buitenhuis
b198e09138 af_amix: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:32:03 -04:00
Derek Buitenhuis
704b774ae0 af_tempo: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 15:24:49 -04:00
Kevin Mark
d32a6c36e4 libavfilter/scale2ref: Maintain main input's DAR
The scale2ref filter will now maintain the DAR of the main input and
not the DAR of the reference input. This previous behavior was deemed
counterintuitive for most (all?) use-cases.

Before:
scale2ref=iw/4:ow/mdar
in  w:320 h:240 fmt:rgb24 sar:1/1
ref w:640 h:360 fmt:rgb24 sar:1/1
out w:160 h:120 fmt:rgb24 sar:4/3 flags:0x2
SAR: ((120 * 640) / (160 * 360)) * (1 / 1) = 4 / 3
DAR: (160 / 120) * (4 / 3) = 16 / 9
(main out now same DAR as ref)

Now:
scale2ref=iw/4:ow/mdar
in  w:320 h:240 fmt:rgb24 sar:1/1
ref w:640 h:360 fmt:rgb24 sar:1/1
out w:160 h:120 fmt:rgb24 sar:1/1 flags:0x2
SAR: ((120 * 320) / (160 * 240)) * (1 / 1) = 1 / 1
DAR: (160 / 120) * (1 / 1) = 4 / 3
(main out same DAR as main in)

The scale2ref FATE test has also been updated.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-04 15:09:10 +02:00
Paul B Mahol
1212041c91 avfilter/vf_ssim: use unsigned so result can be properly stored
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-04 10:21:14 +02:00
Michael Niedermayer
ecc16d893d avfilter/vf_geq: >8 bps support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-30 12:34:34 +02:00
James Almer
d2ef9e6e7f x86/vf_blend: use ABS2 macro 2017-06-27 20:45:55 -03:00
James Almer
0daa1cf073 x86/vf_blend: optimize difference and negation functions
Process more pixels per loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-27 13:17:23 -03:00
James Almer
fa50d9360b x86/vf_blend: add sse and ssse3 extremity functions
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-27 13:17:23 -03:00
Paul B Mahol
e9510dc032 avfilter: remove usage of empty header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-26 19:43:41 +02:00
Paul B Mahol
22a03c2900 avfilter/vf_blend: add extremity blend mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25 16:39:10 +02:00
Paul B Mahol
8a14374ab3 avfilter/vf_waveform: allow alpha output for >8 depth planar rgb inputs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25 13:14:22 +02:00
Paul B Mahol
f269a1e0b8 avfilter/vf_overlay: separate functions with main alpha
~5-15% faster overall with main input without alpha.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25 12:32:53 +02:00
Paul B Mahol
5c1f4330d4 avfilter/vf_lut2: add support for gray10 and gray12 pixel formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 22:40:32 +02:00
Paul B Mahol
c1b43e8452 avfilter/vf_overlay: remove rgb option
Its been deprecated for over 3 years.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:20:46 +02:00
Paul B Mahol
f483949188 avfilter/af_headphone: do not free frame that's gonna be reused later
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:15:57 +02:00
Paul B Mahol
c90b88090c avfilter: do not leak AVFrame on failed buffer allocation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:15:57 +02:00
Ronald S. Bultje
97f7f83169 vf_spp: only assign function pointers if permutation matches expectations. 2017-06-24 07:53:15 -04:00
Paul B Mahol
565dc0e283 avfilter/vf_overlay: add auto format mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 10:18:30 +02:00
Paul B Mahol
04aa09c4bc Revert "lavfi/buffersrc: push the frame deeper if requested."
Fixes framesync filters with shortest option enabled.

This reverts commit 0ff5567a30.
2017-06-23 16:18:42 +02:00
Diego Biurrun
fd502f4f5f build: Generalize yasm/nasm-related variable names
None of them are specific to the YASM assembler.

(Cherry-picked from libav commit 39e208f4d4)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:29 -03:00
Paul B Mahol
664ac7c5e2 avfilter/af_stereotools: add forgotten break
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-21 19:20:25 +02:00
Kevin Mark
05feeeb813 libavfilter/scale: Populate ow/oh when using 0 as w/h
The input width and height is known at parse time so there's no
reason ow/oh should not be usable when using 0 as the width or
height expression.

Previously in "scale=0:ow" ow would be set to "0" which works,
conveniently, as "scale=0:0" is perfectly valid input but this breaks
down when you do something like "scale=0:ow/4" which one could
reasonably expect to work as well, but does not as ow is 0 not the
real value.

This change handles the 0 case for w/h immediately so the ow/oh
variables work as expected. Consequently, the rest of the code does
not need to handle 0 input. w/h will always be > 0 or < 0.

The second explicit (int) cast ensures that ow/oh appear as integers
as a user might expect when dealing with pixel dimensions.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-19 14:27:52 -04:00
Paul B Mahol
ef178f630f avfilter/af_stereotools: add 2 more modes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-19 18:59:33 +02:00
Paul B Mahol
1a4236e025 avfilter/af_superequalizer: stop leaking s->out frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-19 18:34:04 +02:00
Paul B Mahol
53624d62d9 avfilter/af_superequalizer: improve description
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-19 18:19:16 +02:00
Paul B Mahol
2820c9dfaa avfilter/af_superequalizer: fix out of array access
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-19 18:19:16 +02:00
Paul B Mahol
b9d0a5fc21 avfilter: add roberts cross operator
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-19 14:04:44 +02:00
Paul B Mahol
ca5cf84655 avfilter: add superequalizer filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-19 14:03:54 +02:00
Nicolas George
d790f18ac0 lavfi: print the error message when threading init fails. 2017-06-19 10:29:17 +02:00
Paul B Mahol
478a1949d9 avfilter/af_amix: fix possible hang
Fixes #6424.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-18 21:06:54 +02:00
Mark Thompson
70808859dd vf_hwmap: Properly free a locally derived device
Fixes CID 1412853.

(cherry picked from commit a670eea560)
2017-06-18 17:06:41 +01:00
Mark Thompson
d984b29b21 vf_hwmap: Add missing error code
Fixes CID 1412854.

(cherry picked from commit 5635c80bf5)
2017-06-18 17:05:13 +01:00
Paul B Mahol
a23a56e77c libavfilter/af_biquads: add shorter option for width_type
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-18 17:31:03 +02:00
Paul B Mahol
9b667f609c avfilter/af_headphone: fix possible memory leaks on failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-15 11:19:12 +02:00
Mark Thompson
d81be0a60a vf_hwmap: Add reverse mapping for hardware frames
This is something of a hack.  It allocates a new hwframe context for
the target format, then maps it back to the source link and overwrites
the input link hw_frames_ctx so that the previous filter will receive
the frames we want from ff_get_video_buffer().  It may fail if
the previous filter imposes any additional constraints on the frames
it wants to use as output.

(cherry picked from commit 81a4cb8e58)
2017-06-14 22:27:34 +01:00
Mark Thompson
b2ef1f42ba vf_hwmap: Add device derivation
Also refactor a little and improve error messages to make failure
cases easier to understand.

(cherry picked from commit 38cb05f1c8)
2017-06-14 22:27:34 +01:00
Mark Thompson
bff7bec1d7 vf_deinterlace_vaapi: Add support for field rate output
In order to work correctly with the i965 driver, this also fixes the
direction of forward/backward references - forward references are
intended to be those from the past to the current frame, not from the
current frame to the future.

(cherry picked from commit 9aa251c98c)
2017-06-14 22:26:32 +01:00