diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-27 14:03:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-27 14:10:05 +0100 |
commit | b4d4e51027e0c55e35c081cb180396ab04099b2f (patch) | |
tree | e1335b4096cda0fd7fb738723719e09d08771f6c | |
parent | 2684d2e3ea8a1a2863ae9842d072341b44b09829 (diff) | |
parent | 3c370f5abc55739a261534b9f9bdc739cedbbbb9 (diff) | |
download | ffmpeg-b4d4e51027e0c55e35c081cb180396ab04099b2f.tar.gz |
Merge commit '3c370f5abc55739a261534b9f9bdc739cedbbbb9'
* commit '3c370f5abc55739a261534b9f9bdc739cedbbbb9':
riff: only warn on a bad INFO chunk code size instead of failing
configure: Add separate list for libraries and use where appropriate
x86: float_dsp: add SSE version of vector_fmul_scalar()
Conflicts:
configure
libavformat/riff.c
libavutil/x86/float_dsp.asm
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-x | configure | 49 | ||||
-rw-r--r-- | libavformat/riff.c | 3 | ||||
-rw-r--r-- | libavutil/x86/float_dsp.asm | 29 | ||||
-rw-r--r-- | libavutil/x86/float_dsp_init.c | 4 |
4 files changed, 57 insertions, 28 deletions
@@ -120,6 +120,7 @@ Component options: --disable-avdevice disable libavdevice build --disable-avcodec disable libavcodec build --disable-avformat disable libavformat build + --disable-avutil disable libavutil build --disable-swresample disable libswresample build --disable-swscale disable libswscale build --disable-postproc disable libpostproc build @@ -1091,6 +1092,17 @@ DOCUMENT_LIST=" txtpages " +LIBRARY_LIST=" + avcodec + avdevice + avfilter + avformat + avresample + avutil + swresample + swscale +" + PROGRAM_LIST=" ffplay ffprobe @@ -1101,12 +1113,8 @@ PROGRAM_LIST=" CONFIG_LIST=" $COMPONENT_LIST $DOCUMENT_LIST + $LIBRARY_LIST $PROGRAM_LIST - avcodec - avdevice - avfilter - avformat - avresample avisynth bzlib crystalhd @@ -1179,8 +1187,6 @@ CONFIG_LIST=" small sram static - swresample - swscale swscale_alpha thumb vaapi @@ -1432,7 +1438,6 @@ HAVE_LIST=" CONFIG_EXTRA=" aandcttables ac3dsp - avutil error_resilience gcrypt golomb @@ -1966,9 +1971,13 @@ tinterlace_merge_test_deps="tinterlace_filter" tinterlace_pad_test_deps="tinterlace_filter" # libraries -avdevice_deps="avcodec avformat" -avformat_deps="avcodec" +avcodec_deps="avutil" +avdevice_deps="avutil avcodec avformat" +avfilter_deps="avutil" +avformat_deps="avutil avcodec" +avresample_deps="avutil" postproc_deps="gpl" +swscale_deps="avutil" # programs ffmpeg_deps="avcodec avfilter avformat swscale swresample" @@ -2035,16 +2044,9 @@ ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO # configurable options enable $PROGRAM_LIST enable $DOCUMENT_LIST - -enable avcodec -enable avdevice -enable avfilter -enable avformat -enable avutil +enable $(filter_out avresample $LIBRARY_LIST) enable postproc enable stripping -enable swresample -enable swscale enable asm enable debug @@ -4338,7 +4340,7 @@ NOREDZONE_FLAGS=$noredzone_flags EOF get_version(){ - lcname=$1 + lcname=lib${1} name=$(toupper $lcname) file=$source_path/$lcname/version.h eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file") @@ -4362,14 +4364,7 @@ fi get_version_old LIBPOSTPROC libpostproc/version.h -get_version libavcodec -get_version libavdevice -get_version libavfilter -get_version libavformat -get_version libavresample -get_version libavutil -get_version libswresample -get_version libswscale +map 'get_version $v' $LIBRARY_LIST cat > $TMPH <<EOF /* Automatically generated by configure - do not modify! */ diff --git a/libavformat/riff.c b/libavformat/riff.c index 0cb1694d88..684546670a 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -824,12 +824,13 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size) chunk_code = avio_rl32(pb); chunk_size = avio_rl32(pb); + if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) { avio_seek(pb, -9, SEEK_CUR); chunk_code = avio_rl32(pb); chunk_size = avio_rl32(pb); if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) { - av_log(s, AV_LOG_ERROR, "too big INFO subchunk\n"); + av_log(s, AV_LOG_WARNING, "too big INFO subchunk\n"); return AVERROR_INVALIDDATA; } } diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm index 9b7608c7d0..a3200c64b6 100644 --- a/libavutil/x86/float_dsp.asm +++ b/libavutil/x86/float_dsp.asm @@ -91,3 +91,32 @@ VECTOR_FMAC_SCALAR INIT_YMM avx VECTOR_FMAC_SCALAR %endif + +;------------------------------------------------------------------------------ +; void ff_vector_fmul_scalar(float *dst, const float *src, float mul, int len) +;------------------------------------------------------------------------------ + +%macro VECTOR_FMUL_SCALAR 0 +%if UNIX64 +cglobal vector_fmul_scalar, 3,3,2, dst, src, len +%else +cglobal vector_fmul_scalar, 4,4,3, dst, src, mul, len +%endif +%if ARCH_X86_32 + movss m0, mulm +%elif WIN64 + SWAP 0, 2 +%endif + shufps m0, m0, 0 + lea lenq, [lend*4-mmsize] +.loop: + mova m1, [srcq+lenq] + mulps m1, m0 + mova [dstq+lenq], m1 + sub lenq, mmsize + jge .loop + REP_RET +%endmacro + +INIT_XMM sse +VECTOR_FMUL_SCALAR diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c index 1382373185..259fda146e 100644 --- a/libavutil/x86/float_dsp_init.c +++ b/libavutil/x86/float_dsp_init.c @@ -32,6 +32,9 @@ extern void ff_vector_fmac_scalar_sse(float *dst, const float *src, float mul, extern void ff_vector_fmac_scalar_avx(float *dst, const float *src, float mul, int len); +extern void ff_vector_fmul_scalar_sse(float *dst, const float *src, float mul, + int len); + void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) { int mm_flags = av_get_cpu_flags(); @@ -39,6 +42,7 @@ void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) if (EXTERNAL_SSE(mm_flags)) { fdsp->vector_fmul = ff_vector_fmul_sse; fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; + fdsp->vector_fmul_scalar = ff_vector_fmul_scalar_sse; } if (EXTERNAL_AVX(mm_flags)) { fdsp->vector_fmul = ff_vector_fmul_avx; |