hvirtual/quicktime/ffmpeg/libavcodec/error_resilience.c File Reference

#include <limits.h>
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "common.h"

Include dependency graph for error_resilience.c:

Go to the source code of this file.

Defines

#define MV_FROZEN   3
#define MV_CHANGED   2
#define MV_UNCHANGED   1

Functions

static void decode_mb (MpegEncContext *s)
static void put_dc (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int mb_x, int mb_y)
static void filter181 (int16_t *data, int width, int height, int stride)
static void guess_dc (MpegEncContext *s, int16_t *dc, int w, int h, int stride, int is_luma)
static void h_block_filter (MpegEncContext *s, uint8_t *dst, int w, int h, int stride, int is_luma)
static void v_block_filter (MpegEncContext *s, uint8_t *dst, int w, int h, int stride, int is_luma)
static void guess_mv (MpegEncContext *s)
static int is_intra_more_likely (MpegEncContext *s)
void ff_er_frame_start (MpegEncContext *s)
void ff_er_add_slice (MpegEncContext *s, int startx, int starty, int endx, int endy, int status)
void ff_er_frame_end (MpegEncContext *s)


Detailed Description

Error resilience / concealment.

Definition in file error_resilience.c.


Define Documentation

#define MV_CHANGED   2

Referenced by guess_mv().

#define MV_FROZEN   3

Referenced by guess_mv().

#define MV_UNCHANGED   1

Referenced by guess_mv().


Function Documentation

static void decode_mb ( MpegEncContext s  )  [static]

void ff_er_add_slice ( MpegEncContext s,
int  startx,
int  starty,
int  endx,
int  endy,
int  status 
)

adds a slice.

Parameters:
endx x component of the last macroblock, can be -1 for the last of the previous line
status the status at the end (MV_END, AC_ERROR, ...), it is assumed that no earlier end or error of the same type occured

Definition at line 612 of file error_resilience.c.

References AC_END, AC_ERROR, MpegEncContext::avctx, DC_END, DC_ERROR, MpegEncContext::error_count, MpegEncContext::error_resilience, MpegEncContext::error_status_table, MpegEncContext::mb_index2xy, MpegEncContext::mb_num, MpegEncContext::mb_width, MV_END, MV_ERROR, AVCodecContext::skip_top, AVCodecContext::thread_count, and VP_START.

Referenced by decode_slice(), ff_mpeg4_decode_partitions(), mpeg_decode_frame(), and slice_decode_thread().

void ff_er_frame_end ( MpegEncContext s  ) 

Definition at line 663 of file error_resilience.c.

References AC_END, AC_ERROR, av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, AV_LOG_INFO, av_mallocz(), MpegEncContext::avctx, MpegEncContext::b8_stride, B_TYPE, MpegEncContext::block, DSPContext::clear_blocks, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, DC_END, DC_ERROR, MpegEncContext::dc_val, AVCodecContext::debug, decode_mb(), MpegEncContext::dsp, error(), AVCodecContext::error_concealment, MpegEncContext::error_count, MpegEncContext::error_resilience, MpegEncContext::error_status_table, FF_DEBUG_ER, FF_EC_DEBLOCK, filter181(), guess_dc(), guess_mv(), h_block_filter(), IS_8X8, IS_INTER, IS_INTRA, is_intra_more_likely(), MpegEncContext::linesize, MpegEncContext::mb_height, MpegEncContext::mb_index2xy, MpegEncContext::mb_intra, MpegEncContext::mb_num, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MB_TYPE_16x16, MB_TYPE_INTRA4x4, MB_TYPE_L0, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mbintra_table, MpegEncContext::mbskip_table, Picture::motion_val_base, MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_BACKWARD, MV_DIR_FORWARD, MV_END, MV_ERROR, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_8X8, MpegEncContext::next_picture, NULL, MpegEncContext::partitioned_frame, MpegEncContext::pb_time, MpegEncContext::pict_type, MpegEncContext::pp_time, put_dc(), AVCodecContext::skip_bottom, AVCodecContext::skip_top, MpegEncContext::uvlinesize, v_block_filter(), VP_START, and AVCodecContext::xvmc_acceleration.

Referenced by decode_nal_units(), ff_h263_decode_frame(), slice_end(), and vc9_decode_frame().

Here is the call graph for this function:

void ff_er_frame_start ( MpegEncContext s  ) 

static void filter181 ( int16_t *  data,
int  width,
int  height,
int  stride 
) [static]

Definition at line 73 of file error_resilience.c.

Referenced by ff_er_frame_end().

static void guess_dc ( MpegEncContext s,
int16_t *  dc,
int  w,
int  h,
int  stride,
int  is_luma 
) [static]

guess the dc of blocks which dont have a undamaged dc

Parameters:
w width in 8 pixel blocks
h height in 8 pixel blocks

Definition at line 114 of file error_resilience.c.

References MpegEncContext::current_picture, DC_ERROR, error(), MpegEncContext::error_status_table, IS_INTER, IS_INTRA, and MpegEncContext::mb_stride.

Referenced by ff_er_frame_end().

Here is the call graph for this function:

static void guess_mv ( MpegEncContext s  )  [static]

static void h_block_filter ( MpegEncContext s,
uint8_t *  dst,
int  w,
int  h,
int  stride,
int  is_luma 
) [static]

simple horizontal deblocking filter used for error resilience

Parameters:
w width in 8 pixel blocks
h height in 8 pixel blocks

Definition at line 198 of file error_resilience.c.

References a, ABS, AC_ERROR, b, MpegEncContext::b8_stride, c, cm, cropTbl, MpegEncContext::current_picture, DC_ERROR, MpegEncContext::error_status_table, IS_INTRA, MAX_NEG_CROP, MpegEncContext::mb_stride, MV_ERROR, and offset.

Referenced by ff_er_frame_end().

static int is_intra_more_likely ( MpegEncContext s  )  [static]

static void put_dc ( MpegEncContext s,
uint8_t *  dest_y,
uint8_t *  dest_cb,
uint8_t *  dest_cr,
int  mb_x,
int  mb_y 
) [static]

replaces the current MB with a flat dc only version.

Definition at line 44 of file error_resilience.c.

References MpegEncContext::b8_stride, MpegEncContext::dc_val, MpegEncContext::linesize, MpegEncContext::mb_stride, and MpegEncContext::uvlinesize.

Referenced by ff_er_frame_end().

static void v_block_filter ( MpegEncContext s,
uint8_t *  dst,
int  w,
int  h,
int  stride,
int  is_luma 
) [static]

simple vertical deblocking filter used for error resilience

Parameters:
w width in 8 pixel blocks
h height in 8 pixel blocks

Definition at line 258 of file error_resilience.c.

References a, ABS, AC_ERROR, b, MpegEncContext::b8_stride, c, cm, cropTbl, MpegEncContext::current_picture, DC_ERROR, MpegEncContext::error_status_table, IS_INTRA, MAX_NEG_CROP, MpegEncContext::mb_stride, MV_ERROR, and offset.

Referenced by ff_er_frame_end().


Generated on Mon Apr 28 14:03:54 2008 for Cinelerra by  doxygen 1.5.5