From: Chih-Wei Huang Date: Tue, 18 Apr 2017 08:39:34 +0000 (+0800) Subject: omx: remove useless code X-Git-Tag: android-x86-7.1-r1~22 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a43d29e39f926f00d8fb7d8aa44069d38e44e5e2;p=android-x86%2Fexternal-stagefright-plugins.git omx: remove useless code The lowres field is not used anymore. Remove all related code. --- diff --git a/omx/SoftFFmpegAudio.cpp b/omx/SoftFFmpegAudio.cpp index 7d2d855..7ae610b 100644 --- a/omx/SoftFFmpegAudio.cpp +++ b/omx/SoftFFmpegAudio.cpp @@ -144,12 +144,6 @@ void SoftFFmpegAudio::setDefaultCtx(AVCodecContext *avctx, const AVCodec *codec) int fast = 0; avctx->workaround_bugs = 1; - avctx->lowres = 0; - if(avctx->lowres > codec->max_lowres){ - ALOGW("The maximum value for lowres supported by the decoder is %d", - codec->max_lowres); - avctx->lowres= codec->max_lowres; - } avctx->idct_algo = 0; avctx->skip_frame = AVDISCARD_DEFAULT; avctx->skip_idct = AVDISCARD_DEFAULT; @@ -158,7 +152,6 @@ void SoftFFmpegAudio::setDefaultCtx(AVCodecContext *avctx, const AVCodec *codec) avctx->flags |= CODEC_FLAG_BITEXACT; - if(avctx->lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; if (fast) avctx->flags2 |= CODEC_FLAG2_FAST; if(codec->capabilities & CODEC_CAP_DR1) avctx->flags |= CODEC_FLAG_EMU_EDGE; diff --git a/omx/SoftFFmpegVideo.cpp b/omx/SoftFFmpegVideo.cpp index 034c3b5..e91d492 100644 --- a/omx/SoftFFmpegVideo.cpp +++ b/omx/SoftFFmpegVideo.cpp @@ -86,12 +86,6 @@ void SoftFFmpegVideo::setDefaultCtx(AVCodecContext *avctx, const AVCodec *codec) int fast = 1; avctx->workaround_bugs = 1; - avctx->lowres = 0; - if(avctx->lowres > codec->max_lowres){ - ALOGW("The maximum value for lowres supported by the decoder is %d", - codec->max_lowres); - avctx->lowres= codec->max_lowres; - } avctx->idct_algo = 0; avctx->skip_frame = AVDISCARD_DEFAULT; avctx->skip_idct = AVDISCARD_DEFAULT; @@ -99,7 +93,6 @@ void SoftFFmpegVideo::setDefaultCtx(AVCodecContext *avctx, const AVCodec *codec) avctx->error_concealment = 3; avctx->thread_count = 0; - if(avctx->lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; if (fast) avctx->flags2 |= CODEC_FLAG2_FAST; if(codec->capabilities & CODEC_CAP_DR1) avctx->flags |= CODEC_FLAG_EMU_EDGE;