#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();
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;
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