diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-02 18:24:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-12 22:55:39 +0200 |
commit | 81d1fcf37d4bdba58705f0541ebdab890d80ee4a (patch) | |
tree | 435843390b6004e67079ce275bda46343f29b10f | |
parent | a8bc175dd9cec09c1cbdc6e5e3bf8f59170162da (diff) | |
download | ffmpeg-81d1fcf37d4bdba58705f0541ebdab890d80ee4a.tar.gz |
avcodec: add option to make is_intra_more_likely() from error concealment return "no"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | doc/codecs.texi | 2 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 1 | ||||
-rw-r--r-- | libavcodec/error_resilience.c | 3 | ||||
-rw-r--r-- | libavcodec/options_table.h | 1 | ||||
-rw-r--r-- | libavcodec/version.h | 4 |
5 files changed, 9 insertions, 2 deletions
diff --git a/doc/codecs.texi b/doc/codecs.texi index ad31dbf812..ec69a581ba 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -429,6 +429,8 @@ Possible values: iterative motion vector (MV) search (slow) @item deblock use strong deblock filter for damaged MBs +@item favor_inter +favor predicting from the previous frame instead of the current @end table @item bits_per_coded_sample @var{integer} diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index d35ce94850..9a24c96633 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2556,6 +2556,7 @@ typedef struct AVCodecContext { int error_concealment; #define FF_EC_GUESS_MVS 1 #define FF_EC_DEBLOCK 2 +#define FF_EC_FAVOR_INTER 256 /** * debug diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 670e592b8c..7bb7860f91 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -686,6 +686,9 @@ static int is_intra_more_likely(ERContext *s) if (!s->last_pic.f || !s->last_pic.f->data[0]) return 1; // no previous frame available -> use spatial prediction + if (s->avctx->error_concealment & FF_EC_FAVOR_INTER) + return 0; + undamaged_count = 0; for (i = 0; i < s->mb_num; i++) { const int mb_xy = s->mb_index2xy[i]; diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 0059ea9978..f115ea718f 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -223,6 +223,7 @@ static const AVOption avcodec_options[] = { {"ec", "set error concealment strategy", OFFSET(error_concealment), AV_OPT_TYPE_FLAGS, {.i64 = 3 }, INT_MIN, INT_MAX, V|D, "ec"}, {"guess_mvs", "iterative motion vector (MV) search (slow)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_GUESS_MVS }, INT_MIN, INT_MAX, V|D, "ec"}, {"deblock", "use strong deblock filter for damaged MBs", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_DEBLOCK }, INT_MIN, INT_MAX, V|D, "ec"}, +{"favor_inter", "favor predicting from the previous frame", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_FAVOR_INTER }, INT_MIN, INT_MAX, V|D, "ec"}, {"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"pred", "prediction method", OFFSET(prediction_method), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "pred"}, {"left", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_LEFT }, INT_MIN, INT_MAX, V|E, "pred"}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 5294d8e283..150e932b41 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 55 -#define LIBAVCODEC_VERSION_MINOR 60 -#define LIBAVCODEC_VERSION_MICRO 103 +#define LIBAVCODEC_VERSION_MINOR 61 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ |