Mercurial > mplayer.hg
annotate libvo/spuenc.h @ 7396:cfb1bc3925eb
The granule position of pages contining Vorbis audio is in units of
PCM audio samples (per channel; a stereo stream's granule position does
no increment at twice the speed of a mono stream).
patch by Moritz Bunkus <moritz@bunkus.org>
author | arpi |
---|---|
date | Sat, 14 Sep 2002 23:21:22 +0000 |
parents | fb56a6c15dca |
children | 401b440a6d76 |
rev | line source |
---|---|
5467
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
1 /* |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
2 * subpic_encode.c - encodes a pixmap with RLE |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
3 * |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
4 * Copyright (C) 2000 Alejandro J. Cura <alecu@protocultura.net> |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
5 * |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
6 * This program is free software; you can redistribute it and/or modify |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
8 * the Free Software Foundation; either version 2 of the License, or |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
9 * (at your option) any later version. |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
10 * |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
14 * GNU General Public License for more details. |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
15 * |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
17 * along with this program; if not, write to the Free Software |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
19 * |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
20 */ |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
21 |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
22 #include <stdlib.h> |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
23 #define DATASIZE 53220 |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
24 |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
25 |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
26 typedef struct { |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
27 int x, y; |
6855
fb56a6c15dca
fix silly shorthand that could cause trouble porting
rfelker
parents:
5467
diff
changeset
|
28 unsigned int rgb[4]; |
fb56a6c15dca
fix silly shorthand that could cause trouble porting
rfelker
parents:
5467
diff
changeset
|
29 unsigned char* pixels; |
5467
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
30 } pixbuf; |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
31 |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
32 typedef struct { |
6855
fb56a6c15dca
fix silly shorthand that could cause trouble porting
rfelker
parents:
5467
diff
changeset
|
33 unsigned char data[DATASIZE]; |
5467
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
34 int count; /* the count of bytes written */ |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
35 int oddstart; |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
36 int nibblewaiting; |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
37 } encodedata; |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
38 |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
39 void pixbuf_encode_rle(int x, int y, int w, int h, char *inbuf, int stride, encodedata *ed); |
7c2afd5b5163
Subpic encoder added (used on DXR3 and similar hardware that has a subpic channel)
mswitch
parents:
diff
changeset
|
40 void pixbuf_delete(pixbuf* pb); |