diff options
Diffstat (limited to 'media/libstagefright')
201 files changed, 429 insertions, 434 deletions
diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp index 7cc9430..2e41d80 100644 --- a/media/libstagefright/AACWriter.cpp +++ b/media/libstagefright/AACWriter.cpp @@ -80,10 +80,6 @@ status_t AACWriter::initCheck() const { return mInitCheck; } -static int writeInt8(int fd, uint8_t x) { - return ::write(fd, &x, 1); -} - status_t AACWriter::addSource(const sp<MediaSource> &source) { if (mInitCheck != OK) { diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index e1b3b4d..dfb0101 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -922,7 +922,6 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) { ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { ANativeWindowBuffer *buf; - int fenceFd = -1; CHECK(mNativeWindow.get() != NULL); if (mTunneled) { @@ -3040,7 +3039,6 @@ bool ACodec::allYourBuffersAreBelongToUs() { } void ACodec::deferMessage(const sp<AMessage> &msg) { - bool wasEmptyBefore = mDeferredQueue.empty(); mDeferredQueue.push_back(msg); } @@ -3675,7 +3673,6 @@ status_t ACodec::pushBlankBuffersToNativeWindow() { // on the screen and then been replaced, so an previous video frames are // guaranteed NOT to be currently displayed. for (int i = 0; i < numBufs + 1; i++) { - int fenceFd = -1; err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &anb); if (err != NO_ERROR) { ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", @@ -4454,7 +4451,7 @@ void ACodec::UninitializedState::stateEntered() { ALOGV("Now uninitialized"); if (mDeathNotifier != NULL) { - mCodec->mOMX->asBinder()->unlinkToDeath(mDeathNotifier); + IInterface::asBinder(mCodec->mOMX)->unlinkToDeath(mDeathNotifier); mDeathNotifier.clear(); } @@ -4547,7 +4544,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { sp<AMessage> notify = new AMessage(kWhatOMXDied, mCodec->id()); mDeathNotifier = new DeathNotifier(notify); - if (omx->asBinder()->linkToDeath(mDeathNotifier) != OK) { + if (IInterface::asBinder(omx)->linkToDeath(mDeathNotifier) != OK) { // This was a local binder, if it dies so do we, we won't care // about any notifications in the afterlife. mDeathNotifier.clear(); @@ -4592,7 +4589,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { componentName = matchingCodecs.itemAt(matchIndex).mName.string(); quirks = matchingCodecs.itemAt(matchIndex).mQuirks; - pid_t tid = androidGetTid(); + pid_t tid = gettid(); int prevPriority = androidGetThreadPriority(tid); androidSetThreadPriority(tid, ANDROID_PRIORITY_FOREGROUND); status_t err = omx->allocateNode(componentName.c_str(), observer, &node); @@ -5392,6 +5389,7 @@ bool ACodec::OutputPortSettingsChangedState::onMessageReceived( case kWhatFlush: case kWhatShutdown: case kWhatResume: + case kWhatSetParameters: { if (msg->what() == kWhatResume) { ALOGV("[%s] Deferring resume", mCodec->mComponentName.c_str()); diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp index c3a940a..ad12bdd 100644 --- a/media/libstagefright/CameraSource.cpp +++ b/media/libstagefright/CameraSource.cpp @@ -219,7 +219,7 @@ status_t CameraSource::isCameraAvailable( mCameraFlags |= FLAGS_HOT_CAMERA; mDeathNotifier = new DeathNotifier(); // isBinderAlive needs linkToDeath to work. - mCameraRecordingProxy->asBinder()->linkToDeath(mDeathNotifier); + IInterface::asBinder(mCameraRecordingProxy)->linkToDeath(mDeathNotifier); } mCamera->lock(); @@ -702,7 +702,7 @@ void CameraSource::releaseCamera() { { Mutex::Autolock autoLock(mLock); if (mCameraRecordingProxy != 0) { - mCameraRecordingProxy->asBinder()->unlinkToDeath(mDeathNotifier); + IInterface::asBinder(mCameraRecordingProxy)->unlinkToDeath(mDeathNotifier); mCameraRecordingProxy.clear(); } mCameraFlags = 0; @@ -825,7 +825,7 @@ status_t CameraSource::read( mFrameAvailableCondition.waitRelative(mLock, mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) { if (mCameraRecordingProxy != 0 && - !mCameraRecordingProxy->asBinder()->isBinderAlive()) { + !IInterface::asBinder(mCameraRecordingProxy)->isBinderAlive()) { ALOGW("camera recording proxy is gone"); return ERROR_END_OF_STREAM; } diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 2eb7e5c..dec52f3 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -265,6 +265,8 @@ status_t MPEG4DataSource::setCachedRange(off64_t offset, size_t size) { //////////////////////////////////////////////////////////////////////////////// +static const bool kUseHexDump = false; + static void hexdump(const void *_data, size_t size) { const uint8_t *data = (const uint8_t *)_data; size_t offset = 0; @@ -607,7 +609,6 @@ status_t MPEG4Extractor::parseDrmSINF( if (size < 0) { return ERROR_IO; } - int32_t classSize = size; data_offset += numOfBytes; while(size >= 11 ) { @@ -668,7 +669,6 @@ status_t MPEG4Extractor::parseDrmSINF( if (size < 0) { return ERROR_IO; } - classSize = size; data_offset += numOfBytes; while (size > 0) { @@ -766,7 +766,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_IO; } uint64_t chunk_size = ntohl(hdr[0]); - uint32_t chunk_type = ntohl(hdr[1]); + int32_t chunk_type = ntohl(hdr[1]); off64_t data_offset = *offset + 8; if (chunk_size == 1) { @@ -806,23 +806,23 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { MakeFourCCString(chunk_type, chunk); ALOGV("chunk: %s @ %lld, %d", chunk, *offset, depth); -#if 0 - static const char kWhitespace[] = " "; - const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth]; - printf("%sfound chunk '%s' of size %" PRIu64 "\n", indent, chunk, chunk_size); + if (kUseHexDump) { + static const char kWhitespace[] = " "; + const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth]; + printf("%sfound chunk '%s' of size %" PRIu64 "\n", indent, chunk, chunk_size); - char buffer[256]; - size_t n = chunk_size; - if (n > sizeof(buffer)) { - n = sizeof(buffer); - } - if (mDataSource->readAt(*offset, buffer, n) - < (ssize_t)n) { - return ERROR_IO; - } + char buffer[256]; + size_t n = chunk_size; + if (n > sizeof(buffer)) { + n = sizeof(buffer); + } + if (mDataSource->readAt(*offset, buffer, n) + < (ssize_t)n) { + return ERROR_IO; + } - hexdump(buffer, n); -#endif + hexdump(buffer, n); + } PathAdder autoAdder(&mPath, chunk_type); @@ -1301,7 +1301,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_IO; } - uint16_t data_ref_index = U16_AT(&buffer[6]); + uint16_t data_ref_index __unused = U16_AT(&buffer[6]); uint32_t num_channels = U16_AT(&buffer[16]); uint16_t sample_size = U16_AT(&buffer[18]); @@ -1354,7 +1354,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_IO; } - uint16_t data_ref_index = U16_AT(&buffer[6]); + uint16_t data_ref_index __unused = U16_AT(&buffer[6]); uint16_t width = U16_AT(&buffer[6 + 18]); uint16_t height = U16_AT(&buffer[6 + 20]); @@ -1536,13 +1536,13 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { break; } - // @xyz - case FOURCC('\xA9', 'x', 'y', 'z'): + // ©xyz + case FOURCC(0xA9, 'x', 'y', 'z'): { *offset += chunk_size; - // Best case the total data length inside "@xyz" box - // would be 8, for instance "@xyz" + "\x00\x04\x15\xc7" + "0+0/", + // Best case the total data length inside "©xyz" box + // would be 8, for instance "©xyz" + "\x00\x04\x15\xc7" + "0+0/", // where "\x00\x04" is the text string length with value = 4, // "\0x15\xc7" is the language code = en, and "0+0" is a // location (string) value with longitude = 0 and latitude = 0. @@ -1870,7 +1870,6 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { if (chunk_data_size < 24) { return ERROR_IO; } - uint32_t duration; Trex trex; if (!mDataSource->getUInt32(data_offset + 4, &trex.track_ID) || !mDataSource->getUInt32(data_offset + 8, &trex.default_sample_description_index) || @@ -2142,7 +2141,7 @@ status_t MPEG4Extractor::parseTrackHeader( return ERROR_IO; } - uint64_t ctime, mtime, duration; + uint64_t ctime __unused, mtime __unused, duration __unused; int32_t id; if (version == 1) { @@ -2164,12 +2163,13 @@ status_t MPEG4Extractor::parseTrackHeader( size_t matrixOffset = dynSize + 16; int32_t a00 = U32_AT(&buffer[matrixOffset]); int32_t a01 = U32_AT(&buffer[matrixOffset + 4]); - int32_t dx = U32_AT(&buffer[matrixOffset + 8]); int32_t a10 = U32_AT(&buffer[matrixOffset + 12]); int32_t a11 = U32_AT(&buffer[matrixOffset + 16]); - int32_t dy = U32_AT(&buffer[matrixOffset + 20]); #if 0 + int32_t dx = U32_AT(&buffer[matrixOffset + 8]); + int32_t dy = U32_AT(&buffer[matrixOffset + 20]); + ALOGI("x' = %.2f * x + %.2f * y + %.2f", a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f); ALOGI("y' = %.2f * x + %.2f * y + %.2f", @@ -2230,7 +2230,7 @@ status_t MPEG4Extractor::parseITunesMetaData(off64_t offset, size_t size) { char chunk[5]; MakeFourCCString(mPath[4], chunk); ALOGV("meta: %s @ %lld", chunk, offset); - switch (mPath[4]) { + switch ((int32_t)mPath[4]) { case FOURCC(0xa9, 'a', 'l', 'b'): { metadataKey = kKeyAlbum; @@ -2721,10 +2721,10 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( return ERROR_MALFORMED; } -#if 0 - printf("ESD of size %d\n", csd_size); - hexdump(csd, csd_size); -#endif + if (kUseHexDump) { + printf("ESD of size %d\n", csd_size); + hexdump(csd, csd_size); + } if (csd_size == 0) { // There's no further information, i.e. no codec specific data @@ -2775,7 +2775,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( if (objectType == AOT_SBR || objectType == AOT_PS) {//SBR specific config per 14496-3 table 1.13 uint32_t extFreqIndex = br.getBits(4); - int32_t extSampleRate; + int32_t extSampleRate __unused; if (extFreqIndex == 15) { if (csd_size < 8) { return ERROR_MALFORMED; @@ -2825,12 +2825,12 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( if (objectType == AOT_AAC_LC || objectType == AOT_ER_AAC_LC || objectType == AOT_ER_AAC_LD || objectType == AOT_ER_AAC_SCAL || objectType == AOT_ER_BSAC) { - const int32_t frameLengthFlag = br.getBits(1); + const int32_t frameLengthFlag __unused = br.getBits(1); const int32_t dependsOnCoreCoder = br.getBits(1); if (dependsOnCoreCoder ) { - const int32_t coreCoderDelay = br.getBits(14); + const int32_t coreCoderDelay __unused = br.getBits(14); } int32_t extensionFlag = -1; @@ -2859,54 +2859,54 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( if (numChannels == 0) { int32_t channelsEffectiveNum = 0; int32_t channelsNum = 0; - const int32_t ElementInstanceTag = br.getBits(4); - const int32_t Profile = br.getBits(2); - const int32_t SamplingFrequencyIndex = br.getBits(4); + const int32_t ElementInstanceTag __unused = br.getBits(4); + const int32_t Profile __unused = br.getBits(2); + const int32_t SamplingFrequencyIndex __unused = br.getBits(4); const int32_t NumFrontChannelElements = br.getBits(4); const int32_t NumSideChannelElements = br.getBits(4); const int32_t NumBackChannelElements = br.getBits(4); const int32_t NumLfeChannelElements = br.getBits(2); - const int32_t NumAssocDataElements = br.getBits(3); - const int32_t NumValidCcElements = br.getBits(4); + const int32_t NumAssocDataElements __unused = br.getBits(3); + const int32_t NumValidCcElements __unused = br.getBits(4); const int32_t MonoMixdownPresent = br.getBits(1); if (MonoMixdownPresent != 0) { - const int32_t MonoMixdownElementNumber = br.getBits(4); + const int32_t MonoMixdownElementNumber __unused = br.getBits(4); } const int32_t StereoMixdownPresent = br.getBits(1); if (StereoMixdownPresent != 0) { - const int32_t StereoMixdownElementNumber = br.getBits(4); + const int32_t StereoMixdownElementNumber __unused = br.getBits(4); } const int32_t MatrixMixdownIndexPresent = br.getBits(1); if (MatrixMixdownIndexPresent != 0) { - const int32_t MatrixMixdownIndex = br.getBits(2); - const int32_t PseudoSurroundEnable = br.getBits(1); + const int32_t MatrixMixdownIndex __unused = br.getBits(2); + const int32_t PseudoSurroundEnable __unused = br.getBits(1); } int i; for (i=0; i < NumFrontChannelElements; i++) { const int32_t FrontElementIsCpe = br.getBits(1); - const int32_t FrontElementTagSelect = br.getBits(4); + const int32_t FrontElementTagSelect __unused = br.getBits(4); channelsNum += FrontElementIsCpe ? 2 : 1; } for (i=0; i < NumSideChannelElements; i++) { const int32_t SideElementIsCpe = br.getBits(1); - const int32_t SideElementTagSelect = br.getBits(4); + const int32_t SideElementTagSelect __unused = br.getBits(4); channelsNum += SideElementIsCpe ? 2 : 1; } for (i=0; i < NumBackChannelElements; i++) { const int32_t BackElementIsCpe = br.getBits(1); - const int32_t BackElementTagSelect = br.getBits(4); + const int32_t BackElementTagSelect __unused = br.getBits(4); channelsNum += BackElementIsCpe ? 2 : 1; } channelsEffectiveNum = channelsNum; for (i=0; i < NumLfeChannelElements; i++) { - const int32_t LfeElementTagSelect = br.getBits(4); + const int32_t LfeElementTagSelect __unused = br.getBits(4); channelsNum += 1; } ALOGV("mpeg4 audio channelsNum = %d", channelsNum); diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp index ca031aa..230c1f7 100644 --- a/media/libstagefright/OMXClient.cpp +++ b/media/libstagefright/OMXClient.cpp @@ -37,7 +37,7 @@ struct MuxOMX : public IOMX { MuxOMX(const sp<IOMX> &remoteOMX); virtual ~MuxOMX(); - virtual IBinder *onAsBinder() { return mRemoteOMX->asBinder().get(); } + virtual IBinder *onAsBinder() { return IInterface::asBinder(mRemoteOMX).get(); } virtual bool livesLocally(node_id node, pid_t pid); diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index f26563e..69f4989 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -101,10 +101,10 @@ static sp<MediaSource> InstantiateSoftwareEncoder( #undef FACTORY_CREATE_ENCODER #undef FACTORY_REF -#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGW(x, ...) ALOGW("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGI(x, ...) ALOGI("[%s] " x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGV(x, ...) ALOGV("[%s] " x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGW(x, ...) ALOGW("[%s] " x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGE(x, ...) ALOGE("[%s] " x, mComponentName, ##__VA_ARGS__) struct OMXCodecObserver : public BnOMXObserver { OMXCodecObserver() { @@ -451,7 +451,7 @@ status_t OMXCodec::parseAVCCodecSpecificData( // assertion, let's be lenient for now... // CHECK((ptr[4] >> 2) == 0x3f); // reserved - size_t lengthSize = 1 + (ptr[4] & 3); + size_t lengthSize __unused = 1 + (ptr[4] & 3); // commented out check below as H264_QVGA_500_NO_AUDIO.3gp // violates it... @@ -2006,7 +2006,6 @@ status_t OMXCodec::cancelBufferToNativeWindow(BufferInfo *info) { OMXCodec::BufferInfo* OMXCodec::dequeueBufferFromNativeWindow() { // Dequeue the next buffer from the native window. ANativeWindowBuffer* buf; - int fenceFd = -1; int err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &buf); if (err != 0) { CODEC_LOGE("dequeueBuffer failed w/ error 0x%08x", err); @@ -2111,7 +2110,6 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { // on the screen and then been replaced, so an previous video frames are // guaranteed NOT to be currently displayed. for (int i = 0; i < numBufs + 1; i++) { - int fenceFd = -1; err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &anb); if (err != NO_ERROR) { ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index b8868aa..6e32494 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -849,6 +849,7 @@ void parseVorbisComment( { "TRACKNUMBER", kKeyCDTrackNumber }, { "DISCNUMBER", kKeyDiscNumber }, { "DATE", kKeyDate }, + { "YEAR", kKeyYear }, { "LYRICIST", kKeyWriter }, { "METADATA_BLOCK_PICTURE", kKeyAlbumArt }, { "ANDROID_LOOP", kKeyAutoLoop }, diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp index 1fdb244..7d15220 100644 --- a/media/libstagefright/TimedEventQueue.cpp +++ b/media/libstagefright/TimedEventQueue.cpp @@ -52,7 +52,7 @@ TimedEventQueue::TimedEventQueue() TimedEventQueue::~TimedEventQueue() { stop(); if (mPowerManager != 0) { - sp<IBinder> binder = mPowerManager->asBinder(); + sp<IBinder> binder = IInterface::asBinder(mPowerManager); binder->unlinkToDeath(mDeathRecipient); } } diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp index 25afc5b..b3a79a0 100644 --- a/media/libstagefright/Utils.cpp +++ b/media/libstagefright/Utils.cpp @@ -181,14 +181,14 @@ status_t convertMetaDataToMessage( CHECK(size >= 7); CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1 - uint8_t profile = ptr[1]; - uint8_t level = ptr[3]; + uint8_t profile __unused = ptr[1]; + uint8_t level __unused = ptr[3]; // There is decodable content out there that fails the following // assertion, let's be lenient for now... // CHECK((ptr[4] >> 2) == 0x3f); // reserved - size_t lengthSize = 1 + (ptr[4] & 3); + size_t lengthSize __unused = 1 + (ptr[4] & 3); // commented out check below as H264_QVGA_500_NO_AUDIO.3gp // violates it... @@ -257,8 +257,8 @@ status_t convertMetaDataToMessage( CHECK(size >= 7); CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1 - uint8_t profile = ptr[1] & 31; - uint8_t level = ptr[12]; + uint8_t profile __unused = ptr[1] & 31; + uint8_t level __unused = ptr[12]; ptr += 22; size -= 22; diff --git a/media/libstagefright/avc_utils.cpp b/media/libstagefright/avc_utils.cpp index cbdb816..5ec3438 100644 --- a/media/libstagefright/avc_utils.cpp +++ b/media/libstagefright/avc_utils.cpp @@ -505,8 +505,8 @@ bool ExtractDimensionsFromVOLHeader( CHECK_NE(video_object_type_indication, 0x21u /* Fine Granularity Scalable */); - unsigned video_object_layer_verid; - unsigned video_object_layer_priority; + unsigned video_object_layer_verid __unused; + unsigned video_object_layer_priority __unused; if (br.getBits(1)) { video_object_layer_verid = br.getBits(4); video_object_layer_priority = br.getBits(3); @@ -568,7 +568,7 @@ bool ExtractDimensionsFromVOLHeader( unsigned video_object_layer_height = br.getBits(13); CHECK(br.getBits(1)); // marker_bit - unsigned interlaced = br.getBits(1); + unsigned interlaced __unused = br.getBits(1); *width = video_object_layer_width; *height = video_object_layer_height; @@ -614,7 +614,7 @@ bool GetMPEGAudioFrameSize( return false; } - unsigned protection = (header >> 16) & 1; + unsigned protection __unused = (header >> 16) & 1; unsigned bitrate_index = (header >> 12) & 0x0f; diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp index 351ba1e..495bad0 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp @@ -876,7 +876,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { *nextTimeStamp += mStreamInfo->aacSamplesPerFrame * 1000000ll / mStreamInfo->sampleRate; ALOGV("adjusted nextTimeStamp/size to %lld/%d", - *nextTimeStamp, *currentBufLeft); + (long long) *nextTimeStamp, *currentBufLeft); } else { // move to next timestamp in list if (mBufferTimestamps.size() > 0) { @@ -885,7 +885,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { mBufferSizes.removeAt(0); currentBufLeft = &mBufferSizes.editItemAt(0); ALOGV("moved to next time/size: %lld/%d", - *nextTimeStamp, *currentBufLeft); + (long long) *nextTimeStamp, *currentBufLeft); } // try to limit output buffer size to match input buffers // (e.g when an input buffer contained 4 "sub" frames, output @@ -993,8 +993,6 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) { } void SoftAAC2::drainDecoder() { - int32_t outputDelay = mStreamInfo->outputDelay * mStreamInfo->numChannels; - // flush decoder until outputDelay is compensated while (mOutputDelayCompensated > 0) { // a buffer big enough for MAX_CHANNEL_COUNT channels of decoded HE-AAC diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp index 8b5007e..bebb9dc 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -214,8 +214,6 @@ sp<MetaData> AACEncoder::getFormat() { status_t AACEncoder::read( MediaBuffer **out, const ReadOptions *options) { - status_t err; - *out = NULL; int64_t seekTimeUs; diff --git a/media/libstagefright/codecs/aacenc/basic_op/basic_op.h b/media/libstagefright/codecs/aacenc/basic_op/basic_op.h index 5cd7e5f..bbc753b 100644 --- a/media/libstagefright/codecs/aacenc/basic_op/basic_op.h +++ b/media/libstagefright/codecs/aacenc/basic_op/basic_op.h @@ -518,8 +518,6 @@ __inline Word32 L_shl(Word32 L_var1, Word16 var2) return ASM_L_shr( L_var1, -var2); } #else - Word32 L_var_out = 0L; - if (var2 <= 0) { L_var1 = L_shr(L_var1, (Word16)-var2); @@ -540,7 +538,6 @@ __inline Word32 L_shl(Word32 L_var1, Word16 var2) } } L_var1 <<= 1; - L_var_out = L_var1; } } return (L_var1); diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c index 1d029fc..d1fe833 100644 --- a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c +++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c @@ -351,12 +351,11 @@ Word32 pow2_xy(Word32 x, Word32 y) UWord32 iPart; UWord32 fPart; Word32 res; - Word32 tmp, tmp2; - Word32 shift, shift2; + Word32 tmp; - tmp2 = -x; - iPart = tmp2 / y; - fPart = tmp2 - iPart*y; + tmp = -x; + iPart = tmp / y; + fPart = tmp - iPart*y; iPart = min(iPart,INT_BITS-1); res = pow2Table[(POW2_TABLE_SIZE*fPart)/y] >> iPart; diff --git a/media/libstagefright/codecs/aacenc/src/aacenc.c b/media/libstagefright/codecs/aacenc/src/aacenc.c index 40db92c..df17787 100644 --- a/media/libstagefright/codecs/aacenc/src/aacenc.c +++ b/media/libstagefright/codecs/aacenc/src/aacenc.c @@ -39,18 +39,20 @@ VO_U32 VO_API voAACEncInit(VO_HANDLE * phCodec,VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA *pUserData) { AAC_ENCODER*hAacEnc; - AACENC_CONFIG config; int error; #ifdef USE_DEAULT_MEM VO_MEM_OPERATOR voMemoprator; #endif VO_MEM_OPERATOR *pMemOP; + +#ifdef USE_DEAULT_MEM int interMem; + interMem = 0; +#endif UNUSED(vType); - interMem = 0; error = 0; /* init the memory operator */ @@ -214,7 +216,7 @@ VO_U32 VO_API voAACEncGetOutputData(VO_HANDLE hCodec, VO_CODECBUFFER * pOutput, AAC_ENCODER* hAacEnc = (AAC_ENCODER*)hCodec; Word16 numAncDataBytes=0; Word32 inbuflen; - int ret, length; + int length; if(NULL == hAacEnc) return VO_ERR_INVALID_ARG; diff --git a/media/libstagefright/codecs/aacenc/src/aacenc_core.c b/media/libstagefright/codecs/aacenc/src/aacenc_core.c index cecbc8f..de452d4 100644 --- a/media/libstagefright/codecs/aacenc/src/aacenc_core.c +++ b/media/libstagefright/codecs/aacenc/src/aacenc_core.c @@ -58,7 +58,6 @@ Word16 AacEncOpen( AAC_ENCODER* hAacEnc, /* pointer to an encoder const AACENC_CONFIG config /* pre-initialized config struct */ ) { - Word32 i; Word32 error = 0; Word16 profile = 1; diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c index 471631c..8b8be0e 100644 --- a/media/libstagefright/codecs/aacenc/src/adj_thr.c +++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c @@ -96,7 +96,7 @@ static void adaptMinSnr(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS], MINSNR_ADAPT_PARAM *msaParam, const Word16 nChannels) { - Word16 ch, sfb, sfbOffs, shift; + Word16 ch, sfb, sfbOffs; Word32 nSfb, avgEn; Word16 log_avgEn = 0; Word32 startRatio_x_avgEn = 0; diff --git a/media/libstagefright/codecs/aacenc/src/bitbuffer.c b/media/libstagefright/codecs/aacenc/src/bitbuffer.c index 0ce93d3..15eebd0 100644 --- a/media/libstagefright/codecs/aacenc/src/bitbuffer.c +++ b/media/libstagefright/codecs/aacenc/src/bitbuffer.c @@ -24,29 +24,6 @@ /***************************************************************************** * -* function name: updateBitBufWordPtr -* description: update Bit Buffer pointer -* -*****************************************************************************/ -static void updateBitBufWordPtr(HANDLE_BIT_BUF hBitBuf, - UWord8 **pBitBufWord, - Word16 cnt) -{ - *pBitBufWord += cnt; - - - if(*pBitBufWord > hBitBuf->pBitBufEnd) { - *pBitBufWord -= (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1); - } - - if(*pBitBufWord < hBitBuf->pBitBufBase) { - *pBitBufWord += (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1); - } -} - - -/***************************************************************************** -* * function name: CreateBitBuffer * description: create and init Bit Buffer Management * diff --git a/media/libstagefright/codecs/aacenc/src/bitenc.c b/media/libstagefright/codecs/aacenc/src/bitenc.c index d1fd647..9c81204 100644 --- a/media/libstagefright/codecs/aacenc/src/bitenc.c +++ b/media/libstagefright/codecs/aacenc/src/bitenc.c @@ -547,7 +547,7 @@ static void writeFillElement( const UWord8 *ancBytes, totFillBits = totFillBits - (3+4); - if ((cnt == (1<<4)-1)) { + if (cnt == (1<<4)-1) { esc_count = min( ((totFillBits >> 3) - ((1<<4)-1)), (1<<8)-1); WriteBits(hBitStream,esc_count,8); diff --git a/media/libstagefright/codecs/aacenc/src/block_switch.c b/media/libstagefright/codecs/aacenc/src/block_switch.c index c80538f..11bc7e7 100644 --- a/media/libstagefright/codecs/aacenc/src/block_switch.c +++ b/media/libstagefright/codecs/aacenc/src/block_switch.c @@ -30,9 +30,6 @@ #define ENERGY_SHIFT (8 - 1) /**************** internal function prototypes ***********/ -static Word16 -IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[]); - static Word32 SrchMaxWithIndex(const Word32 *in, Word16 *index, Word16 n); @@ -280,7 +277,7 @@ Word32 CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl, Word16 chIncrement, Word16 windowLen) { - Word32 w, i, wOffset, tidx, ch; + Word32 w, i, tidx; Word32 accuUE, accuFE; Word32 tempUnfiltered; Word32 tempFiltered; @@ -329,30 +326,6 @@ Word32 CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl, } #endif -/***************************************************************************** -* -* function name: IIRFilter -* description: calculate the iir-filter for an array -* returns: the result after iir-filter -* -**********************************************************************************/ -static Word16 IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[]) -{ - Word32 accu1, accu2, accu3; - Word32 out; - - accu1 = L_mpy_ls(coeff[1], in); - accu3 = accu1 - states[0]; - accu2 = fixmul( coeff[0], states[1] ); - out = accu3 - accu2; - - states[0] = accu1; - states[1] = out; - - return round16(out); -} - - static Word16 synchronizedBlockTypeTable[4][4] = { /* LONG_WINDOW START_WINDOW SHORT_WINDOW STOP_WINDOW */ /* LONG_WINDOW */{LONG_WINDOW, START_WINDOW, SHORT_WINDOW, STOP_WINDOW}, diff --git a/media/libstagefright/codecs/aacenc/src/ms_stereo.c b/media/libstagefright/codecs/aacenc/src/ms_stereo.c index 2e34f14..1e4b227 100644 --- a/media/libstagefright/codecs/aacenc/src/ms_stereo.c +++ b/media/libstagefright/codecs/aacenc/src/ms_stereo.c @@ -50,7 +50,6 @@ void MsStereoProcessing(Word32 *sfbEnergyLeft, const Word16 sfbPerGroup, const Word16 maxSfbPerGroup, const Word16 *sfbOffset) { - Word32 temp; Word32 sfb,sfboffs, j; Word32 msMaskTrueSomewhere = 0; Word32 msMaskFalseSomewhere = 0; diff --git a/media/libstagefright/codecs/aacenc/src/sf_estim.c b/media/libstagefright/codecs/aacenc/src/sf_estim.c index bc320ec..78947e1 100644 --- a/media/libstagefright/codecs/aacenc/src/sf_estim.c +++ b/media/libstagefright/codecs/aacenc/src/sf_estim.c @@ -99,7 +99,7 @@ CalcFormFactorChannel(Word16 *logSfbFormFactor, { Word32 sfbw, sfbw1; Word32 i, j; - Word32 sfbOffs, sfb, shift; + Word32 sfbOffs, sfb; sfbw = sfbw1 = 0; for (sfbOffs=0; sfbOffs<psyOutChan->sfbCnt; sfbOffs+=psyOutChan->sfbPerGroup){ diff --git a/media/libstagefright/codecs/aacenc/src/tns.c b/media/libstagefright/codecs/aacenc/src/tns.c index 5172612..27c3971 100644 --- a/media/libstagefright/codecs/aacenc/src/tns.c +++ b/media/libstagefright/codecs/aacenc/src/tns.c @@ -140,7 +140,7 @@ Word16 InitTnsConfigurationLong(Word32 bitRate, /*!< bitrate */ Word16 active) /*!< tns active flag */ { - Word32 bitratePerChannel; + Word32 bitratePerChannel __unused; tC->maxOrder = TNS_MAX_ORDER; tC->tnsStartFreq = 1275; tC->coefRes = 4; @@ -206,7 +206,7 @@ Word16 InitTnsConfigurationShort(Word32 bitRate, /*!< bitrate */ PSY_CONFIGURATION_SHORT *pC, /*!< psy config struct */ Word16 active) /*!< tns active flag */ { - Word32 bitratePerChannel; + Word32 bitratePerChannel __unused; tC->maxOrder = TNS_MAX_ORDER_SHORT; tC->tnsStartFreq = 2750; tC->coefRes = 3; @@ -497,36 +497,6 @@ Word16 TnsEncode(TNS_INFO* tnsInfo, /*!< tns info structure (modified) */ /***************************************************************************** * -* function name: m_pow2_cordic -* description: Iterative power function -* -* Calculates pow(2.0,x-1.0*(scale+1)) with INT_BITS bit precision -* using modified cordic algorithm -* returns: the result of pow2 -* -*****************************************************************************/ -static Word32 m_pow2_cordic(Word32 x, Word16 scale) -{ - Word32 k; - - Word32 accu_y = 0x40000000; - accu_y = L_shr(accu_y,scale); - - for(k=1; k<INT_BITS; k++) { - const Word32 z = m_log2_table[k]; - - while(L_sub(x,z) >= 0) { - - x = L_sub(x, z); - accu_y = L_add(accu_y, (accu_y >> k)); - } - } - return(accu_y); -} - - -/***************************************************************************** -* * function name: CalcWeightedSpectrum * description: Calculate weighted spectrum for LPC calculation * diff --git a/media/libstagefright/codecs/aacenc/src/transform.c b/media/libstagefright/codecs/aacenc/src/transform.c index a02336f..0080810 100644 --- a/media/libstagefright/codecs/aacenc/src/transform.c +++ b/media/libstagefright/codecs/aacenc/src/transform.c @@ -475,7 +475,6 @@ void Transform_Real(Word16 *mdctDelayBuffer, Word32 *winPtr; Word32 delayBufferSf,timeSignalSf,minSf; - Word32 headRoom=0; switch(blockType){ diff --git a/media/libstagefright/codecs/amrnb/common/Android.mk b/media/libstagefright/codecs/amrnb/common/Android.mk index a2b3c8f..5e632a6 100644 --- a/media/libstagefright/codecs/amrnb/common/Android.mk +++ b/media/libstagefright/codecs/amrnb/common/Android.mk @@ -67,7 +67,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF= LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h b/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h index 35638e3..c4e4d4f 100644 --- a/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h +++ b/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h @@ -115,7 +115,7 @@ extern "C" Returns: L_sum = 32-bit sum of L_var1 and L_var2 (Word32) */ - static inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow) + static inline Word32 L_add(Word32 L_var1, Word32 L_var2, Flag *pOverflow) { Word32 L_sum; @@ -154,8 +154,8 @@ extern "C" Returns: L_diff = 32-bit difference of L_var1 and L_var2 (Word32) */ - static inline Word32 L_sub(register Word32 L_var1, register Word32 L_var2, - register Flag *pOverflow) + static inline Word32 L_sub(Word32 L_var1, Word32 L_var2, + Flag *pOverflow) { Word32 L_diff; @@ -246,7 +246,7 @@ extern "C" */ static inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word32 L_product; + Word32 L_product; L_product = (Word32) var1 * var2; @@ -452,7 +452,7 @@ extern "C" */ static inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word32 product; + Word32 product; product = ((Word32) var1 * var2) >> 15; diff --git a/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp b/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp index 4135f30..976b1a6 100644 --- a/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp @@ -564,10 +564,10 @@ void Az_lsp( Flag *pOverflow /* (i/o): overflow flag */ ) { - register Word16 i; - register Word16 j; - register Word16 nf; - register Word16 ip; + Word16 i; + Word16 j; + Word16 nf; + Word16 ip; Word16 xlow; Word16 ylow; Word16 xhigh; diff --git a/media/libstagefright/codecs/amrnb/common/src/div_s.cpp b/media/libstagefright/codecs/amrnb/common/src/div_s.cpp index f3bed7e..14d30c5 100644 --- a/media/libstagefright/codecs/amrnb/common/src/div_s.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/div_s.cpp @@ -207,13 +207,13 @@ Word16 div_s (Word16 var1, Word16 var2) /*---------------------------------------------------------------------------- ; FUNCTION CODE ----------------------------------------------------------------------------*/ -Word16 div_s(register Word16 var1, register Word16 var2) +Word16 div_s(Word16 var1, Word16 var2) { /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ Word16 var_out = 0; - register Word16 iteration; + Word16 iteration; Word32 L_num; Word32 L_denom; Word32 L_denom_by_2; diff --git a/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp b/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp index 3650f3c..1c8a700 100644 --- a/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp @@ -477,9 +477,9 @@ void gc_pred( Flag *pOverflow ) { - register Word16 i; - register Word32 L_temp1, L_temp2; - register Word32 L_tmp; + Word16 i; + Word32 L_temp1, L_temp2; + Word32 L_tmp; Word32 ener_code; Word32 ener; Word16 exp, frac; @@ -993,7 +993,7 @@ void gc_pred_average_limited( ) { Word16 av_pred_en; - register Word16 i; + Word16 i; /* do average in MR122 mode (log2() domain) */ av_pred_en = 0; diff --git a/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp b/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp index be76241..2d3b9e4 100644 --- a/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp @@ -185,9 +185,9 @@ Word16 gmed_n( /* o : the median value */ Word16 n /* i : number of inputs */ ) { - register Word16 i, j, ix = 0; - register Word16 max; - register Word16 medianIndex; + Word16 i, j, ix = 0; + Word16 max; + Word16 medianIndex; Word16 tmp[NMAX]; Word16 tmp2[NMAX]; diff --git a/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp b/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp index 6b7b471..495359f 100644 --- a/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp @@ -254,8 +254,8 @@ static void Get_lsp_pol( Word32 *f, Flag *pOverflow) { - register Word16 i; - register Word16 j; + Word16 i; + Word16 j; Word16 hi; Word16 lo; @@ -511,8 +511,8 @@ void Lsp_Az( Flag *pOverflow /* (o) : overflow flag */ ) { - register Word16 i; - register Word16 j; + Word16 i; + Word16 j; Word32 f1[6]; Word32 f2[6]; diff --git a/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp b/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp index 0777e68..7112b3d 100644 --- a/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp @@ -190,7 +190,7 @@ Word16 mult_r (Word16 var1, Word16 var2) Word16 mult_r(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word32 L_product_arr; + Word32 L_product_arr; L_product_arr = ((Word32) var1) * var2; /* product */ L_product_arr += (Word32) 0x00004000L; /* round */ diff --git a/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp b/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp index 132fed6..d8d1259 100644 --- a/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp @@ -197,12 +197,12 @@ Word16 norm_l (Word32 L_var1) ; FUNCTION CODE ----------------------------------------------------------------------------*/ #if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) -Word16 norm_l(register Word32 L_var1) +Word16 norm_l(Word32 L_var1) { /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ - register Word16 var_out = 0; + Word16 var_out = 0; /*---------------------------------------------------------------------------- ; Function body here diff --git a/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp b/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp index 8cdcdb8..6468b67 100644 --- a/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp @@ -194,13 +194,13 @@ Word16 norm_s (Word16 var1) ----------------------------------------------------------------------------*/ #if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) -Word16 norm_s(register Word16 var1) +Word16 norm_s(Word16 var1) { /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ - register Word16 var_out = 0; + Word16 var_out = 0; /*---------------------------------------------------------------------------- ; Function body here diff --git a/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp b/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp index 9163623..8a1aa9e 100644 --- a/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp @@ -260,9 +260,9 @@ void Pred_lt_3or6( Flag *pOverflow /* output: if set, overflow occurred in this function */ ) { - register Word16 i; - register Word16 j; - register Word16 k; + Word16 i; + Word16 j; + Word16 k; Word16 *pX0; Word16 *pX2; diff --git a/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp b/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp index 2b30bf4..c70847e 100644 --- a/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp @@ -281,7 +281,7 @@ static Word16 Vq_subvec4( /* o: quantization index, Q0 */ Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i; + Word16 i; Word16 temp; const Word16 *p_dico; Word16 index = 0; @@ -607,7 +607,7 @@ static Word16 Vq_subvec3( /* o: quantization index, Q0 */ Flag use_half, /* i: use every second entry in codebook */ Flag *pOverflow) /* o : Flag set when overflow occurs */ { - register Word16 i; + Word16 i; Word16 temp; const Word16 *p_dico; @@ -1013,7 +1013,7 @@ void Q_plsf_3( Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i, j; + Word16 i, j; Word16 lsf1[M]; Word16 wf1[M]; Word16 lsf_p[M]; diff --git a/media/libstagefright/codecs/amrnb/common/src/residu.cpp b/media/libstagefright/codecs/amrnb/common/src/residu.cpp index b25d3be..2ad132f 100644 --- a/media/libstagefright/codecs/amrnb/common/src/residu.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/residu.cpp @@ -202,7 +202,7 @@ void Residu( { - register Word16 i, j; + Word16 i, j; Word32 s1; Word32 s2; Word32 s3; diff --git a/media/libstagefright/codecs/amrnb/common/src/shr.cpp b/media/libstagefright/codecs/amrnb/common/src/shr.cpp index 775dc69..1018d9c 100644 --- a/media/libstagefright/codecs/amrnb/common/src/shr.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/shr.cpp @@ -202,10 +202,10 @@ Word16 shr_std (Word16 var1, Word16 var2) /*---------------------------------------------------------------------------- ; FUNCTION CODE ----------------------------------------------------------------------------*/ -Word16 shr(register Word16 var1, register Word16 var2, Flag *pOverflow) +Word16 shr(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word16 result; - register Word32 temp_res; + Word16 result; + Word32 temp_res; if (var2 != 0) { diff --git a/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp b/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp index 2e2efc4..ee821ef 100644 --- a/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp @@ -178,7 +178,7 @@ void Weight_Ai( Word16 a_exp[] /* (o) : Spectral expanded LPC coefficients */ ) { - register Word16 i; + Word16 i; *(a_exp) = *(a); diff --git a/media/libstagefright/codecs/amrnb/dec/Android.mk b/media/libstagefright/codecs/amrnb/dec/Android.mk index b067456..3750e2e 100644 --- a/media/libstagefright/codecs/amrnb/dec/Android.mk +++ b/media/libstagefright/codecs/amrnb/dec/Android.mk @@ -45,7 +45,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../common/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= LOCAL_CFLAGS += -Werror @@ -83,3 +83,24 @@ LOCAL_MODULE := libstagefright_soft_amrdec LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) + +################################################################################ +include $(CLEAR_VARS) +LOCAL_SRC_FILES := \ + test/amrnbdec_test.cpp + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/src \ + $(LOCAL_PATH)/../common/include \ + $(call include-path-for, audio-utils) + +LOCAL_STATIC_LIBRARIES := \ + libstagefright_amrnbdec libsndfile + +LOCAL_SHARED_LIBRARIES := \ + libstagefright_amrnb_common libaudioutils + +LOCAL_MODULE := libstagefright_amrnbdec_test +LOCAL_MODULE_TAGS := optional + +include $(BUILD_EXECUTABLE) diff --git a/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp b/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp index 899daba..861b3e6 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp @@ -209,7 +209,7 @@ void dec_10i40_35bits( Word16 cod[] /* (o) : algebraic (fixed) codebook excitation */ ) { - register Word16 i, j, pos1, pos2; + Word16 i, j, pos1, pos2; Word16 sign, tmp; for (i = 0; i < L_CODE; i++) diff --git a/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp b/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp index 08b690d..7068c0a 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp @@ -308,7 +308,7 @@ void D_plsf_5( Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i; + Word16 i; Word16 temp; Word16 sign; diff --git a/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp b/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp index c5aefe4..2ca30de 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp @@ -218,9 +218,9 @@ void Int_lsf( Flag *pOverflow /* o : flag set if overflow occurs */ ) { - register Word16 i; - register Word16 temp1; - register Word16 temp2; + Word16 i; + Word16 temp1; + Word16 temp2; if (i_subfr == 0) { diff --git a/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp b/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp index da5445b..285465f 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp @@ -207,7 +207,7 @@ int ph_disp_reset (ph_dispState *state) Word16 ph_disp_reset(ph_dispState *state) { - register Word16 i; + Word16 i; if (state == (ph_dispState *) NULL) { @@ -667,15 +667,15 @@ void ph_disp( Flag *pOverflow /* i/o : oveflow indicator */ ) { - register Word16 i, i1; - register Word16 tmp1; + Word16 i, i1; + Word16 tmp1; Word32 L_temp; Word32 L_temp2; Word16 impNr; /* indicator for amount of disp./filter used */ Word16 inno_sav[L_SUBFR]; Word16 ps_poss[L_SUBFR]; - register Word16 nze, nPulse; + Word16 nze, nPulse; Word16 ppos; const Word16 *ph_imp; /* Pointer to phase dispersion filter */ diff --git a/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp b/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp index 0336990..39e01a2 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp @@ -445,13 +445,13 @@ void Post_Filter( ) { Word16 Ap3[MP1]; - Word16 Ap4[MP1]; /* bandwidth expanded LP parameters */ - Word16 *Az; /* pointer to Az_4: */ + Word16 Ap4[MP1]; /* bandwidth expanded LP parameters */ + Word16 *Az; /* pointer to Az_4: */ /* LPC parameters in each subframe */ - register Word16 i_subfr; /* index for beginning of subframe */ + Word16 i_subfr; /* index for beginning of subframe */ Word16 h[L_H]; - register Word16 i; + Word16 i; Word16 temp1; Word16 temp2; Word32 L_tmp; diff --git a/media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp b/media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp new file mode 100644 index 0000000..521fe2b --- /dev/null +++ b/media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp @@ -0,0 +1,149 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <stdio.h> +#include <stdint.h> +#include <string.h> +#include <assert.h> + +#include "gsmamr_dec.h" +#include <audio_utils/sndfile.h> + +// Constants for AMR-NB +enum { + kInputBufferSize = 64, + kSamplesPerFrame = 160, + kBitsPerSample = 16, + kOutputBufferSize = kSamplesPerFrame * kBitsPerSample/8, + kSampleRate = 8000, + kChannels = 1, + kFileHeaderSize = 6 +}; +const uint32_t kFrameSizes[] = {12, 13, 15, 17, 19, 20, 26, 31}; + + +int main(int argc, char *argv[]) { + + if(argc != 3) { + fprintf(stderr, "Usage %s <input file> <output file>\n", argv[0]); + return 1; + } + + // Open the input file + FILE* fpInput = fopen(argv[1], "rb"); + if (!fpInput) { + fprintf(stderr, "Could not open %s\n", argv[1]); + return 1; + } + + // Validate the input AMR file + char header[kFileHeaderSize]; + int bytesRead = fread(header, 1, kFileHeaderSize, fpInput); + if (bytesRead != kFileHeaderSize || memcmp(header, "#!AMR\n", kFileHeaderSize)) { + fprintf(stderr, "Invalid AMR-NB file\n"); + return 1; + } + + // Open the output file + SF_INFO sfInfo; + memset(&sfInfo, 0, sizeof(SF_INFO)); + sfInfo.channels = kChannels; + sfInfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; + sfInfo.samplerate = kSampleRate; + SNDFILE *handle = sf_open(argv[2], SFM_WRITE, &sfInfo); + if(!handle){ + fprintf(stderr, "Could not create %s\n", argv[2]); + return 1; + } + + // Create AMR-NB decoder instance + void* amrHandle; + int err = GSMInitDecode(&amrHandle, (Word8*)"AMRNBDecoder"); + if(err != 0){ + fprintf(stderr, "Error creating AMR-NB decoder instance\n"); + return 1; + } + + //Allocate input buffer + void *inputBuf = malloc(kInputBufferSize); + assert(inputBuf != NULL); + + //Allocate output buffer + void *outputBuf = malloc(kOutputBufferSize); + assert(outputBuf != NULL); + + + // Decode loop + uint32_t retVal = 0; + while (1) { + // Read mode + uint8_t mode; + bytesRead = fread(&mode, 1, 1, fpInput); + if (bytesRead != 1) break; + + // Find frame type + Frame_Type_3GPP frameType = (Frame_Type_3GPP)((mode >> 3) & 0x0f); + if (frameType >= AMR_SID){ + fprintf(stderr, "Frame type %d not supported\n",frameType); + retVal = 1; + break; + } + + // Find frame type + int32_t frameSize = kFrameSizes[frameType]; + bytesRead = fread(inputBuf, 1, frameSize, fpInput); + if (bytesRead != frameSize) break; + + //Decode frame + int32_t decodeStatus; + decodeStatus = AMRDecode(amrHandle, frameType, (uint8_t*)inputBuf, + (int16_t*)outputBuf, MIME_IETF); + if(decodeStatus == -1) { + fprintf(stderr, "Decoder encountered error\n"); + retVal = 1; + break; + } + + //Write output to wav + sf_writef_short(handle, (int16_t*)outputBuf, kSamplesPerFrame); + + } + + // Close input and output file + fclose(fpInput); + sf_close(handle); + + //Free allocated memory + free(inputBuf); + free(outputBuf); + + // Close decoder instance + GSMDecodeFrameExit(&amrHandle); + + return retVal; +} diff --git a/media/libstagefright/codecs/amrnb/enc/Android.mk b/media/libstagefright/codecs/amrnb/enc/Android.mk index afc0b89..bdba8a9 100644 --- a/media/libstagefright/codecs/amrnb/enc/Android.mk +++ b/media/libstagefright/codecs/amrnb/enc/Android.mk @@ -67,7 +67,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../common/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp b/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp index 0d3acac..c71811d 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp @@ -306,9 +306,9 @@ Word16 Autocorr( Flag *pOverflow /* (o) : indicates overflow */ ) { - register Word16 i; - register Word16 j; - register Word16 norm; + Word16 i; + Word16 j; + Word16 norm; Word16 y[L_WINDOW]; Word32 sum; diff --git a/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp b/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp index a33cdf74..b211032 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp @@ -318,7 +318,7 @@ extern "C" Word16 dn_sign[L_CODE]; Word16 rr[L_CODE][L_CODE]; - register Word16 i; + Word16 i; Word16 index; Word16 sharp; @@ -592,10 +592,10 @@ extern "C" Flag * pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i0; - register Word16 i1; + Word16 i0; + Word16 i1; Word16 ix = 0; /* initialization only needed to keep gcc silent */ - register Word16 track1; + Word16 track1; Word16 ipos[NB_PULSE]; Word16 psk; Word16 ps0; @@ -608,7 +608,7 @@ extern "C" Word32 s; Word32 alp0; Word32 alp1; - register Word16 i; + Word16 i; Word32 L_temp; Word16 *p_codvec = &codvec[0]; @@ -993,13 +993,13 @@ extern "C" Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i; - register Word16 j; - register Word16 k; - register Word16 track; - register Word16 first; - register Word16 index; - register Word16 rsign; + Word16 i; + Word16 j; + Word16 k; + Word16 track; + Word16 first; + Word16 index; + Word16 rsign; Word16 indx; Word16 _sign[NB_PULSE]; Word16 *p0; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp b/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp index 4a05327..525e57d 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp @@ -638,7 +638,7 @@ void cl_ltp( Flag *pOverflow /* o : overflow indicator */ ) { - register Word16 i; + Word16 i; Word16 index; Word32 L_temp; /* temporarily variable */ Word16 resu3; /* flag for upsample resolution */ diff --git a/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp b/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp index e9ce7ba..5015a4a 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp @@ -212,7 +212,7 @@ void Convolve( Word16 L /* (i) : vector size */ ) { - register Word16 i, n; + Word16 i, n; Word32 s1, s2; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp b/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp index e46d99f..20583c4 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp @@ -272,8 +272,8 @@ void cor_h( Flag *pOverflow ) { - register Word16 i; - register Word16 dec; + Word16 i; + Word16 dec; Word16 h2[L_CODE]; Word32 s; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp index beb2aec..c25c026 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp @@ -249,9 +249,9 @@ void cor_h_x( Flag *pOverflow /* (o): pointer to overflow flag */ ) { - register Word16 i; - register Word16 j; - register Word16 k; + Word16 i; + Word16 j; + Word16 k; Word32 s; Word32 y32[L_CODE]; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp index da60640..b4fd867 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp @@ -236,9 +236,9 @@ void cor_h_x2( Flag *pOverflow ) { - register Word16 i; - register Word16 j; - register Word16 k; + Word16 i; + Word16 j; + Word16 k; Word32 s; Word32 y32[L_CODE]; Word32 max; diff --git a/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp b/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp index 276e590..2ccb777 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp @@ -130,7 +130,7 @@ terms listed above has been obtained from the copyright holder. ; MACROS ; Define module specific macros here ----------------------------------------------------------------------------*/ -extern Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow); +extern Word32 L_add(Word32 L_var1, Word32 L_var2, Flag *pOverflow); /*---------------------------------------------------------------------------- ; DEFINES @@ -671,7 +671,7 @@ void dtx_enc(dtx_encState *st, /* i/o : State struct */ Flag *pOverflow /* i/o : overflow indicator */ ) { - register Word16 i, j; + Word16 i, j; Word16 temp; Word16 log_en; Word16 lsf[M]; @@ -943,7 +943,7 @@ void dtx_buffer(dtx_encState *st, /* i/o : State struct */ ) { - register Word16 i; + Word16 i; Word32 L_frame_en; Word32 L_temp; Word16 log_en_e; diff --git a/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp b/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp index 001897b..29cdac6 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp @@ -638,8 +638,8 @@ Word16 Levinson( Flag *pOverflow ) { - register Word16 i; - register Word16 j; + Word16 i; + Word16 j; Word16 hi; Word16 lo; Word16 Kh; /* reflexion coefficient; hi and lo */ @@ -651,9 +651,9 @@ Word16 Levinson( Word16 Al[M + 1]; Word16 Anh[M + 1]; /* LPC coef.for next iteration in */ Word16 Anl[M + 1]; /* double prec. */ - register Word32 t0; /* temporary variable */ - register Word32 t1; /* temporary variable */ - register Word32 t2; /* temporary variable */ + Word32 t0; /* temporary variable */ + Word32 t1; /* temporary variable */ + Word32 t2; /* temporary variable */ Word16 *p_Rh; Word16 *p_Rl; diff --git a/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp b/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp index d3a2ec0..c039bb0 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp @@ -320,7 +320,7 @@ static Word16 Lag_max( /* o : lag found */ ) #endif { - register Word16 i; + Word16 i; Word16 *p; Word32 max; Word32 t0; diff --git a/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp b/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp index fdc2440..042920e 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp @@ -542,7 +542,7 @@ void Pre_Process( Word16 signal[], /* input/output signal */ Word16 lg) /* length of signal */ { - register Word16 i; + Word16 i; Word16 x_n_2; Word16 x_n_1; Word32 L_tmp; diff --git a/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp b/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp index d626de3..fa43f78 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp @@ -248,7 +248,7 @@ void set_sign(Word16 dn[], /* i/o : correlation between target and h[] */ Word16 n /* i : # of maximum correlations in dn2[] */ ) { - register Word16 i, j, k; + Word16 i, j, k; Word16 val, min; Word16 pos = 0; /* initialization only needed to keep gcc silent */ diff --git a/media/libstagefright/codecs/amrwb/Android.mk b/media/libstagefright/codecs/amrwb/Android.mk index efdf988..686f7a3 100644 --- a/media/libstagefright/codecs/amrwb/Android.mk +++ b/media/libstagefright/codecs/amrwb/Android.mk @@ -48,7 +48,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp b/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp index d1ec790..5872512 100644 --- a/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp +++ b/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp @@ -205,7 +205,7 @@ int16 div_16by16(int16 var1, int16 var2) { int16 var_out = 0; - register int16 iteration; + int16 iteration; int32 L_num; int32 L_denom; int32 L_denom_by_2; diff --git a/media/libstagefright/codecs/amrwbenc/Android.mk b/media/libstagefright/codecs/amrwbenc/Android.mk index 64fe8d1..024a292 100644 --- a/media/libstagefright/codecs/amrwbenc/Android.mk +++ b/media/libstagefright/codecs/amrwbenc/Android.mk @@ -86,6 +86,9 @@ LOCAL_SRC_FILES += \ endif +# ARMV5E/Filt_6k_7k_opt.s does not compile with Clang. +LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as + LOCAL_MODULE := libstagefright_amrwbenc LOCAL_ARM_MODE := arm diff --git a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c index 80a0b73..d658602 100644 --- a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c +++ b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c @@ -188,7 +188,7 @@ Word32 quant_4p_4N( /* (o) return 4*N bits */ Word16 pos[], /* (i) position of the pulse 1..4 */ Word16 N) /* (i) number of bits for position */ { - Word16 nb_pos, mask, n_1, tmp; + Word16 nb_pos, mask __unused, n_1, tmp; Word16 posA[4], posB[4]; Word32 i, j, k, index; diff --git a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c index 13dd2aa..2beaefd 100644 --- a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c +++ b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c @@ -404,7 +404,7 @@ static void noise_estimate_update( alpha_down = ALPHA_DOWN1; } else { - if ((st->stat_count == 0)) + if (st->stat_count == 0) { alpha_up = ALPHA_UP2; alpha_down = ALPHA_DOWN2; diff --git a/media/libstagefright/codecs/avc/common/src/deblock.cpp b/media/libstagefright/codecs/avc/common/src/deblock.cpp index de2d2b6..5f8b693 100644 --- a/media/libstagefright/codecs/avc/common/src/deblock.cpp +++ b/media/libstagefright/codecs/avc/common/src/deblock.cpp @@ -1279,7 +1279,7 @@ void EdgeLoop_Luma_vertical(uint8* SrcPtr, uint8 *Strength, int Alpha, int Beta, int C0, c0, dif, AbsDelta, Strng, tmp, tmp1; int L2 = 0, L1, L0, R0, R1, R2 = 0; uint8 *ptr, *ptr1; - register uint R_in, L_in; + uint R_in, L_in; uint R_out, L_out; diff --git a/media/libstagefright/codecs/avc/enc/Android.mk b/media/libstagefright/codecs/avc/enc/Android.mk index 537ba42..2ceebc8 100644 --- a/media/libstagefright/codecs/avc/enc/Android.mk +++ b/media/libstagefright/codecs/avc/enc/Android.mk @@ -28,7 +28,7 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS := \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_CFLAGS += -Werror @@ -51,7 +51,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../common LOCAL_CFLAGS := \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_STATIC_LIBRARIES := \ diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp index 24dfc29..928a74f 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp @@ -561,13 +561,6 @@ void SoftAVCEncoder::onQueueFilled(OMX_U32 /* portIndex */) { videoInput.coding_timestamp = (inHeader->nTimeStamp + 500) / 1000; // in ms const uint8_t *inputData = NULL; if (mInputDataIsMeta) { - if (inHeader->nFilledLen != 8) { - ALOGE("MetaData buffer is wrong size! " - "(got %u bytes, expected 8)", inHeader->nFilledLen); - mSignalledError = true; - notify(OMX_EventError, OMX_ErrorUndefined, 0, 0); - return; - } inputData = extractGraphicBuffer( mInputFrameData, (mWidth * mHeight * 3) >> 1, diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h index f31c1f4..81de109 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h @@ -26,8 +26,6 @@ namespace android { -struct MediaBuffer; - struct SoftAVCEncoder : public MediaBufferObserver, public SoftVideoEncoderOMXComponent { SoftAVCEncoder( diff --git a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp index 38a2a15..0b8d9e2 100644 --- a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp +++ b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp @@ -151,8 +151,7 @@ void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx) uint8 tmp8; int32 tmp32; int16 tmp_horz[18*22], *dst_16, *src_16; - register int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; // temp register - int msk; + int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; // temp int i, j; /* first copy full-pel to the first array */ @@ -379,7 +378,6 @@ void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx) // one can just use the above code and change the for(i=2 to for(i=18 for (i = 16; i > 0; i -= 4) { - msk = 0; for (j = 17; j > 0; j--) { a = *((uint32*)ref); /* load 4 bytes */ diff --git a/media/libstagefright/codecs/avc/enc/src/init.cpp b/media/libstagefright/codecs/avc/enc/src/init.cpp index c258b57..6e1413a 100644 --- a/media/libstagefright/codecs/avc/enc/src/init.cpp +++ b/media/libstagefright/codecs/avc/enc/src/init.cpp @@ -177,10 +177,6 @@ AVCEnc_Status SetEncodeParam(AVCHandle* avcHandle, AVCEncParams* encParam, seqParam->offset_for_non_ref_pic = extS->offset_for_non_ref_pic; seqParam->offset_for_top_to_bottom_field = extS->offset_for_top_to_bottom_field; seqParam->num_ref_frames_in_pic_order_cnt_cycle = extS->num_ref_frames_in_pic_order_cnt_cycle; - if (extS->offset_for_ref_frame == NULL) - { - return AVCENC_ENCPARAM_MEM_FAIL; - } for (ii = 0; ii < (int) extS->num_ref_frames; ii++) { seqParam->offset_for_ref_frame[ii] = extS->offset_for_ref_frame[ii]; diff --git a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp index aa13873..09dcc28 100644 --- a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp +++ b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp @@ -171,7 +171,7 @@ AVCEnc_Status InitRateControlModule(AVCHandle *avcHandle) AVCRateControl *rateCtrl = encvid->rateCtrl; double L1, L2, L3, bpp; int qp; - int i, j; + int i; rateCtrl->basicUnit = video->PicSizeInMbs; diff --git a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp index 1301060..9edffd2 100644 --- a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp +++ b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp @@ -421,7 +421,6 @@ OMX_ERRORTYPE SoftFlacEncoder::configureEncoder() { } FLAC__bool ok = true; - FLAC__StreamEncoderInitStatus initStatus = FLAC__STREAM_ENCODER_INIT_STATUS_OK; ok = ok && FLAC__stream_encoder_set_channels(mFlacStreamEncoder, mNumChannels); ok = ok && FLAC__stream_encoder_set_sample_rate(mFlacStreamEncoder, mSampleRate); ok = ok && FLAC__stream_encoder_set_bits_per_sample(mFlacStreamEncoder, 16); diff --git a/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp b/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp index a357ea6..1ac88a1 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp @@ -138,8 +138,8 @@ void FindMaxMin( /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ - register uint i, j; - register int min, max; + uint i, j; + int min, max; /*---------------------------------------------------------------------------- ; Function body here diff --git a/media/libstagefright/codecs/m4v_h263/enc/Android.mk b/media/libstagefright/codecs/m4v_h263/enc/Android.mk index c9006d9..7117692 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/Android.mk +++ b/media/libstagefright/codecs/m4v_h263/enc/Android.mk @@ -25,7 +25,7 @@ LOCAL_MODULE := libstagefright_m4vh263enc LOCAL_CFLAGS := \ -DBX_RC \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ @@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := \ -DBX_RC \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_STATIC_LIBRARIES := \ diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp index fa3486c..8240f83 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp @@ -413,13 +413,6 @@ void SoftMPEG4Encoder::onQueueFilled(OMX_U32 /* portIndex */) { if (inHeader->nFilledLen > 0) { const uint8_t *inputData = NULL; if (mInputDataIsMeta) { - if (inHeader->nFilledLen != 8) { - ALOGE("MetaData buffer is wrong size! " - "(got %u bytes, expected 8)", inHeader->nFilledLen); - mSignalledError = true; - notify(OMX_EventError, OMX_ErrorUndefined, 0, 0); - return; - } inputData = extractGraphicBuffer( mInputFrameData, (mWidth * mHeight * 3) >> 1, diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h index 25ecdc9..3389c37 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h +++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h @@ -26,7 +26,6 @@ namespace android { struct CodecProfileLevel; -struct MediaBuffer; struct SoftMPEG4Encoder : public SoftVideoEncoderOMXComponent { SoftMPEG4Encoder( diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp index fa4ae23..8d7d9f1 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp @@ -267,7 +267,7 @@ extern "C" Void Block4x4DCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x0188053A; @@ -473,7 +473,7 @@ extern "C" Void Block2x2DCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x018803B2; @@ -863,7 +863,7 @@ extern "C" Void Block4x4DCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x0188053A; @@ -1050,7 +1050,7 @@ extern "C" Void Block2x2DCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x018803B2; diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp index 7ea5dc4..2aec815 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp @@ -271,7 +271,7 @@ PutCBPY(Int cbpy, Char intra, BitstreamEncVideo *bitstream) Int ind; Int length; - if ((intra == 0)) + if (intra == 0) cbpy = 15 - cbpy; ind = cbpy; diff --git a/media/libstagefright/codecs/mp3dec/Android.mk b/media/libstagefright/codecs/mp3dec/Android.mk index 8284490..948ae29 100644 --- a/media/libstagefright/codecs/mp3dec/Android.mk +++ b/media/libstagefright/codecs/mp3dec/Android.mk @@ -48,7 +48,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/on2/h264dec/Android.mk b/media/libstagefright/codecs/on2/h264dec/Android.mk index bf03ad9..e63b6b1 100644 --- a/media/libstagefright/codecs/on2/h264dec/Android.mk +++ b/media/libstagefright/codecs/on2/h264dec/Android.mk @@ -94,6 +94,8 @@ ifeq ($(TARGET_ARCH),arm) LOCAL_C_INCLUDES += $(LOCAL_PATH)/./omxdl/arm_neon/api \ $(LOCAL_PATH)/./omxdl/arm_neon/vc/api \ $(LOCAL_PATH)/./omxdl/arm_neon/vc/m4p10/api + # h264bsdWriteMacroblock.S does not compile with Clang. + LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as endif endif diff --git a/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h b/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h index fe112bc..fe112bc 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h +++ b/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h diff --git a/media/libstagefright/codecs/on2/h264dec/inc/basetype.h b/media/libstagefright/codecs/on2/h264dec/inc/basetype.h index 63d5653..63d5653 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/inc/basetype.h +++ b/media/libstagefright/codecs/on2/h264dec/inc/basetype.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h index 64c1958..64c1958 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h index c738f72..c738f72 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h index b699034..b699034 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h index e0cfdaa..e0cfdaa 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h index 0baa087..0baa087 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h index 51118fd..51118fd 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h index 41b3e1e..41b3e1e 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h index 0956bd1..0956bd1 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h index 7a68d14..7a68d14 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h index 912cb0d..912cb0d 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h index 48703d1..48703d1 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c index e572a89..e572a89 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c index 9ef9319..9ef9319 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c index 3f5e279..3f5e279 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c index 09f88c3..09f88c3 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h index 35b510b..35b510b 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h index 32a0166..32a0166 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h index 7b3cc72..7b3cc72 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h index 89f3040..89f3040 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h index 547a2d9..547a2d9 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c index 137495d..137495d 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c index 40d4d5e..40d4d5e 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c index 619365f..619365f 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c index 4e871bf..4e871bf 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c index b29e576..b29e576 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c index 3ce41be..3ce41be 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h index 74b5505..74b5505 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h index e95203a..e95203a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c index 38af975..38af975 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c index 6948f80..6948f80 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c index 21fa715..21fa715 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c index 796ad6e..796ad6e 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c index b28657c..b28657c 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c index 5d93681..5d93681 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c +++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c b/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c index dcf2ef6..dcf2ef6 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c +++ b/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c b/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c index aadc75f..aadc75f 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c +++ b/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c b/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c index 42170d3..42170d3 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c +++ b/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c index db77f8c..db77f8c 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h index 36aec76..36aec76 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c index 91d78bd..91d78bd 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h index 80353d3..80353d3 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h index 2baba5a..2baba5a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c index 7a262ed..7a262ed 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h index 3134670..3134670 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h index 99b74a0..99b74a0 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c index f8c1f76..f8c1f76 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h index 2571dda..2571dda 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c index 9517d0a..9517d0a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h index 0e25084..0e25084 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c index 7b92870..7b92870 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h index ed7c18c..ed7c18c 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c index 2a81c4a..2a81c4a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h index 94dee25..94dee25 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c index 52c85e5..52c85e5 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h index 4652bd5..4652bd5 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c index 2b3e7f0..2b3e7f0 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h index 32bc340..32bc340 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c index e44c43a..e44c43a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h index 38957bf..38957bf 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c index ce5eeff..ce5eeff 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h index fce0ad1..fce0ad1 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c index fb23352..fb23352 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h index 19741eb..19741eb 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c index e04dea4..e04dea4 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h index 6328638..6328638 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c index b409a06..b409a06 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h index 5a1a140..5a1a140 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c index 0756c47..0756c47 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h index efe543a..efe543a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h index e18df94..e18df94 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c index c288d4b..c288d4b 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h index f23d49e..f23d49e 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c index 7cbb534..7cbb534 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h index 4bcb6f2..4bcb6f2 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c index 23401c6..23401c6 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h index 198898a..198898a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c index 3234754..3234754 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h index ba3b2da..ba3b2da 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c index 20d1083..20d1083 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h index 4404b66..4404b66 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c index 4eb6dd0..4eb6dd0 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h index 4f41a23..4f41a23 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c index fb97a28..fb97a28 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h index 216ad04..216ad04 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c index 060f35e..060f35e 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h index 4c16773..4c16773 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c index 4a9335a..4a9335a 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h index 05d52a4..05d52a4 100755..100644 --- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h +++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h diff --git a/media/libstagefright/http/MediaHTTP.cpp b/media/libstagefright/http/MediaHTTP.cpp index 2d29913..bb89567 100644 --- a/media/libstagefright/http/MediaHTTP.cpp +++ b/media/libstagefright/http/MediaHTTP.cpp @@ -129,7 +129,7 @@ status_t MediaHTTP::getSize(off64_t *size) { *size = mCachedSize; - return *size < 0 ? *size : OK; + return *size < 0 ? *size : static_cast<status_t>(OK); } uint32_t MediaHTTP::flags() { diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 0b18666..04005bd 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -685,7 +685,6 @@ void LiveSession::onConnect(const sp<AMessage> &msg) { AString uri; mPlaylist->itemAt(i, &uri, &meta); - unsigned long bandwidth; CHECK(meta->findInt32("bandwidth", (int32_t *)&item.mBandwidth)); if (initialBandwidth == 0) { @@ -962,9 +961,11 @@ sp<M3UParser> LiveSession::fetchPlaylist( return playlist; } +#if 0 static double uniformRand() { return (double)rand() / RAND_MAX; } +#endif size_t LiveSession::getBandwidthIndex() { if (mBandwidthItems.size() == 0) { @@ -1441,7 +1442,6 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) { sp<PlaylistFetcher> fetcher = addFetcher(uri.c_str()); CHECK(fetcher != NULL); - int32_t latestSeq = -1; int64_t startTimeUs = -1; int64_t segmentStartTimeUs = -1ll; int32_t discontinuitySeq = -1; @@ -1469,7 +1469,6 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) { ATSParser::DISCONTINUITY_TIME, extra, true); } else { int32_t type; - int64_t srcSegmentStartTimeUs; sp<AMessage> meta; if (pickTrack) { // selecting diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp index d8eed5b..c0c7ed9 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.cpp +++ b/media/libstagefright/httplive/PlaylistFetcher.cpp @@ -290,7 +290,6 @@ status_t PlaylistFetcher::decryptBuffer( } status_t PlaylistFetcher::checkDecryptPadding(const sp<ABuffer> &buffer) { - status_t err; AString method; CHECK(buffer->meta()->findString("cipher-method", &method)); if (method == "NONE") { @@ -1525,7 +1524,7 @@ status_t PlaylistFetcher::extractAndQueueAccessUnits( CHECK_EQ(bits.getBits(12), 0xfffu); bits.skipBits(3); // ID, layer - bool protection_absent = bits.getBits(1) != 0; + bool protection_absent __unused = bits.getBits(1) != 0; unsigned profile = bits.getBits(2); CHECK_NE(profile, 3u); @@ -1667,7 +1666,7 @@ void PlaylistFetcher::updateDuration() { } int64_t PlaylistFetcher::resumeThreshold(const sp<AMessage> &msg) { - int64_t durationUs, threshold; + int64_t durationUs; if (msg->findInt64("durationUs", &durationUs)) { return kNumSkipFrames * durationUs; } diff --git a/media/libstagefright/httplive/PlaylistFetcher.h b/media/libstagefright/httplive/PlaylistFetcher.h index 78c358f..76cc852 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.h +++ b/media/libstagefright/httplive/PlaylistFetcher.h @@ -31,7 +31,7 @@ struct DataSource; struct HTTPBase; struct LiveDataSource; struct M3UParser; -struct String8; +class String8; struct PlaylistFetcher : public AHandler { enum { diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp index 7f221a0..d8bfada 100644 --- a/media/libstagefright/id3/ID3.cpp +++ b/media/libstagefright/id3/ID3.cpp @@ -793,8 +793,8 @@ ID3::getAlbumArt(size_t *length, String8 *mime) const { mime->setTo((const char *)&data[1]); size_t mimeLen = strlen((const char *)&data[1]) + 1; - uint8_t picType = data[1 + mimeLen]; #if 0 + uint8_t picType = data[1 + mimeLen]; if (picType != 0x03) { // Front Cover Art it.next(); diff --git a/media/libstagefright/include/AACEncoder.h b/media/libstagefright/include/AACEncoder.h index 3d5fc60..52beb0e 100644 --- a/media/libstagefright/include/AACEncoder.h +++ b/media/libstagefright/include/AACEncoder.h @@ -25,7 +25,7 @@ struct VO_MEM_OPERATOR; namespace android { -struct MediaBufferGroup; +class MediaBufferGroup; class AACEncoder: public MediaSource { public: diff --git a/media/libstagefright/include/ID3.h b/media/libstagefright/include/ID3.h index e83f3ef..c2c4a6d 100644 --- a/media/libstagefright/include/ID3.h +++ b/media/libstagefright/include/ID3.h @@ -22,8 +22,8 @@ namespace android { -struct DataSource; -struct String8; +class DataSource; +class String8; struct ID3 { enum Version { diff --git a/media/libstagefright/include/MPEG2TSExtractor.h b/media/libstagefright/include/MPEG2TSExtractor.h index c5e86a6..db1187d 100644 --- a/media/libstagefright/include/MPEG2TSExtractor.h +++ b/media/libstagefright/include/MPEG2TSExtractor.h @@ -28,7 +28,7 @@ namespace android { struct AMessage; struct AnotherPacketSource; struct ATSParser; -struct DataSource; +class DataSource; struct MPEG2TSSource; struct String8; diff --git a/media/libstagefright/include/avc_utils.h b/media/libstagefright/include/avc_utils.h index d517320..c270bc1 100644 --- a/media/libstagefright/include/avc_utils.h +++ b/media/libstagefright/include/avc_utils.h @@ -23,7 +23,7 @@ namespace android { -struct ABitReader; +class ABitReader; enum { kAVCProfileBaseline = 0x42, @@ -49,7 +49,7 @@ status_t getNextNALUnit( const uint8_t **nalStart, size_t *nalSize, bool startCodeFollows = false); -struct MetaData; +class MetaData; sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit); bool IsIDR(const sp<ABuffer> &accessUnit); diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index 4f0862c..0712bf0 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -500,17 +500,6 @@ static unsigned U24_AT(const uint8_t *ptr) { return ptr[0] << 16 | ptr[1] << 8 | ptr[2]; } -static size_t clz(uint8_t x) { - size_t numLeadingZeroes = 0; - - while (!(x & 0x80)) { - ++numLeadingZeroes; - x = x << 1; - } - - return numLeadingZeroes; -} - void MatroskaSource::clearPendingFrames() { while (!mPendingFrames.empty()) { MediaBuffer *frame = *mPendingFrames.begin(); diff --git a/media/libstagefright/mpeg2ts/ATSParser.h b/media/libstagefright/mpeg2ts/ATSParser.h index 5d76cbd..75d76dc 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.h +++ b/media/libstagefright/mpeg2ts/ATSParser.h @@ -28,7 +28,7 @@ namespace android { -struct ABitReader; +class ABitReader; struct ABuffer; struct MediaSource; diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index 2ed3ccc..a605595 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -63,8 +63,6 @@ static unsigned parseAC3SyncFrame( const uint8_t *ptr, size_t size, sp<MetaData> *metaData) { static const unsigned channelCountTable[] = {2, 1, 2, 3, 3, 4, 4, 5}; static const unsigned samplingRateTable[] = {48000, 44100, 32000}; - static const unsigned rates[] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, - 320, 384, 448, 512, 576, 640}; static const unsigned frameSizeTable[19][3] = { { 64, 69, 96 }, @@ -89,7 +87,6 @@ static unsigned parseAC3SyncFrame( }; ABitReader bits(ptr, size); - unsigned syncStartPos = 0; // in bytes if (bits.numBitsLeft() < 16) { return 0; } @@ -121,11 +118,11 @@ static unsigned parseAC3SyncFrame( return 0; } - unsigned bsmod = bits.getBits(3); + unsigned bsmod __unused = bits.getBits(3); unsigned acmod = bits.getBits(3); - unsigned cmixlev = 0; - unsigned surmixlev = 0; - unsigned dsurmod = 0; + unsigned cmixlev __unused = 0; + unsigned surmixlev __unused = 0; + unsigned dsurmod __unused = 0; if ((acmod & 1) > 0 && acmod != 1) { if (bits.numBitsLeft() < 2) { @@ -556,7 +553,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitPCMAudio() { CHECK_EQ(bits.getBits(8), 0xa0); unsigned numAUs = bits.getBits(8); bits.skipBits(8); - unsigned quantization_word_length = bits.getBits(2); + unsigned quantization_word_length __unused = bits.getBits(2); unsigned audio_sampling_frequency = bits.getBits(3); unsigned num_channels = bits.getBits(3); @@ -634,7 +631,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() { CHECK_EQ(bits.getBits(12), 0xfffu); bits.skipBits(3); // ID, layer - bool protection_absent = bits.getBits(1) != 0; + bool protection_absent __unused = bits.getBits(1) != 0; if (mFormat == NULL) { unsigned profile = bits.getBits(2); @@ -683,7 +680,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() { return NULL; } - size_t headerSize = protection_absent ? 7 : 9; + size_t headerSize __unused = protection_absent ? 7 : 9; offset += aac_frame_length; // TODO: move back to concatenation when codec can support arbitrary input buffers. diff --git a/media/libstagefright/mpeg2ts/ESQueue.h b/media/libstagefright/mpeg2ts/ESQueue.h index 7c81ff0..eb4b1c9 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.h +++ b/media/libstagefright/mpeg2ts/ESQueue.h @@ -26,7 +26,7 @@ namespace android { struct ABuffer; -struct MetaData; +class MetaData; struct ElementaryStreamQueue { enum Mode { diff --git a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp index 35ca118..1f43d6d 100644 --- a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp +++ b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp @@ -159,7 +159,6 @@ void MPEG2TSExtractor::init() { int numPacketsParsed = 0; while (feedMore() == OK) { - ATSParser::SourceType type; if (haveAudio && haveVideo) { break; } diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 6d46eee..f8d38ff 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -245,8 +245,8 @@ status_t OMX::allocateNode( instance->setHandle(*node, handle); - mLiveNodes.add(observer->asBinder(), instance); - observer->asBinder()->linkToDeath(this); + mLiveNodes.add(IInterface::asBinder(observer), instance); + IInterface::asBinder(observer)->linkToDeath(this); return OK; } @@ -256,7 +256,7 @@ status_t OMX::freeNode(node_id node) { { Mutex::Autolock autoLock(mLock); - ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder()); + ssize_t index = mLiveNodes.indexOfKey(IInterface::asBinder(instance->observer())); if (index < 0) { // This could conceivably happen if the observer dies at roughly the // same time that a client attempts to free the node explicitly. @@ -265,7 +265,7 @@ status_t OMX::freeNode(node_id node) { mLiveNodes.removeItemsAt(index); } - instance->observer()->asBinder()->unlinkToDeath(this); + IInterface::asBinder(instance->observer())->unlinkToDeath(this); status_t err = instance->freeNode(mMaster); diff --git a/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp index b2d3623..d4d6217 100644 --- a/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp +++ b/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp @@ -500,12 +500,12 @@ const uint8_t *SoftVideoEncoderOMXComponent::extractGraphicBuffer( size_t srcStride; size_t srcVStride; if (usingGraphicBuffer) { - if (srcSize < 4 + sizeof(GraphicBuffer *)) { - ALOGE("Metadata is too small (%zu vs %zu)", srcSize, 4 + sizeof(GraphicBuffer *)); + if (srcSize < sizeof(OMX_U32) + sizeof(GraphicBuffer *)) { + ALOGE("Metadata is too small (%zu vs %zu)", srcSize, sizeof(OMX_U32) + sizeof(GraphicBuffer *)); return NULL; } - GraphicBuffer *buffer = *(GraphicBuffer **)(src + 4); + GraphicBuffer *buffer = *(GraphicBuffer **)(src + sizeof(OMX_U32)); handle = buffer->handle; format = buffer->format; srcStride = buffer->stride; @@ -519,12 +519,12 @@ const uint8_t *SoftVideoEncoderOMXComponent::extractGraphicBuffer( } else { // TODO: remove this part. Check if anyone uses this. - if (srcSize < 4 + sizeof(buffer_handle_t)) { - ALOGE("Metadata is too small (%zu vs %zu)", srcSize, 4 + sizeof(buffer_handle_t)); + if (srcSize < sizeof(OMX_U32) + sizeof(buffer_handle_t)) { + ALOGE("Metadata is too small (%zu vs %zu)", srcSize, sizeof(OMX_U32) + sizeof(buffer_handle_t)); return NULL; } - handle = *(buffer_handle_t *)(src + 4); + handle = *(buffer_handle_t *)(src + sizeof(OMX_U32)); // assume HAL_PIXEL_FORMAT_RGBA_8888 // there is no way to get the src stride without the graphic buffer format = HAL_PIXEL_FORMAT_RGBA_8888; diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index f4dfd6b..67ff145 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -253,29 +253,6 @@ static sp<MediaExtractor> CreateExtractorFromURI(const char *uri) { return MediaExtractor::Create(source); } -static sp<MediaSource> MakeSource( - const char *uri, - const char *mimeType) { - sp<MediaExtractor> extractor = CreateExtractorFromURI(uri); - - if (extractor == NULL) { - return NULL; - } - - for (size_t i = 0; i < extractor->countTracks(); ++i) { - sp<MetaData> meta = extractor->getTrackMetaData(i); - - const char *trackMIME; - CHECK(meta->findCString(kKeyMIMEType, &trackMIME)); - - if (!strcasecmp(trackMIME, mimeType)) { - return extractor->getTrack(i); - } - } - - return NULL; -} - status_t Harness::testStateTransitions( const char *componentName, const char *componentRole) { if (strncmp(componentName, "OMX.", 4)) { diff --git a/media/libstagefright/rtsp/AAMRAssembler.cpp b/media/libstagefright/rtsp/AAMRAssembler.cpp index 9e8725a..bb2a238 100644 --- a/media/libstagefright/rtsp/AAMRAssembler.cpp +++ b/media/libstagefright/rtsp/AAMRAssembler.cpp @@ -143,8 +143,8 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( return MALFORMED_PACKET; } - unsigned payloadHeader = buffer->data()[0]; - unsigned CMR = payloadHeader >> 4; + unsigned payloadHeader __unused = buffer->data()[0]; + unsigned CMR __unused = payloadHeader >> 4; Vector<uint8_t> tableOfContents; diff --git a/media/libstagefright/rtsp/AMPEG2TSAssembler.h b/media/libstagefright/rtsp/AMPEG2TSAssembler.h index 712e18e..f39c2b5 100644 --- a/media/libstagefright/rtsp/AMPEG2TSAssembler.h +++ b/media/libstagefright/rtsp/AMPEG2TSAssembler.h @@ -24,7 +24,7 @@ namespace android { struct AMessage; struct AString; -struct MetaData; +class MetaData; struct AMPEG2TSAssembler : public ARTPAssembler { AMPEG2TSAssembler( diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp index aa8ffc6..1f76068 100644 --- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp @@ -108,7 +108,7 @@ static status_t parseAudioObjectType( static status_t parseGASpecificConfig( ABitReader *bits, unsigned audioObjectType, unsigned channelConfiguration) { - unsigned frameLengthFlag = bits->getBits(1); + unsigned frameLengthFlag __unused = bits->getBits(1); unsigned dependsOnCoreCoder = bits->getBits(1); if (dependsOnCoreCoder) { /* unsigned coreCoderDelay = */bits->getBits(1); @@ -217,7 +217,7 @@ static status_t parseAudioSpecificConfig(ABitReader *bits, sp<ABuffer> *asc) { // Apparently an extension is always considered an even // multiple of 8 bits long. - ALOGI("Skipping %d bits after sync extension", + ALOGI("Skipping %zu bits after sync extension", 8 - (numBitsInExtension & 7)); bits->skipBits(8 - (numBitsInExtension & 7)); @@ -422,7 +422,7 @@ sp<ABuffer> AMPEG4AudioAssembler::removeLATMFraming(const sp<ABuffer> &buffer) { } if (offset < buffer->size()) { - ALOGI("ignoring %d bytes of trailing data", buffer->size() - offset); + ALOGI("ignoring %zu bytes of trailing data", buffer->size() - offset); } CHECK_LE(offset, buffer->size()); diff --git a/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp b/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp index 7eb6542..156004c 100644 --- a/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp @@ -360,7 +360,7 @@ ARTPAssembler::AssemblyStatus AMPEG4ElementaryAssembler::addPacket( } if (offset != buffer->size()) { - ALOGW("potentially malformed packet (offset %d, size %d)", + ALOGW("potentially malformed packet (offset %zu, size %zu)", offset, buffer->size()); } } diff --git a/media/libstagefright/rtsp/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp index 09f52bc..cfafaa7 100644 --- a/media/libstagefright/rtsp/APacketSource.cpp +++ b/media/libstagefright/rtsp/APacketSource.cpp @@ -279,8 +279,6 @@ sp<ABuffer> MakeAACCodecSpecificData2(const char *params) { // be encoded. CHECK_LT(20 + config->size(), 128u); - const uint8_t *data = config->data(); - static const uint8_t kStaticESDS[] = { 0x03, 22, 0x00, 0x00, // ES_ID diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp index 372fbe9..a6bd824 100644 --- a/media/libstagefright/rtsp/ARTPConnection.cpp +++ b/media/libstagefright/rtsp/ARTPConnection.cpp @@ -664,11 +664,10 @@ void ARTPConnection::onInjectPacket(const sp<AMessage> &msg) { StreamInfo *s = &*it; - status_t err; if (it->mRTPSocket == index) { - err = parseRTP(s, buffer); + parseRTP(s, buffer); } else { - err = parseRTCP(s, buffer); + parseRTCP(s, buffer); } } diff --git a/media/libstagefright/rtsp/ARawAudioAssembler.h b/media/libstagefright/rtsp/ARawAudioAssembler.h index ed7af08..bc1dea6 100644 --- a/media/libstagefright/rtsp/ARawAudioAssembler.h +++ b/media/libstagefright/rtsp/ARawAudioAssembler.h @@ -24,7 +24,7 @@ namespace android { struct AMessage; struct AString; -struct MetaData; +class MetaData; struct ARawAudioAssembler : public ARTPAssembler { ARawAudioAssembler( diff --git a/media/libstagefright/rtsp/SDPLoader.cpp b/media/libstagefright/rtsp/SDPLoader.cpp index 424badf..a24eb69 100644 --- a/media/libstagefright/rtsp/SDPLoader.cpp +++ b/media/libstagefright/rtsp/SDPLoader.cpp @@ -105,7 +105,7 @@ void SDPLoader::onLoad(const sp<AMessage> &msg) { headers = NULL; } - off64_t sdpSize; + off64_t sdpSize = 0; if (err == OK && !mCancelled) { err = mHTTPDataSource->getSize(&sdpSize); diff --git a/media/libstagefright/tests/Android.mk b/media/libstagefright/tests/Android.mk index 99b480ad..8d6ff5b 100644 --- a/media/libstagefright/tests/Android.mk +++ b/media/libstagefright/tests/Android.mk @@ -1,8 +1,7 @@ # Build the unit tests. LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) - -ifneq ($(TARGET_SIMULATOR),true) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := SurfaceMediaSource_test @@ -22,33 +21,23 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright \ libstagefright_foundation \ libstagefright_omx \ - libstlport \ libsync \ libui \ libutils \ liblog -LOCAL_STATIC_LIBRARIES := \ - libgtest \ - libgtest_main \ - LOCAL_C_INCLUDES := \ - bionic \ - bionic/libstdc++/include \ - external/gtest/include \ - external/stlport/stlport \ frameworks/av/media/libstagefright \ frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax \ LOCAL_32_BIT_ONLY := true -include $(BUILD_EXECUTABLE) - -endif +include $(BUILD_NATIVE_TEST) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := Utils_test @@ -64,23 +53,14 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright \ libstagefright_foundation \ libstagefright_omx \ - libstlport \ - -LOCAL_STATIC_LIBRARIES := \ - libgtest \ - libgtest_main \ LOCAL_C_INCLUDES := \ - bionic \ - bionic/libstdc++/include \ - external/gtest/include \ - external/stlport/stlport \ frameworks/av/include \ frameworks/av/media/libstagefright \ frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax \ -include $(BUILD_EXECUTABLE) +include $(BUILD_NATIVE_TEST) # Include subdirectory makefiles # ============================================================ diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp index 71aa21e..55a9803 100644 --- a/media/libstagefright/timedtext/TimedTextDriver.cpp +++ b/media/libstagefright/timedtext/TimedTextDriver.cpp @@ -133,7 +133,7 @@ status_t TimedTextDriver::selectTrack(size_t index) { } mPlayer->start(); break; - defaut: + default: TRESPASS(); } return ret; @@ -181,7 +181,7 @@ status_t TimedTextDriver::seekToAsync(int64_t timeUs) { case PLAYING: mPlayer->seekToAsync(timeUs); return OK; - defaut: + default: TRESPASS(); } return UNKNOWN_ERROR; diff --git a/media/libstagefright/timedtext/TimedTextPlayer.h b/media/libstagefright/timedtext/TimedTextPlayer.h index ec8ed25..9cb49ec 100644 --- a/media/libstagefright/timedtext/TimedTextPlayer.h +++ b/media/libstagefright/timedtext/TimedTextPlayer.h @@ -27,7 +27,7 @@ namespace android { -class AMessage; +struct AMessage; class MediaPlayerBase; class TimedTextDriver; class TimedTextSource; diff --git a/media/libstagefright/timedtext/TimedTextSRTSource.h b/media/libstagefright/timedtext/TimedTextSRTSource.h index 598c200..232675e 100644 --- a/media/libstagefright/timedtext/TimedTextSRTSource.h +++ b/media/libstagefright/timedtext/TimedTextSRTSource.h @@ -25,7 +25,7 @@ namespace android { -class AString; +struct AString; class DataSource; class MediaBuffer; class Parcel; diff --git a/media/libstagefright/webm/WebmWriter.cpp b/media/libstagefright/webm/WebmWriter.cpp index 03cf92a..069961b 100644 --- a/media/libstagefright/webm/WebmWriter.cpp +++ b/media/libstagefright/webm/WebmWriter.cpp @@ -333,7 +333,6 @@ status_t WebmWriter::reset() { serializeCodedUnsigned(segmentSizeCoded, bary); ::write(mFd, bary, sizeOf(kMkvUnknownLength)); - uint64_t size; uint64_t durationOffset = mInfoOffset + sizeOf(kMkvInfo) + sizeOf(mInfoSize) + sizeOf(kMkvSegmentDuration) + sizeOf(sizeof(double)); sp<WebmElement> duration = new WebmFloat( diff --git a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp index da405e2..0c39ccf 100644 --- a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp +++ b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp @@ -43,6 +43,10 @@ namespace android { // static +const int64_t WifiDisplaySource::kReaperIntervalUs; +const int64_t WifiDisplaySource::kTeardownTriggerTimeouSecs; +const int64_t WifiDisplaySource::kPlaybackSessionTimeoutSecs; +const int64_t WifiDisplaySource::kPlaybackSessionTimeoutUs; const AString WifiDisplaySource::sUserAgent = MakeUserAgent(); WifiDisplaySource::WifiDisplaySource( |