mirror of https://github.com/FFmpeg/FFmpeg.git
* qatar/master: ac3enc: ARM optimised ac3_compute_matissa_size ac3: armv6 optimised bit_alloc_calc_bap fate: simplify fft test rules avio: document avio_alloc_context. lavf: make compute_chapters_end less picky. sierravmd: fix Indeo3 videos FFT: simplify fft8() fate: add fixed-point fft/mdct tests Fixed-point support in fft-test ape: check that number of seektable entries is equal to number of frames Merged-by: Michael Niedermayer <michaelni@gmx.at>oldabi
commit
4defa68fe2
13 changed files with 292 additions and 78 deletions
@ -0,0 +1,52 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
|
||||||
|
* |
||||||
|
* This file is part of Libav. |
||||||
|
* |
||||||
|
* Libav is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public |
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* Libav is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||||
|
* Lesser General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU Lesser General Public |
||||||
|
* License along with Libav; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "asm.S" |
||||||
|
|
||||||
|
function ff_ac3_compute_mantissa_size_arm, export=1 |
||||||
|
push {r4-r8,lr} |
||||||
|
ldm r0, {r4-r8} |
||||||
|
mov r3, r0 |
||||||
|
mov r0, #0 |
||||||
|
1: |
||||||
|
ldrb lr, [r1], #1 |
||||||
|
subs r2, r2, #1 |
||||||
|
blt 2f |
||||||
|
cmp lr, #4 |
||||||
|
bgt 3f |
||||||
|
subs lr, lr, #1 |
||||||
|
addlt r4, r4, #1 |
||||||
|
addeq r5, r5, #1 |
||||||
|
ble 1b |
||||||
|
subs lr, lr, #2 |
||||||
|
addlt r6, r6, #1 |
||||||
|
addeq r7, r7, #1 |
||||||
|
addgt r8, r8, #1 |
||||||
|
b 1b |
||||||
|
3: |
||||||
|
cmp lr, #14 |
||||||
|
sublt lr, lr, #1 |
||||||
|
addgt r0, r0, #16 |
||||||
|
addle r0, r0, lr |
||||||
|
b 1b |
||||||
|
2: |
||||||
|
stm r3, {r4-r8} |
||||||
|
pop {r4-r8,pc} |
||||||
|
endfunc |
@ -0,0 +1,83 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
|
||||||
|
* |
||||||
|
* This file is part of Libav. |
||||||
|
* |
||||||
|
* Libav is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public |
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* Libav is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||||
|
* Lesser General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU Lesser General Public |
||||||
|
* License along with Libav; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "asm.S" |
||||||
|
|
||||||
|
function ff_ac3_bit_alloc_calc_bap_armv6, export=1 |
||||||
|
ldr r12, [sp] |
||||||
|
cmp r12, #-960 |
||||||
|
beq 4f |
||||||
|
push {r4-r11,lr} |
||||||
|
add r5, sp, #40 |
||||||
|
movrel r4, X(ff_ac3_bin_to_band_tab) |
||||||
|
movrel lr, X(ff_ac3_band_start_tab) |
||||||
|
ldm r5, {r5-r7} |
||||||
|
ldrb r4, [r4, r2] |
||||||
|
add r1, r1, r2, lsl #1 @ psd + start
|
||||||
|
add r0, r0, r4, lsl #1 @ mask + band
|
||||||
|
add r4, lr, r4 |
||||||
|
add r7, r7, r2 @ bap + start
|
||||||
|
ldrb r10, [r4], #1 |
||||||
|
1: |
||||||
|
ldrsh r9, [r0], #2 @ mask[band]
|
||||||
|
movw r8, #0x1fe0 |
||||||
|
sub r9, r9, r12 @ - snr_offset
|
||||||
|
mov r11, r10 |
||||||
|
ldrb r10, [r4], #1 @ band_start_tab[band++]
|
||||||
|
subs r9, r9, r5 @ - floor
|
||||||
|
movlt r9, #0 |
||||||
|
cmp r10, r3 @ - end
|
||||||
|
and r9, r9, r8 @ & 0x1fe0
|
||||||
|
subgt r8, r3, r11 |
||||||
|
suble r8, r10, r11 |
||||||
|
add r9, r9, r5 @ + floor => m
|
||||||
|
tst r8, #1 |
||||||
|
add r2, r7, r8 |
||||||
|
bne 3f |
||||||
|
b 5f |
||||||
|
2: |
||||||
|
ldrsh r8, [r1], #2 |
||||||
|
ldrsh lr, [r1], #2 |
||||||
|
sub r8, r8, r9 |
||||||
|
sub lr, lr, r9 |
||||||
|
usat r8, #6, r8, asr #5 @ address
|
||||||
|
usat lr, #6, lr, asr #5 |
||||||
|
ldrb r8, [r6, r8] @ bap_tab[address]
|
||||||
|
ldrb lr, [r6, lr] |
||||||
|
strb r8, [r7], #1 @ bap[bin]
|
||||||
|
strb lr, [r7], #1 |
||||||
|
5: cmp r7, r2 |
||||||
|
blo 2b |
||||||
|
cmp r3, r11 |
||||||
|
bgt 1b |
||||||
|
pop {r4-r11,pc} |
||||||
|
3: |
||||||
|
ldrsh r8, [r1], #2 @ psd[bin]
|
||||||
|
sub r8, r8, r9 @ - m
|
||||||
|
usat r8, #6, r8, asr #5 @ address
|
||||||
|
ldrb r8, [r6, r8] @ bap_tab[address]
|
||||||
|
strb r8, [r7], #1 @ bap[bin]
|
||||||
|
b 5b |
||||||
|
4: |
||||||
|
ldr r0, [sp, #12] |
||||||
|
mov r1, #0 |
||||||
|
mov r2, #256 |
||||||
|
b memset |
||||||
|
endfunc |
@ -0,0 +1,20 @@ |
|||||||
|
/*
|
||||||
|
* This file is part of FFmpeg. |
||||||
|
* |
||||||
|
* FFMpeg is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU Lesser General Public |
||||||
|
* License as published by the Free Software Foundation; either |
||||||
|
* version 2.1 of the License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* FFMpeg is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||||
|
* Lesser General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU Lesser General Public |
||||||
|
* License along with FFmpeg; if not, write to the Free Software |
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||||
|
*/ |
||||||
|
|
||||||
|
#define CONFIG_FFT_FLOAT 0 |
||||||
|
#include "fft-test.c" |
@ -1,35 +1,31 @@ |
|||||||
FATE_FFT += fate-fft
|
FATE_FFT = fate-fft fate-ifft \
|
||||||
fate-fft: libavcodec/fft-test$(EXESUF) |
fate-mdct fate-imdct \
|
||||||
fate-fft: CMD = run libavcodec/fft-test |
fate-rdft fate-irdft \
|
||||||
|
fate-dct1d fate-idct1d
|
||||||
FATE_FFT += fate-ifft
|
|
||||||
fate-ifft: libavcodec/fft-test$(EXESUF) |
fate-fft: CMD = run libavcodec/fft-test |
||||||
fate-ifft: CMD = run libavcodec/fft-test -i |
fate-ifft: CMD = run libavcodec/fft-test -i |
||||||
|
fate-mdct: CMD = run libavcodec/fft-test -m |
||||||
FATE_FFT += fate-mdct
|
fate-imdct: CMD = run libavcodec/fft-test -m -i |
||||||
fate-mdct: libavcodec/fft-test$(EXESUF) |
fate-rdft: CMD = run libavcodec/fft-test -r |
||||||
fate-mdct: CMD = run libavcodec/fft-test -m |
fate-irdft: CMD = run libavcodec/fft-test -r -i |
||||||
|
fate-dct1d: CMD = run libavcodec/fft-test -d |
||||||
FATE_FFT += fate-imdct
|
fate-idct1d: CMD = run libavcodec/fft-test -d -i |
||||||
fate-imdct: libavcodec/fft-test$(EXESUF) |
|
||||||
fate-imdct: CMD = run libavcodec/fft-test -m -i |
|
||||||
|
|
||||||
FATE_FFT += fate-rdft
|
fate-fft-test: $(FATE_FFT) |
||||||
fate-rdft: libavcodec/fft-test$(EXESUF) |
$(FATE_FFT): libavcodec/fft-test$(EXESUF) |
||||||
fate-rdft: CMD = run libavcodec/fft-test -r |
$(FATE_FFT): REF = /dev/null |
||||||
|
|
||||||
FATE_FFT += fate-irdft
|
FATE_FFT_FIXED = fate-fft-fixed fate-ifft-fixed \
|
||||||
fate-irdft: libavcodec/fft-test$(EXESUF) |
fate-mdct-fixed fate-imdct-fixed
|
||||||
fate-irdft: CMD = run libavcodec/fft-test -r -i |
|
||||||
|
|
||||||
FATE_FFT += fate-dct1d
|
fate-fft-fixed: CMD = run libavcodec/fft-fixed-test |
||||||
fate-dct1d: libavcodec/fft-test$(EXESUF) |
fate-ifft-fixed: CMD = run libavcodec/fft-fixed-test -i |
||||||
fate-dct1d: CMD = run libavcodec/fft-test -d |
fate-mdct-fixed: CMD = run libavcodec/fft-fixed-test -m |
||||||
|
fate-imdct-fixed: CMD = run libavcodec/fft-fixed-test -m -i |
||||||
|
|
||||||
FATE_FFT += fate-idct1d
|
fate-fft-fixed-test: $(FATE_FFT_FIXED) |
||||||
fate-idct1d: libavcodec/fft-test$(EXESUF) |
$(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF) |
||||||
fate-idct1d: CMD = run libavcodec/fft-test -d -i |
$(FATE_FFT_FIXED): REF = /dev/null |
||||||
|
|
||||||
FATE_TESTS += $(FATE_FFT)
|
FATE_TESTS += $(FATE_FFT) $(FATE_FFT_FIXED)
|
||||||
fate-fft-test: $(FATE_FFT) |
|
||||||
$(FATE_FFT): REF = /dev/null |
|
||||||
|
Loading…
Reference in new issue