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

Commit f9d062b3 authored by Alice Kuo's avatar Alice Kuo
Browse files

Update language to comply with Android's inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for reference


Bug: 161896447
Change-Id: Ib602baa8cd73ffc6961ebe3915930893fb499a5b
parent 8fd831a5
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -887,7 +887,7 @@ status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) {

            sp<DataConverter> converter = mConverter[portIndex];
            if (converter != NULL) {
                // here we assume sane conversions of max 4:1, so result fits in int32
                // here we assume conversions of max 4:1, so result fits in int32
                if (portIndex == kPortIndexInput) {
                    conversionBufferSize = converter->sourceSize(bufSize);
                } else {
@@ -2538,15 +2538,15 @@ status_t ACodec::configureTemporalLayers(
    unsigned int numLayers = 0;
    unsigned int numBLayers = 0;
    int tags;
    char dummy;
    char tmp;
    OMX_VIDEO_ANDROID_TEMPORALLAYERINGPATTERNTYPE pattern =
        OMX_VIDEO_AndroidTemporalLayeringPatternNone;
    if (sscanf(tsSchema.c_str(), "webrtc.vp8.%u-layer%c", &numLayers, &dummy) == 1
    if (sscanf(tsSchema.c_str(), "webrtc.vp8.%u-layer%c", &numLayers, &tmp) == 1
            && numLayers > 0) {
        pattern = OMX_VIDEO_AndroidTemporalLayeringPatternWebRTC;
    } else if ((tags = sscanf(tsSchema.c_str(), "android.generic.%u%c%u%c",
                    &numLayers, &dummy, &numBLayers, &dummy))
            && (tags == 1 || (tags == 3 && dummy == '+'))
                    &numLayers, &tmp, &numBLayers, &tmp))
            && (tags == 1 || (tags == 3 && tmp == '+'))
            && numLayers > 0 && numLayers < UINT32_MAX - numBLayers) {
        numLayers += numBLayers;
        pattern = OMX_VIDEO_AndroidTemporalLayeringPatternAndroid;
@@ -4691,15 +4691,15 @@ status_t ACodec::setupVPXEncoderParameters(const sp<AMessage> &msg, sp<AMessage>
        unsigned int numLayers = 0;
        unsigned int numBLayers = 0;
        int tags;
        char dummy;
        if (sscanf(tsSchema.c_str(), "webrtc.vp8.%u-layer%c", &numLayers, &dummy) == 1
        char tmp;
        if (sscanf(tsSchema.c_str(), "webrtc.vp8.%u-layer%c", &numLayers, &tmp) == 1
                && numLayers > 0) {
            pattern = OMX_VIDEO_VPXTemporalLayerPatternWebRTC;
            tsType = OMX_VIDEO_AndroidTemporalLayeringPatternWebRTC;
            tsLayers = numLayers;
        } else if ((tags = sscanf(tsSchema.c_str(), "android.generic.%u%c%u%c",
                        &numLayers, &dummy, &numBLayers, &dummy))
                && (tags == 1 || (tags == 3 && dummy == '+'))
                        &numLayers, &tmp, &numBLayers, &tmp))
                && (tags == 1 || (tags == 3 && tmp == '+'))
                && numLayers > 0 && numLayers < UINT32_MAX - numBLayers) {
            pattern = OMX_VIDEO_VPXTemporalLayerPatternWebRTC;
            // VPX does not have a concept of B-frames, so just count all layers
@@ -7549,8 +7549,8 @@ status_t ACodec::setParameters(const sp<AMessage> &params) {
        mInputFormat->setInt64("android._stop-time-offset-us", stopTimeOffsetUs);
    }

    int32_t dummy;
    if (params->findInt32("request-sync", &dummy)) {
    int32_t tmp;
    if (params->findInt32("request-sync", &tmp)) {
        status_t err = requestIDRFrame();

        if (err != OK) {
+2 −2
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ CDrcPresModeWrapper::update()
        }
        else { // handle other used encoder target levels

            // Sanity check: DRC presentation mode is only specified for max. 5.1 channels
            // Validation check: DRC presentation mode is only specified for max. 5.1 channels
            if (mStreamNrAACChan > 6) {
                drcPresMode = 0;
            }
@@ -309,7 +309,7 @@ CDrcPresModeWrapper::update()
            } // switch()
        } // if (mEncoderTarget  == GPM_ENCODER_TARGET_LEVEL)

        // sanity again
        // validation check again
        if (newHeavy == 1) {
            newBoostFactor=127; // not really needed as the same would be done by the decoder anyway
            newAttFactor = 127;
+2 −2
Original line number Diff line number Diff line
@@ -1106,7 +1106,7 @@ MR475_gain_quant( // o : index of quantization.
    // the real, quantized gains)
    gc_pred(pred_st, MR475, sf1_code_nosharp,
            &sf1_exp_gcode0, &sf1_frac_gcode0,
            &sf0_exp_gcode0, &sf0_gcode0); // last two args are dummy
            &sf0_exp_gcode0, &sf0_gcode0); // last two args are unused
    sf1_gcode0 = extract_l(Pow2(14, sf1_frac_gcode0));

    tmp = add (tmp, 2);
@@ -1426,7 +1426,7 @@ Word16 MR475_gain_quant( /* o : index of quantization. */
       the real, quantized gains)                                   */
    gc_pred(pred_st, MR475, sf1_code_nosharp,
            &sf1_exp_gcode0, &sf1_frac_gcode0,
            &sf0_exp_gcode0, &sf0_gcode0, /* dummy args */
            &sf0_exp_gcode0, &sf0_gcode0, /* unused args */
            pOverflow);

    sf1_gcode0 = (Word16)(Pow2(14, sf1_frac_gcode0, pOverflow));
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ protected:
    enum IA : int32_t { };
};

// =========== basic sanity tests for type-support templates
// =========== basic tests for type-support templates
TEST_F(TypeTraitsTest, StaticTests) {

    // ============ is_integral_or_enum