#include "avcodec.h"
#include "libavutil/bswap.h"
+#include "libavutil/common.h"
static av_cold int decode_init(AVCodecContext *avctx)
{
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])
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;
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,
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,
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,