mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-02 15:02:11 +00:00
cellVideoOut: support interlaced scan modes
This commit is contained in:
parent
8e5fec785e
commit
e164d462b4
@ -408,16 +408,19 @@ void rec_info::set_video_params(s32 video_format)
|
||||
|
||||
switch(g_cfg.video.resolution)
|
||||
{
|
||||
case video_resolution::_1080:
|
||||
case video_resolution::_720:
|
||||
case video_resolution::_1080p:
|
||||
case video_resolution::_1080i:
|
||||
case video_resolution::_720p:
|
||||
case video_resolution::_1600x1080:
|
||||
case video_resolution::_1440x1080:
|
||||
case video_resolution::_1280x1080:
|
||||
case video_resolution::_960x1080:
|
||||
hd = true;
|
||||
break;
|
||||
case video_resolution::_480:
|
||||
case video_resolution::_576:
|
||||
case video_resolution::_480p:
|
||||
case video_resolution::_480i:
|
||||
case video_resolution::_576p:
|
||||
case video_resolution::_576i:
|
||||
hd = false;
|
||||
break;
|
||||
}
|
||||
|
@ -13,10 +13,13 @@ LOG_CHANNEL(cellSysutil);
|
||||
// NOTE: Unused in this module, but used by gs_frame to determine window size
|
||||
const extern std::unordered_map<video_resolution, std::pair<int, int>, value_hash<video_resolution>> g_video_out_resolution_map
|
||||
{
|
||||
{ video_resolution::_1080, { 1920, 1080 } },
|
||||
{ video_resolution::_720, { 1280, 720 } },
|
||||
{ video_resolution::_480, { 720, 480 } },
|
||||
{ video_resolution::_576, { 720, 576 } },
|
||||
{ video_resolution::_1080p, { 1920, 1080 } },
|
||||
{ video_resolution::_1080i, { 1920, 1080 } },
|
||||
{ video_resolution::_720p, { 1280, 720 } },
|
||||
{ video_resolution::_480p, { 720, 480 } },
|
||||
{ video_resolution::_480i, { 720, 480 } },
|
||||
{ video_resolution::_576p, { 720, 576 } },
|
||||
{ video_resolution::_576i, { 720, 576 } },
|
||||
{ video_resolution::_1600x1080, { 1600, 1080 } },
|
||||
{ video_resolution::_1440x1080, { 1440, 1080 } },
|
||||
{ video_resolution::_1280x1080, { 1280, 1080 } },
|
||||
@ -25,16 +28,34 @@ const extern std::unordered_map<video_resolution, std::pair<int, int>, value_has
|
||||
|
||||
const extern std::unordered_map<video_resolution, CellVideoOutResolutionId, value_hash<video_resolution>> g_video_out_resolution_id
|
||||
{
|
||||
{ video_resolution::_1080, CELL_VIDEO_OUT_RESOLUTION_1080 },
|
||||
{ video_resolution::_720, CELL_VIDEO_OUT_RESOLUTION_720 },
|
||||
{ video_resolution::_480, CELL_VIDEO_OUT_RESOLUTION_480 },
|
||||
{ video_resolution::_576, CELL_VIDEO_OUT_RESOLUTION_576 },
|
||||
{ video_resolution::_1080p, CELL_VIDEO_OUT_RESOLUTION_1080 },
|
||||
{ video_resolution::_1080i, CELL_VIDEO_OUT_RESOLUTION_1080 },
|
||||
{ video_resolution::_720p, CELL_VIDEO_OUT_RESOLUTION_720 },
|
||||
{ video_resolution::_480p, CELL_VIDEO_OUT_RESOLUTION_480 },
|
||||
{ video_resolution::_480i, CELL_VIDEO_OUT_RESOLUTION_480 },
|
||||
{ video_resolution::_576p, CELL_VIDEO_OUT_RESOLUTION_576 },
|
||||
{ video_resolution::_576i, CELL_VIDEO_OUT_RESOLUTION_576 },
|
||||
{ video_resolution::_1600x1080, CELL_VIDEO_OUT_RESOLUTION_1600x1080 },
|
||||
{ video_resolution::_1440x1080, CELL_VIDEO_OUT_RESOLUTION_1440x1080 },
|
||||
{ video_resolution::_1280x1080, CELL_VIDEO_OUT_RESOLUTION_1280x1080 },
|
||||
{ video_resolution::_960x1080, CELL_VIDEO_OUT_RESOLUTION_960x1080 },
|
||||
};
|
||||
|
||||
const extern std::unordered_map<video_resolution, CellVideoOutScanMode, value_hash<video_resolution>> g_video_out_scan_mode
|
||||
{
|
||||
{ video_resolution::_1080p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_1080i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
|
||||
{ video_resolution::_720p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_480p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_480i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
|
||||
{ video_resolution::_576p, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_576i, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE },
|
||||
{ video_resolution::_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
{ video_resolution::_960x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE },
|
||||
};
|
||||
|
||||
const extern std::unordered_map<video_aspect, CellVideoOutDisplayAspect, value_hash<video_aspect>> g_video_out_aspect_id
|
||||
{
|
||||
{ video_aspect::_16_9, CELL_VIDEO_OUT_ASPECT_16_9 },
|
||||
@ -124,7 +145,7 @@ error_code cellVideoOutGetState(u32 videoOut, u32 deviceIndex, vm::ptr<CellVideo
|
||||
state->state = CELL_VIDEO_OUT_OUTPUT_STATE_ENABLED;
|
||||
state->colorSpace = CELL_VIDEO_OUT_COLOR_SPACE_RGB;
|
||||
state->displayMode.resolutionId = conf.state ? conf.resolution_id : ::at32(g_video_out_resolution_id, g_cfg.video.resolution);
|
||||
state->displayMode.scanMode = CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE;
|
||||
state->displayMode.scanMode = conf.state ? conf.scan_mode : ::at32(g_video_out_scan_mode, g_cfg.video.resolution);
|
||||
state->displayMode.conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE;
|
||||
state->displayMode.aspect = conf.state ? conf.aspect : ::at32(g_video_out_aspect_id, g_cfg.video.aspect_ratio);
|
||||
state->displayMode.refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_59_94HZ;
|
||||
@ -283,7 +304,6 @@ error_code cellVideoOutGetDeviceInfo(u32 videoOut, u32 deviceIndex, vm::ptr<Cell
|
||||
info->portType = CELL_VIDEO_OUT_PORT_HDMI;
|
||||
info->colorSpace = CELL_VIDEO_OUT_COLOR_SPACE_RGB;
|
||||
info->latency = 100;
|
||||
info->availableModeCount = 1;
|
||||
info->state = CELL_VIDEO_OUT_DEVICE_STATE_AVAILABLE;
|
||||
info->rgbOutputRange = 1;
|
||||
info->colorInfo.blueX = 0xFFFF;
|
||||
@ -295,21 +315,109 @@ error_code cellVideoOutGetDeviceInfo(u32 videoOut, u32 deviceIndex, vm::ptr<Cell
|
||||
info->colorInfo.whiteX = 0xFFFF;
|
||||
info->colorInfo.whiteY = 0xFFFF;
|
||||
info->colorInfo.gamma = 100;
|
||||
info->availableModes[0].aspect = ::at32(g_video_out_aspect_id, g_cfg.video.aspect_ratio);
|
||||
info->availableModes[0].conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE;
|
||||
info->availableModes[0].refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_60HZ | CELL_VIDEO_OUT_REFRESH_RATE_59_94HZ;
|
||||
info->availableModes[0].resolutionId = ::at32(g_video_out_resolution_id, g_cfg.video.resolution);
|
||||
info->availableModes[0].scanMode = CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE;
|
||||
|
||||
if (g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled && g_cfg.video.resolution == video_resolution::_720)
|
||||
u32 mode_count = 0;
|
||||
|
||||
const auto add_mode = [&](u8 resolutionId, u8 scanMode, u8 conversion, u8 aspect)
|
||||
{
|
||||
info->availableModes[mode_count].resolutionId = resolutionId;
|
||||
info->availableModes[mode_count].scanMode = scanMode;
|
||||
info->availableModes[mode_count].conversion = conversion;
|
||||
info->availableModes[mode_count].aspect = aspect;
|
||||
info->availableModes[mode_count].refreshRates = CELL_VIDEO_OUT_REFRESH_RATE_60HZ | CELL_VIDEO_OUT_REFRESH_RATE_59_94HZ;
|
||||
mode_count++;
|
||||
};
|
||||
|
||||
switch (g_cfg.video.resolution.get())
|
||||
{
|
||||
case video_resolution::_1080p:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
case video_resolution::_1080i:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
case video_resolution::_720p:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_720, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
case video_resolution::_480p:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3);
|
||||
if (g_cfg.video.aspect_ratio == video_aspect::_16_9)
|
||||
{
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
}
|
||||
break;
|
||||
case video_resolution::_480i:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3);
|
||||
if (g_cfg.video.aspect_ratio == video_aspect::_16_9)
|
||||
{
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
}
|
||||
break;
|
||||
case video_resolution::_576p:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3);
|
||||
if (g_cfg.video.aspect_ratio == video_aspect::_16_9)
|
||||
{
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
}
|
||||
break;
|
||||
case video_resolution::_576i:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_4_3);
|
||||
if (g_cfg.video.aspect_ratio == video_aspect::_16_9)
|
||||
{
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_576, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_SCAN_MODE_INTERLACE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
}
|
||||
break;
|
||||
case video_resolution::_1600x1080:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
case video_resolution::_1440x1080:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1440x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
case video_resolution::_1280x1080:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
case video_resolution::_960x1080:
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_1080, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled && g_cfg.video.resolution == video_resolution::_720p)
|
||||
{
|
||||
// Register 3D-capable display mode
|
||||
info->availableModes[1] = info->availableModes[0];
|
||||
info->availableModes[1].conversion = CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING;
|
||||
info->availableModes[1].resolutionId = CELL_VIDEO_OUT_RESOLUTION_720_3D_FRAME_PACKING;
|
||||
info->availableModeCount++;
|
||||
if (true) // TODO
|
||||
{
|
||||
// 3D stereo
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_NONE, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1024x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_960x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_800x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_640x720_3D_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
}
|
||||
else
|
||||
{
|
||||
// SimulView
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_1024x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_960x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_800x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
add_mode(CELL_VIDEO_OUT_RESOLUTION_640x720_SIMULVIEW_FRAME_PACKING, CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE, CELL_VIDEO_OUT_DISPLAY_CONVERSION_TO_720_3D_FRAME_PACKING, CELL_VIDEO_OUT_ASPECT_16_9);
|
||||
}
|
||||
}
|
||||
|
||||
info->availableModeCount = mode_count;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -346,7 +454,7 @@ error_code cellVideoOutGetResolutionAvailability(u32 videoOut, u32 resolutionId,
|
||||
return not_an_error(1);
|
||||
}
|
||||
|
||||
if ((g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled) && g_cfg.video.resolution == video_resolution::_720)
|
||||
if ((g_cfg.video.stereo_render_mode != stereo_render_mode_options::disabled) && g_cfg.video.resolution == video_resolution::_720p)
|
||||
{
|
||||
switch (resolutionId)
|
||||
{
|
||||
|
@ -172,13 +172,17 @@ struct av_get_monitor_info_cmd : public ps3av_cmd
|
||||
{
|
||||
switch (g_cfg.video.resolution)
|
||||
{
|
||||
case video_resolution::_1080:
|
||||
case video_resolution::_1080p:
|
||||
return PS3AV_RESBIT_1920x1080P;
|
||||
case video_resolution::_1080i:
|
||||
return PS3AV_RESBIT_1920x1080I;
|
||||
case video_resolution::_1600x1080:
|
||||
case video_resolution::_1440x1080:
|
||||
case video_resolution::_1280x1080:
|
||||
case video_resolution::_720:
|
||||
case video_resolution::_720p:
|
||||
return PS3AV_RESBIT_1280x720P;
|
||||
case video_resolution::_576p:
|
||||
return PS3AV_RESBIT_720x576P;
|
||||
default:
|
||||
return PS3AV_RESBIT_720x480P;
|
||||
}
|
||||
|
@ -728,7 +728,14 @@ namespace rsx
|
||||
|
||||
void avconf::save(utils::serial& ar)
|
||||
{
|
||||
ar(*this);
|
||||
[[maybe_unused]] const s32 version = GET_OR_USE_SERIALIZATION_VERSION(ar.is_writing(), rsx);
|
||||
|
||||
ar(stereo_mode, format, aspect, resolution_id, scanline_pitch, gamma, resolution_x, resolution_y, state);
|
||||
|
||||
if (ar.is_writing() || version >= 3)
|
||||
{
|
||||
ar(scan_mode);
|
||||
}
|
||||
}
|
||||
|
||||
void thread::capture_frame(const std::string &name)
|
||||
|
@ -162,6 +162,7 @@ namespace rsx
|
||||
u32 resolution_x = 1280; // X RES
|
||||
u32 resolution_y = 720; // Y RES
|
||||
atomic_t<u32> state = 0; // 1 after cellVideoOutConfigure was called
|
||||
u8 scan_mode = 1; // CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE
|
||||
|
||||
ENABLE_BITWISE_SERIALIZATION;
|
||||
SAVESTATE_INIT_POS(12);
|
||||
|
@ -274,18 +274,21 @@ static void fixup_settings(const psf::registry* _psf)
|
||||
{
|
||||
const std::map<video_resolution, u32> resolutions
|
||||
{
|
||||
{ video_resolution::_480, psf::resolution_flag::_480p | psf::resolution_flag::_480p_16_9 },
|
||||
{ video_resolution::_576, psf::resolution_flag::_576p | psf::resolution_flag::_576p_16_9 },
|
||||
{ video_resolution::_720, psf::resolution_flag::_720p },
|
||||
{ video_resolution::_1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_1600x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_1440x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_1280x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_960x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
|
||||
{ video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
|
||||
{ video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
|
||||
{ video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
|
||||
{ video_resolution::_720p, psf::resolution_flag::_720 },
|
||||
{ video_resolution::_1080p, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1080i, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1600x1080, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1440x1080, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1280x1080, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_960x1080, psf::resolution_flag::_1080 },
|
||||
};
|
||||
|
||||
const video_resolution resolution = g_cfg.video.resolution;
|
||||
constexpr video_resolution new_resolution = video_resolution::_720;
|
||||
constexpr video_resolution new_resolution = video_resolution::_720p;
|
||||
|
||||
if (!resolutions.contains(resolution) || !(psf_resolution & resolutions.at(resolution)))
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ SERIALIZATION_VER(lv2_config, 9, 1)
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
SERIALIZATION_VER(rsx, 10, 1, 2/*Pending flip*/)
|
||||
SERIALIZATION_VER(rsx, 10, 1, 2/*Pending flip*/, 3/*avconf scan_mode*/)
|
||||
}
|
||||
|
||||
namespace np
|
||||
|
@ -127,7 +127,7 @@ struct cfg_root : cfg::node
|
||||
cfg::_enum<video_renderer> renderer{ this, "Renderer", video_renderer::opengl };
|
||||
#endif
|
||||
|
||||
cfg::_enum<video_resolution> resolution{ this, "Resolution", video_resolution::_720 };
|
||||
cfg::_enum<video_resolution> resolution{ this, "Resolution", video_resolution::_720p };
|
||||
cfg::_enum<video_aspect> aspect_ratio{ this, "Aspect ratio", video_aspect::_16_9 };
|
||||
cfg::_enum<frame_limit_type> frame_limit{ this, "Frame limit", frame_limit_type::_auto, true };
|
||||
cfg::_float<0, 1000> second_frame_limit{ this, "Second Frame Limit", 0, true }; // 0 disables its effect
|
||||
|
@ -40,10 +40,13 @@ void fmt_class_string<video_resolution>::format(std::string& out, u64 arg)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case video_resolution::_1080: return "1920x1080";
|
||||
case video_resolution::_720: return "1280x720";
|
||||
case video_resolution::_480: return "720x480";
|
||||
case video_resolution::_576: return "720x576";
|
||||
case video_resolution::_1080p: return "1920x1080";
|
||||
case video_resolution::_1080i: return "1920x1080i";
|
||||
case video_resolution::_720p: return "1280x720";
|
||||
case video_resolution::_480p: return "720x480";
|
||||
case video_resolution::_480i: return "720x480i";
|
||||
case video_resolution::_576p: return "720x576";
|
||||
case video_resolution::_576i: return "720x576i";
|
||||
case video_resolution::_1600x1080: return "1600x1080";
|
||||
case video_resolution::_1440x1080: return "1440x1080";
|
||||
case video_resolution::_1280x1080: return "1280x1080";
|
||||
|
@ -197,10 +197,13 @@ enum class pad_handler_mode
|
||||
|
||||
enum class video_resolution
|
||||
{
|
||||
_1080,
|
||||
_720,
|
||||
_480,
|
||||
_576,
|
||||
_1080p,
|
||||
_1080i,
|
||||
_720p,
|
||||
_480p,
|
||||
_480i,
|
||||
_576p,
|
||||
_576i,
|
||||
_1600x1080,
|
||||
_1440x1080,
|
||||
_1280x1080,
|
||||
|
@ -23,12 +23,12 @@ namespace psf
|
||||
|
||||
enum resolution_flag : s32
|
||||
{
|
||||
_480p = 1 << 0,
|
||||
_576p = 1 << 1,
|
||||
_720p = 1 << 2,
|
||||
_1080p = 1 << 3,
|
||||
_480p_16_9 = 1 << 4,
|
||||
_576p_16_9 = 1 << 5,
|
||||
_480 = 1 << 0,
|
||||
_576 = 1 << 1,
|
||||
_720 = 1 << 2,
|
||||
_1080 = 1 << 3,
|
||||
_480_16_9 = 1 << 4,
|
||||
_576_16_9 = 1 << 5,
|
||||
};
|
||||
|
||||
enum class format : u16
|
||||
|
@ -79,12 +79,12 @@ std::string Localized::GetStringFromU32(const u32& key, const std::map<u32, QStr
|
||||
|
||||
Localized::resolution::resolution()
|
||||
: mode({
|
||||
{ psf::resolution_flag::_480p, tr("480") },
|
||||
{ psf::resolution_flag::_576p, tr("576") },
|
||||
{ psf::resolution_flag::_720p, tr("720") },
|
||||
{ psf::resolution_flag::_1080p, tr("1080") },
|
||||
{ psf::resolution_flag::_480p_16_9, tr("480 16:9") },
|
||||
{ psf::resolution_flag::_576p_16_9, tr("576 16:9") },
|
||||
{ psf::resolution_flag::_480, tr("480") },
|
||||
{ psf::resolution_flag::_576, tr("576") },
|
||||
{ psf::resolution_flag::_720, tr("720") },
|
||||
{ psf::resolution_flag::_1080, tr("1080") },
|
||||
{ psf::resolution_flag::_480_16_9, tr("480 16:9") },
|
||||
{ psf::resolution_flag::_576_16_9, tr("576 16:9") },
|
||||
})
|
||||
{
|
||||
}
|
||||
|
@ -465,14 +465,17 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
{
|
||||
const std::map<video_resolution, u32> resolutions
|
||||
{
|
||||
{ video_resolution::_480, psf::resolution_flag::_480p | psf::resolution_flag::_480p_16_9 },
|
||||
{ video_resolution::_576, psf::resolution_flag::_576p | psf::resolution_flag::_576p_16_9 },
|
||||
{ video_resolution::_720, psf::resolution_flag::_720p },
|
||||
{ video_resolution::_1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_1600x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_1440x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_1280x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_960x1080, psf::resolution_flag::_1080p },
|
||||
{ video_resolution::_480p, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
|
||||
{ video_resolution::_480i, psf::resolution_flag::_480 | psf::resolution_flag::_480_16_9 },
|
||||
{ video_resolution::_576p, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
|
||||
{ video_resolution::_576i, psf::resolution_flag::_576 | psf::resolution_flag::_576_16_9 },
|
||||
{ video_resolution::_720p, psf::resolution_flag::_720 },
|
||||
{ video_resolution::_1080p, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1080i, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1600x1080, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1440x1080, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_1280x1080, psf::resolution_flag::_1080 },
|
||||
{ video_resolution::_960x1080, psf::resolution_flag::_1080 },
|
||||
};
|
||||
|
||||
const int saved_index = ui->resBox->currentIndex();
|
||||
@ -496,7 +499,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
{
|
||||
const auto [text, value] = get_data(ui->resBox, i);
|
||||
|
||||
if (static_cast<video_resolution>(value) == video_resolution::_720)
|
||||
if (static_cast<video_resolution>(value) == video_resolution::_720p)
|
||||
{
|
||||
// Rename the default resolution for users
|
||||
ui->resBox->setItemText(i, tr("1280x720 (Recommended)", "Resolution"));
|
||||
|
Loading…
Reference in New Issue
Block a user