combo = new QComboBox(w);
combo->addItem("Source Width x Height");
combo->addItem("4x3");
+ combo->addItem("14x9");
combo->addItem("16x9");
combo->addItem("16x9 Anamorphic");
addWidget(grid, combo);
" <aspect> can be one of: square, ntsc, pal\n"
" --stream-out-video-aspect=<aspect\n"
" select a video aspect ratio. The default is to use the frame ratio.\n"
- " <aspect> can be one of: 4x3, 16x9, anamorphic\n"
+ " <aspect> can be one of: 4x3, 14x9, 16x9, anamorphic\n"
" --stream-out-alpha=<alpha-value>\n"
" value to use for the alpha component, range 0-255. The default is 0.\n"
" --stream-out-alpha-red-only\n"
case OptStreamOutVideoAspect:
if (!strcmp(optarg, "4x3"))
stream_out_video_aspect = TPG_VIDEO_ASPECT_4X3;
+ else if (!strcmp(optarg, "14x9"))
+ stream_out_video_aspect = TPG_VIDEO_ASPECT_14X9_CENTRE;
else if (!strcmp(optarg, "16x9"))
stream_out_video_aspect = TPG_VIDEO_ASPECT_16X9_CENTRE;
else if (!strcmp(optarg, "anamorphic"))
const char * const tpg_aspect_strings[] = {
"Source Width x Height",
"4x3",
+ "14x9",
"16x9",
"16x9 Anamorphic",
NULL
tpg->border.height = ((3 * w) / 4) & ~1;
tpg->border.top = (h - tpg->border.height) / 2;
break;
+ case TPG_VIDEO_ASPECT_14X9_CENTRE:
+ if (tpg->pix_aspect) {
+ tpg->border.height = tpg->pix_aspect == TPG_PIXEL_ASPECT_NTSC ? 420 : 506;
+ tpg->border.top = (h - tpg->border.height) / 2;
+ break;
+ }
+ if (9 * w >= 14 * h) {
+ tpg->border.width = ((14 * h) / 9) & ~1;
+ if (((w - tpg->border.width) / 2) & ~1)
+ tpg->border.width -= 2;
+ tpg->border.left = (w - tpg->border.width) / 2;
+ break;
+ }
+ tpg->border.height = ((9 * w) / 14) & ~1;
+ tpg->border.top = (h - tpg->border.height) / 2;
+ break;
case TPG_VIDEO_ASPECT_16X9_CENTRE:
if (tpg->pix_aspect) {
tpg->border.height = tpg->pix_aspect == TPG_PIXEL_ASPECT_NTSC ? 368 : 442;
enum tpg_video_aspect {
TPG_VIDEO_ASPECT_IMAGE,
TPG_VIDEO_ASPECT_4X3,
+ TPG_VIDEO_ASPECT_14X9_CENTRE,
TPG_VIDEO_ASPECT_16X9_CENTRE,
TPG_VIDEO_ASPECT_16X9_ANAMORPHIC,
};