lavc/j2kenc: Support AV_PIX_FMT_PAL8.
[ffmpeg.git] / libavcodec / msmpeg4.c
index 7041076..920f50f 100644 (file)
  */
 
 #include "avcodec.h"
-#include "dsputil.h"
+#include "idctdsp.h"
 #include "mpegvideo.h"
 #include "msmpeg4.h"
 #include "libavutil/x86/asm.h"
 #include "h263.h"
 #include "mpeg4video.h"
 #include "msmpeg4data.h"
+#include "mpegvideodata.h"
 #include "vc1data.h"
 #include "libavutil/imgutils.h"
 
 /*
- * You can also call this codec : MPEG4 with a twist !
+ * You can also call this codec: MPEG-4 with a twist!
  *
  * TODO:
  *        - (encoding) select best mv table (two choices)
  *        - (encoding) select best vlc/dc table
  */
 
-/* This table is practically identical to the one from h263
+/* This table is practically identical to the one from H.263
  * except that it is inverted. */
 static av_cold void init_h263_dc_for_msmpeg4(void)
 {
@@ -70,7 +71,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void)
             else
                 l= level;
 
-            /* luminance h263 */
+            /* luminance H.263 */
             uni_code= ff_mpeg4_DCtab_lum[size][0];
             uni_len = ff_mpeg4_DCtab_lum[size][1];
             uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
@@ -86,7 +87,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void)
             ff_v2_dc_lum_table[level + 256][0] = uni_code;
             ff_v2_dc_lum_table[level + 256][1] = uni_len;
 
-            /* chrominance h263 */
+            /* chrominance H.263 */
             uni_code= ff_mpeg4_DCtab_chrom[size][0];
             uni_len = ff_mpeg4_DCtab_chrom[size][1];
             uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
@@ -138,10 +139,10 @@ av_cold void ff_msmpeg4_common_init(MpegEncContext *s)
 
 
     if(s->msmpeg4_version>=4){
-        ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable  , ff_wmv1_scantable[1]);
-        ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_wmv1_scantable[2]);
-        ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_wmv1_scantable[3]);
-        ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable  , ff_wmv1_scantable[0]);
+        ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable,   ff_wmv1_scantable[1]);
+        ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_wmv1_scantable[2]);
+        ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_wmv1_scantable[3]);
+        ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable,   ff_wmv1_scantable[0]);
     }
     //Note the default tables are set in common_init in mpegvideo.c
 
@@ -251,7 +252,7 @@ int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,
         c = FASTDIV((c + (scale >> 1)), scale);
     }
 #endif
-    /* XXX: WARNING: they did not choose the same test as MPEG4. This
+    /* XXX: WARNING: they did not choose the same test as MPEG-4. This
        is very important ! */
     if(s->msmpeg4_version>3){
         if(s->inter_intra_pred){