Michael Niedermayer
2624027439
lavu: drop time redefinition as it causes some problems in some uncommon configurations.
...
Based-on: e96d90eed6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
b473c9937e
lavu/samplefmt: return the size of the allocated samples buffer at the next bump
...
Make the functions av_samples_fill_arrays, av_samples_alloc, and
avcodec_fill_audio_frame return a buffer size rather than 0 in case of
success. This will be enabled at the next libavutil major bump, in order
to preserve backward compatibility.
Returning the size allows to simplify the code, avoiding a few function
calls.
12 years ago
Janne Grunau
e96d90eed6
remove #defines to prevent use of discouraged external functions
...
Preventing the use of discouraged or 'insecure' external functions
through defines in an internal header is not a good solution. The
header is not guaranteed to be included universally which makes
overlooking bad use of said functions during review more likely.
There are cases were those functions either are the most straight
forward solution or even have to be used. Using malloc or free is
required if the allocation or release is done by other libraries.
12 years ago
Stefano Sabatini
51e9f58e1c
lavu/opt: add support for reading pixel and sample format through av_get_int()
...
Simplify backward compatibility, when switching from AV_OPT_TYPE_INT to
AV_OPT_TYPE_SAMPLE/PIXEL_FMT.
12 years ago
Stefano Sabatini
252746d052
lavu/imgutils: add consistency checks to av_image_copy_plane()
...
Add assertions and abort in case of invalid |dst_linesize| < bytewidth or
|src_linesize| < bytewidth.
Avoid to silently corrupt memory.
12 years ago
Stefano Sabatini
26c531cc22
lavu/opt: fix range shown in set_format() log message
12 years ago
Stefano Sabatini
c70ec631c9
lavu/opt: add av_opt_ accessors for pixel/format/image size options
...
The interface is implemented against the style of the other options
accessors. Possibly simplify programmatic setting of options.
12 years ago
Michael Niedermayer
0efcf16a3e
replace av_log(0, by av_log(NULL,
...
The first parameter is a pointer and NULL is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
4a606c830a
av_memcpy_backptr: optimise some special cases
...
- Add special cases for offsets of 2, 3, or 4 bytes. This means the
offset is always >4 in the generic case, allowing 32-bit copies to
be used there.
- Don't use memcpy() for sizes less than 16 bytes.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Bojan Zivkovic
e41b518555
mips: Fixing HAVE_MIPSFPU dependencies
...
Signed-off-by: Bojan Zivkovic <bojan@mips.com>
Reviewed-by: Vitor Sessak <vitor1001@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
9ccc349f77
ensure comment blocks that contain doxygen commands start with double asterix
...
Reveiwed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1dafbdac65
pixdesc: fix alpha flags
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
649d8bd8a5
pixdesc: add av_get_padded_bits_per_pixel()
...
This will be needed to allow removing the PixFmtInfo table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
cbe5a60c9d
pixdesc: add PIX_FMT_ALPHA flag
12 years ago
Bojan Zivkovic
a74ae4691a
mips: Optimization of AC3 FP encoder and EAC3 FP decoder
...
Signed-off-by: Bojan Zivkovic <bojan@mips.com>
Reveiwed-by: Vitor Sessak <vitor1001@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
87af05c575
x86: SPLATD: port to cpuflags
12 years ago
Nicolas George
4cd74c8143
lavu/bprint: implement av_bprint_strftime().
12 years ago
Michael Niedermayer
7b723ed4c0
cpu: add a few cpu names as aliases for their cpu flags
...
Help to complete this list is welcome!
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
65e57975b9
cpu: add cmov ro the table, which appears to have been forgotten
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
8f5587c3d0
cpu.h: define AV_CPU_FLAG_MMX2 for libavutil major 52
12 years ago
Diego Biurrun
8ff0f7763d
crc: av_crc() parameter names should match between .c, .h and doxygen
12 years ago
Nicolas George
926481078b
lavu/opt: fix av_opt_get_key_value() API.
...
Do not skip the end delimiter.
Reserve positive return values.
This is an API break, but the function was introduced less than
two weeks ago.
12 years ago
Mans Rullgard
7ba0c1b390
avutil: change GET_UTF8 to not use av_log2()
...
This removes an inter-library dependency on ff_log2_tab causing
linking errors in some configurations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
d4e74d5d6d
Remove deprecation of avcodec_get_chroma_sub_sample.
...
Add explanations what the difference between the 2 functions are and
when either should be used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
26301caaa1
x86: mmx2 ---> mmxext in asm constructs
12 years ago
Luca Barbato
c1a02e884a
pixdesc: add av_pix_fmt_get_chroma_sub_sample
...
Deprecate avcodec_get_chroma_sub_sample.
12 years ago
Diego Biurrun
2b479bcab0
build: Drop AVX assembly ifdefs
...
An assembler able to cope with AVX instructions is now required.
12 years ago
Justin Ruggles
5980f5dd18
lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h
12 years ago
Diego Biurrun
f0d124f005
x86inc: Set program_name outside of x86inc.asm
...
This reduces the local difference to the x264 upstream version.
12 years ago
Diego Biurrun
4b60fac419
x86: PALIGNR: port to cpuflags
12 years ago
Stefano Sabatini
1c6962dc20
lavu: remove disabled FF_API_OLD_EVAL_NAMES code
12 years ago
Stefano Sabatini
ef4dc3e55b
lavu/opt: show valid range in case of out-of-range value
...
Improve feedback.
12 years ago
Justin Ruggles
dfde8a34e5
lavu: add av_ctz() for trailing zero bit count
12 years ago
Diego Biurrun
dbb37e7711
x86: PABSW: port to cpuflags
12 years ago
Stefano Sabatini
74a50e75a8
lavu: drop disabled FF_API_OLD_TC_ADJUST_FRAMENUM code
12 years ago
Nicolas George
3bdf4971ba
lavu/opt: implement av_opt_get_key_value().
...
This function does the low-level work of av_opt_set_from_string()
but can be used when there is no option context or when a generic
handling of unknown keys is needed.
av_opt_set_from_string() is changed to make use of it.
12 years ago
Nicolas George
e021eeb9f0
lavu/opt: parse key into a mallocated buffer.
...
It removes the hardcoded limit on the key size without making
the code much more complex, and it makes for a more versatile API.
12 years ago
Michael Niedermayer
ab796ded75
avstring: fix compiler warning about freeing const pointers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
b91fa5fcca
lavu/opt: set sample format default value, and accept NULL value
...
Fix commit c9eaa98a3e
.
+10l.
12 years ago
Stefano Sabatini
ca11f6b240
lavu/opt: prefer if(){}else{} over if()else{} construct
...
Improve consistency.
12 years ago
Stefano Sabatini
481fdeeecf
lavu/opt: add AV_OPT_SAMPLE_FMT option
12 years ago
Anton Khirnov
b4dc6dccba
crc: move doxy to the header
12 years ago
Diego Biurrun
0a7a94f2e5
x86: Refactor PSWAPD fallback implementations and port to cpuflags
12 years ago
Diego Biurrun
26f01bd106
x86: PMINUB: port to cpuflags
12 years ago
Diego Biurrun
61bc2bc7d4
x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
...
"mmxext" is a more sensible name and more common in outside projects.
12 years ago
Nicolas George
483c1aa5f1
lavu/bprint: add av_bprint_get_buffer().
...
It is useful to use bprint to handle a growing buffer
used with another API.
12 years ago
Diego Biurrun
012f73e271
x86inc: Only define program_name if the macro is unset
...
This allows overriding the value from outside of the file.
12 years ago
Michael Niedermayer
6204ea17f1
rational: test add/sub too
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
25a21c587c
eval-test: add some otherwise untested functions.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
adc39b28a5
av_image_copy: check for av_image_get_linesize() failure.
...
Fixes CID703722
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago