annotate ffmpeg/libavcodec/error_resilience.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 *
yading@10 3 * This file is part of FFmpeg.
yading@10 4 *
yading@10 5 * FFmpeg is free software; you can redistribute it and/or
yading@10 6 * modify it under the terms of the GNU Lesser General Public
yading@10 7 * License as published by the Free Software Foundation; either
yading@10 8 * version 2.1 of the License, or (at your option) any later version.
yading@10 9 *
yading@10 10 * FFmpeg is distributed in the hope that it will be useful,
yading@10 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 13 * Lesser General Public License for more details.
yading@10 14 *
yading@10 15 * You should have received a copy of the GNU Lesser General Public
yading@10 16 * License along with FFmpeg; if not, write to the Free Software
yading@10 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 18 */
yading@10 19
yading@10 20 #ifndef AVCODEC_ERROR_RESILIENCE_H
yading@10 21 #define AVCODEC_ERROR_RESILIENCE_H
yading@10 22
yading@10 23 #include <stdint.h>
yading@10 24
yading@10 25 #include "avcodec.h"
yading@10 26 #include "dsputil.h"
yading@10 27
yading@10 28 ///< current MB is the first after a resync marker
yading@10 29 #define VP_START 1
yading@10 30 #define ER_AC_ERROR 2
yading@10 31 #define ER_DC_ERROR 4
yading@10 32 #define ER_MV_ERROR 8
yading@10 33 #define ER_AC_END 16
yading@10 34 #define ER_DC_END 32
yading@10 35 #define ER_MV_END 64
yading@10 36
yading@10 37 #define ER_MB_ERROR (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR)
yading@10 38 #define ER_MB_END (ER_AC_END|ER_DC_END|ER_MV_END)
yading@10 39
yading@10 40 typedef struct ERContext {
yading@10 41 AVCodecContext *avctx;
yading@10 42 DSPContext *dsp;
yading@10 43
yading@10 44 int *mb_index2xy;
yading@10 45 int mb_num;
yading@10 46 int mb_width, mb_height;
yading@10 47 int mb_stride;
yading@10 48 int b8_stride;
yading@10 49
yading@10 50 int error_count, error_occurred;
yading@10 51 uint8_t *error_status_table;
yading@10 52 uint8_t *er_temp_buffer;
yading@10 53 int16_t *dc_val[3];
yading@10 54 uint8_t *mbskip_table;
yading@10 55 uint8_t *mbintra_table;
yading@10 56 int mv[2][4][2];
yading@10 57
yading@10 58 struct Picture *cur_pic;
yading@10 59 struct Picture *last_pic;
yading@10 60 struct Picture *next_pic;
yading@10 61
yading@10 62 uint16_t pp_time;
yading@10 63 uint16_t pb_time;
yading@10 64 int quarter_sample;
yading@10 65 int partitioned_frame;
yading@10 66 int ref_count;
yading@10 67
yading@10 68 void (*decode_mb)(void *opaque, int ref, int mv_dir, int mv_type,
yading@10 69 int (*mv)[2][4][2],
yading@10 70 int mb_x, int mb_y, int mb_intra, int mb_skipped);
yading@10 71 void *opaque;
yading@10 72 } ERContext;
yading@10 73
yading@10 74 void ff_er_frame_start(ERContext *s);
yading@10 75 void ff_er_frame_end(ERContext *s);
yading@10 76 void ff_er_add_slice(ERContext *s, int startx, int starty, int endx, int endy,
yading@10 77 int status);
yading@10 78
yading@10 79 #endif /* AVCODEC_ERROR_RESILIENCE_H */