X-Git-Url: https://git.libav.org/?p=libav.git;a=blobdiff_plain;f=libavcodec%2Fdxtory.c;h=da43c4700364adb83b2cd5ee92a8f7f7293ece49;hp=d11b942ff85ed7f8fc8bc02964f51295b1899280;hb=aa91fe80913ff8e84d2264f65b87af57519ce0ff;hpb=36ef5369ee9b336febc2c270f8718cec4476cb85 diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c index d11b942ff8..da43c47003 100644 --- a/libavcodec/dxtory.c +++ b/libavcodec/dxtory.c @@ -21,11 +21,12 @@ */ #include "avcodec.h" +#include "libavutil/common.h" #include "libavutil/intreadwrite.h" static av_cold int decode_init(AVCodecContext *avctx) { - avctx->pix_fmt = PIX_FMT_YUV420P; + avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->coded_frame = avcodec_alloc_frame(); if (!avctx->coded_frame) return AVERROR(ENOMEM); @@ -69,8 +70,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, V = pic->data[2]; for (h = 0; h < avctx->height; h += 2) { for (w = 0; w < avctx->width; w += 2) { - AV_WN16A(Y1 + w, AV_RN16A(src)); - AV_WN16A(Y2 + w, AV_RN16A(src + 2)); + AV_COPY16(Y1 + w, src); + AV_COPY16(Y2 + w, src + 2); U[w >> 1] = src[4] + 0x80; V[w >> 1] = src[5] + 0x80; src += 6;