[FFmpeg-cvslog] Add decoder for Avid 1:1 10-bit RGB Packer (AVrp).
Carl Eugen Hoyos
git at videolan.org
Wed Jan 4 15:38:22 CET 2012
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Jan 4 15:10:58 2012 +0100| [64e4f4836a03e427936c17a651a19658d3e3b474] | committer: Carl Eugen Hoyos
Add decoder for Avid 1:1 10-bit RGB Packer (AVrp).
Fixes ticket #525.
Reviewed-by: Paul B Mahol
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64e4f4836a03e427936c17a651a19658d3e3b474
---
Changelog | 1 +
doc/general.texi | 2 ++
libavcodec/Makefile | 1 +
libavcodec/allcodecs.c | 1 +
libavcodec/avcodec.h | 1 +
libavcodec/r210dec.c | 19 ++++++++++++++++++-
libavcodec/version.h | 2 +-
libavformat/isom.c | 1 +
8 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index 1543562..1d2f66f 100644
--- a/Changelog
+++ b/Changelog
@@ -16,6 +16,7 @@ version next:
- Automatic thread count based on detection number of (available) CPU cores
- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
- ffprobe -show_error option
+- Avid 1:1 10-bit RGB Packer decoder
version 0.9:
diff --git a/doc/general.texi b/doc/general.texi
index 8ca34f9..7f49013 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -438,6 +438,8 @@ following image formats are supported:
@item Autodesk Animator Flic video @tab @tab X
@item Autodesk RLE @tab @tab X
@tab fourcc: AASC
+ at item Avid 1:1 10-bit RGB Packer @tab @tab X
+ @tab fourcc: AVrp
@item AVS (Audio Video Standard) video @tab @tab X
@tab Video encoding used by the Creature Shock game.
@item Beam Software VB @tab @tab X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index c3901ef..e735b5b 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -91,6 +91,7 @@ OBJS-$(CONFIG_ATRAC1_DECODER) += atrac1.o atrac.o
OBJS-$(CONFIG_ATRAC3_DECODER) += atrac3.o atrac.o
OBJS-$(CONFIG_AURA_DECODER) += cyuv.o
OBJS-$(CONFIG_AURA2_DECODER) += aura.o
+OBJS-$(CONFIG_AVRP_DECODER) += r210dec.o
OBJS-$(CONFIG_AVS_DECODER) += avs.o
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index b96339d..ec9f928 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -79,6 +79,7 @@ void avcodec_register_all(void)
REGISTER_ENCDEC (ASV2, asv2);
REGISTER_DECODER (AURA, aura);
REGISTER_DECODER (AURA2, aura2);
+ REGISTER_DECODER (AVRP, avrp);
REGISTER_DECODER (AVS, avs);
REGISTER_DECODER (BETHSOFTVID, bethsoftvid);
REGISTER_DECODER (BFI, bfi);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index bb1e239..11b4ae0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -258,6 +258,7 @@ enum CodecID {
CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
CODEC_ID_UTVIDEO = 0x800,
CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
+ CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 18086c6..d310332 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
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1f7e621..0153efe 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -21,7 +21,7 @@
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53
-#define LIBAVCODEC_VERSION_MINOR 50
+#define LIBAVCODEC_VERSION_MINOR 51
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 7cadcef..0c648e9 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -89,6 +89,7 @@ const AVCodecTag codec_movvideo_tags[] = {
{ CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */
{ CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */
{ CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
+ { CODEC_ID_AVRP, MKTAG('A', 'V', 'r', 'p') }, /* Avid 1:1 10-bit RGB Packer */
{ CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
{ CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */
{ CODEC_ID_Y41P, MKTAG('Y', '4', '1', 'P') }, /* UNCOMPRESSED 12BIT 4:1:1 */
More information about the ffmpeg-cvslog
mailing list