Loading media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h +0 −4 Original line number Diff line number Diff line Loading @@ -67,10 +67,6 @@ private: kNumBuffers = 2, }; enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1 }; // OMX input buffer's timestamp and flags typedef struct { int64_t mTimeUs; Loading media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h +0 −4 Original line number Diff line number Diff line Loading @@ -56,10 +56,6 @@ private: kNumBuffers = 2, }; enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1 }; // OMX input buffer's timestamp and flags typedef struct { int64_t mTimeUs; Loading media/libstagefright/codecs/on2/dec/SoftVPX.cpp +39 −20 Original line number Diff line number Diff line Loading @@ -143,11 +143,24 @@ void SoftVPX::onQueueFilled(OMX_U32 /* portIndex */) { mWidth = width; mHeight = height; if (!mIsAdaptive || width > mAdaptiveMaxWidth || height > mAdaptiveMaxHeight) { if (mIsAdaptive) { if (width > mAdaptiveMaxWidth) { mAdaptiveMaxWidth = width; } if (height > mAdaptiveMaxHeight) { mAdaptiveMaxHeight = height; } } updatePortDefinitions(); notify(OMX_EventPortSettingsChanged, 1, 0, NULL); notify(OMX_EventPortSettingsChanged, kOutputPortIndex, 0, NULL); mOutputPortSettingsChange = AWAITING_DISABLED; return; } else { updatePortDefinitions(); notify(OMX_EventPortSettingsChanged, kOutputPortIndex, OMX_IndexConfigCommonOutputCrop, NULL); } } outHeader->nOffset = 0; Loading @@ -155,29 +168,35 @@ void SoftVPX::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFlags = EOSseen ? OMX_BUFFERFLAG_EOS : 0; outHeader->nTimeStamp = inHeader->nTimeStamp; uint32_t buffer_stride = mIsAdaptive ? mAdaptiveMaxWidth : mWidth; uint32_t buffer_height = mIsAdaptive ? mAdaptiveMaxHeight : mHeight; const uint8_t *srcLine = (const uint8_t *)img->planes[PLANE_Y]; uint8_t *dst = outHeader->pBuffer; for (size_t i = 0; i < img->d_h; ++i) { for (size_t i = 0; i < buffer_height; ++i) { if (i < img->d_h) { memcpy(dst, srcLine, img->d_w); srcLine += img->stride[PLANE_Y]; dst += img->d_w; } dst += buffer_stride; } srcLine = (const uint8_t *)img->planes[PLANE_U]; for (size_t i = 0; i < img->d_h / 2; ++i) { for (size_t i = 0; i < buffer_height / 2; ++i) { if (i < img->d_h / 2) { memcpy(dst, srcLine, img->d_w / 2); srcLine += img->stride[PLANE_U]; dst += img->d_w / 2; } dst += buffer_stride / 2; } srcLine = (const uint8_t *)img->planes[PLANE_V]; for (size_t i = 0; i < img->d_h / 2; ++i) { for (size_t i = 0; i < buffer_height / 2; ++i) { if (i < img->d_h / 2) { memcpy(dst, srcLine, img->d_w / 2); srcLine += img->stride[PLANE_V]; dst += img->d_w / 2; } dst += buffer_stride / 2; } outInfo->mOwnedByUs = false; Loading media/libstagefright/codecs/on2/enc/SoftVPXEncoder.h +0 −4 Original line number Diff line number Diff line Loading @@ -91,10 +91,6 @@ protected: const char *name, OMX_INDEXTYPE *index); private: enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1, }; enum TemporalReferences { // For 1 layer case: reference all (last, golden, and alt ref), but only // update last. Loading media/libstagefright/include/SimpleSoftOMXComponent.h +5 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,11 @@ protected: } mTransition; }; enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1, kPrepareForAdaptivePlaybackIndex, }; void addPort(const OMX_PARAM_PORTDEFINITIONTYPE &def); virtual OMX_ERRORTYPE internalGetParameter( Loading Loading
media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h +0 −4 Original line number Diff line number Diff line Loading @@ -67,10 +67,6 @@ private: kNumBuffers = 2, }; enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1 }; // OMX input buffer's timestamp and flags typedef struct { int64_t mTimeUs; Loading
media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h +0 −4 Original line number Diff line number Diff line Loading @@ -56,10 +56,6 @@ private: kNumBuffers = 2, }; enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1 }; // OMX input buffer's timestamp and flags typedef struct { int64_t mTimeUs; Loading
media/libstagefright/codecs/on2/dec/SoftVPX.cpp +39 −20 Original line number Diff line number Diff line Loading @@ -143,11 +143,24 @@ void SoftVPX::onQueueFilled(OMX_U32 /* portIndex */) { mWidth = width; mHeight = height; if (!mIsAdaptive || width > mAdaptiveMaxWidth || height > mAdaptiveMaxHeight) { if (mIsAdaptive) { if (width > mAdaptiveMaxWidth) { mAdaptiveMaxWidth = width; } if (height > mAdaptiveMaxHeight) { mAdaptiveMaxHeight = height; } } updatePortDefinitions(); notify(OMX_EventPortSettingsChanged, 1, 0, NULL); notify(OMX_EventPortSettingsChanged, kOutputPortIndex, 0, NULL); mOutputPortSettingsChange = AWAITING_DISABLED; return; } else { updatePortDefinitions(); notify(OMX_EventPortSettingsChanged, kOutputPortIndex, OMX_IndexConfigCommonOutputCrop, NULL); } } outHeader->nOffset = 0; Loading @@ -155,29 +168,35 @@ void SoftVPX::onQueueFilled(OMX_U32 /* portIndex */) { outHeader->nFlags = EOSseen ? OMX_BUFFERFLAG_EOS : 0; outHeader->nTimeStamp = inHeader->nTimeStamp; uint32_t buffer_stride = mIsAdaptive ? mAdaptiveMaxWidth : mWidth; uint32_t buffer_height = mIsAdaptive ? mAdaptiveMaxHeight : mHeight; const uint8_t *srcLine = (const uint8_t *)img->planes[PLANE_Y]; uint8_t *dst = outHeader->pBuffer; for (size_t i = 0; i < img->d_h; ++i) { for (size_t i = 0; i < buffer_height; ++i) { if (i < img->d_h) { memcpy(dst, srcLine, img->d_w); srcLine += img->stride[PLANE_Y]; dst += img->d_w; } dst += buffer_stride; } srcLine = (const uint8_t *)img->planes[PLANE_U]; for (size_t i = 0; i < img->d_h / 2; ++i) { for (size_t i = 0; i < buffer_height / 2; ++i) { if (i < img->d_h / 2) { memcpy(dst, srcLine, img->d_w / 2); srcLine += img->stride[PLANE_U]; dst += img->d_w / 2; } dst += buffer_stride / 2; } srcLine = (const uint8_t *)img->planes[PLANE_V]; for (size_t i = 0; i < img->d_h / 2; ++i) { for (size_t i = 0; i < buffer_height / 2; ++i) { if (i < img->d_h / 2) { memcpy(dst, srcLine, img->d_w / 2); srcLine += img->stride[PLANE_V]; dst += img->d_w / 2; } dst += buffer_stride / 2; } outInfo->mOwnedByUs = false; Loading
media/libstagefright/codecs/on2/enc/SoftVPXEncoder.h +0 −4 Original line number Diff line number Diff line Loading @@ -91,10 +91,6 @@ protected: const char *name, OMX_INDEXTYPE *index); private: enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1, }; enum TemporalReferences { // For 1 layer case: reference all (last, golden, and alt ref), but only // update last. Loading
media/libstagefright/include/SimpleSoftOMXComponent.h +5 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,11 @@ protected: } mTransition; }; enum { kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1, kPrepareForAdaptivePlaybackIndex, }; void addPort(const OMX_PARAM_PORTDEFINITIONTYPE &def); virtual OMX_ERRORTYPE internalGetParameter( Loading