-#define CHECK_STREAM_PTR(n) \
- if ((s->stream_ptr + n) > s->stream_end) { \
- av_log(s->avctx, AV_LOG_ERROR, "Interplay video warning: stream_ptr out of bounds (%p >= %p)\n", \
- s->stream_ptr + n, s->stream_end); \
- return -1; \
- }
-
-#define COPY_FROM_CURRENT() \
- motion_offset = current_offset; \
- motion_offset += y * s->stride; \
- motion_offset += x; \
- if (motion_offset < 0) { \
- av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \
- return -1; \
- } else if (motion_offset > s->upper_motion_limit_offset) { \
- av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \
- motion_offset, s->upper_motion_limit_offset); \
- return -1; \
- } \
- s->dsp.put_pixels_tab[1][0](s->pixel_ptr, \
- s->current_frame.data[0] + motion_offset, s->stride, 8);
-
-#define COPY_FROM_PREVIOUS() \
- motion_offset = current_offset; \
- motion_offset += y * s->stride; \
- motion_offset += x; \
- if (motion_offset < 0) { \
- av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \
- return -1; \
- } else if (motion_offset > s->upper_motion_limit_offset) { \
- av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \
- motion_offset, s->upper_motion_limit_offset); \
- return -1; \
- } \
- s->dsp.put_pixels_tab[1][0](s->pixel_ptr, \
- s->last_frame.data[0] + motion_offset, s->stride, 8);
-
-#define COPY_FROM_SECOND_LAST() \
- motion_offset = current_offset; \
- motion_offset += y * s->stride; \
- motion_offset += x; \
- if (motion_offset < 0) { \
- av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \
- return -1; \
- } else if (motion_offset > s->upper_motion_limit_offset) { \
- av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \
- motion_offset, s->upper_motion_limit_offset); \
- return -1; \
- } \
- s->dsp.put_pixels_tab[1][0](s->pixel_ptr, \
- s->second_last_frame.data[0] + motion_offset, s->stride, 8);
-
-static int ipvideo_decode_block_opcode_0x0(IpvideoContext *s)