summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-03-01 15:17:47 -0800
committerAndreas Huber <andih@google.com>2012-03-01 15:17:47 -0800
commit25a9ce1b1fea65341299c262b944825d233006f6 (patch)
tree0cd419550547e95ffd84a58f82a97863621c39f7 /media/libstagefright/OMXCodec.cpp
parentf08d7d0ee19c225d5b67fb49046290adfd9ab4bc (diff)
downloadframeworks_av-25a9ce1b1fea65341299c262b944825d233006f6.zip
frameworks_av-25a9ce1b1fea65341299c262b944825d233006f6.tar.gz
frameworks_av-25a9ce1b1fea65341299c262b944825d233006f6.tar.bz2
Remove hacks that worked around issues in OMX components several releases back.
Change-Id: I89bb3d0be4d2c1824de382aedfdd4f9bd2547dbc
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index b471837..966416e 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -493,16 +493,6 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
CODEC_LOGI(
"AVC profile = %u (%s), level = %u",
profile, AVCProfileToString(profile), level);
-
- if (!strcmp(mComponentName, "OMX.TI.Video.Decoder")
- && (profile != kAVCProfileBaseline || level > 30)) {
- // This stream exceeds the decoder's capabilities. The decoder
- // does not handle this gracefully and would clobber the heap
- // and wreak havoc instead...
-
- ALOGE("Profile and/or level exceed the decoder's capabilities.");
- return ERROR_UNSUPPORTED;
- }
} else if (meta->findData(kKeyVorbisInfo, &type, &data, &size)) {
addCodecSpecificData(data, size);
@@ -558,40 +548,11 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
}
}
- if (!strcasecmp(mMIME, MEDIA_MIMETYPE_IMAGE_JPEG)
- && !strcmp(mComponentName, "OMX.TI.JPEG.decode")) {
- OMX_COLOR_FORMATTYPE format =
- OMX_COLOR_Format32bitARGB8888;
- // OMX_COLOR_FormatYUV420PackedPlanar;
- // OMX_COLOR_FormatCbYCrY;
- // OMX_COLOR_FormatYUV411Planar;
-
- int32_t width, height;
- bool success = meta->findInt32(kKeyWidth, &width);
- success = success && meta->findInt32(kKeyHeight, &height);
-
- int32_t compressedSize;
- success = success && meta->findInt32(
- kKeyMaxInputSize, &compressedSize);
-
- CHECK(success);
- CHECK(compressedSize > 0);
-
- setImageOutputFormat(format, width, height);
- setJPEGInputFormat(width, height, (OMX_U32)compressedSize);
- }
-
int32_t maxInputSize;
if (meta->findInt32(kKeyMaxInputSize, &maxInputSize)) {
setMinBufferSize(kPortIndexInput, (OMX_U32)maxInputSize);
}
- if (!strcmp(mComponentName, "OMX.TI.AMR.encode")
- || !strcmp(mComponentName, "OMX.TI.WBAMR.encode")
- || !strcmp(mComponentName, "OMX.TI.AAC.encode")) {
- setMinBufferSize(kPortIndexOutput, 8192); // XXX
- }
-
initOutputFormat(meta);
if ((mFlags & kClientNeedsFramebuffer)
@@ -695,21 +656,6 @@ status_t OMXCodec::setVideoPortFormatType(
index, format.eCompressionFormat, format.eColorFormat);
#endif
- if (!strcmp("OMX.TI.Video.encoder", mComponentName)) {
- if (portIndex == kPortIndexInput
- && colorFormat == format.eColorFormat) {
- // eCompressionFormat does not seem right.
- found = true;
- break;
- }
- if (portIndex == kPortIndexOutput
- && compressionFormat == format.eCompressionFormat) {
- // eColorFormat does not seem right.
- found = true;
- break;
- }
- }
-
if (format.eCompressionFormat == compressionFormat
&& format.eColorFormat == colorFormat) {
found = true;
@@ -772,13 +718,8 @@ status_t OMXCodec::findTargetColorFormat(
int32_t targetColorFormat;
if (meta->findInt32(kKeyColorFormat, &targetColorFormat)) {
*colorFormat = (OMX_COLOR_FORMATTYPE) targetColorFormat;
- } else {
- if (!strcasecmp("OMX.TI.Video.encoder", mComponentName)) {
- *colorFormat = OMX_COLOR_FormatYCbYCr;
- }
}
-
// Check whether the target color format is supported.
return isColorFormatSupported(*colorFormat, kPortIndexInput);
}
@@ -3192,13 +3133,6 @@ bool OMXCodec::drainInputBuffer(BufferInfo *info) {
info->mStatus = OWNED_BY_COMPONENT;
- // This component does not ever signal the EOS flag on output buffers,
- // Thanks for nothing.
- if (mSignalledEOS && !strcmp(mComponentName, "OMX.TI.Video.encoder")) {
- mNoMoreOutputData = true;
- mBufferFilled.signal();
- }
-
return true;
}