1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

54329 Commits

Author SHA1 Message Date
Jean Delvare
16fd75ceec lavfi/delogo: use weighted interpolation
The original delogo algorithm interpolates both horizontally and
vertically and uses the average to compute the resulting sample. This
works reasonably well when the logo area is almost square. However
when the logo area is significantly larger than high or higher than
large, the result is largely suboptimal.

The issue can be clearly seen by testing the delogo filter with a fake
logo area that is 200 pixels large and 2 pixels high. Vertical
interpolation gives a very good result in that case, horizontal
interpolation gives a very bad result, and the overall result is poor,
because both are given the same weight.

Even when the logo is roughly square, the current algorithm gives poor
results on the borders of the logo area, because it always gives
horizontal and vertical interpolations an equal weight, and this is
suboptimal on borders. For example, in the middle of the left hand
side border of the logo, you want to trust the left known point much
more than the right known point (which the current algorithm already
does) but also much more than the top and bottom known points (which
the current algorithm doesn't do.)

By properly weighting each known point when computing the value of
each interpolated pixel, the visual result is much better, especially
on borders and/or for high or large logo areas.

The algorithm I implemented guarantees that the weight of each of the
4 known points directly depends on its distance to the interpolated
point. It is largely inspired from the original algorithm, the key
difference being that it computes the relative weights globally
instead of separating the vertical and horizontal interpolations and
combining them afterward.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-07-01 09:33:33 +02:00
Carl Eugen Hoyos
b42bcaef29 Avoid a null pointer dereference in avcodec_decode_audio4().
This could happen if oom occured while probing a file.
Fixes ticket #2722.
2013-07-01 03:07:44 +02:00
Michael Niedermayer
ec837a0899 Merge remote-tracking branch 'cus/stable'
* cus/stable:
  ffplay: always send zero packets to flush audio decoders
  ffplay: use frame->pkt_pts instead of pkt->pts in audio pts calculation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-01 02:41:26 +02:00
Michael Niedermayer
a6e46ed51a Revert "avutil/x86: disable ff_evaluate_lls_sse2() for 32bit"
This reverts commit 247425241c.
2013-07-01 02:27:47 +02:00
Michael Niedermayer
4e488ac5f5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: lpc: fix a segfault in av_evaluate_lls_sse2()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-01 02:26:22 +02:00
Michael Niedermayer
709cae2bcb vorbisdec: Check VLC tables during use instead of setup
Fixes regression and Ticket2720

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-01 02:09:29 +02:00
Michael Niedermayer
ae038c0914 vorbisdec: propagate errors from setup_classifs()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-01 02:08:50 +02:00
Loren Merritt
1221bb6239 x86: lpc: fix a segfault in av_evaluate_lls_sse2() 2013-06-30 23:11:19 +00:00
Marton Balint
02fc61a5a6 ffplay: always send zero packets to flush audio decoders
Zero packets are needed not for codecs with CODEC_CAP_DELAY but for
multithreaded decoders as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
2013-07-01 00:24:03 +02:00
Marton Balint
447d2e31d1 ffplay: use frame->pkt_pts instead of pkt->pts in audio pts calculation
Fixes ticket #2717.

Signed-off-by: Marton Balint <cus@passwd.hu>
2013-07-01 00:24:03 +02:00
Carl Eugen Hoyos
712ef25116 Avoid a null pointer dereference after oom on frame size change in mpegvideo.c.
Fixes ticket #2735.
2013-06-30 23:45:37 +02:00
Carl Eugen Hoyos
f4aa8085f2 Avoid a null pointer dereference on oom in the aac encoder.
Fixes ticket #2732.
2013-06-30 23:25:18 +02:00
Paul B Mahol
84343dd9d3 indeo3: check return values of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-30 19:43:55 +00:00
Michael Niedermayer
b00e56bec5 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Support compilation on aix with gcc.
  Rename "AVClass class" as "AVClass component_class".
  Rename constant FRAMESIZE in ra144 codec as FRAME_SIZE.
  Rename thread_init() in libavcodec and libavfilter as library_thread_init().
  Rename constant HZ in af_biquads.c as HERTZ.
  Drop local lable from ppc asm timer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 21:18:17 +02:00
Michael Niedermayer
247425241c avutil/x86: disable ff_evaluate_lls_sse2() for 32bit
It just segfaults on 32bit, thus its disabled until someone fixes it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 19:03:57 +02:00
Paul B Mahol
7e112df470 flac_parser: check return value of av_fifo_alloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-30 16:49:45 +00:00
Matthieu Bouron
9e6d063dbc lavf/movenc: use ffio_fill()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:28:51 +02:00
Michael Niedermayer
4e99660493 mpegts: use seek_back() for all seek backs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:50 +02:00
Michael Niedermayer
a5f23d8da0 mpegts: factor seek_back() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:46 +02:00
Michael Niedermayer
b7c6685268 mpegts_read_header: goto fail instead of return directly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:42 +02:00
Michael Niedermayer
afddf0d910 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mjpeg: Check the unescaped size for overflows

Conflicts:
	libavcodec/mjpegdec.c

See: a9456c7c5c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 14:11:38 +02:00
Michael Niedermayer
e3fb8ac956 Merge commit '7520d9779c6d30b385df5a0a42da508238076192'
* commit '7520d9779c6d30b385df5a0a42da508238076192':
  mjpeg: Move code out of else branch

Conflicts:
	libavcodec/mjpegdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 13:50:55 +02:00
Carl Eugen Hoyos
f803e0dc0e Support compilation on aix with gcc.
Shared libraries and the IBM compiler are currently not supported.
"--arch=ppc" has to be passed to configure, uname is not compatible.
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
0915b531bc Rename "AVClass class" as "AVClass component_class".
The aix header math.h defines "extern int class()" for C.
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
742b961769 Rename constant FRAMESIZE in ra144 codec as FRAME_SIZE.
The aix header sys/mstsave.h defines FRAMESIZE as _FRAMESIZE.
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
674d8a9629 Rename thread_init() in libavcodec and libavfilter as library_thread_init().
The aix header sys/thread.h contains a definition for thread_init().
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
33f5d70df5 Rename constant HZ in af_biquads.c as HERTZ.
The aix header sys/m_param.h defines HZ as _HZ.
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
6258e86d4b Drop local lable from ppc asm timer.
The aix assembler does not support local lables.
2013-06-30 13:47:44 +02:00
Michael Niedermayer
06549cee42 Merge commit '7798a59dc14ae27efe64e639a42646002608a908'
* commit '7798a59dc14ae27efe64e639a42646002608a908':
  avconv: Don't include colorspace.h

No change as the commit is already part of ffmpeg.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 13:43:05 +02:00
Michael Niedermayer
c1fc4ff937 Merge commit '02ec656af72030eea4f3d63e30b25625cce6a3df'
* commit '02ec656af72030eea4f3d63e30b25625cce6a3df':
  wmapro: error out on impossible scale factor offsets

The check is replaced by an assert(), as the condition cannot be
true except through bugs elsewhere (which should have been fixed
already)

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 13:35:36 +02:00
Michael Niedermayer
490ed7f0ec Merge commit 'd4a217a408da4bd63acc02cd8f9ebe378a2ad65a'
* commit 'd4a217a408da4bd63acc02cd8f9ebe378a2ad65a':
  wmapro: check the min_samples_per_subframe

Conflicts:
	libavcodec/wmaprodec.c

See: 9166f483c5

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 13:21:49 +02:00
Michael Niedermayer
97947d9bba Merge commit '183880cfc4aae53ce504e13337791cad5841c80c'
* commit '183880cfc4aae53ce504e13337791cad5841c80c':
  pictor: use the correct logging context

No change, as this has already been fixed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 13:04:40 +02:00
Michael Niedermayer
e27be795f0 avcodec/lpc: Use a function pointer from an initialized context
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 12:40:16 +02:00
Michael Niedermayer
32a3955259 Merge commit 'c93ccf5a4cca722b39f05e9f5660b4cb75bc1740'
* commit 'c93ccf5a4cca722b39f05e9f5660b4cb75bc1740':
  lpc: use levinson for the first pass of multipass cholesky

Conflicts:
	libavcodec/lpc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 12:26:58 +02:00
Michael Niedermayer
6e76e6a05a Merge commit 'b545179fdff1ccfbbb9d422e4e9720cb6c6d9191'
* commit 'b545179fdff1ccfbbb9d422e4e9720cb6c6d9191':
  x86: lpc: simd av_evaluate_lls

Conflicts:
	libavutil/x86/lls.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 12:15:12 +02:00
Michael Niedermayer
a285079bc7 lls.asm: disable ff_update_lls_avx
The code doesnt build with yasm from ubuntu 12.04

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 12:12:11 +02:00
Michael Niedermayer
0b40c50508 lls.asm: put avx code under if HAVE_AVX_EXTERNAL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 12:12:01 +02:00
Michael Niedermayer
78b5479633 Merge commit '502ab21af0ca68f76d6112722c46d2f35c004053'
* commit '502ab21af0ca68f76d6112722c46d2f35c004053':
  x86: lpc: simd av_update_lls

The versions are bumped due to changes in lls.h which is used across
libraries affecting intra library ABI
(This version bump also covers changes to lls.h in the immedeatly previous
 commits)

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 11:35:52 +02:00
Michael Niedermayer
c93a424718 Merge commit '41578f70cf8aec8e7565fba1ca7e07f3dc46c3d2'
* commit '41578f70cf8aec8e7565fba1ca7e07f3dc46c3d2':
  lpc: use function pointers, in preparation for asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 11:23:43 +02:00
Michael Niedermayer
d3bd320e63 Merge commit 'cc6714bb16b1f0716ba43701d47273dbe9657b8b'
* commit 'cc6714bb16b1f0716ba43701d47273dbe9657b8b':
  lpc: remove "decay" argument

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 10:54:20 +02:00
Luca Barbato
6765ee7b9c mjpeg: Check the unescaped size for overflows
And contextually check init_get_bits success and fix the reporting
message.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-30 08:48:51 +02:00
Luca Barbato
7520d9779c mjpeg: Move code out of else branch
Simplify the control flow and spare some vertical space.
2013-06-30 08:46:55 +02:00
Michael Niedermayer
ff130d7363 get_xbits: assert validity of the number of bits
similar is already done in the other get_bits() functions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 01:40:18 +02:00
Michael Niedermayer
68efb1d60a 4xm: Dont ignore dc run errors
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 01:35:22 +02:00
Michael Niedermayer
13c56e9a9c 4xm: check for invalid zero ac coeffs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 01:35:22 +02:00
Michael Niedermayer
6d6eabd399 mjpeg_decode_dc: check code before using it in get_xbits()
Fixes undefined behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 01:35:22 +02:00
Derek Buitenhuis
58950ca0df ffmpeg: Don't include colorspace.h
The header is private, and ffmpeg.c doesn't use it
for anything.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-29 16:44:12 -04:00
Michael Niedermayer
a2802d3cd4 get_pix_fmt_score: favor equal formats if all else equal
Fixes Ticket2578

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 22:20:20 +02:00
Derek Buitenhuis
7798a59dc1 avconv: Don't include colorspace.h
The header is private, and avconv.c doesn't use it
for anything.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-29 14:24:02 -04:00
Michael Niedermayer
7f866c14ba update all trac links to use the trac subdomain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-29 19:27:49 +02:00