From a43d29e39f926f00d8fb7d8aa44069d38e44e5e2 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Tue, 18 Apr 2017 16:39:34 +0800 Subject: [PATCH] omx: remove useless code The lowres field is not used anymore. Remove all related code. --- omx/SoftFFmpegAudio.cpp | 7 ------- omx/SoftFFmpegVideo.cpp | 7 ------- 2 files changed, 14 deletions(-) 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; -- 2.11.0