]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vc1.h
lavc: remove disabled FF_API_IDCT cruft
[ffmpeg] / libavcodec / vc1.h
index ac65348352bcd8024210ff2f45f0afaeb6ffb29d..6f24c0e4af301facfb7d58dd7c5a70d8afd45273 100644 (file)
 #define AVCODEC_VC1_H
 
 #include "avcodec.h"
+#include "h264chroma.h"
 #include "mpegvideo.h"
 #include "intrax8.h"
 #include "vc1dsp.h"
 
+#define AC_VLC_BITS 9
+
 /** Markers used in VC-1 AP frame data */
 //@{
 enum VC1Code {
@@ -161,6 +164,16 @@ enum COTypes {
 };
 //@}
 
+/**
+ * FCM Frame Coding Mode
+ * @note some content might be marked interlaced
+ * but have fcm set to 0 as well (e.g. HD-DVD)
+ */
+enum FrameCodingMode {
+    PROGRESSIVE = 0,    ///<  in the bitstream is reported as 00b
+    ILACE_FRAME,        ///<  in the bitstream is reported as 10b
+    ILACE_FIELD         ///<  in the bitstream is reported as 11b
+};
 
 /** The VC1 Context
  * @todo Change size wherever another size is more efficient
@@ -169,6 +182,7 @@ enum COTypes {
 typedef struct VC1Context{
     MpegEncContext s;
     IntraX8Context x8;
+    H264ChromaContext h264chroma;
     VC1DSPContext vc1dsp;
 
     int bits;
@@ -296,7 +310,7 @@ typedef struct VC1Context{
 
     /** Frame decoding info for Advanced profile */
     //@{
-    uint8_t fcm; ///< 0->Progressive, 2->Frame-Interlace, 3->Field-Interlace
+    enum FrameCodingMode fcm;
     uint8_t numpanscanwin;
     uint8_t tfcntr;
     uint8_t rptfrm, tff, rff;
@@ -373,7 +387,7 @@ typedef struct VC1Context{
     int bi_type;
     int x8_type;
 
-    DCTELEM (*block)[6][64];
+    int16_t (*block)[6][64];
     int n_allocated_blks, cur_blk_idx, left_blk_idx, topleft_blk_idx, top_blk_idx;
     uint32_t *cbp_base, *cbp;
     uint8_t *is_intra_base, *is_intra;
@@ -382,6 +396,8 @@ typedef struct VC1Context{
     uint8_t broken_link;         ///< Broken link flag (BROKEN_LINK syntax element)
     uint8_t closed_entry;        ///< Closed entry point flag (CLOSED_ENTRY syntax element)
 
+    int end_mb_x;                ///< Horizontal macroblock limit (used only by mss2)
+
     int parse_only;              ///< Context is used within parser
 
     int warn_interlaced;
@@ -431,11 +447,17 @@ static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, ui
  * @param gb GetBit context initialized from Codec context extra_data
  * @return Status
  */
-int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
+int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
+
+int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
 
-int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
+int ff_vc1_parse_frame_header    (VC1Context *v, GetBitContext *gb);
+int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb);
+int ff_vc1_init_common(VC1Context *v);
 
-int vc1_parse_frame_header    (VC1Context *v, GetBitContext *gb);
-int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb);
+int  ff_vc1_decode_init_alloc_tables(VC1Context *v);
+void ff_vc1_init_transposed_scantables(VC1Context *v);
+int  ff_vc1_decode_end(AVCodecContext *avctx);
+void ff_vc1_decode_blocks(VC1Context *v);
 
 #endif /* AVCODEC_VC1_H */