mirror of
https://github.com/Vita3K/Vita3K.git
synced 2026-07-11 01:34:23 +02:00
@@ -25,8 +25,6 @@
|
||||
|
||||
TRACY_MODULE_NAME(SceAudiodecUser);
|
||||
|
||||
BOOST_DESCRIBE_ENUM(SceAudiodecCodec, SCE_AUDIODEC_TYPE_AT9, SCE_AUDIODEC_TYPE_MP3, SCE_AUDIODEC_TYPE_AAC, SCE_AUDIODEC_TYPE_CELP)
|
||||
|
||||
enum {
|
||||
SCE_AUDIODEC_ERROR_API_FAIL = 0x807F0000,
|
||||
SCE_AUDIODEC_ERROR_NOT_INITIALIZED = 0x807F0005,
|
||||
|
||||
@@ -19,12 +19,15 @@
|
||||
|
||||
#include <module/module.h>
|
||||
|
||||
#include <boost/describe/enum.hpp>
|
||||
|
||||
enum SceAudiodecCodec : uint32_t {
|
||||
SCE_AUDIODEC_TYPE_AT9 = 0x1003,
|
||||
SCE_AUDIODEC_TYPE_MP3 = 0x1004,
|
||||
SCE_AUDIODEC_TYPE_AAC = 0x1005,
|
||||
SCE_AUDIODEC_TYPE_CELP = 0x1006,
|
||||
};
|
||||
BOOST_DESCRIBE_ENUM(SceAudiodecCodec, SCE_AUDIODEC_TYPE_AT9, SCE_AUDIODEC_TYPE_MP3, SCE_AUDIODEC_TYPE_AAC, SCE_AUDIODEC_TYPE_CELP)
|
||||
|
||||
struct SceAudiodecInitStreamParam {
|
||||
SceUInt32 size;
|
||||
|
||||
@@ -51,15 +51,14 @@ enum SceJpegColorSpace : int {
|
||||
SCE_JPEG_COLORSPACE_YUV420 = 0x20202,
|
||||
SCE_JPEG_COLORSPACE_YUV411 = 0x20401,
|
||||
};
|
||||
|
||||
BOOST_DESCRIBE_ENUM(SceJpegColorSpace, SCE_JPEG_COLORSPACE_UNKNOWN, SCE_JPEG_COLORSPACE_GRAYSCALE, SCE_JPEG_COLORSPACE_YUV, SCE_JPEG_COLORSPACE_YUV444, SCE_JPEG_COLORSPACE_YUV440, SCE_JPEG_COLORSPACE_YUV441, SCE_JPEG_COLORSPACE_YUV422, SCE_JPEG_COLORSPACE_YUV420, SCE_JPEG_COLORSPACE_YUV411)
|
||||
|
||||
enum SceJpegDHTMode : int {
|
||||
SCE_JPEG_MJPEG_WITH_DHT,
|
||||
SCE_JPEG_MJPEG_WITHOUT_DHT,
|
||||
SCE_JPEG_MJPEG_ANY_SAMPLING_WITHOUT_DHT,
|
||||
SCE_JPEG_MJPEG_ANY_SAMPLING
|
||||
};
|
||||
|
||||
BOOST_DESCRIBE_ENUM(SceJpegDHTMode, SCE_JPEG_MJPEG_WITH_DHT, SCE_JPEG_MJPEG_WITHOUT_DHT, SCE_JPEG_MJPEG_ANY_SAMPLING_WITHOUT_DHT, SCE_JPEG_MJPEG_ANY_SAMPLING)
|
||||
|
||||
enum SceJpegDownscaleMode : int {
|
||||
@@ -68,7 +67,6 @@ enum SceJpegDownscaleMode : int {
|
||||
SCE_JPEG_MJPEG_DOWNSCALE_1_8 = 1 << 6,
|
||||
SCE_JPEG_MJPEG_DOWNSCALE_ANY = 0b111 << 4
|
||||
};
|
||||
|
||||
BOOST_DESCRIBE_ENUM(SceJpegDownscaleMode, SCE_JPEG_MJPEG_DOWNSCALE_1_2, SCE_JPEG_MJPEG_DOWNSCALE_1_4, SCE_JPEG_MJPEG_DOWNSCALE_1_8, SCE_JPEG_MJPEG_DOWNSCALE_ANY)
|
||||
|
||||
enum SceJpegFormat : int {
|
||||
@@ -77,15 +75,13 @@ enum SceJpegFormat : int {
|
||||
SCE_JPEG_PIXEL_RGBA8888 = 0,
|
||||
SCE_JPEG_PIXEL_BGRA8888 = 4
|
||||
};
|
||||
|
||||
BOOST_DESCRIBE_ENUM(SceJpegFormat, SCE_JPEG_NO_CSC_OUTPUT, SCE_JPEG_PIXEL_RGBA8888, SCE_JPEG_PIXEL_BGRA8888)
|
||||
|
||||
enum SceJpegColorConversion : int {
|
||||
SCE_JPEG_COLORSPACE_JFIF = 0,
|
||||
SCE_JPEG_COLORSPACE_BT601 = 0x10
|
||||
};
|
||||
|
||||
BOOST_DESCRIBE_ENUM(SceJpegColorConversion, SCE_JPEG_COLORSPACE_JFIF, SCE_JPEG_COLORSPACE_BT601);
|
||||
BOOST_DESCRIBE_ENUM(SceJpegColorConversion, SCE_JPEG_COLORSPACE_JFIF, SCE_JPEG_COLORSPACE_BT601)
|
||||
|
||||
struct SceJpegOutputInfo {
|
||||
SceJpegColorSpace color_space;
|
||||
|
||||
@@ -128,8 +128,8 @@ struct formatter<T, Char> : formatter<string_view, Char> {
|
||||
public:
|
||||
template <typename FormatContext>
|
||||
auto format(const T e, FormatContext &ctx) const {
|
||||
auto name = boost::describe::enum_to_string(e, "");
|
||||
if (name && *name != '\0') {
|
||||
auto name = boost::describe::enum_to_string(e, nullptr);
|
||||
if (name != nullptr) {
|
||||
return detail::write(ctx.out(), name);
|
||||
} else {
|
||||
auto enum_as_uint = static_cast<std::make_unsigned_t<T>>(e);
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <util/log.h>
|
||||
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
|
||||
// universal to string converters for module specific types (usually enums)
|
||||
template <typename T>
|
||||
@@ -32,6 +31,11 @@ std::string to_debug_str(const MemState &mem, T type) {
|
||||
return std::move(datass).str();
|
||||
}
|
||||
|
||||
template <fmt::formattable T>
|
||||
std::string to_debug_str(const MemState &mem, T type) {
|
||||
return fmt::format("{}", type);
|
||||
}
|
||||
|
||||
// Override pointers, we want to print the address in hex
|
||||
template <typename U>
|
||||
std::string to_debug_str(const MemState &mem, U *type) {
|
||||
@@ -68,12 +72,6 @@ inline std::string to_debug_str<std::string>(const MemState &mem, std::string ty
|
||||
return type;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(boost::describe::has_describe_enumerators<T>::value)
|
||||
inline std::string to_debug_str(const MemState &mem, T type) {
|
||||
return fmt::format("{}", type);
|
||||
}
|
||||
|
||||
inline std::string to_debug_str(const MemState &mem) {
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user