*/
#include "libavutil/intreadwrite.h"
+#include "libavcore/imgutils.h"
#include "avcodec.h"
typedef struct PTXContext {
if (p->data[0])
avctx->release_buffer(avctx, p);
- if (avcodec_check_dimensions(avctx, w, h))
+ if (av_image_check_size(w, h, 0, avctx))
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
stride = p->linesize[0];
for (y=0; y<h; y++) {
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
unsigned int x;
for (x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel)
AV_WN16(ptr+x, AV_RL16(buf+x));
AVCodec ptx_decoder = {
"ptx",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_PTX,
sizeof(PTXContext),
ptx_init,
NULL,
ptx_end,
ptx_decode_frame,
- 0,
+ CODEC_CAP_DR1,
NULL,
.long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"),
};