summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/test/ffmpeg_tests/ffmpeg_tests.cc2
-rw-r--r--media/tools/media_bench/media_bench.cc12
2 files changed, 14 insertions, 0 deletions
diff --git a/media/test/ffmpeg_tests/ffmpeg_tests.cc b/media/test/ffmpeg_tests/ffmpeg_tests.cc
index ff130d1..abfbeff 100644
--- a/media/test/ffmpeg_tests/ffmpeg_tests.cc
+++ b/media/test/ffmpeg_tests/ffmpeg_tests.cc
@@ -215,6 +215,8 @@ int main(int argc, const char** argv) {
}
codec_context->flags2 |= CODEC_FLAG2_FAST;
+ codec_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
+ codec_context->error_recognition = FF_ER_CAREFUL;
// Initialize threaded decode.
if (target_codec == CODEC_TYPE_VIDEO && video_threads > 0) {
diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc
index 47b767b..89366c5 100644
--- a/media/tools/media_bench/media_bench.cc
+++ b/media/tools/media_bench/media_bench.cc
@@ -38,6 +38,7 @@ const char kStream[] = "stream";
const char kVideoThreads[] = "video-threads";
const char kVerbose[] = "verbose";
const char kFast2[] = "fast2";
+const char kErrorCorrection[] = "error-correction";
const char kSkip[] = "skip";
const char kFlush[] = "flush";
const char kDjb2[] = "djb2";
@@ -97,6 +98,8 @@ int main(int argc, const char** argv) {
<< "Loop N times\n"
<< " --fast2 "
<< "Enable fast2 flag\n"
+ << " --error-correction "
+ << "Enable ffmpeg error correction\n"
<< " --flush "
<< "Flush last frame\n"
<< " --djb2 (aka --hash) "
@@ -174,6 +177,11 @@ int main(int argc, const char** argv) {
fast2 = true;
}
+ bool error_correction = false;
+ if (cmd_line->HasSwitch(switches::kErrorCorrection)) {
+ error_correction = true;
+ }
+
bool flush = false;
if (cmd_line->HasSwitch(switches::kFlush)) {
flush = true;
@@ -309,6 +317,10 @@ int main(int argc, const char** argv) {
if (fast2) {
codec_context->flags2 |= CODEC_FLAG2_FAST;
}
+ if (error_correction) {
+ codec_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
+ codec_context->error_recognition = FF_ER_CAREFUL;
+ }
// Initialize threaded decode.
if (target_codec == CODEC_TYPE_VIDEO && video_threads > 0) {