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

Commit 9e8dfb59 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Fix NPDs in h263 decoder" into klp-dev

am: 012e5fd3

Change-Id: I2ad3e1364472558cf48c51fb3e2a08002d74c32d
parents f71b76ca 012e5fd3
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -15,6 +15,10 @@
 * and limitations under the License.
 * -------------------------------------------------------------------
 */

#define LOG_TAG "m4v_h263"
#include <log/log.h>

/*
------------------------------------------------------------------------------
 INPUT AND OUTPUT DEFINITIONS
@@ -236,6 +240,11 @@ void MBMotionComp(

    /* Pointer to previous luminance frame */
    c_prev  = prev->yChan;
    if (!c_prev) {
        ALOGE("b/35269635");
        android_errorWriteLog(0x534e4554, "35269635");
        return;
    }

    pred_block = video->mblock->pred_block;

@@ -574,7 +583,14 @@ void SkippedMBMotionComp(

    /* zero motion compensation for previous frame */
    /*mby*width + mbx;*/
    c_prev  = prev->yChan + offset;
    c_prev  = prev->yChan;
    if (!c_prev) {
        ALOGE("b/35269635");
        android_errorWriteLog(0x534e4554, "35269635");
        return;
    }
    c_prev += offset;

    /*by*width_uv + bx;*/
    cu_prev = prev->uChan + (offset >> 2) + (xpos >> 2);
    /*by*width_uv + bx;*/
+7 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 * and limitations under the License.
 * -------------------------------------------------------------------
 */
#define LOG_TAG "pvdec_api"
#include <log/log.h>
#include "mp4dec_lib.h"
#include "vlc_decode.h"
#include "bitstream.h"
@@ -1330,6 +1332,11 @@ Bool PVDecodeVopBody(VideoDecControls *decCtrl, int32 buffer_size[])
            }
        }

        if (!video->prevVop->yChan) {
            ALOGE("b/35269635");
            android_errorWriteLog(0x534e4554, "35269635");
            return PV_FALSE;
        }
        oscl_memcpy(currVop->yChan, video->prevVop->yChan, (decCtrl->size*3) / 2);

        video->prevVop = prevVop;