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

Commit 2fe71919 authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Let QCOM encoders set their own defaults

 * The 8x50 decoder only supports baseline profiles. Don't
   bail if Stagefright tries to set something else, let the
   encoder decide instead.

Change-Id: I4ded9ed4d278f9d8a019168597b87205229f1af8
parent 297468b0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -402,6 +402,7 @@ uint32_t OMXCodec::getComponentQuirks(
        quirks |= kRequiresLoadedToIdleAfterAllocation;
        quirks |= kRequiresAllocateBufferOnInputPorts;
        quirks |= kRequiresAllocateBufferOnOutputPorts;
        quirks |= kCanNotSetVideoParameters;
        if (!strncmp(componentName, "OMX.qcom.video.encoder.avc", 26)) {

            // The AVC encoder advertises the size of output buffers
@@ -414,7 +415,6 @@ uint32_t OMXCodec::getComponentQuirks(
    }
    if (!strncmp(componentName, "OMX.qcom.7x30.video.encoder.", 28)) {
        quirks |= kAvoidMemcopyInputRecordingFrames;
    //    quirks |= kRequiresFlushBeforeShutdown;
        quirks |= kCanNotSetVideoParameters;
    }
    if (!strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
@@ -422,7 +422,6 @@ uint32_t OMXCodec::getComponentQuirks(
        quirks |= kDefersOutputBufferAllocation;
    }
    if (!strncmp(componentName, "OMX.qcom.7x30.video.decoder.", 28)) {
    //    quirks |= kRequiresFlushBeforeShutdown;
        quirks |= kRequiresAllocateBufferOnInputPorts;
        quirks |= kRequiresAllocateBufferOnOutputPorts;
        quirks |= kDefersOutputBufferAllocation;
@@ -1309,7 +1308,7 @@ status_t OMXCodec::setupAVCEncoderParameters(const sp<MetaData>& meta) {
    defaultProfileLevel.mProfile = h264type.eProfile;
    defaultProfileLevel.mLevel = h264type.eLevel;
    err = getVideoProfileLevel(meta, defaultProfileLevel, profileLevel);
    if (err != OK) return err;
    if (!(mQuirks & kCanNotSetVideoParameters) && err != OK) return err;
    h264type.eProfile = static_cast<OMX_VIDEO_AVCPROFILETYPE>(profileLevel.mProfile);
    h264type.eLevel = static_cast<OMX_VIDEO_AVCLEVELTYPE>(profileLevel.mLevel);