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>
This commit is contained in:
Michael Niedermayer 2012-10-14 14:38:03 +02:00
commit 82c0055c5e
7 changed files with 47 additions and 6 deletions

5
configure vendored
View File

@ -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)
;;
*)

View File

@ -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

View File

@ -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){

View File

@ -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[];

View File

@ -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;

View File

@ -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

View File

@ -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",