• Home
  • Raw
  • Download

Lines Matching +full:fetch +full:- +full:depth

19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
40 int line = avctx->height - 1; in msrle_decode_pal4()
43 while (line >= 0 && pixel_ptr <= avctx->width) { in msrle_decode_pal4()
47 avctx->width - pixel_ptr, line); in msrle_decode_pal4()
52 /* fetch the next byte to see how to handle escape code */ in msrle_decode_pal4()
56 line--; in msrle_decode_pal4()
66 line -= stream_byte; in msrle_decode_pal4()
72 if (pixel_ptr + 2*rle_code - odd_pixel > avctx->width || in msrle_decode_pal4()
80 if (pixel_ptr >= avctx->width) in msrle_decode_pal4()
83 pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte >> 4; in msrle_decode_pal4()
87 if (pixel_ptr >= avctx->width) in msrle_decode_pal4()
89 pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte & 0x0F; in msrle_decode_pal4()
99 if (pixel_ptr + rle_code > avctx->width + 1) { in msrle_decode_pal4()
101 … "MS RLE: frame ptr just went out of bounds (run) %d %d %d\n", pixel_ptr, rle_code, avctx->width); in msrle_decode_pal4()
106 if (pixel_ptr >= avctx->width) in msrle_decode_pal4()
109 pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte >> 4; in msrle_decode_pal4()
111 pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte & 0x0F; in msrle_decode_pal4()
130 int depth, GetByteContext *gb) in msrle_decode_8_16_24_32() argument
133 int p1, p2, line=avctx->height - 1, pos=0, i; in msrle_decode_8_16_24_32()
136 unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3); in msrle_decode_8_16_24_32()
138 output = pic->data[0] + (avctx->height - 1) * pic->linesize[0]; in msrle_decode_8_16_24_32()
139 output_end = output + FFABS(pic->linesize[0]); in msrle_decode_8_16_24_32()
145 if(p2 == 0) { //End-of-line in msrle_decode_8_16_24_32()
146 if (--line < 0) { in msrle_decode_8_16_24_32()
147 if (bytestream2_get_be16(gb) == 1) { // end-of-picture in msrle_decode_8_16_24_32()
156 output = pic->data[0] + line * pic->linesize[0]; in msrle_decode_8_16_24_32()
157 output_end = output + FFABS(pic->linesize[0]); in msrle_decode_8_16_24_32()
160 } else if(p2 == 1) { //End-of-picture in msrle_decode_8_16_24_32()
165 line -= p2; in msrle_decode_8_16_24_32()
169 return -1; in msrle_decode_8_16_24_32()
171 output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3); in msrle_decode_8_16_24_32()
172 output_end = pic->data[0] + line * pic->linesize[0] + FFABS(pic->linesize[0]); in msrle_decode_8_16_24_32()
176 if (output + p2 * (depth >> 3) > output_end) { in msrle_decode_8_16_24_32()
177 bytestream2_skip(gb, 2 * (depth >> 3)); in msrle_decode_8_16_24_32()
179 } else if (bytestream2_get_bytes_left(gb) < p2 * (depth >> 3)) { in msrle_decode_8_16_24_32()
184 if ((depth == 8) || (depth == 24)) { in msrle_decode_8_16_24_32()
185 bytestream2_get_bufferu(gb, output, p2 * (depth >> 3)); in msrle_decode_8_16_24_32()
186 output += p2 * (depth >> 3); in msrle_decode_8_16_24_32()
188 // RLE8 copy is actually padded - and runs are not! in msrle_decode_8_16_24_32()
189 if(depth == 8 && (p2 & 1)) { in msrle_decode_8_16_24_32()
192 } else if (depth == 16) { in msrle_decode_8_16_24_32()
197 } else if (depth == 32) { in msrle_decode_8_16_24_32()
206 if (output + p1 * (depth >> 3) > output_end) in msrle_decode_8_16_24_32()
209 switch(depth){ in msrle_decode_8_16_24_32()
244 av_log(avctx, AV_LOG_WARNING, "MS RLE warning: no end-of-picture code\n"); in msrle_decode_8_16_24_32()
250 int depth, GetByteContext *gb) in ff_msrle_decode() argument
252 switch(depth){ in ff_msrle_decode()
259 return msrle_decode_8_16_24_32(avctx, pic, depth, gb); in ff_msrle_decode()
261 av_log(avctx, AV_LOG_ERROR, "Unknown depth %d\n", depth); in ff_msrle_decode()
262 return -1; in ff_msrle_decode()