annotate s3tc.h @ 5282:7dcea5ee1d51 libavcodec

add support for Matroska subtitle tracks
author aurel
date Wed, 11 Jul 2007 13:13:20 +0000
parents 2b72f9bc4f06
children 1d83e9c34641
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4933
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
1 /*
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
2 * S3 Texture Compression (S3TC) decoding functions
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
3 * Copyright (c) 2007 by Ivo van Poorten
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
4 *
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
5 * This file is part of FFmpeg.
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
6 *
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
11 *
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
15 * Lesser General Public License for more details.
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
16 *
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
20 */
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
21
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
22 #ifndef FF_S3TC_H
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
23 #define FF_S3TC_H
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
24
5162
4394344397d8 include all prerequisites in header files
mru
parents: 4937
diff changeset
25 #include <stdint.h>
4394344397d8 include all prerequisites in header files
mru
parents: 4937
diff changeset
26
4933
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
27 #define FF_S3TC_DXT1 0x31545844
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
28 #define FF_S3TC_DXT3 0x33545844
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
29
4937
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
30 /**
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
31 * Decode DXT1 encoded data to RGB32
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
32 * @param *src source buffer, has to be aligned on a 4-byte boundary
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
33 * @param *dst destination buffer
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
34 * @param w width of output image
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
35 * @param h height of output image
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
36 * @param stride line size of output image
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
37 */
4933
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
38 void ff_decode_dxt1(const uint8_t *src, uint8_t *dst,
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
39 const unsigned int w, const unsigned int h,
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
40 const unsigned int stride);
4937
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
41 /**
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
42 * Decode DXT3 encoded data to RGB32
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
43 * @param *src source buffer, has to be aligned on a 4-byte boundary
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
44 * @param *dst destination buffer
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
45 * @param w width of output image
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
46 * @param h height of output image
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
47 * @param stride line size of output image
a65cd5b551c2 add doxygen comments
ivo
parents: 4933
diff changeset
48 */
4933
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
49 void ff_decode_dxt3(const uint8_t *src, uint8_t *dst,
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
50 const unsigned int w, const unsigned int h,
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
51 const unsigned int stride);
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
52
ed67837533b0 generic S3TC DXT1 and DXT3 decoding functions
ivo
parents:
diff changeset
53 #endif