mirror of https://github.com/FFmpeg/FFmpeg.git
This gets rid of virtually useless hardcoded tables hackery. The reason it is useless is that a 320 element lut is anyway placed regardless of --enable-hardcoded-tables, from which all necessary tables are trivially derived at runtime at very low cost: sample benchmark (x86-64, Haswell, GNU/Linux, single run is really what is relevant here since looping drastically changes the bench). Fluctuations are on the order of 10% for the single run test: 39400 decicycles in aacsbr_tableinit, 1 runs, 0 skips 25325 decicycles in aacsbr_tableinit, 2 runs, 0 skips 18475 decicycles in aacsbr_tableinit, 4 runs, 0 skips 15008 decicycles in aacsbr_tableinit, 8 runs, 0 skips 13016 decicycles in aacsbr_tableinit, 16 runs, 0 skips 12005 decicycles in aacsbr_tableinit, 32 runs, 0 skips 11546 decicycles in aacsbr_tableinit, 64 runs, 0 skips 11506 decicycles in aacsbr_tableinit, 128 runs, 0 skips 11500 decicycles in aacsbr_tableinit, 256 runs, 0 skips 11183 decicycles in aacsbr_tableinit, 509 runs, 3 skips Tested with FATE with/without --enable-hardcoded-tables. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>pull/164/head
parent
e74f1a121e
commit
cb93df0dcb
6 changed files with 2 additions and 96 deletions
@ -1,39 +0,0 @@ |
||||
/*
|
||||
* Header file for hardcoded AAC SBR windows |
||||
* |
||||
* Copyright (c) 2014 Reimar Döffinger <Reimar.Doeffinger@gmx.de> |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
#include <stdlib.h> |
||||
#define CONFIG_HARDCODED_TABLES 0 |
||||
#define USE_FIXED 1 |
||||
#include "aacsbr_fixed_tablegen.h" |
||||
#include "tableprint.h" |
||||
|
||||
int main(void) |
||||
{ |
||||
aacsbr_tableinit(); |
||||
|
||||
write_fileheader(); |
||||
|
||||
WRITE_ARRAY_ALIGNED("static const", 32, int32_t, sbr_qmf_window_ds); |
||||
WRITE_ARRAY_ALIGNED("static const", 32, int32_t, sbr_qmf_window_us); |
||||
|
||||
return 0; |
||||
} |
@ -1,39 +0,0 @@ |
||||
/*
|
||||
* Header file for hardcoded AAC SBR windows |
||||
* |
||||
* Copyright (c) 2014 Reimar Döffinger <Reimar.Doeffinger@gmx.de> |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
#include <stdlib.h> |
||||
#define CONFIG_HARDCODED_TABLES 0 |
||||
#define USE_FIXED 0 |
||||
#include "aacsbr_tablegen.h" |
||||
#include "tableprint.h" |
||||
|
||||
int main(void) |
||||
{ |
||||
aacsbr_tableinit(); |
||||
|
||||
write_fileheader(); |
||||
|
||||
WRITE_ARRAY_ALIGNED("static const", 32, float, sbr_qmf_window_ds); |
||||
WRITE_ARRAY_ALIGNED("static const", 32, float, sbr_qmf_window_us); |
||||
|
||||
return 0; |
||||
} |
Loading…
Reference in new issue