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

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) |
Definition in file error_resilience.c.
| #define MV_CHANGED 2 |
Referenced by guess_mv().
| #define MV_FROZEN 3 |
Referenced by guess_mv().
| #define MV_UNCHANGED 1 |
Referenced by guess_mv().
| static void decode_mb | ( | MpegEncContext * | s | ) | [static] |
Definition at line 33 of file error_resilience.c.
References MpegEncContext::block, MpegEncContext::current_picture, MpegEncContext::dest, MpegEncContext::linesize, MpegEncContext::mb_x, MpegEncContext::mb_y, MPV_decode_mb(), and MpegEncContext::uvlinesize.

| void ff_er_add_slice | ( | MpegEncContext * | s, | |
| int | startx, | |||
| int | starty, | |||
| int | endx, | |||
| int | endy, | |||
| int | status | |||
| ) |
adds a slice.
| 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().

| void ff_er_frame_start | ( | MpegEncContext * | s | ) |
Definition at line 599 of file error_resilience.c.
References AC_END, AC_ERROR, DC_END, DC_ERROR, MpegEncContext::error_count, MpegEncContext::error_resilience, MpegEncContext::error_status_table, MpegEncContext::mb_height, MpegEncContext::mb_num, MpegEncContext::mb_stride, MV_END, MV_ERROR, and VP_START.
Referenced by ff_h263_decode_frame(), frame_start(), h261_decode_frame(), mpeg_field_start(), and vc9_decode_frame().
| static void filter181 | ( | int16_t * | data, | |
| int | width, | |||
| int | height, | |||
| int | stride | |||
| ) | [static] |
| 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
| 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().

| static void guess_mv | ( | MpegEncContext * | s | ) | [static] |
Definition at line 313 of file error_resilience.c.
References ABS, MpegEncContext::avctx, MpegEncContext::b8_stride, MpegEncContext::block, DSPContext::clear_blocks, MpegEncContext::current_picture, decode_mb(), MpegEncContext::dsp, error(), AVCodecContext::error_concealment, MpegEncContext::error_status_table, FF_EC_GUESS_MVS, IS_INTRA, MpegEncContext::last_picture_ptr, MpegEncContext::linesize, mb_height, MpegEncContext::mb_height, MpegEncContext::mb_index2xy, MpegEncContext::mb_intra, MpegEncContext::mb_num, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MpegEncContext::mb_width, mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mv, MV_CHANGED, MpegEncContext::mv_dir, MV_DIR_FORWARD, MV_ERROR, MV_FROZEN, MpegEncContext::mv_type, MV_TYPE_16X16, MV_UNCHANGED, and src.
Referenced by ff_er_frame_end().

| 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
| 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] |
Definition at line 550 of file error_resilience.c.
References MpegEncContext::current_picture, DC_ERROR, MpegEncContext::dsp, error(), MpegEncContext::error_status_table, I_TYPE, IS_INTRA, MpegEncContext::last_picture, MpegEncContext::last_picture_ptr, MpegEncContext::linesize, MpegEncContext::mb_height, MpegEncContext::mb_index2xy, MpegEncContext::mb_num, MpegEncContext::mb_stride, MpegEncContext::mb_width, MV_ERROR, NULL, MpegEncContext::pict_type, and DSPContext::sad.
Referenced by ff_er_frame_end().

| 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
| 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().
1.5.5