• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:frame

56 static int decode_copy(GetByteContext *gb, uint8_t *frame, int width, int height)
60 if (bytestream2_get_buffer(gb, frame, size) != size)
65 static int decode_tsw1(GetByteContext *gb, uint8_t *frame, int width, int height)
67 const uint8_t *frame_start = frame;
68 const uint8_t *frame_end = frame + width * height;
75 if (segments == 0 && offset == frame_end - frame)
76 return 0; // skip frame
77 if (frame_end - frame <= offset)
79 frame += offset;
87 if (frame_end - frame < 2)
93 if (frame - frame_start < offset || frame_end - frame < count)
95 av_memcpy_backptr(frame, offset, count);
96 frame += count;
98 *frame++ = bytestream2_get_byte(gb);
99 *frame++ = bytestream2_get_byte(gb);
107 static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height)
109 const uint8_t *frame_start = frame;
110 const uint8_t *frame_end = frame + width * height;
122 if (frame_end - frame < 2)
128 if (frame - frame_start < offset || frame_end - frame < count)
130 av_memcpy_backptr(frame, offset, count);
131 frame += count;
133 frame += bytestream2_get_le16(gb);
135 *frame++ = bytestream2_get_byte(gb);
136 *frame++ = bytestream2_get_byte(gb);
144 static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height)
146 const uint8_t *frame_start = frame;
147 const uint8_t *frame_end = frame + width * height;
164 if (frame - frame_start < offset || frame_end - frame < count*2 + width)
167 frame[0] = frame[1] =
168 frame[width] = frame[width + 1] = frame[-offset];
170 frame += 2;
174 if (frame - frame_end < v)
176 frame += v;
178 if (frame_end - frame < width + 3)
180 frame[0] = frame[1] =
181 frame[width] = frame[width + 1] = bytestream2_get_byte(gb);
182 frame += 2;
183 frame[0] = frame[1] =
184 frame[width] = frame[width + 1] = bytestream2_get_byte(gb);
185 frame += 2;
193 static int decode_bdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
201 frame += width * count;
209 line_ptr = frame;
210 frame += width;
213 if (frame - line_ptr <= bytestream2_peek_byte(gb))
218 if (frame - line_ptr < count)
224 if (frame - line_ptr < count)
235 static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
237 const uint8_t *frame_end = frame + width * height;
253 if (frame_end - frame <= delta || y + lines + skip_lines > height)
255 frame += delta;
260 if (frame_end <= frame)
263 frame[width - 1] = segments & 0xFF;
266 line_ptr = frame;
267 if (frame_end - frame < width)
269 frame += width;
272 if (frame - line_ptr <= bytestream2_peek_byte(gb))
277 if (frame - line_ptr < count * 2)
284 if (frame - line_ptr < count * 2)
296 static int decode_tdlt(GetByteContext *gb, uint8_t *frame, int width, int height)
298 const uint8_t *frame_end = frame + width * height;
307 if (frame_end - frame < copy + skip ||
310 frame += skip;
311 bytestream2_get_buffer(gb, frame, copy);
312 frame += copy;
318 static int decode_blck(GetByteContext *gb, uint8_t *frame, int width, int height)
320 memset(frame, 0, width * height);
325 typedef int (*chunk_decoder)(GetByteContext *gb, uint8_t *frame, int width, int height);
340 AVFrame *frame = data;
350 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
366 frame->palette_has_changed = 1;
382 dst = frame->data[0];
394 dst += frame->linesize[0];
396 memcpy(frame->data[1], s->pal, sizeof(s->pal));