Commit Graph

3573 Commits

Author SHA1 Message Date
Lukasz Marek 96f896750d lavu/dict: add more tests
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2015-04-02 23:15:57 +02:00
Lukasz Marek a8c5b4551e lavu/dict: fix set function when reuse existing key pointer
Fixes following scenario:

av_dict_set(&d, "key", "old", 0);
AVDictionaryEentry *e = av_dict_get(d, "key", NULL, 0);
av_dict_set(&d, e->key, "new", 0);

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2015-04-02 23:15:57 +02:00
Lukasz Marek 08d0dbf2ae lavu/dict: don't accept AV_DICT_DONT_STRDUP_VAL for av_dict_set_int
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-02 00:48:19 +02:00
Michael Niedermayer c49e7924a8 avutil/eval: check for av_malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-01 15:59:58 +02:00
Michael Niedermayer 61123634dd avutil/eval: factor av_expr_free() calls out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-01 15:59:58 +02:00
Lukasz Marek 31886968d3 lavu/avstring: add av_append_path_component() funcion
Convinient function to build paths.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-31 23:50:46 +02:00
Michael Niedermayer 21ee6da70c avutil/hmac: Check av_hmac_alloc() return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-30 23:24:33 +02:00
Michael Niedermayer dadc43eee4 avutil/pca: Check for av_malloc* failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-30 04:37:42 +02:00
Michael Niedermayer 268ff17cb7 Merge commit 'c48456166e95648719a8be8f8613f9dee98205c1'
* commit 'c48456166e95648719a8be8f8613f9dee98205c1':
  lavc: add MMAL hardware decoder wrapper

Conflicts:
	Changelog
	configure
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/version.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-29 11:32:24 +02:00
wm4 c48456166e lavc: add MMAL hardware decoder wrapper
Based on a patch by Rodger Combs.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-29 09:55:20 +02:00
Michael Niedermayer 174330b18e avutil/timer: give each printed value of STOP_TIMER a fixed length
this makes the result easier to read

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-27 04:44:58 +01:00
Michael Niedermayer 0fee509cf5 avutil/timer: show histogram of cpu cycles each run took
The new information is printed at verbose log level and can thus be switched on and off
through the log level

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-27 04:20:13 +01:00
James Almer 1f5d1eed78 avutil/cpu: add missing check for mmxext to av_force_cpu_flags
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-03-26 22:54:15 -03:00
Ronald S. Bultje 589a6042ea avutil: make AVFrameSideData buffers ref-counted.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-25 12:04:00 +01:00
Ronald S. Bultje b8e36690e8 lavu/frame: move av_frame_copy_props() up in the file.
Preparation for following patch.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-25 12:03:53 +01:00
Michael Niedermayer e5de6de8f0 avutil/pixfmt: Add missing AV_ prefix to PIX_FMT_YUV411P
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 17:36:39 +01:00
Michael Niedermayer 3e39956198 Merge commit '312a9ef04bf6b55e68e4a61694b169cd3cc69bb8'
* commit '312a9ef04bf6b55e68e4a61694b169cd3cc69bb8':
  pixfmt: Update documentation with prefixed pixel formats

Conflicts:
	libavutil/pixfmt.h

See: 231e33f050
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 01:56:11 +01:00
Michael Niedermayer d280d43c26 Merge commit '592a04054e6423be5050efd2bceece48b10b9c1d'
* commit '592a04054e6423be5050efd2bceece48b10b9c1d':
  pixdesc: Replace a few leftover instances of non AV-prefixed flags

Conflicts:
	libavutil/pixdesc.c

See: c7c71f95f8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 01:47:01 +01:00
Michael Niedermayer dfea1acb21 Merge commit 'e4fe535d12f4f30df2dd672e30304af112a5a827'
* commit 'e4fe535d12f4f30df2dd672e30304af112a5a827':
  mov: Write the display matrix in order

Conflicts:
	libavformat/mov.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 01:14:31 +01:00
Vittorio Giovara 312a9ef04b pixfmt: Update documentation with prefixed pixel formats 2015-03-23 20:53:28 +00:00
Vittorio Giovara 592a04054e pixdesc: Replace a few leftover instances of non AV-prefixed flags 2015-03-23 20:53:28 +00:00
Vittorio Giovara e4fe535d12 mov: Write the display matrix in order
This will allow to copy the matrix as is and it is just cleaner to keep
the matrix in the same order specified by the mov standard (which is
also explicitly described in the documentation).

In order to preserve compatibility, flip the angle sign in the display API
av_display_rotation_set() and av_display_rotation_get(), and improve the
documentation mentioning the rotation direction.
2015-03-23 20:53:28 +00:00
Michael Niedermayer 744c9b49a5 avutil/frame: Add some very basic documentation for AVFrameSideData
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 18:46:26 +01:00
James Almer 60b9373dbd libavutil: add bmi2 optimized av_mod_uintp2
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-03-20 15:47:43 -03:00
James Almer d13e521cc8 libavutil: add av_mod_uintp2
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-03-20 15:47:31 -03:00
James Cowgill f8323744a0 mips/float_dsp: fix vector_fmul_window_mips on mips64
Commit dfa9208074 ("mips/float_dsp: fix a bug in vector_fmul_window_mips")
fixed vector_fmul_window_mips by unrolling the loop only 4 times, but also
removed the outer C loop and replaced it with assembly branches and pointer
arithmetic. When submitting my 64-bit porting patch I missed this new
assembly which also needed porting.

This patch fixes a bus error in the fate-float-dsp test when run on 64-bit
mips.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-18 19:08:02 +01:00
Martin Storsjö 58a840e215 Replace a few leftover instances of enum PixelFormat with enum AVPixelFormat
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-17 23:53:33 +02:00
srikanth 730f3c49e0 OpenCL uninit bug fix - clear is_compiled flag
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-16 22:52:19 +01:00
James Cowgill a251aa1a35 mips/asmdefs: use _ABI64 as defined by gcc
Unfortunately android < api 21 (lollipop) doesn't have the sgidefs.h header,
the easiest way around this is to just use the preprocessor definitions from
gcc / clang.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 16:45:31 +01:00
Michael Niedermayer 26d81b5703 avutil/buffer: Avoid moving the AVBufferRef to a new place in memory in av_buffer_make_writable()
This allows making a AVBufferRef writable without the need to
update all pointers to it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 02:15:28 +01:00
Michael Niedermayer 35fad1e9c9 avutil/buffer: Avoid moving the AVBufferRef to a new place in memory in av_buffer_realloc()
This allows reallocating AVBufferRefs without the need to update
all pointers to it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 02:15:28 +01:00
Michael Niedermayer 9a1884a10e Merge commit 'dcae2e32f7d8a1ca5fb8c1e4aa81313be854dd73'
* commit 'dcae2e32f7d8a1ca5fb8c1e4aa81313be854dd73':
  arm: Suppress tags about used cpu arch and extensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-07 19:30:51 +01:00
Martin Storsjö dcae2e32f7 arm: Suppress tags about used cpu arch and extensions
When all the codepaths using manually set .arch/.fpu code is
behind runtime detection, the elf attributes should be suppressed.

This allows tools to know that the final built binary doesn't
strictly require these extensions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-07 17:10:08 +02:00
James Cowgill 3499a1c0a9 mips/asmdefs: change include guard to read AVUTIL_ instead of AVCODEC_
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-07 11:28:03 +01:00
Michael Niedermayer ebd59d271c Revert "avutil/opencl: is_compiled flag not being cleared in av_opencl_uninit"
Fixed build with opencl enabled
Found-by:  WJ Liu

This reverts commit 0f2359b869.
2015-03-07 09:59:27 +01:00
Peter Tissen 79f83523f7 configure: Make compilable with VS2015 (missing hunk)
This hunk was missing in the github pull request when i downloaded it,
but is needed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 22:45:56 +01:00
Srikanth G 0f2359b869 avutil/opencl: is_compiled flag not being cleared in av_opencl_uninit
When OpenCL kernels are compiled, is_compiled flag is being set for each
kernel. But, in opencl uninit, this flag is not being cleared.
This causes an error when an OpenCL kernel is tried on different OpenCL
devices on same platform.

Here is the patch with a fix

Reviewed-by; Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 15:20:12 +01:00
James Cowgill 157d6f0d5b mips: port optimizations to mips n64
This mainly consists of replacing all the pointer arithmatic 'addiu'
instructions with PTR_ADDIU which will handle the differences in pointer
sizes when compiled on 64 bit mips systems.

The header asmdefs.h contains the PTR_ macros which expend to the correct mips
instructions to manipulate registers containing pointers.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 14:37:44 +01:00
Michael Niedermayer 6d7e57e88b avutil/opt: Do not print inf in selftest
This fixes fate failures on windows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 13:50:22 +01:00
Nedeljko Babic dfa9208074 mips/float_dsp: fix a bug in vector_fmul_window_mips
Loop was unrolled eight times although in heder there is assumption
that len is multiple of 4.
This is fixed, and assembly code is rewritten to be more optimal and
to simplify clobber list.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 12:31:44 +01:00
Kevin Wheatley 86b59e6a50 avutil: Extract gamma determination from PNG encoder for future use. Adds private avpriv_get_gamma_from_trc() function to libavutil.
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 12:26:22 +01:00
Peter Cordes 9e5687adf2 pixelutils: Comment on (lack of) sad_8x8_sse2
Signed-off-by: Peter Cordes <peter@cordes.ca>
2015-03-04 21:58:53 +01:00
Peter Cordes 4da3a14f3c pixelutils: indent comments in pixdesc.h to be clearer
Signed-off-by: Peter Cordes <peter@cordes.ca>
2015-03-04 21:58:53 +01:00
Michael Niedermayer 85108195c5 avutil/common: minor simplification in av_clip_intp2_c()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 01:07:50 +01:00
Michael Niedermayer 88ec5435bb avutil/opt: also test av_opt_show2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 17:45:32 +01:00
Michael Niedermayer e9c85ae648 avutil/opt: Remove odd trailing whitespace bytes from flags help description
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 17:29:33 +01:00
Michael Niedermayer c1e93cdc9e avutil/opt: Also test/compare the av_log output i the selftest
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 17:04:12 +01:00
Michael Niedermayer 9564375dee avutil/ppc/intreadwrite: remove AV_??64 overriding code
The code has undefined behavior and makes no difference when optimizations
are enabled.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 03:15:19 +01:00
Michael Niedermayer 5705dc5276 avutil/imgutils: correctly check for negative SAR components
These could trigger assert failures previously

Found-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 21:57:11 +01:00
James Almer bc65abc8d7 libavutil: add x86 optimized av_popcount
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-02-25 19:58:00 -03:00