aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-14 14:38:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-14 14:46:13 +0200
commit82c0055c5e71f2289936e6c2528bed5826c18c43 (patch)
treee4510e6a8cf751182378f293f7a8bc4f253c0097
parentdb51c65961bd692fc6ebb12c2f4183699d3db9c0 (diff)
parentb5198a2637b7b45b0049a1d4b386a06f016f2520 (diff)
downloadffmpeg-82c0055c5e71f2289936e6c2528bed5826c18c43.tar.gz
Merge commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520'
* commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520': configure: tms470: add mapping for -mfpu=vfpv3-d16 flag configure: recognise Minix as OS configure: work around bug in ash shell eval-test: make table static const lavr: handle clipping in the float to s32 conversion nut: support pcm codecs not mapped in avi Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure5
-rw-r--r--doc/nut.texi2
-rw-r--r--libavformat/nut.c27
-rw-r--r--libavformat/nut.h1
-rw-r--r--libavformat/nutdec.c7
-rw-r--r--libavresample/x86/audio_convert.asm8
-rw-r--r--libavutil/eval.c3
7 files changed, 47 insertions, 6 deletions
diff --git a/configure b/configure
index a183b5be2d..36c88e2626 100755
--- a/configure
+++ b/configure
@@ -639,7 +639,7 @@ print_config(){
}
print_enabled(){
- test "$1" = -n && end=" " && shift || end="\n"
+ test x"$1" = x-n && end=" " && shift || end="\n"
suf=$1
shift
for v; do
@@ -2488,6 +2488,7 @@ tms470_flags(){
-mfpu=neon) echo --float_support=vfpv3 --neon ;;
-mfpu=vfp) echo --float_support=vfpv2 ;;
-mfpu=vfpv3) echo --float_support=vfpv3 ;;
+ -mfpu=vfpv3-d16) echo --float_support=vfpv3d16 ;;
-msoft-float) echo --float_support=vfplib ;;
-O[0-3]|-mf=*) echo $flag ;;
-g) echo -g -mn ;;
@@ -3192,6 +3193,8 @@ case $target_os in
add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT
FFSERVERLDFLAGS=
;;
+ minix)
+ ;;
none)
;;
*)
diff --git a/doc/nut.texi b/doc/nut.texi
index 9de9521635..d697e2ed79 100644
--- a/doc/nut.texi
+++ b/doc/nut.texi
@@ -54,7 +54,7 @@ to be read big-endian.
@end multitable
<type> is S for signed integer, U for unsigned integer, F for IEEE float
-<interleaving> is D for default, as a historical artefact.
+<interleaving> is D for default, P is for planar.
<bits> is 8/16/24/32
@example
diff --git a/libavformat/nut.c b/libavformat/nut.c
index c30bac8e8e..34c43d16fb 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -113,9 +113,34 @@ const AVCodecTag ff_nut_video_tags[] = {
{ AV_CODEC_ID_NONE , 0 }
};
+const AVCodecTag ff_nut_audio_tags[] = {
+ { AV_CODEC_ID_PCM_ALAW, MKTAG('A', 'L', 'A', 'W') },
+ { AV_CODEC_ID_PCM_MULAW, MKTAG('U', 'L', 'A', 'W') },
+ { AV_CODEC_ID_PCM_F32BE, MKTAG(32 , 'D', 'F', 'P') },
+ { AV_CODEC_ID_PCM_F32LE, MKTAG('P', 'F', 'D', 32 ) },
+ { AV_CODEC_ID_PCM_F64BE, MKTAG(64 , 'D', 'F', 'P') },
+ { AV_CODEC_ID_PCM_F64LE, MKTAG('P', 'F', 'D', 64 ) },
+ { AV_CODEC_ID_PCM_S16BE, MKTAG(16 , 'D', 'S', 'P') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('P', 'S', 'D', 16 ) },
+ { AV_CODEC_ID_PCM_S24BE, MKTAG(24 , 'D', 'S', 'P') },
+ { AV_CODEC_ID_PCM_S24LE, MKTAG('P', 'S', 'D', 24 ) },
+ { AV_CODEC_ID_PCM_S32BE, MKTAG(32 , 'D', 'S', 'P') },
+ { AV_CODEC_ID_PCM_S32LE, MKTAG('P', 'S', 'D', 32 ) },
+ { AV_CODEC_ID_PCM_S8, MKTAG('P', 'S', 'D', 8 ) },
+ { AV_CODEC_ID_PCM_U16BE, MKTAG(16 , 'D', 'U', 'P') },
+ { AV_CODEC_ID_PCM_U16LE, MKTAG('P', 'U', 'D', 16 ) },
+ { AV_CODEC_ID_PCM_U24BE, MKTAG(24 , 'D', 'U', 'P') },
+ { AV_CODEC_ID_PCM_U24LE, MKTAG('P', 'U', 'D', 24 ) },
+ { AV_CODEC_ID_PCM_U32BE, MKTAG(32 , 'D', 'U', 'P') },
+ { AV_CODEC_ID_PCM_U32LE, MKTAG('P', 'U', 'D', 32 ) },
+ { AV_CODEC_ID_PCM_U8, MKTAG('P', 'U', 'D', 8 ) },
+ { AV_CODEC_ID_PCM_S16LE_PLANAR, MKTAG('P', 'S', 'P', 16 ) },
+ { AV_CODEC_ID_NONE, 0 }
+};
+
const AVCodecTag * const ff_nut_codec_tags[] = {
ff_nut_video_tags, ff_nut_subtitle_tags,
- ff_codec_bmp_tags, ff_codec_wav_tags, 0
+ ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_audio_tags, 0
};
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
diff --git a/libavformat/nut.h b/libavformat/nut.h
index dad03f7ea6..673f12f4b2 100644
--- a/libavformat/nut.h
+++ b/libavformat/nut.h
@@ -109,6 +109,7 @@ typedef struct NUTContext {
extern const AVCodecTag ff_nut_subtitle_tags[];
extern const AVCodecTag ff_nut_video_tags[];
+extern const AVCodecTag ff_nut_audio_tags[];
extern const AVCodecTag * const ff_nut_codec_tags[];
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 1513f5dad5..cc18adc97d 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -369,7 +369,12 @@ static int decode_stream_header(NUTContext *nut)
break;
case 1:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp);
+ st->codec->codec_id = av_codec_get_id((const AVCodecTag * const []) {
+ ff_nut_audio_tags,
+ ff_codec_wav_tags,
+ 0
+ },
+ tmp);
break;
case 2:
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
index 2ebdbc1ec0..25166afff2 100644
--- a/libavresample/x86/audio_convert.asm
+++ b/libavresample/x86/audio_convert.asm
@@ -28,6 +28,7 @@ SECTION_RODATA 32
pf_s32_inv_scale: times 8 dd 0x30000000
pf_s32_scale: times 8 dd 0x4f000000
+pf_s32_clip: times 8 dd 0x4effffff
pf_s16_inv_scale: times 4 dd 0x38000000
pf_s16_scale: times 4 dd 0x47000000
pb_shuf_unpack_even: db -1, -1, 0, 1, -1, -1, 2, 3, -1, -1, 8, 9, -1, -1, 10, 11
@@ -197,17 +198,22 @@ cglobal conv_flt_to_s16, 3,3,5, dst, src, len
;------------------------------------------------------------------------------
%macro CONV_FLT_TO_S32 0
-cglobal conv_flt_to_s32, 3,3,5, dst, src, len
+cglobal conv_flt_to_s32, 3,3,6, dst, src, len
lea lenq, [lend*4]
add srcq, lenq
add dstq, lenq
neg lenq
mova m4, [pf_s32_scale]
+ mova m5, [pf_s32_clip]
.loop:
mulps m0, m4, [srcq+lenq ]
mulps m1, m4, [srcq+lenq+1*mmsize]
mulps m2, m4, [srcq+lenq+2*mmsize]
mulps m3, m4, [srcq+lenq+3*mmsize]
+ minps m0, m0, m5
+ minps m1, m1, m5
+ minps m2, m2, m5
+ minps m3, m3, m5
cvtps2dq m0, m0
cvtps2dq m1, m1
cvtps2dq m2, m2
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 931ad6bc54..3cea1705c9 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -714,7 +714,8 @@ int main(int argc, char **argv)
{
int i;
double d;
- const char **expr, *exprs[] = {
+ const char *const *expr;
+ static const char *const exprs[] = {
"",
"1;2",
"-20",