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

Commit 811731c8 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8567972 from d4bdf50a to tm-qpr1-release

Change-Id: I4cfe63d2dd1a3792805877eb27a15cf503271df8
parents a31a4479 d4bdf50a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1072,6 +1072,13 @@ status_t CCodecConfig::initialize(
                    C2_PARAMKEY_SURFACE_SCALING_MODE);
        } else {
            addLocalParam(new C2StreamColorAspectsInfo::input(0u), C2_PARAMKEY_COLOR_ASPECTS);

            if (domain.value == C2Component::DOMAIN_VIDEO) {
                addLocalParam(new C2AndroidStreamAverageBlockQuantizationInfo::output(0u, 0),
                              C2_PARAMKEY_AVERAGE_QP);
                addLocalParam(new C2StreamPictureTypeMaskInfo::output(0u, 0),
                              C2_PARAMKEY_PICTURE_TYPE);
            }
        }
    }

+4 −2
Original line number Diff line number Diff line
@@ -57,8 +57,10 @@ interface ISpatializer {
    boolean isHeadTrackingSupported();

    /** Reports the list of supported head tracking modes (see SpatializerHeadTrackingMode.aidl).
     * The list can be empty if the spatializer implementation does not support head tracking or if
     * no head tracking sensor is registered (see setHeadSensor() and setScreenSensor()).
     * The list always contains SpatializerHeadTrackingMode.DISABLED and can include other modes
     * if the spatializer effect implementation supports head tracking.
     * The result does not depend on currently connected sensors but reflects the capabilities
     * when sensors are available.
     */
    SpatializerHeadTrackingMode[] getSupportedHeadTrackingModes();

+0 −20
Original line number Diff line number Diff line
@@ -158,7 +158,6 @@ class SensorPoseProviderImpl : public SensorPoseProvider {
    enum DataFormat {
        kUnknown,
        kQuaternion,
        kRotationVectorsAndFlags,
        kRotationVectorsAndDiscontinuityCount,
    };

@@ -283,10 +282,6 @@ class SensorPoseProviderImpl : public SensorPoseProvider {
            return DataFormat::kRotationVectorsAndDiscontinuityCount;
        }

        if (sensor->getStringType() == "com.google.hardware.sensor.hid_dynamic.headtracker") {
            return DataFormat::kRotationVectorsAndFlags;
        }

        return DataFormat::kUnknown;
    }

@@ -332,21 +327,6 @@ class SensorPoseProviderImpl : public SensorPoseProvider {
                return PoseEvent{Pose3f(quat), std::optional<Twist3f>(), false};
            }

            case DataFormat::kRotationVectorsAndFlags: {
                // Custom sensor, assumed to contain:
                // 3 floats representing orientation as a rotation vector (in rad).
                // 3 floats representing angular velocity as a rotation vector (in rad/s).
                // 1 uint32_t of flags, where:
                // - LSb is '1' iff the given sample is the first one in a new frame of reference.
                // - The rest of the bits are reserved for future use.
                Eigen::Vector3f rotation = {event.data[0], event.data[1], event.data[2]};
                Eigen::Vector3f twist = {event.data[3], event.data[4], event.data[5]};
                Eigen::Quaternionf quat = rotationVectorToQuaternion(rotation);
                uint32_t flags = *reinterpret_cast<const uint32_t*>(&event.data[6]);
                return PoseEvent{Pose3f(quat), Twist3f(Eigen::Vector3f::Zero(), twist),
                                 (flags & (1 << 0)) != 0};
            }

            case DataFormat::kRotationVectorsAndDiscontinuityCount: {
                Eigen::Vector3f rotation = {event.head_tracker.rx, event.head_tracker.ry,
                                            event.head_tracker.rz};
+56 −1
Original line number Diff line number Diff line
@@ -521,9 +521,64 @@ status_t MetaDataBase::updateFromParcel(const Parcel &parcel) {
                }
                setData(key, type, blob.data(), size);
                blob.release();
            } else if (type == TYPE_C_STRING) {
                // copy data directly from Parcel storage, then advance position
                // NB: readInplace() bumps position, it is NOT idempotent.
                const void *src = parcel.readInplace(size);
                char *str = (char *) src;
                if (src == nullptr || size == 0 || str[size-1] != '\0') {
                    char ccKey[5];
                    MakeFourCCString(key, ccKey);
                    if (src == nullptr) {
                        ALOGW("ignoring key '%s' string with no data (expected %d)", ccKey, size);
                    } else {
                        ALOGW("ignoring key '%s': unterminated string of %d bytes", ccKey, size);
                    }
                } else {
                    setData(key, type, src, size);
                }
            } else {
                // copy data directly from Parcel storage, then advance position
                setData(key, type, parcel.readInplace(size), size);
                // verify that the received size is enough
                uint32_t needed = 0;
                switch (type) {
                    case TYPE_INT32:
                        needed = sizeof(int32_t);
                        break;
                    case TYPE_INT64:
                        needed = sizeof(int64_t);
                        break;
                    case TYPE_FLOAT:
                        needed = sizeof(float);
                        break;
                    case TYPE_POINTER:
                        // NB: this rejects passing between 32-bit and 64-bit space.
                        needed = sizeof(void*);
                        break;
                    case TYPE_RECT:
                        needed = sizeof(Rect);
                        break;
                    default:
                        // non-standard entities can be any size >= 0
                        needed = 0;
                        break;
                }
                const void *src = parcel.readInplace(size);
                if (src == nullptr || (needed != 0 && size != needed)) {
                    char ccKey[5];
                    MakeFourCCString(key, ccKey);
                    char ccType[5];
                    MakeFourCCString(type, ccType);
                    if (src == nullptr) {
                        ALOGW("ignoring key '%s' type '%s' missing data (expected %d)",
                              ccKey, ccType, size);
                    } else {
                        ALOGW("ignoring key '%s': type '%s' bytes: expected %d != %d received",
                               ccKey, ccType, needed, size);
                    }
                } else {
                    setData(key, type, src, size);
                }
            }
         }

+1 −11
Original line number Diff line number Diff line
@@ -11,17 +11,7 @@
                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
        </mixPort>
        <!-- Le Audio Audio Ports -->
        <mixPort name="le audio output" role="source">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="8000,16000,24000,32000,44100,48000"
                     channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
            <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
                     samplingRates="8000,16000,24000,32000,44100,48000"
                     channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
            <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
                     samplingRates="8000,16000,24000,32000,44100,48000"
                     channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
        </mixPort>
        <mixPort name="le audio output" role="source"/>
        <mixPort name="le audio input" role="sink">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="8000,16000,24000,32000,44100,48000"
Loading