]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rv34.h
Implement a SIMD version of emulated_edge_mc() for x86.
[ffmpeg] / libavcodec / rv34.h
index dff36f29e770976860af137a15b9cf4bc6293172..24a27ce4824e17d608913ed316a795086b6c0cc7 100644 (file)
  */
 
 /**
- * @file rv34.h
+ * @file
  * RV30 and RV40 decoder common data declarations
  */
 
-#ifndef FFMPEG_RV34_H
-#define FFMPEG_RV34_H
+#ifndef AVCODEC_RV34_H
+#define AVCODEC_RV34_H
 
 #include "avcodec.h"
 #include "dsputil.h"
@@ -33,6 +33,9 @@
 
 #include "h264pred.h"
 
+#define MB_TYPE_SEPARATE_DC 0x01000000
+#define IS_SEPARATE_DC(a)   ((a) & MB_TYPE_SEPARATE_DC)
+
 /**
  * RV30 and RV40 Macroblock types
  */
@@ -74,6 +77,7 @@ typedef struct SliceInfo{
     int start, end;        ///< start and end macroblocks of the slice
     int width;             ///< coded width
     int height;            ///< coded height
+    int pts;               ///< frame timestamp
 }SliceInfo;
 
 /** decoder context */
@@ -81,6 +85,7 @@ typedef struct RV34DecContext{
     MpegEncContext s;
     int8_t *intra_types_hist;///< old block types, used for prediction
     int8_t *intra_types;     ///< block types
+    int    intra_types_stride;///< block types array stride
     const uint8_t *luma_dc_quant_i;///< luma subblock DC quantizer for intraframes
     const uint8_t *luma_dc_quant_p;///< luma subblock DC quantizer for interframes
 
@@ -99,16 +104,19 @@ typedef struct RV34DecContext{
     int rv30;                ///< indicates which RV variasnt is currently decoded
     int rpr;                 ///< one field size in RV30 slice header
 
+    int cur_pts, last_pts, next_pts;
+
     uint16_t *cbp_luma;      ///< CBP values for luma subblocks
     uint8_t  *cbp_chroma;    ///< CBP values for chroma subblocks
+    int      *deblock_coefs; ///< deblock coefficients for each macroblock
 
     /** 8x8 block available flags (for MV prediction) */
-    DECLARE_ALIGNED_8(uint32_t, avail_cache[3*4]);
+    DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4];
 
     int (*parse_slice_header)(struct RV34DecContext *r, GetBitContext *gb, SliceInfo *si);
     int (*decode_mb_info)(struct RV34DecContext *r);
     int (*decode_intra_types)(struct RV34DecContext *r, GetBitContext *gb, int8_t *dst);
-    void (*loop_filter)(struct RV34DecContext *r);
+    void (*loop_filter)(struct RV34DecContext *r, int row);
 }RV34DecContext;
 
 /**
@@ -116,7 +124,7 @@ typedef struct RV34DecContext{
  */
 int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
 int ff_rv34_decode_init(AVCodecContext *avctx);
-int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size);
+int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt);
 int ff_rv34_decode_end(AVCodecContext *avctx);
 
-#endif /* FFMPEG_RV34_H */
+#endif /* AVCODEC_RV34_H */