Fix multithreaded decoding to significantly improve Tegra 3 decoding performance. It's not as smooth as Tegra 4 CPU decoding or Snapdragon hardware decoding, but it's much better than it was before.

This commit is contained in:
Cameron Gutman 2013-11-20 03:07:52 -05:00
parent 9b46155af2
commit 54839e672d
3 changed files with 7 additions and 3 deletions

View File

@ -41,12 +41,16 @@ int nv_avc_init(int width, int height) {
return -1;
}
// We're a latency-sensitive application
decoder_ctx->flags |= CODEC_FLAG_LOW_DELAY;
// Show frames even before a reference frame
decoder_ctx->flags2 |= CODEC_FLAG2_SHOW_ALL;
// Skip the loop filter for performance reasons
decoder_ctx->skip_loop_filter = AVDISCARD_ALL;
// Run 2 threads for decoding
decoder_ctx->thread_count = 2;
decoder_ctx->thread_type = FF_THREAD_FRAME;
decoder_ctx->width = width;
decoder_ctx->height = height;
decoder_ctx->pix_fmt = PIX_FMT_YUV420P;

Binary file not shown.

Binary file not shown.