]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/error_resilience.h
avcodec: rename the AV1 profiles
[ffmpeg] / libavcodec / error_resilience.h
index 949c58f245a7fe6bdb28dc05fa326491f4c53457..10456525fde1f4f670e280f817fd9c6c30862ac0 100644 (file)
@@ -1,5 +1,4 @@
 /*
- *
  * This file is part of Libav.
  *
  * Libav is free software; you can redistribute it and/or
 #ifndef AVCODEC_ERROR_RESILIENCE_H
 #define AVCODEC_ERROR_RESILIENCE_H
 
+#include <stdint.h>
+
+#include "avcodec.h"
+#include "me_cmp.h"
+#include "thread.h"
+
 ///< current MB is the first after a resync marker
 #define VP_START               1
 #define ER_AC_ERROR            2
 #define ER_MB_ERROR (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR)
 #define ER_MB_END   (ER_AC_END|ER_DC_END|ER_MV_END)
 
+typedef struct ERPicture {
+    AVFrame *f;
+    ThreadFrame *tf;
+
+    // it is the caller's responsibility to allocate these buffers
+    int16_t (*motion_val[2])[2];
+    int8_t *ref_index[2];
+
+    uint32_t *mb_type;
+    int field_picture;
+} ERPicture;
+
 typedef struct ERContext {
     AVCodecContext *avctx;
-    DSPContext *dsp;
+    MECmpContext mecc;
+    int mecc_inited;
 
     int *mb_index2xy;
     int mb_num;
     int mb_width, mb_height;
-    int mb_stride;
-    int b8_stride;
+    ptrdiff_t mb_stride;
+    ptrdiff_t b8_stride;
 
     int error_count, error_occurred;
     uint8_t *error_status_table;
@@ -50,9 +68,9 @@ typedef struct ERContext {
     uint8_t *mbintra_table;
     int mv[2][4][2];
 
-    struct Picture *cur_pic;
-    struct Picture *last_pic;
-    struct Picture *next_pic;
+    ERPicture cur_pic;
+    ERPicture last_pic;
+    ERPicture next_pic;
 
     uint16_t pp_time;
     uint16_t pb_time;