]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eatgq.c
Port pred8x8l_horizontal_down_mmxext (H.264 intra prediction) from x264
[ffmpeg] / libavcodec / eatgq.c
index a854d5f4f8b4d826da5086c7ac6aa84950299d82..7a985050c5a7a39087df76eaa060d7475f03c03f 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/eatgq.c
+ * @file
  * Electronic Arts TGQ Video Decoder
  * @author Peter Ross <pross@xvid.org>
  *
@@ -42,6 +42,7 @@ typedef struct TgqContext {
     int width,height;
     ScanTable scantable;
     int qtable[64];
+    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
 } TgqContext;
 
 static av_cold int tgq_decode_init(AVCodecContext *avctx){
@@ -144,7 +145,6 @@ static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const uint8_t **bs,
     int mode;
     int i;
     int8_t dc[6];
-    DCTELEM block[6][64];
 
     mode = bytestream_get_byte(bs);
     if (mode>buf_end-*bs) {
@@ -156,8 +156,8 @@ static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const uint8_t **bs,
         GetBitContext gb;
         init_get_bits(&gb, *bs, mode*8);
         for(i=0; i<6; i++)
-            tgq_decode_block(s, block[i], &gb);
-        tgq_idct_put_mb(s, block, mb_x, mb_y);
+            tgq_decode_block(s, s->block[i], &gb);
+        tgq_idct_put_mb(s, s->block, mb_x, mb_y);
     }else{
         if (mode==3) {
             memset(dc, (*bs)[0], 4);
@@ -245,7 +245,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){
 
 AVCodec eatgq_decoder = {
     "eatgq",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TGQ,
     sizeof(TgqContext),
     tgq_decode_init,