#include "swscale.h"
#include "dsputil.h"
-#ifdef USE_FASTMEMCPY
-#include "libvo/fastmemcpy.h"
-#endif
-
#define NB_COMPONENTS 3
#define PHASE_BITS 4
src_pos += src_incr;\
}
-#define DUMP(reg) movq_r2m(reg, tmp); printf(#reg "=%016Lx\n", tmp.uq);
+#define DUMP(reg) movq_r2m(reg, tmp); printf(#reg "=%016"PRIx64"\n", tmp.uq);
/* XXX: do four pixels at a time */
static void h_resample_fast4_mmx(uint8_t *dst, int dst_width,
}
emms();
}
-#endif
+#endif /* HAVE_MMX */
#ifdef HAVE_ALTIVEC
typedef union {
dst_width--;
}
}
-#endif
+#endif /* HAVE_ALTIVEC */
/* slow version to handle limit cases. Does not need optimisation */
static void h_resample_slow(uint8_t *dst, int dst_width,
void sws_freeContext(struct SwsContext *ctx)
{
+ if (!ctx)
+ return;
if ((ctx->resampling_ctx->iwidth != ctx->resampling_ctx->owidth) ||
(ctx->resampling_ctx->iheight != ctx->resampling_ctx->oheight)) {
img_resample_close(ctx->resampling_ctx);
goto the_end;
}
} else if (resampled_picture != &dst_pict) {
- img_copy(&dst_pict, resampled_picture, current_pix_fmt,
+ av_picture_copy(&dst_pict, resampled_picture, current_pix_fmt,
ctx->resampling_ctx->owidth, ctx->resampling_ctx->oheight);
}
#ifdef TEST
#include <stdio.h>
+#undef exit
/* input */
#define XSIZE 256
exit(1);
}
av_log(NULL, AV_LOG_INFO, "MMX OK\n");
-#endif
+#endif /* HAVE_MMX */
return 0;
}
-#endif
+#endif /* TEST */