Browse code

Add Auravision Aura decoding support

Originally committed as revision 20914 to svn://svn.ffmpeg.org/ffmpeg/trunk

Kostya Shishkov authored on 2009/12/23 22:04:57
Showing 6 changed files
... ...
@@ -46,6 +46,7 @@ version <next>:
46 46
 - IV8 demuxer
47 47
 - CDG demuxer and decoder
48 48
 - R210 decoder
49
+- Auravision Aura decoder
49 50
 
50 51
 
51 52
 
... ...
@@ -317,6 +317,7 @@ following image formats are supported:
317 317
     @tab fourcc: VCR1
318 318
 @item ATI VCR2               @tab     @tab  X
319 319
     @tab fourcc: VCR2
320
+@item Auravision Aura        @tab     @tab  X
320 321
 @item Autodesk Animator Flic video  @tab     @tab  X
321 322
 @item Autodesk RLE           @tab     @tab  X
322 323
     @tab fourcc: AASC
... ...
@@ -60,6 +60,7 @@ OBJS-$(CONFIG_ASV2_DECODER)            += asv1.o mpeg12data.o
60 60
 OBJS-$(CONFIG_ASV2_ENCODER)            += asv1.o mpeg12data.o
61 61
 OBJS-$(CONFIG_ATRAC1_DECODER)          += atrac1.o atrac.o
62 62
 OBJS-$(CONFIG_ATRAC3_DECODER)          += atrac3.o atrac.o
63
+OBJS-$(CONFIG_AURA_DECODER)            += cyuv.o
63 64
 OBJS-$(CONFIG_AVS_DECODER)             += avs.o
64 65
 OBJS-$(CONFIG_BETHSOFTVID_DECODER)     += bethsoftvideo.o
65 66
 OBJS-$(CONFIG_BFI_DECODER)             += bfi.o
... ...
@@ -65,6 +65,7 @@ void avcodec_register_all(void)
65 65
     REGISTER_DECODER (AMV, amv);
66 66
     REGISTER_ENCDEC  (ASV1, asv1);
67 67
     REGISTER_ENCDEC  (ASV2, asv2);
68
+    REGISTER_DECODER (AURA, aura);
68 69
     REGISTER_DECODER (AVS, avs);
69 70
     REGISTER_DECODER (BETHSOFTVID, bethsoftvid);
70 71
     REGISTER_DECODER (BFI, bfi);
... ...
@@ -30,7 +30,7 @@
30 30
 #include "libavutil/avutil.h"
31 31
 
32 32
 #define LIBAVCODEC_VERSION_MAJOR 52
33
-#define LIBAVCODEC_VERSION_MINOR 43
33
+#define LIBAVCODEC_VERSION_MINOR 44
34 34
 #define LIBAVCODEC_VERSION_MICRO  0
35 35
 
36 36
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
... ...
@@ -82,6 +82,10 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
82 82
     unsigned char cur_byte;
83 83
     int pixel_groups;
84 84
 
85
+    if (avctx->codec_id == CODEC_ID_AURA) {
86
+        y_table = u_table;
87
+        u_table = v_table;
88
+    }
85 89
     /* sanity check the buffer size: A buffer has 3x16-bytes tables
86 90
      * followed by (height) lines each with 3 bytes to represent groups
87 91
      * of 4 pixels. Thus, the total size of the buffer ought to be:
... ...
@@ -163,6 +167,23 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
163 163
     return buf_size;
164 164
 }
165 165
 
166
+#if CONFIG_AURA_DECODER
167
+AVCodec aura_decoder = {
168
+    "aura",
169
+    CODEC_TYPE_VIDEO,
170
+    CODEC_ID_AURA,
171
+    sizeof(CyuvDecodeContext),
172
+    cyuv_decode_init,
173
+    NULL,
174
+    NULL,
175
+    cyuv_decode_frame,
176
+    CODEC_CAP_DR1,
177
+    NULL,
178
+    .long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"),
179
+};
180
+#endif
181
+
182
+#if CONFIG_CYUV_DECODER
166 183
 AVCodec cyuv_decoder = {
167 184
     "cyuv",
168 185
     CODEC_TYPE_VIDEO,
... ...
@@ -176,4 +197,4 @@ AVCodec cyuv_decoder = {
176 176
     NULL,
177 177
     .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
178 178
 };
179
-
179
+#endif