annotate libvo/vo_gif89a.c @ 8151:76b693c15c47

updating
author pontscho
date Mon, 11 Nov 2002 17:13:37 +0000
parents 5b39e79af5fe
children a1ff87c254ff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
1 /*
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
2 * vo_gif89a.c Generate gif89a output in file out.gif
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
3 *
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
4 * Originally based on vo_png.c
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
5 *
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
6 * Stolen (C) 2002 by GifWhore <joey@yunamusic.com>
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
7 *
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
8 */
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
9
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
10 #include <stdio.h>
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
11 #include <stdlib.h>
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
12 #include <string.h>
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
13 #include <errno.h>
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
14
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
15 #include "config.h"
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
16 #include "video_out.h"
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
17 #include "video_out_internal.h"
7472
c4434bdf6e51 tons of warning fixes, also some 10l bugfixes, including Dominik's PVA bug
arpi
parents: 7124
diff changeset
18 #include "sub.h"
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
19
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
20 #include "../postproc/rgb2rgb.h"
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
21
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
22 #include <gif_lib.h>
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
23
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
24 #define GIFWHORE_version 0.90
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
25
8148
5b39e79af5fe removed get_info, using the same sheme as in libmpcodecs instead
alex
parents: 8123
diff changeset
26 static vo_info_t info =
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
27 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
28 "GIF89a (out.gif)",
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
29 "gif89a",
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
30 "GifWhore <joey@yunamusic.com>",
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
31 ""
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
32 };
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
33
8148
5b39e79af5fe removed get_info, using the same sheme as in libmpcodecs instead
alex
parents: 8123
diff changeset
34 LIBVO_EXTERN (gif89a)
5b39e79af5fe removed get_info, using the same sheme as in libmpcodecs instead
alex
parents: 8123
diff changeset
35
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
36 extern int verbose;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
37 extern int vo_config_count;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
38
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
39 static int image_width;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
40 static int image_height;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
41 static int image_format;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
42 static uint8_t *image_data=NULL;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
43
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
44 static int reverse_map = 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
45 static unsigned char framenum = 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
46 static int gif_frameskip;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
47 static int gif_framedelay;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
48 static int target_fps = 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
49
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
50 GifFileType *newgif=NULL;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
51
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
52 static uint32_t config
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
53 (uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height,
7124
eca7dbad0166 finally removed query_vaa, bes_da and vo_tune_info - the obsoleted libvo api
alex
parents: 6211
diff changeset
54 uint32_t fullscreen, char *title, uint32_t format) {
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
55 char filename[] = "out.gif";
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
56 ColorMapObject *Cmap;
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
57 #ifdef HAVE_GIF_4
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
58 char LB[] = {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
59 'N','E','T','S',
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
60 'C','A','P','E',
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
61 '2','.','0' };
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
62 char LB2[] = { 1, 0x00, 0x00 };
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
63 #endif
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
64
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
65 if (target_fps == 0) target_fps = 5;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
66 gif_frameskip = (vo_fps + 0.25) / target_fps;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
67 gif_framedelay = 100 / target_fps;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
68
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
69 image_width = width;
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
70 image_height = height;
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
71 image_format = format;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
72
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
73 Cmap = MakeMapObject(256, NULL);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
74
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
75 switch(format) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
76 case IMGFMT_BGR24:
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
77 reverse_map = 1;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
78 break;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
79 case IMGFMT_RGB24:
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
80 break;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
81 case IMGFMT_YV12:
7487
e60109dfc85c U-V swapping fixed, patch by Joey Parrish <joey@yunamusic.com>
arpi
parents: 7472
diff changeset
82 yuv2rgb_init(24, MODE_BGR);
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
83 image_data = malloc(image_width*image_height*3);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
84 break;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
85 default:
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
86 return 1;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
87 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
88
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
89 if (vo_config_count > 0)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
90 return 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
91
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
92 // this line causes crashes in certain earlier versions of libungif.
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
93 // i don't know exactly which, but certainly all those before v4.
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
94 // if you have problems, you need to upgrade your gif library.
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
95 #ifdef HAVE_GIF_4
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
96 EGifSetGifVersion("89a");
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
97 #else
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
98 fprintf(stderr, "vo_gif89a: Your version of libgif/libungif needs to be upgraded.\n");
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
99 fprintf(stderr, "vo_gif89a: Some functionality has been disabled.\n");
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
100 #endif
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
101 newgif = EGifOpenFileName(filename, 0);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
102 if (newgif == NULL)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
103 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
104 fprintf(stderr, "error opening file for output.\n");
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
105 return(1);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
106 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
107 EGifPutScreenDesc(newgif, image_width, image_height, 256, 0, Cmap);
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
108 #ifdef HAVE_GIF_4
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
109 // version 3 of libgif/libungif does not support multiple control blocks.
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
110 // for this version, looping will be disabled.
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
111 EGifPutExtensionFirst(newgif, 0xFF, 11, LB);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
112 EGifPutExtensionLast(newgif, 0, 3, LB2);
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
113 #endif
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
114
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
115 return 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
116 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
117
8123
9fc45fe0d444 *HUGE* set of compiler warning fixes, unused variables removal
arpi
parents: 7487
diff changeset
118 /* forward declaration */
9fc45fe0d444 *HUGE* set of compiler warning fixes, unused variables removal
arpi
parents: 7487
diff changeset
119 int gif_reduce(int width, int height, unsigned char *source, unsigned char *destination, unsigned char *palette);
9fc45fe0d444 *HUGE* set of compiler warning fixes, unused variables removal
arpi
parents: 7487
diff changeset
120
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
121 static uint32_t draw_frame(uint8_t * src[])
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
122 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
123 uint8_t *use_data;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
124 ColorMapObject *Cmap;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
125 uint8_t Colors[256 * 3];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
126 int z;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
127 char CB[] = { (char)(gif_framedelay >> 8), (char)(gif_framedelay & 0xff), 0, 0};
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
128
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
129 if ((framenum++ % gif_frameskip)) return(0);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
130
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
131 Cmap = MakeMapObject(256, NULL);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
132 use_data = (uint8_t *)malloc(image_width * image_height);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
133 if (gif_reduce(image_width, image_height, src[0], use_data, Colors)) return(0);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
134
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
135 if (reverse_map)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
136 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
137 for (z = 0; z < 256; z++) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
138 Cmap->Colors[z].Blue = Colors[(z * 3) + 0];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
139 Cmap->Colors[z].Green = Colors[(z * 3) + 1];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
140 Cmap->Colors[z].Red = Colors[(z * 3) + 2];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
141 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
142 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
143 else
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
144 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
145 for (z = 0; z < 256; z++) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
146 Cmap->Colors[z].Red = Colors[(z * 3) + 0];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
147 Cmap->Colors[z].Green = Colors[(z * 3) + 1];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
148 Cmap->Colors[z].Blue = Colors[(z * 3) + 2];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
149 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
150 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
151
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
152 EGifPutExtension(newgif, 0xF9, 0x04, CB);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
153 EGifPutImageDesc(newgif, 0, 0, image_width, image_height, 0, Cmap);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
154 EGifPutLine(newgif, use_data, image_width * image_height);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
155 FreeMapObject(Cmap);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
156 free(use_data);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
157
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
158 return (0);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
159 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
160
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
161 #ifdef USE_OSD
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
162 static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca, int stride)
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
163 {
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
164 vo_draw_alpha_rgb24(w, h, src, srca, stride, image_data + 3 * (y0 * image_width + x0), 3 * image_width);
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
165 }
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
166 #endif
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
167
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
168 static void draw_osd(void)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
169 {
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
170 #ifdef USE_OSD
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
171 vo_draw_text(image_width, image_height, draw_alpha);
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
172 #endif
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
173 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
174
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
175 static void flip_page (void)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
176 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
177 uint8_t *use_data;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
178 ColorMapObject *Cmap;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
179 uint8_t Colors[256 * 3];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
180 int z;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
181 char CB[] = { (char)(gif_framedelay >> 8), (char)(gif_framedelay & 0xff), 0, 0};
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
182
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
183 if (image_format == IMGFMT_YV12) {
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
184
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
185 if ((framenum++ % gif_frameskip)) return;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
186
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
187 Cmap = MakeMapObject(256, NULL);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
188 use_data = (uint8_t *)malloc(image_width * image_height);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
189 if (gif_reduce(image_width, image_height, image_data, use_data, Colors)) return;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
190
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
191 if (reverse_map)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
192 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
193 for (z = 0; z < 256; z++) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
194 Cmap->Colors[z].Blue = Colors[(z * 3) + 0];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
195 Cmap->Colors[z].Green = Colors[(z * 3) + 1];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
196 Cmap->Colors[z].Red = Colors[(z * 3) + 2];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
197 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
198 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
199 else
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
200 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
201 for (z = 0; z < 256; z++) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
202 Cmap->Colors[z].Red = Colors[(z * 3) + 0];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
203 Cmap->Colors[z].Green = Colors[(z * 3) + 1];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
204 Cmap->Colors[z].Blue = Colors[(z * 3) + 2];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
205 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
206 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
207
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
208 EGifPutExtension(newgif, 0xF9, 0x04, CB);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
209 EGifPutImageDesc(newgif, 0, 0, image_width, image_height, 0, Cmap);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
210 EGifPutLine(newgif, use_data, image_width * image_height);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
211 FreeMapObject(Cmap);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
212 free(use_data);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
213 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
214 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
215
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
216 static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y )
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
217 {
6078
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
218 uint8_t *dst = image_data + (image_width * y + x) * 3;
4a9c7041141d cleanups, removed swscaler, osd support - by Joey Parrish <joey@yunamusic.com>
arpi
parents: 6053
diff changeset
219 yuv2rgb(dst,src[0],src[1],src[2],w,h,image_width*3,stride[0],stride[1]);
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
220 return 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
221 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
222
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
223 static uint32_t
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
224 query_format(uint32_t format)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
225 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
226 switch(format){
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
227 case IMGFMT_YV12:
6211
a59795bd14d0 revised query_format
alex
parents: 6078
diff changeset
228 return VFCAP_CSP_SUPPORTED | VFCAP_TIMER | VFCAP_ACCEPT_STRIDE;
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
229 case IMGFMT_RGB|24:
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
230 case IMGFMT_BGR|24:
6211
a59795bd14d0 revised query_format
alex
parents: 6078
diff changeset
231 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD | VFCAP_TIMER;
6053
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
232 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
233 return 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
234 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
235
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
236 static void
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
237 uninit(void)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
238 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
239 char temp[256];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
240
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
241 if (image_data) { free(image_data); image_data=NULL; }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
242
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
243 if (vo_config_count > 0) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
244 sprintf(temp, "gifwhore v%2.2f (c) %s\r\n",
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
245 GIFWHORE_version, "joey@yunamusic.com");
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
246 EGifPutComment(newgif, temp);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
247 EGifCloseFile(newgif);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
248 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
249 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
250
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
251
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
252 static void check_events(void)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
253 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
254 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
255
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
256 int gif_reduce(int width, int height,
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
257 unsigned char *source,
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
258 unsigned char *destination,
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
259 unsigned char *palette)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
260 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
261 GifColorType cmap[256];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
262 unsigned char Ra[width * height];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
263 unsigned char Ga[width * height];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
264 unsigned char Ba[width * height];
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
265 unsigned char *R, *G, *B;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
266 int Size = 256;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
267 int i;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
268
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
269 R = Ra; G = Ga; B = Ba;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
270 for (i = 0; i < width * height; i++)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
271 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
272 *R++ = *source++;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
273 *G++ = *source++;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
274 *B++ = *source++;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
275 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
276
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
277 R = Ra; G = Ga; B = Ba;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
278 if (QuantizeBuffer(width, height, &Size,
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
279 R, G, B,
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
280 destination, cmap) == GIF_ERROR)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
281 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
282 fprintf(stderr, "vo_gif89a: Quantize failed!\n");
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
283 return(-1);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
284 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
285
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
286 for (i = 0; i < Size; i++)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
287 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
288 *palette++ = cmap[i].Red;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
289 *palette++ = cmap[i].Green;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
290 *palette++ = cmap[i].Blue;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
291 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
292
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
293 return(0);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
294 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
295
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
296 static uint32_t preinit(const char *arg)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
297 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
298 int i = 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
299 if (arg) i = atoi(arg);
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
300 if (i > vo_fps) i = vo_fps;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
301 if (i < 1) i = 5;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
302 target_fps = i;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
303 return 0;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
304 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
305
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
306 static uint32_t control(uint32_t request, void *data, ...)
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
307 {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
308 switch (request) {
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
309 case VOCTRL_QUERY_FORMAT:
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
310 return query_format(*((uint32_t*)data));
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
311 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
312 return VO_NOTIMPL;
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
313 }
759c5a3314a2 -vo gif - by Joey Parrish <joey@yunamusic.com>
arpi
parents:
diff changeset
314