annotate aac_tablegen.c @ 12334:435319d67bd8 libavcodec

Use word-writing instead of dword-writing (with two cached but otherwise unchanged bytes) in the horizontal simple loopfilter. This makes the filter quite a bit faster in itself (~30 cycles less on Core1), probably mostly because we don't need a complex 4x4 transpose, but only a simple byte interleave. Also allows using pextrw on SSE4, which speeds up even more (e.g. 25% faster on Core i7).
author rbultje
date Sat, 31 Jul 2010 23:13:15 +0000
parents 263b4ef7ad87
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11932
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
1 /*
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
2 * Generate a header file for hardcoded AAC tables
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
3 *
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
4 * Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
5 *
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
6 * This file is part of FFmpeg.
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
7 *
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
12 *
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
16 * Lesser General Public License for more details.
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
17 *
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
21 */
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
22
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
23 #include <stdlib.h>
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
24 #define CONFIG_HARDCODED_TABLES 0
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
25 #include "aac_tablegen.h"
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
26 #include "tableprint.h"
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
27
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
28 int main(void)
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
29 {
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
30 ff_aac_tableinit();
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
31
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
32 write_fileheader();
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
33
11980
263b4ef7ad87 tablegen: implement and use WRITE_ARRAY macros
flameeyes
parents: 11932
diff changeset
34 WRITE_ARRAY("const", float, ff_aac_pow2sf_tab);
11932
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
35
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
36 return 0;
ebe049799f6d aactab: Tablegenify ff_aac_pow2sf_tab.
alexc
parents:
diff changeset
37 }