X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fr210dec.c;h=d31033229fa19203d7d65df9f978bc7522e9bd2b;hb=107f55cb01d2333541b8887194c487a6c6bc1ba1;hp=18086c69162f6cc7943b0c045c6ce05d21773a61;hpb=6faf0a21e18f314c48a886864145abe715be6572;p=ffmpeg diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c index 18086c69162..d31033229fa 100644 --- a/libavcodec/r210dec.c +++ b/libavcodec/r210dec.c @@ -61,8 +61,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, for (h = 0; h < avctx->height; h++) { uint16_t *dst = (uint16_t *)dst_line; for (w = 0; w < avctx->width; w++) { - uint32_t pixel = av_be2ne32(*src++); + uint32_t pixel; uint16_t r, g, b; + if (avctx->codec_id==CODEC_ID_AVRP) { + pixel = av_le2ne32(*src++); + } else { + pixel = av_be2ne32(*src++); + } if (avctx->codec_id==CODEC_ID_R210) { b = pixel << 6; g = (pixel >> 4) & 0xffc0; @@ -120,3 +125,15 @@ AVCodec ff_r10k_decoder = { .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"), }; #endif +#if CONFIG_AVRP_DECODER +AVCodec ff_avrp_decoder = { + .name = "avrp", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_AVRP, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"), +}; +#endif