]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/r210dec.c
hlsenc: stand alone hls segmenter
[ffmpeg] / libavcodec / r210dec.c
index 0f85f5892bceb701679e0681405ca729bc03d708..05f94b7e1a0155e3135b0c1604ed526d1fb69c19 100644 (file)
 
 #include "avcodec.h"
 #include "libavutil/bswap.h"
+#include "libavutil/common.h"
 
 static av_cold int decode_init(AVCodecContext *avctx)
 {
-    avctx->pix_fmt             = PIX_FMT_RGB48;
+    avctx->pix_fmt             = AV_PIX_FMT_RGB48;
     avctx->bits_per_raw_sample = 10;
 
     avctx->coded_frame         = avcodec_alloc_frame();
@@ -63,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         for (w = 0; w < avctx->width; w++) {
             uint32_t pixel = av_be2ne32(*src++);
             uint16_t r, g, b;
-            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;
@@ -100,23 +101,23 @@ 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,
     .capabilities   = CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
+    .long_name      = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"),
 };
 #endif
 #if CONFIG_R10K_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,
     .capabilities   = CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
+    .long_name      = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
 };
 #endif