Serialize QTM, Y2R services
This commit is contained in:
parent
92857efca4
commit
ef2e503281
11 changed files with 97 additions and 2 deletions
4
TODO
4
TODO
|
@ -105,7 +105,7 @@
|
||||||
✔ PS @done(20-01-01 00:54)
|
✔ PS @done(20-01-01 00:54)
|
||||||
✔ PTM @done(20-01-01 22:36)
|
✔ PTM @done(20-01-01 22:36)
|
||||||
✔ PXI @done(20-01-01 00:53)
|
✔ PXI @done(20-01-01 00:53)
|
||||||
☐ QTM
|
✔ QTM @done(20-01-01 22:41)
|
||||||
✔ SOC @done(20-01-01 00:51)
|
✔ SOC @done(20-01-01 00:51)
|
||||||
✔ SSL @done(20-01-01 00:48)
|
✔ SSL @done(20-01-01 00:48)
|
||||||
☐ Y2R
|
✔ Y2R @done(20-01-01 22:56)
|
|
@ -2,9 +2,12 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "common/archives.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/service/qtm/qtm_c.h"
|
#include "core/hle/service/qtm/qtm_c.h"
|
||||||
|
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::QTM::QTM_C)
|
||||||
|
|
||||||
namespace Service::QTM {
|
namespace Service::QTM {
|
||||||
|
|
||||||
QTM_C::QTM_C() : ServiceFramework("qtm:c", 2) {
|
QTM_C::QTM_C() : ServiceFramework("qtm:c", 2) {
|
||||||
|
|
|
@ -15,3 +15,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::QTM
|
} // namespace Service::QTM
|
||||||
|
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::QTM::QTM_C)
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "common/archives.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/service/qtm/qtm_s.h"
|
#include "core/hle/service/qtm/qtm_s.h"
|
||||||
|
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::QTM::QTM_S)
|
||||||
|
|
||||||
namespace Service::QTM {
|
namespace Service::QTM {
|
||||||
|
|
||||||
QTM_S::QTM_S() : ServiceFramework("qtm:s", 2) {
|
QTM_S::QTM_S() : ServiceFramework("qtm:s", 2) {
|
||||||
|
|
|
@ -15,3 +15,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::QTM
|
} // namespace Service::QTM
|
||||||
|
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::QTM::QTM_S)
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "common/archives.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/service/qtm/qtm_sp.h"
|
#include "core/hle/service/qtm/qtm_sp.h"
|
||||||
|
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::QTM::QTM_SP)
|
||||||
|
|
||||||
namespace Service::QTM {
|
namespace Service::QTM {
|
||||||
|
|
||||||
QTM_SP::QTM_SP() : ServiceFramework("qtm:sp", 2) {
|
QTM_SP::QTM_SP() : ServiceFramework("qtm:sp", 2) {
|
||||||
|
|
|
@ -15,3 +15,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::QTM
|
} // namespace Service::QTM
|
||||||
|
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::QTM::QTM_SP)
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "common/archives.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/service/qtm/qtm_u.h"
|
#include "core/hle/service/qtm/qtm_u.h"
|
||||||
|
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::QTM::QTM_U)
|
||||||
|
|
||||||
namespace Service::QTM {
|
namespace Service::QTM {
|
||||||
|
|
||||||
QTM_U::QTM_U() : ServiceFramework("qtm:u", 2) {
|
QTM_U::QTM_U() : ServiceFramework("qtm:u", 2) {
|
||||||
|
|
|
@ -15,3 +15,5 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::QTM
|
} // namespace Service::QTM
|
||||||
|
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::QTM::QTM_U)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include "common/archives.h"
|
||||||
#include "common/common_funcs.h"
|
#include "common/common_funcs.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
|
@ -12,8 +13,22 @@
|
||||||
#include "core/hle/service/y2r_u.h"
|
#include "core/hle/service/y2r_u.h"
|
||||||
#include "core/hw/y2r.h"
|
#include "core/hw/y2r.h"
|
||||||
|
|
||||||
|
SERVICE_CONSTRUCT_IMPL(Service::Y2R::Y2R_U)
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::Y2R::Y2R_U)
|
||||||
|
|
||||||
namespace Service::Y2R {
|
namespace Service::Y2R {
|
||||||
|
|
||||||
|
template <class Archive>
|
||||||
|
void Y2R_U::serialize(Archive& ar, const unsigned int) {
|
||||||
|
ar& completion_event;
|
||||||
|
ar& conversion;
|
||||||
|
ar& dithering_weight_params;
|
||||||
|
ar& temporal_dithering_enabled;
|
||||||
|
ar& transfer_end_interrupt_enabled;
|
||||||
|
ar& spacial_dithering_enabled;
|
||||||
|
}
|
||||||
|
SERIALIZE_IMPL(Y2R_U)
|
||||||
|
|
||||||
static const CoefficientSet standard_coefficients[4] = {
|
static const CoefficientSet standard_coefficients[4] = {
|
||||||
{{0x100, 0x166, 0xB6, 0x58, 0x1C5, -0x166F, 0x10EE, -0x1C5B}}, // ITU_Rec601
|
{{0x100, 0x166, 0xB6, 0x58, 0x1C5, -0x166F, 0x10EE, -0x1C5B}}, // ITU_Rec601
|
||||||
{{0x100, 0x193, 0x77, 0x2F, 0x1DB, -0x1933, 0xA7C, -0x1D51}}, // ITU_Rec709
|
{{0x100, 0x193, 0x77, 0x2F, 0x1DB, -0x1933, 0xA7C, -0x1D51}}, // ITU_Rec709
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <boost/serialization/array.hpp>
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -91,6 +92,16 @@ struct ConversionBuffer {
|
||||||
u16 transfer_unit;
|
u16 transfer_unit;
|
||||||
/// Amount of bytes to be skipped between copying each `transfer_unit` bytes.
|
/// Amount of bytes to be skipped between copying each `transfer_unit` bytes.
|
||||||
u16 gap;
|
u16 gap;
|
||||||
|
|
||||||
|
private:
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int) {
|
||||||
|
ar& address;
|
||||||
|
ar& image_size;
|
||||||
|
ar& transfer_unit;
|
||||||
|
ar& gap;
|
||||||
|
}
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ConversionConfiguration {
|
struct ConversionConfiguration {
|
||||||
|
@ -112,6 +123,26 @@ struct ConversionConfiguration {
|
||||||
ResultCode SetInputLineWidth(u16 width);
|
ResultCode SetInputLineWidth(u16 width);
|
||||||
ResultCode SetInputLines(u16 lines);
|
ResultCode SetInputLines(u16 lines);
|
||||||
ResultCode SetStandardCoefficient(StandardCoefficient standard_coefficient);
|
ResultCode SetStandardCoefficient(StandardCoefficient standard_coefficient);
|
||||||
|
|
||||||
|
private:
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int) {
|
||||||
|
ar& input_format;
|
||||||
|
ar& output_format;
|
||||||
|
ar& rotation;
|
||||||
|
ar& block_alignment;
|
||||||
|
ar& input_line_width;
|
||||||
|
ar& input_lines;
|
||||||
|
ar& coefficients;
|
||||||
|
ar& padding;
|
||||||
|
ar& alpha;
|
||||||
|
ar& src_Y;
|
||||||
|
ar& src_U;
|
||||||
|
ar& src_V;
|
||||||
|
ar& src_YUYV;
|
||||||
|
ar& dst;
|
||||||
|
}
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DitheringWeightParams {
|
struct DitheringWeightParams {
|
||||||
|
@ -131,6 +162,28 @@ struct DitheringWeightParams {
|
||||||
u16 w3_xOdd_yEven;
|
u16 w3_xOdd_yEven;
|
||||||
u16 w3_xEven_yOdd;
|
u16 w3_xEven_yOdd;
|
||||||
u16 w3_xOdd_yOdd;
|
u16 w3_xOdd_yOdd;
|
||||||
|
|
||||||
|
private:
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int) {
|
||||||
|
ar& w0_xEven_yEven;
|
||||||
|
ar& w0_xOdd_yEven;
|
||||||
|
ar& w0_xEven_yOdd;
|
||||||
|
ar& w0_xOdd_yOdd;
|
||||||
|
ar& w1_xEven_yEven;
|
||||||
|
ar& w1_xOdd_yEven;
|
||||||
|
ar& w1_xEven_yOdd;
|
||||||
|
ar& w1_xOdd_yOdd;
|
||||||
|
ar& w2_xEven_yEven;
|
||||||
|
ar& w2_xOdd_yEven;
|
||||||
|
ar& w2_xEven_yOdd;
|
||||||
|
ar& w2_xOdd_yOdd;
|
||||||
|
ar& w3_xEven_yEven;
|
||||||
|
ar& w3_xOdd_yEven;
|
||||||
|
ar& w3_xEven_yOdd;
|
||||||
|
ar& w3_xOdd_yOdd;
|
||||||
|
}
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ConversionParameters {
|
struct ConversionParameters {
|
||||||
|
@ -301,8 +354,15 @@ private:
|
||||||
bool temporal_dithering_enabled = false;
|
bool temporal_dithering_enabled = false;
|
||||||
bool transfer_end_interrupt_enabled = false;
|
bool transfer_end_interrupt_enabled = false;
|
||||||
bool spacial_dithering_enabled = false;
|
bool spacial_dithering_enabled = false;
|
||||||
|
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int);
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
void InstallInterfaces(Core::System& system);
|
void InstallInterfaces(Core::System& system);
|
||||||
|
|
||||||
} // namespace Service::Y2R
|
} // namespace Service::Y2R
|
||||||
|
|
||||||
|
SERVICE_CONSTRUCT(Service::Y2R::Y2R_U)
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::Y2R::Y2R_U)
|
||||||
|
|
Loading…
Reference in a new issue