Files
Webcam/include/platform/video/video_mode.h
2026-06-22 11:49:35 +02:00

80 lines
1.3 KiB
C++

/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
------------------------------------------------------------------------------*/
#ifndef __NVIDEOMODE__
#define __NVIDEOMODE__
#include "ntypes.h"
/*!
@short Video mode database.
@author Emmanuel Julien (ejulien@gsworks.fr)
*/
namespace nVideoMode
{
struct Mode
{
const char *name;
uint width, height;
uchar bpp;
bool pc_mode;
};
enum AspectRatio
{
AR_4_3,
AR_16_9,
AR_16_10,
AR_Unknown
};
enum Name
{
CGA, // 320x200
QVGA, // 320x240
WQVGA, // 480x272
VGA, // 640x480
SVGA, // 800x600
XGA, // 1024x768
XGAPlus, // 1152x864
HD, // 1366x768
WXGA_922K, // 1280x720
WXGA_1024K, // 1280x800
HDPlus, // 1600x900
SXGA, // 1280x1024
WXGAPlus, // 1440x900
UXGA, // 1600x1200
WSXGAPlus, // 1680x1050
FullHD, // 1920x1080
WUXGA, // 1920x1200
QXGA, // 2048x1536
QWXGA, // 2048x1152
WQHD, // 2560x1440
WQXGA, // 2560x1600
NameLast
};
extern Mode mode_desc[NameLast];
/// Get video mode aspect ratio.
AspectRatio GetModeAspectRatio(const Mode &);
/// Get video mode from resolution.
Mode *GetMode(uint w, uint h);
};
#endif // __NVIDEOMODE__