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

68095 Commits

Author SHA1 Message Date
Benoit Fouet
af8804ac86 avcodec/pngdec: allow for some code path optimizations.
Use 'if (CONFIG_APNG_DECODER)' where needed, so that the compiler can
optimize out some portion of code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 15:51:31 +01:00
Benoit Fouet
aff50ae1d1 avcodec/pngdec: do not blend on transparent black
There is no need to memset the zlib output buffer, as there is no
blending happening there. Instead, do not blend when the dispose
operation is set to 'background' (tranparent black).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 15:51:23 +01:00
Rong Yan
bd67d0ead1 avcodec/ppc/h264qpel: POWER LE support for put_pixels16_l2_altivec() and avg_pixels16_l2_altivec()
add put_unligned_store() and avg_unligned_store() macros

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 15:43:47 +01:00
Rong Yan
8cc5a78e45 avcodec/ppc/h264qpel_template: POWER LE support for PREFIX_h264_qpel16_h_lowpass_altivec() PREFIX_h264_qpel16_v_lowpass_altivec() PREFIX_h264_qpel16_hv_lowpass_altivec()
add load_alignment() macro

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 15:33:18 +01:00
Rong Yan
89f3043c7f avcodec/ppc/h264chroma_template: POWER LE support for PREFIX_h264_chroma_mc8_altivec() PREFIX_no_rnd_vc1_chroma_mc8_altivec() CHROMA_MC8_ALTIVEC_CORE_SIMPLE() CHROMA_MC8_ALTIVEC_CORE()
add marcos GET_VSRC1() GET_VSRC()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 15:32:38 +01:00
Rong Yan
57c89c50bd avcodec/ppc/h264dsp: POWER LE support for h264_idct8_add_altivec() h264_idct_dc_add_internal() h264_loop_filter_luma_altivec() write16x4() VEC_1D_DCT() weight_h264_W_altivec() biweight_h264_W_altivec() VEC_LOAD_U8_ADD_S16_STORE_U8() ALTIVEC_STORE_SUM_CLIP()
add marcos GET_2PERM() dstv_load() vdst_load() dest_unligned_store()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 15:30:02 +01:00
Michael Niedermayer
f001a2bd34 Merge commit 'fcae9f212a6001d966c52dc22cd4b22e9851b428'
* commit 'fcae9f212a6001d966c52dc22cd4b22e9851b428':
  dashenc: Avoid a VLA-like construct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:52:13 +01:00
Michael Niedermayer
5ce070c16c Merge commit 'a9d8d35e4833fc4dfbf557ce73c84e9ca6224427'
* commit 'a9d8d35e4833fc4dfbf557ce73c84e9ca6224427':
  dashenc: Add options to make segment names configurable

Conflicts:
	libavformat/dashenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:50:38 +01:00
Michael Niedermayer
21ff626ce0 Merge commit '01eac895ab350027467ffbe7278740f89ae8be75'
* commit '01eac895ab350027467ffbe7278740f89ae8be75':
  rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess

Conflicts:
	libavformat/rtmpproto.c

See: 60fd790f38
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:31:59 +01:00
Michael Niedermayer
900fff89c9 Merge commit '44127b157e9f8acb837d4bb3a094f56b40da3ef5'
* commit '44127b157e9f8acb837d4bb3a094f56b40da3ef5':
  rtmppkt: Make pkt->data reallocable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:14:26 +01:00
Michael Niedermayer
42a095d095 Merge commit '3c3b8003a13d9c3668c0bb6d79d2376da3b2b352'
* commit '3c3b8003a13d9c3668c0bb6d79d2376da3b2b352':
  rtmpproto: Simplify code for copying data into the output packet

Conflicts:
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 11:57:33 +01:00
Michael Niedermayer
a105c1f204 Merge commit '857e6667f9061ae261c0b951113e4efc4329b05e'
* commit '857e6667f9061ae261c0b951113e4efc4329b05e':
  rtmpproto: Clarify a comment

Conflicts:
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 11:35:08 +01:00
Martin Storsjö
fcae9f212a dashenc: Avoid a VLA-like construct
This fixes the build on compilers that interpreted the earlier
code as a variable length array (which we intentionally disallow).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 11:55:42 +02:00
Bryan Huh
a9d8d35e48 dashenc: Add options to make segment names configurable
This allows one to specify templated segment names for init-segments,
media-segments, and for the base-url in the case of single-file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 10:48:15 +02:00
Martin Storsjö
01eac895ab rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess
Currently, when streaming to an RTMP server, any time a packet of type
RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame
before it gets sent to the server. This is incorrect; only packets for
onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP
server. Specifically, the current bug manifests itself when trying to
stream onTextData or onCuePoint invocations.

This fix addresses that problem and ensures that the @setDataFrame is
only prepended for onMetaData and |RtmpSampleAccess.

Since data is fed to the rtmp_write function in smaller pieces (depending
on the calling IO buffer size), we can't generally assume that the
whole packet (or even the whole command string) is available at once,
therefore we can only check the command string once the full packet
has been transferred to us for sending.

Based on a patch by Jeffrey Wescott.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:29 +02:00
Martin Storsjö
44127b157e rtmppkt: Make pkt->data reallocable
We try to avoid mixing av_malloc with av_realloc, since av_malloc
may be implemented with functions that can't (formally) be mixed
with the functions used in av_realloc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:28 +02:00
Martin Storsjö
3c3b8003a1 rtmpproto: Simplify code for copying data into the output packet
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:27 +02:00
Martin Storsjö
857e6667f9 rtmpproto: Clarify a comment
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:25 +02:00
Michael Niedermayer
ea38e5a6b7 avcodec/hevc_ps: Check num_long_term_ref_pics_sps
Fixes out of array access
Fixes: signal_sigsegv_35bd0f0_1182_cov_791726764_STRUCT_B_Samsung_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 03:57:13 +01:00
Benoit Fouet
cfd83a8af6 avcodec/pngdec: add support for 'over' blend operation for 'none' dispose operation.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 01:58:01 +01:00
Benoit Fouet
7dfee8d697 avcodec/pngdec: split P frames handling to a separate function.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 01:57:52 +01:00
Timo Rothenpieler
95fc80672f Move extralibs variables using ldl after ldl definition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 01:31:41 +01:00
Michael Niedermayer
fae545ca2a Merge commit '1973079417e8701b52ba810a72cb6c7c6f7f9a56'
* commit '1973079417e8701b52ba810a72cb6c7c6f7f9a56':
  opusdec: make sure all substreams have the same number of coded samples

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 00:14:13 +01:00
Michael Niedermayer
449bd3c0c3 Merge commit '96fda42a8f9bf84beaaf7f5991d17f2a057de86c'
* commit '96fda42a8f9bf84beaaf7f5991d17f2a057de86c':
  vf_interlace: get rid of useless loads

See: ca59b5b6ec
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 23:46:45 +01:00
Michael Niedermayer
6db8cd8f37 Merge commit 'fbd6c97f9ca858140df16dd07200ea0d4bdc1a83'
* commit 'fbd6c97f9ca858140df16dd07200ea0d4bdc1a83':
  lavu: fix memory leaks by using a mutex instead of atomics

Conflicts:
	libavutil/buffer.c

The atomics code is left in place as a fallback for synchronization in the
absence of p/w32 threads. Our ABI did not requires applications to
only use threads (and matching ones) to what libavutil was build with
Our code also was not affected by the leak this change fixes, though
no question the atomics based implementation is not pretty at all.
First and foremost the code must work, being pretty comes after that.

If this causes problems, for example when libavutil is used by multiple
applications each using a different kind of threading system then the
default possibly has to be changed to the uglier atomics.

See: cea3a63ba3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 23:42:16 +01:00
Lukasz Marek
f00e9c4b10 lavu/opt: add consts where possible 2014-11-27 23:27:14 +01:00
Lukasz Marek
3ff3990104 ffmpeg_opt: make use of recommended encoder configuration
So far ffmpeg used recommended configuration only for codec priv options.
ffmpeg will use now codec defaults and then apply recommended configuration
for all options. Recommended configuration possibly contains minimal
set of options to filful user configuration.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-27 23:19:46 +01:00
Lukasz Marek
500d608861 lavf/ffmenc: store recommended encoder configuration
ffmenc will store recommended encoder configuration if present.
This will allow the user to base on local defaults and
apply only explicitly set options.

If recommended encoder configuration is not present, then
non-default context's options are stored.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-27 23:19:41 +01:00
Lukasz Marek
568853b8f5 lavf/ffmdec: add common options to recommended encoder configuration
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-27 23:19:20 +01:00
Michael Niedermayer
4760278007 Merge commit '2443e522f0059176ff8717c9c753eb6fe7e7bbf1'
* commit '2443e522f0059176ff8717c9c753eb6fe7e7bbf1':
  lavu: add wrappers for the pthreads mutex API

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 22:08:17 +01:00
Vincent Bernat
d0f8b94b43 avformat/rtpproto: Allow to specify DSCP class
By appending `?dscp=26` to the URL, IP packets will be classified as
AF31 (assured forwarding for multimedia flows with low probability of
loss). On congested network, this allows a user to assign priorities to
flows.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2014-11-27 19:53:09 +01:00
Vincent Bernat
5269cef408 avformat/udp: Allow to specify DSCP class
By appending `?dscp=26` to the URL, IP packets will be classified as
AF31 (assured forwarding for multimedia flows with low probability of
loss). On congested network, this allows a user to assign priorities to
flows.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2014-11-27 19:53:09 +01:00
Michael Niedermayer
970a8f1c25 avcodec/mjpegdec: Fix integer overflow in shift
Fixes: signal_sigabrt_7ffff6ac7bb9_2683_cov_4120310995_m_ijpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 19:30:31 +01:00
Clément Bœsch
92fa1d9231 avformat/mov: change conjugation for "Duplicate" 2014-11-27 18:13:57 +01:00
Clément Bœsch
5ab882d728 avformat/mov: strengthen some table allocations 2014-11-27 18:12:40 +01:00
Michael Niedermayer
98e8a9e2f2 ffmpeg: Print a debug message if the frame parameters mismatch the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 15:47:49 +01:00
Michael Niedermayer
57e5812198 avcodec/hevc_ps: More complete window reset
Fixes out of array read
Fixes: signal_sigsegv_35bcf26_471_cov_2806540268_CAINIT_A_SHARP_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 15:47:49 +01:00
Stefano Sabatini
29208e6dcf lavu/imgutils: remove redundant and wrong check in av_image_fill_arrays 2014-11-27 14:24:16 +01:00
Anton Khirnov
1973079417 opusdec: make sure all substreams have the same number of coded samples
Fixes invalid writes with invalid multichannel streams.

CC:libav-stable@libav.org
2014-11-27 14:06:03 +01:00
Kieran Kunhya
96fda42a8f vf_interlace: get rid of useless loads
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-27 13:57:50 +01:00
wm4
fbd6c97f9c lavu: fix memory leaks by using a mutex instead of atomics
The buffer pool has to atomically add and remove entries from the linked
list of available buffers. This was done by removing the entire list
with a CAS operation, working on it, and then setting it back again
(using a retry-loop in case another thread was doing the same thing).

This could effectively cause memory leaks: while a thread was working on
the buffer list, other threads would allocate new buffers, increasing
the pool's total size. There was no real leak, but since these extra
buffers were not needed, but not free'd either (except when the buffer
pool was destroyed), this had the same effects as a real leak. For some
reason, growth was exponential, and could easily kill the process due
to OOM in real-world uses.

Fix this by using a mutex to protect the list operations. The fancy
way atomics remove the whole list to work on it is not needed anymore,
which also avoids the situation which was causing the leak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-27 13:36:00 +01:00
Anton Khirnov
2443e522f0 lavu: add wrappers for the pthreads mutex API
Also add no-op fallbacks when threading is disabled.

This helps keeping the code clean if Libav is compiled for targets
without threading. Since we assume that no threads of any kind are used
in such configurations, doing nothing is ok by definition.

Based on a patch by wm4 <nfxjfg@googlemail.com>.
2014-11-27 13:36:00 +01:00
Matthew Oliver
0167fa0060 msvc: Fix compilation errors due to header include order.
Ensures that the header include order is such that winsock2.h is always
included before windows.h or that windows.h does not include winsock.h.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 12:40:18 +01:00
Rong Yan
22e557917d libavutil/ppc/util_altivec.h : fix load_with_perm_vec() add marcos vcswapi2s() vcswapc() VEC_SPLAT16() VEC_SLD16() for POWER LE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 12:07:19 +01:00
Michael Niedermayer
4ae1d6021b Merge commit '675ac56b7ee0f204963fde55295197c5df80aa91'
* commit '675ac56b7ee0f204963fde55295197c5df80aa91':
  Revert "lavf: Don't try to update files atomically with renames on windows"

Conflicts:
	libavformat/dashenc.c
	libavformat/hdsenc.c
	libavformat/internal.h
	libavformat/smoothstreamingenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 11:52:33 +01:00
Michael Niedermayer
cc663bd13a Merge commit '79fd186a5035cf16fc0ab288d8f59da8b1ba2c0e'
* commit '79fd186a5035cf16fc0ab288d8f59da8b1ba2c0e':
  lavf: Use MoveFileEx instead of rename/_wrename on windows

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 11:35:54 +01:00
Michael Niedermayer
097de4d1d6 Merge commit '9326d64ed1baadd7af60df6bbcc59cf1fefede48'
* commit '9326d64ed1baadd7af60df6bbcc59cf1fefede48':
  Share the utf8 to wchar conversion routine between lavf and lavu

Conflicts:
	libavformat/os_support.h
	libavutil/file_open.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 11:10:26 +01:00
Martin Storsjö
675ac56b7e Revert "lavf: Don't try to update files atomically with renames on windows"
This reverts commit b9d08c77a4.

After taking MoveFileEx into use, we can replace files with renames
on windows as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-27 09:29:47 +02:00
Martin Storsjö
79fd186a50 lavf: Use MoveFileEx instead of rename/_wrename on windows
This allows getting the normal unix semantics, where a rename
allows replacing an existing file.

Based on a suggestion by Reimar Döffinger.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-27 09:29:29 +02:00
Martin Storsjö
9326d64ed1 Share the utf8 to wchar conversion routine between lavf and lavu
This doesn't add any dependency on library internals, since this
only is a static inline function that gets built into each of the
calling functions - this is only to reduce the code duplication.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-27 09:29:17 +02:00