Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f5e46d2 authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by android-build-merger
Browse files

Merge changes Icd9d4af6,I55f931b3 into nyc-dev

am: 4fa4c691

* commit '4fa4c691':
  codecs: fix MPEG2 decoder resolution change
  codecs: fix AVC decoder resolution change

Change-Id: I89c48de626d13cbd2e6a20dc9da9c62a74aed33c
parents b1302149 4fa4c691
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -638,6 +638,8 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
                mChangingResolution = false;
                resetDecoder();
                resetPlugin();
                mStride = outputBufferWidth();
                setParams(mStride);
                continue;
            }

+14 −2
Original line number Diff line number Diff line
@@ -74,7 +74,8 @@ SoftMPEG2::SoftMPEG2(
      mIvColorFormat(IV_YUV_420P),
      mNewWidth(mWidth),
      mNewHeight(mHeight),
      mChangingResolution(false) {
      mChangingResolution(false),
      mStride(mWidth) {
    initPorts(kNumBuffers, INPUT_BUF_SIZE, kNumBuffers, CODEC_MIME_TYPE);

    // If input dump is enabled, then open create an empty file
@@ -202,6 +203,8 @@ status_t SoftMPEG2::resetDecoder() {
    /* Set number of cores/threads to be used by the codec */
    setNumCores();

    mStride = 0;

    return OK;
}

@@ -384,7 +387,8 @@ status_t SoftMPEG2::initDecoder() {
    resetPlugin();

    /* Set the run time (dynamic) parameters */
    setParams(displayStride);
    mStride = outputBufferWidth();
    setParams(mStride);

    /* Set number of cores/threads to be used by the codec */
    setNumCores();
@@ -548,6 +552,12 @@ void SoftMPEG2::onQueueFilled(OMX_U32 portIndex) {
    List<BufferInfo *> &inQueue = getPortQueue(kInputPortIndex);
    List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);

    if (outputBufferWidth() != mStride) {
        /* Set the run-time (dynamic) parameters */
        mStride = outputBufferWidth();
        setParams(mStride);
    }

    /* If input EOS is seen and decoder is not in flush mode,
     * set the decoder in flush mode.
     * There can be a case where EOS is sent along with last picture data
@@ -686,6 +696,8 @@ void SoftMPEG2::onQueueFilled(OMX_U32 portIndex) {
                mChangingResolution = false;
                resetDecoder();
                resetPlugin();
                mStride = outputBufferWidth();
                setParams(mStride);
                continue;
            }

+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ private:
    bool mChangingResolution;
    bool mFlushNeeded;
    bool mWaitForI;
    size_t mStride;

    status_t initDecoder();
    status_t deInitDecoder();