summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-16 18:46:28 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-16 18:54:56 +0100
commit1fad547cefb4d2f3ed3d764b547ee16cf399e477 (patch)
treee0c261a8eb1823e1ab9235d1ff7c66a8058a247c /libavcodec/mpegvideo.h
parent2bac1535db970e981e90306d64f2252be4c9fd63 (diff)
parent54974c62982ae827becdbdb9b620b7ba75d079a0 (diff)
Merge commit '54974c62982ae827becdbdb9b620b7ba75d079a0'
* commit '54974c62982ae827becdbdb9b620b7ba75d079a0': error_resilience: decouple ER from MpegEncContext Conflicts: libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/h264.c libavcodec/mpegvideo.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index af59befd25..924baccc8a 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "dsputil.h"
+#include "error_resilience.h"
#include "get_bits.h"
#include "h264chroma.h"
#include "put_bits.h"
@@ -494,19 +495,6 @@ typedef struct MpegEncContext {
int last_bits; ///< temp var used for calculating the above vars
/* error concealment / resync */
- int error_count, error_occurred;
- uint8_t *error_status_table; ///< table of the error status of each MB
-#define VP_START 1 ///< current MB is the first after a resync marker
-#define ER_AC_ERROR 2
-#define ER_DC_ERROR 4
-#define ER_MV_ERROR 8
-#define ER_AC_END 16
-#define ER_DC_END 32
-#define ER_MV_END 64
-
-#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)
-
int resync_mb_x; ///< x position of last resync marker
int resync_mb_y; ///< y position of last resync marker
GetBitContext last_resync_gb; ///< used to search for the next resync marker
@@ -715,15 +703,14 @@ typedef struct MpegEncContext {
int mpv_flags; ///< flags set by private options
int quantizer_noise_shaping;
- /* error resilience stuff */
- uint8_t *er_temp_buffer;
-
/* temp buffers for rate control */
float *cplx_tab, *bits_tab;
/* flag to indicate a reinitialization is required, e.g. after
* a frame size change */
int context_reinit;
+
+ ERContext er;
} MpegEncContext;
#define REBASE_PICTURE(pic, new_ctx, old_ctx) \
@@ -801,9 +788,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src
const uint8_t *avpriv_mpv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state);
void ff_set_qscale(MpegEncContext * s, int qscale);
-void ff_er_frame_start(MpegEncContext *s);
-void ff_er_frame_end(MpegEncContext *s);
-void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int endy, int status);
+void ff_mpeg_er_frame_start(MpegEncContext *s);
int ff_dct_common_init(MpegEncContext *s);
int ff_dct_encode_init(MpegEncContext *s);