Lines Matching defs:frame
32 * An Interplay video frame consists of 2 parts: The decoding map and
107 static int ipvideo_decode_block_opcode_0x0(IpvideoContext *s, AVFrame *frame)
109 return copy_from(s, s->last_frame, frame, 0, 0);
112 static int ipvideo_decode_block_opcode_0x1(IpvideoContext *s, AVFrame *frame)
114 return copy_from(s, s->second_last_frame, frame, 0, 0);
117 static int ipvideo_decode_block_opcode_0x2(IpvideoContext *s, AVFrame *frame)
138 return copy_from(s, s->second_last_frame, frame, x, y);
141 static int ipvideo_decode_block_opcode_0x3(IpvideoContext *s, AVFrame *frame)
146 /* copy 8x8 block from current frame from an up/left block */
164 return copy_from(s, frame, frame, x, y);
167 static int ipvideo_decode_block_opcode_0x4(IpvideoContext *s, AVFrame *frame)
172 /* copy a block from the previous frame; need 1 more byte */
185 return copy_from(s, s->last_frame, frame, x, y);
188 static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s, AVFrame *frame)
192 /* copy a block from the previous frame using an expanded range;
198 return copy_from(s, s->last_frame, frame, x, y);
201 static int ipvideo_decode_block_opcode_0x6(IpvideoContext *s, AVFrame *frame)
210 static int ipvideo_decode_block_opcode_0x7(IpvideoContext *s, AVFrame *frame)
254 static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s, AVFrame *frame)
332 static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s, AVFrame *frame)
402 static int ipvideo_decode_block_opcode_0xA(IpvideoContext *s, AVFrame *frame)
468 static int ipvideo_decode_block_opcode_0xB(IpvideoContext *s, AVFrame *frame)
482 static int ipvideo_decode_block_opcode_0xC(IpvideoContext *s, AVFrame *frame)
501 static int ipvideo_decode_block_opcode_0xD(IpvideoContext *s, AVFrame *frame)
526 static int ipvideo_decode_block_opcode_0xE(IpvideoContext *s, AVFrame *frame)
543 static int ipvideo_decode_block_opcode_0xF(IpvideoContext *s, AVFrame *frame)
564 static int ipvideo_decode_block_opcode_0x6_16(IpvideoContext *s, AVFrame *frame)
568 /* copy a block from the second last frame using an expanded range */
573 return copy_from(s, s->second_last_frame, frame, x, y);
576 static int ipvideo_decode_block_opcode_0x7_16(IpvideoContext *s, AVFrame *frame)
613 static int ipvideo_decode_block_opcode_0x8_16(IpvideoContext *s, AVFrame *frame)
689 static int ipvideo_decode_block_opcode_0x9_16(IpvideoContext *s, AVFrame *frame)
756 static int ipvideo_decode_block_opcode_0xA_16(IpvideoContext *s, AVFrame *frame)
822 static int ipvideo_decode_block_opcode_0xB_16(IpvideoContext *s, AVFrame *frame)
838 static int ipvideo_decode_block_opcode_0xC_16(IpvideoContext *s, AVFrame *frame)
858 static int ipvideo_decode_block_opcode_0xD_16(IpvideoContext *s, AVFrame *frame)
879 static int ipvideo_decode_block_opcode_0xE_16(IpvideoContext *s, AVFrame *frame)
898 static int (* const ipvideo_decode_block[])(IpvideoContext *s, AVFrame *frame) = {
909 static int (* const ipvideo_decode_block16[])(IpvideoContext *s, AVFrame *frame) = {
920 static void ipvideo_format_06_firstpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
932 copy_from(s, s->second_last_frame, frame, 0, 0);
936 static void ipvideo_format_06_secondpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
941 off_x = ((uint16_t)opcode - 0xC000) % frame->width;
942 off_y = ((uint16_t)opcode - 0xC000) / frame->width;
943 copy_from(s, s->last_frame, frame, off_x, off_y);
945 off_x = ((uint16_t)opcode - 0x4000) % frame->width;
946 off_y = ((uint16_t)opcode - 0x4000) / frame->width;
947 copy_from(s, frame, frame, off_x, off_y);
951 static void (* const ipvideo_format_06_passes[])(IpvideoContext *s, AVFrame *frame, int16_t op) = {
955 static void ipvideo_decode_format_06_opcodes(IpvideoContext *s, AVFrame *frame)
962 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
963 s->stride = frame->linesize[0];
966 s->upper_motion_limit_offset = (s->avctx->height - 8) * frame->linesize[0]
981 s->pixel_ptr = frame->data[0] + x + y * frame->linesize[0];
982 ipvideo_format_06_passes[pass](s, frame, opcode);
994 static void ipvideo_format_10_firstpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
1006 static void ipvideo_format_10_secondpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
1021 static void (* const ipvideo_format_10_passes[])(IpvideoContext *s, AVFrame *frame, int16_t op) = {
1025 static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
1035 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
1036 s->stride = frame->linesize[0];
1039 s->upper_motion_limit_offset = (s->avctx->height - 8) * frame->linesize[0]
1057 ipvideo_format_10_passes[pass](s, frame, opcode);
1074 s->pixel_ptr = frame->data[0] + x + y*frame->linesize[0];
1087 copy_from(s, s->cur_decode_frame, frame, 0, 0);
1089 /* Don't try to copy last_frame data on the first frame */
1091 copy_from(s, s->last_frame, frame, 0, 0);
1106 static void ipvideo_decode_format_11_opcodes(IpvideoContext *s, AVFrame *frame)
1116 memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
1118 s->stride = frame->linesize[0];
1120 s->stride = frame->linesize[0] >> 1;
1125 s->upper_motion_limit_offset = (s->avctx->height - 8) * frame->linesize[0]
1140 s->pixel_ptr = frame->data[0] + x
1141 + y*frame->linesize[0];
1142 ret = ipvideo_decode_block[opcode](s, frame);
1144 s->pixel_ptr = frame->data[0] + x*2
1145 + y*frame->linesize[0];
1146 ret = ipvideo_decode_block16[opcode](s, frame);
1149 av_log(s->avctx, AV_LOG_ERROR, "decode problem on frame %d, @ block (%d, %d)\n",
1192 static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
1248 /* Decoding map for 0x06 frame format is at the top of pixeldata */
1316 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
1320 frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx);
1325 ipvideo_decode_format_06_opcodes(s, frame);
1328 ipvideo_decode_format_10_opcodes(s, frame);
1331 ipvideo_decode_format_11_opcodes(s, frame);
1340 if ((ret = av_frame_ref(s->last_frame, frame)) < 0)