Loading media/codec2/vndk/util/C2InterfaceUtils.cpp +23 −9 Original line number Diff line number Diff line Loading @@ -216,9 +216,14 @@ C2SupportedFlags<T> C2SupportedFlags<T>::limitedTo(const C2SupportedFlags<T> &li if (limit.contains(minMask) && contains(minMask)) { values[0] = minMask; // keep only flags that are covered by limit std::remove_if(values.begin(), values.end(), [&limit, minMask](const C2Value::Primitive &v) -> bool { values.erase(std::remove_if(values.begin(), values.end(), [&limit, minMask]( const C2Value::Primitive &v) -> bool { T value = v.ref<ValueType>() | minMask; return value == minMask || !limit.contains(value); }); return value == minMask || !limit.contains(value); }), values.end()); // we also need to do it vice versa for (const C2Value::Primitive &v : _mValues) { T value = v.ref<ValueType>() | minMask; Loading Loading @@ -264,24 +269,33 @@ bool C2SupportedValueSet<T>::contains(T value) const { template<typename T> C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedValueSet<T> &limit) const { std::vector<C2Value::Primitive> values = _mValues; // make a copy std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }); values.erase(std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }), values.end()); return C2SupportedValueSet(std::move(values)); } template<typename T> C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedRange<T> &limit) const { std::vector<C2Value::Primitive> values = _mValues; // make a copy std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }); values.erase(std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }), values.end()); return C2SupportedValueSet(std::move(values)); } template<typename T> C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedFlags<T> &limit) const { std::vector<C2Value::Primitive> values = _mValues; // make a copy std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }); values.erase(std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }), values.end()); return C2SupportedValueSet(std::move(values)); } Loading media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -1906,11 +1906,15 @@ int Reverb_command(effect_handle_t self, //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_GET_PARAM start"); effect_param_t *p = (effect_param_t *)pCmdData; if (pCmdData == nullptr) { ALOGW("\tLVM_ERROR : pCmdData is NULL"); return -EINVAL; } if (SIZE_MAX - sizeof(effect_param_t) < (size_t)p->psize) { android_errorWriteLog(0x534e4554, "26347509"); return -EINVAL; } if (pCmdData == NULL || cmdSize < sizeof(effect_param_t) || if (cmdSize < sizeof(effect_param_t) || cmdSize < (sizeof(effect_param_t) + p->psize) || pReplyData == NULL || replySize == NULL || *replySize < (sizeof(effect_param_t) + p->psize)) { Loading media/libstagefright/omx/SoftOMXPlugin.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -34,12 +34,7 @@ static const struct { const char *mRole; } kComponents[] = { // two choices for aac decoding. // configurable in media/libstagefright/data/media_codecs_google_audio.xml // default implementation { "OMX.google.aac.decoder", "aacdec", "audio_decoder.aac" }, // alternate implementation { "OMX.google.xaac.decoder", "xaacdec", "audio_decoder.aac" }, { "OMX.google.aac.encoder", "aacenc", "audio_encoder.aac" }, { "OMX.google.amrnb.decoder", "amrdec", "audio_decoder.amrnb" }, { "OMX.google.amrnb.encoder", "amrnbenc", "audio_encoder.amrnb" }, Loading Loading
media/codec2/vndk/util/C2InterfaceUtils.cpp +23 −9 Original line number Diff line number Diff line Loading @@ -216,9 +216,14 @@ C2SupportedFlags<T> C2SupportedFlags<T>::limitedTo(const C2SupportedFlags<T> &li if (limit.contains(minMask) && contains(minMask)) { values[0] = minMask; // keep only flags that are covered by limit std::remove_if(values.begin(), values.end(), [&limit, minMask](const C2Value::Primitive &v) -> bool { values.erase(std::remove_if(values.begin(), values.end(), [&limit, minMask]( const C2Value::Primitive &v) -> bool { T value = v.ref<ValueType>() | minMask; return value == minMask || !limit.contains(value); }); return value == minMask || !limit.contains(value); }), values.end()); // we also need to do it vice versa for (const C2Value::Primitive &v : _mValues) { T value = v.ref<ValueType>() | minMask; Loading Loading @@ -264,24 +269,33 @@ bool C2SupportedValueSet<T>::contains(T value) const { template<typename T> C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedValueSet<T> &limit) const { std::vector<C2Value::Primitive> values = _mValues; // make a copy std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }); values.erase(std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }), values.end()); return C2SupportedValueSet(std::move(values)); } template<typename T> C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedRange<T> &limit) const { std::vector<C2Value::Primitive> values = _mValues; // make a copy std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }); values.erase(std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }), values.end()); return C2SupportedValueSet(std::move(values)); } template<typename T> C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedFlags<T> &limit) const { std::vector<C2Value::Primitive> values = _mValues; // make a copy std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }); values.erase(std::remove_if(values.begin(), values.end(), [&limit](const C2Value::Primitive &v) -> bool { return !limit.contains(v.ref<ValueType>()); }), values.end()); return C2SupportedValueSet(std::move(values)); } Loading
media/libeffects/lvm/wrapper/Reverb/EffectReverb.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -1906,11 +1906,15 @@ int Reverb_command(effect_handle_t self, //ALOGV("\tReverb_command cmdCode Case: " // "EFFECT_CMD_GET_PARAM start"); effect_param_t *p = (effect_param_t *)pCmdData; if (pCmdData == nullptr) { ALOGW("\tLVM_ERROR : pCmdData is NULL"); return -EINVAL; } if (SIZE_MAX - sizeof(effect_param_t) < (size_t)p->psize) { android_errorWriteLog(0x534e4554, "26347509"); return -EINVAL; } if (pCmdData == NULL || cmdSize < sizeof(effect_param_t) || if (cmdSize < sizeof(effect_param_t) || cmdSize < (sizeof(effect_param_t) + p->psize) || pReplyData == NULL || replySize == NULL || *replySize < (sizeof(effect_param_t) + p->psize)) { Loading
media/libstagefright/omx/SoftOMXPlugin.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -34,12 +34,7 @@ static const struct { const char *mRole; } kComponents[] = { // two choices for aac decoding. // configurable in media/libstagefright/data/media_codecs_google_audio.xml // default implementation { "OMX.google.aac.decoder", "aacdec", "audio_decoder.aac" }, // alternate implementation { "OMX.google.xaac.decoder", "xaacdec", "audio_decoder.aac" }, { "OMX.google.aac.encoder", "aacenc", "audio_encoder.aac" }, { "OMX.google.amrnb.decoder", "amrdec", "audio_decoder.amrnb" }, { "OMX.google.amrnb.encoder", "amrnbenc", "audio_encoder.amrnb" }, Loading