/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include using namespace Aws::Utils; namespace Aws { namespace MediaConvert { namespace Model { namespace Av1SpatialAdaptiveQuantizationMapper { static const int DISABLED_HASH = HashingUtils::HashString("DISABLED"); static const int ENABLED_HASH = HashingUtils::HashString("ENABLED"); Av1SpatialAdaptiveQuantization GetAv1SpatialAdaptiveQuantizationForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == DISABLED_HASH) { return Av1SpatialAdaptiveQuantization::DISABLED; } else if (hashCode == ENABLED_HASH) { return Av1SpatialAdaptiveQuantization::ENABLED; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast(hashCode); } return Av1SpatialAdaptiveQuantization::NOT_SET; } Aws::String GetNameForAv1SpatialAdaptiveQuantization(Av1SpatialAdaptiveQuantization enumValue) { switch(enumValue) { case Av1SpatialAdaptiveQuantization::DISABLED: return "DISABLED"; case Av1SpatialAdaptiveQuantization::ENABLED: return "ENABLED"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast(enumValue)); } return {}; } } } // namespace Av1SpatialAdaptiveQuantizationMapper } // namespace Model } // namespace MediaConvert } // namespace Aws