diff options
author | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 20:07:52 +0000 |
---|---|---|
committer | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 20:07:52 +0000 |
commit | 8d5f6b1dcbaf5ed5276db88b7c59ba3e85d146ed (patch) | |
tree | 3f2ba66b4bcadf7dfa1ff32a6de9d9edac9a0b32 /media | |
parent | 30491fa004c57ddf60bba847a0d65537e903a856 (diff) | |
download | chromium_src-8d5f6b1dcbaf5ed5276db88b7c59ba3e85d146ed.zip chromium_src-8d5f6b1dcbaf5ed5276db88b7c59ba3e85d146ed.tar.gz chromium_src-8d5f6b1dcbaf5ed5276db88b7c59ba3e85d146ed.tar.bz2 |
Enable error recognition and error concealment options in qualification software, for consistency with Chrome, and as a switch in media_bench
BUG=31093
TEST=media_bench --error-correction --stream=video --video-threads=1 d:\mediatests\tulip\tulip2.mp4
Review URL: http://codereview.chromium.org/2107009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/test/ffmpeg_tests/ffmpeg_tests.cc | 2 | ||||
-rw-r--r-- | media/tools/media_bench/media_bench.cc | 12 |
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) { |