]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/r210dec.c
Merge commit 'b146d74730ab9ec5abede9066f770ad851e45fbc'
[ffmpeg] / libavcodec / r210dec.c
index 07dc5886b8c1844fa21d57ad3aafb13b60e4ff19..f8db4a96749c1ea0b7cc15192a26998c62e2bef6 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "avcodec.h"
 #include "libavutil/bswap.h"
+#include "libavutil/common.h"
 
 static av_cold int decode_init(AVCodecContext *avctx)
 {
@@ -42,7 +43,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     AVFrame *pic = avctx->coded_frame;
     const uint32_t *src = (const uint32_t *)avpkt->data;
     int aligned_width = FFALIGN(avctx->width,
-                                avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
+                                avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
     uint8_t *dst_line;
 
     if (pic->data[0])
@@ -66,12 +67,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         for (w = 0; w < avctx->width; w++) {
             uint32_t pixel;
             uint16_t r, g, b;
-            if (avctx->codec_id==CODEC_ID_AVRP) {
+            if (avctx->codec_id==AV_CODEC_ID_AVRP) {
                 pixel = av_le2ne32(*src++);
             } else {
                 pixel = av_be2ne32(*src++);
             }
-            if (avctx->codec_id==CODEC_ID_R210) {
+            if (avctx->codec_id==AV_CODEC_ID_R210) {
                 b =  pixel <<  6;
                 g = (pixel >>  4) & 0xffc0;
                 r = (pixel >> 14) & 0xffc0;
@@ -108,7 +109,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
 AVCodec ff_r210_decoder = {
     .name           = "r210",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_R210,
+    .id             = AV_CODEC_ID_R210,
     .init           = decode_init,
     .close          = decode_close,
     .decode         = decode_frame,
@@ -120,7 +121,7 @@ AVCodec ff_r210_decoder = {
 AVCodec ff_r10k_decoder = {
     .name           = "r10k",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_R10K,
+    .id             = AV_CODEC_ID_R10K,
     .init           = decode_init,
     .close          = decode_close,
     .decode         = decode_frame,
@@ -132,7 +133,7 @@ AVCodec ff_r10k_decoder = {
 AVCodec ff_avrp_decoder = {
     .name           = "avrp",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_AVRP,
+    .id             = AV_CODEC_ID_AVRP,
     .init           = decode_init,
     .close          = decode_close,
     .decode         = decode_frame,