comparison qtrle.c @ 6903:0f63fc62ea8b libavcodec

consistency cosmetics: indices --> indexes
author diego
date Mon, 26 May 2008 23:14:25 +0000
parents 5b3acf9fd50a
children e943e1409077
comparison
equal deleted inserted replaced
6902:b6e110c575ff 6903:0f63fc62ea8b
77 int start_line; 77 int start_line;
78 int lines_to_change; 78 int lines_to_change;
79 int rle_code; 79 int rle_code;
80 int row_ptr, pixel_ptr; 80 int row_ptr, pixel_ptr;
81 int row_inc = s->frame.linesize[0]; 81 int row_inc = s->frame.linesize[0];
82 unsigned char pi1, pi2, pi3, pi4, pi5, pi6, pi7, pi8; /* 8 palette indices */ 82 unsigned char pi1, pi2, pi3, pi4, pi5, pi6, pi7, pi8; /* 8 palette indexes */
83 unsigned char *rgb = s->frame.data[0]; 83 unsigned char *rgb = s->frame.data[0];
84 int pixel_limit = s->frame.linesize[0] * s->avctx->height; 84 int pixel_limit = s->frame.linesize[0] * s->avctx->height;
85 85
86 /* check if this frame is even supposed to change */ 86 /* check if this frame is even supposed to change */
87 if (s->size < 8) 87 if (s->size < 8)
120 CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */ 120 CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
121 } else if (rle_code < 0) { 121 } else if (rle_code < 0) {
122 /* decode the run length code */ 122 /* decode the run length code */
123 rle_code = -rle_code; 123 rle_code = -rle_code;
124 /* get the next 4 bytes from the stream, treat them as palette 124 /* get the next 4 bytes from the stream, treat them as palette
125 * indices, and output them rle_code times */ 125 * indexes, and output them rle_code times */
126 CHECK_STREAM_PTR(4); 126 CHECK_STREAM_PTR(4);
127 pi1 = ((s->buf[stream_ptr]) >> 4) & 0x0f; 127 pi1 = ((s->buf[stream_ptr]) >> 4) & 0x0f;
128 pi2 = (s->buf[stream_ptr++]) & 0x0f; 128 pi2 = (s->buf[stream_ptr++]) & 0x0f;
129 pi3 = ((s->buf[stream_ptr]) >> 4) & 0x0f; 129 pi3 = ((s->buf[stream_ptr]) >> 4) & 0x0f;
130 pi4 = (s->buf[stream_ptr++]) & 0x0f; 130 pi4 = (s->buf[stream_ptr++]) & 0x0f;
168 int start_line; 168 int start_line;
169 int lines_to_change; 169 int lines_to_change;
170 int rle_code; 170 int rle_code;
171 int row_ptr, pixel_ptr; 171 int row_ptr, pixel_ptr;
172 int row_inc = s->frame.linesize[0]; 172 int row_inc = s->frame.linesize[0];
173 unsigned char pi1, pi2, pi3, pi4; /* 4 palette indices */ 173 unsigned char pi1, pi2, pi3, pi4; /* 4 palette indexes */
174 unsigned char *rgb = s->frame.data[0]; 174 unsigned char *rgb = s->frame.data[0];
175 int pixel_limit = s->frame.linesize[0] * s->avctx->height; 175 int pixel_limit = s->frame.linesize[0] * s->avctx->height;
176 176
177 /* check if this frame is even supposed to change */ 177 /* check if this frame is even supposed to change */
178 if (s->size < 8) 178 if (s->size < 8)
211 CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */ 211 CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
212 } else if (rle_code < 0) { 212 } else if (rle_code < 0) {
213 /* decode the run length code */ 213 /* decode the run length code */
214 rle_code = -rle_code; 214 rle_code = -rle_code;
215 /* get the next 4 bytes from the stream, treat them as palette 215 /* get the next 4 bytes from the stream, treat them as palette
216 * indices, and output them rle_code times */ 216 * indexes, and output them rle_code times */
217 CHECK_STREAM_PTR(4); 217 CHECK_STREAM_PTR(4);
218 pi1 = s->buf[stream_ptr++]; 218 pi1 = s->buf[stream_ptr++];
219 pi2 = s->buf[stream_ptr++]; 219 pi2 = s->buf[stream_ptr++];
220 pi3 = s->buf[stream_ptr++]; 220 pi3 = s->buf[stream_ptr++];
221 pi4 = s->buf[stream_ptr++]; 221 pi4 = s->buf[stream_ptr++];