annotate cga_data.h @ 10874:bcfe2acbf190 libavcodec

AAC: Compress codebook tables and optimise sign bit handling The codebooks each consist of small number of values repeated in groups of 2 or 4. Storing the codebooks as a packed list of 2- or 4-bit indexes into a table reduces their size substantially (from 7.5k to 1.5k), resulting in less cache pressure. For the band types with sign bits in the bitstream, storing the number and position of non-zero codebook values using a few bits avoids multiple get_bits() calls and floating-point comparisons which gcc handles miserably. Some float/int type punning also avoids gcc brain damage. Overall speedup 20-35% on Cortex-A8, 20% on Core i7.
author mru
date Wed, 13 Jan 2010 16:46:28 +0000
parents 60d6fa47988b
children 8a393a20349f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9615
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
1 /*
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
2 * CGA ROM data
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
3 *
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
4 * This file is part of FFmpeg.
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
5 *
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
10 *
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
14 * Lesser General Public License for more details.
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
15 *
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
19 */
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
20
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
21 #ifndef AVCODEC_CGA_DATA_H
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
22 #define AVCODEC_CGA_DATA_H
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
23
9973
60d6fa47988b Add missing stdint.h #include to fix 'make checkheaders'.
diego
parents: 9615
diff changeset
24 #include <stdint.h>
60d6fa47988b Add missing stdint.h #include to fix 'make checkheaders'.
diego
parents: 9615
diff changeset
25
9615
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
26 extern const uint8_t ff_cga_font[2048];
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
27 extern const uint32_t ff_cga_palette[16];
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
28
5b75e6e974c7 Add CGA and palette data for 8088flex TMV decoder.
stefano
parents:
diff changeset
29 #endif