Skip to content

Commit bc286c0

Browse files
committed
Add downsampling double-strike render modes
1 parent 4093aca commit bc286c0

2 files changed

Lines changed: 245 additions & 0 deletions

File tree

include/ogc/video_types.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ distribution.
155155
*/
156156

157157
extern GXRModeObj TVNtsc240Ds; /*!< Video and render mode configuration for 240 lines,singlefield NTSC mode */
158+
extern GXRModeObj TVNtsc240DsVf; /*!< Video and render mode configuration for 240 lines,singlefield,downsampled NTSC mode */
158159
extern GXRModeObj TVNtsc240DsAa; /*!< Video and render mode configuration for 240 lines,singlefield,antialiased NTSC mode */
159160
extern GXRModeObj TVNtsc240Int; /*!< Video and render mode configuration for 240 lines,interlaced NTSC mode */
160161
extern GXRModeObj TVNtsc240IntDf; /*!< Video and render mode configuration for 240 lines,interlaced,deflickered NTSC mode */
@@ -166,6 +167,7 @@ extern GXRModeObj TVNtsc480Prog; /*!< Video and render mode configuration for
166167
extern GXRModeObj TVNtsc480ProgSoft;
167168
extern GXRModeObj TVNtsc480ProgAa;
168169
extern GXRModeObj TVMpal240Ds;
170+
extern GXRModeObj TVMpal240DsVf;
169171
extern GXRModeObj TVMpal240DsAa;
170172
extern GXRModeObj TVMpal240Int;
171173
extern GXRModeObj TVMpal240IntDf;
@@ -177,7 +179,11 @@ extern GXRModeObj TVMpal480Prog;
177179
extern GXRModeObj TVMpal480ProgSoft;
178180
extern GXRModeObj TVMpal480ProgAa;
179181
extern GXRModeObj TVPal264Ds; /*!< Video and render mode configuration for 264 lines,singlefield PAL mode */
182+
extern GXRModeObj TVPal264DsVf; /*!< Video and render mode configuration for 264 lines,singlefield,downsampled PAL mode */
180183
extern GXRModeObj TVPal264DsAa; /*!< Video and render mode configuration for 264 lines,singlefield,antialiased PAL mode */
184+
extern GXRModeObj TVPal288DsScale;
185+
extern GXRModeObj TVPal288DsVfScale;
186+
extern GXRModeObj TVPal288DsAaScale;
181187
extern GXRModeObj TVPal264Int; /*!< Video and render mode configuration for 264 lines,interlaced PAL mode */
182188
extern GXRModeObj TVPal264IntDf; /*!< Video and render mode configuration for 264 lines,interlaced,deflickered PAL mode */
183189
extern GXRModeObj TVPal264IntAa; /*!< Video and render mode configuration for 264 lines,interlaced,antialiased PAL mode */
@@ -194,6 +200,7 @@ extern GXRModeObj TVPal524ProgAa;
194200
extern GXRModeObj TVPal576ProgScale;
195201
extern GXRModeObj TVPal576ProgSoftScale;
196202
extern GXRModeObj TVEurgb60Hz240Ds;
203+
extern GXRModeObj TVEurgb60Hz240DsVf;
197204
extern GXRModeObj TVEurgb60Hz240DsAa;
198205
extern GXRModeObj TVEurgb60Hz240Int;
199206
extern GXRModeObj TVEurgb60Hz240IntDf;

libogc/video.c

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,40 @@ GXRModeObj TVNtsc240Ds =
127127
GX_COPY_PROGRESSIVE // copy_interlaced
128128
};
129129

130+
GXRModeObj TVNtsc240DsVf =
131+
{
132+
VI_TVMODE_NTSC_DS, // viTVMode
133+
640, // fbWidth
134+
480, // efbHeight
135+
240, // xfbHeight
136+
(VI_MAX_WIDTH_NTSC - 640)/2, // viXOrigin
137+
(VI_MAX_HEIGHT_NTSC/2 - 480/2)/2, // viYOrigin
138+
640, // viWidth
139+
480, // viHeight
140+
VI_XFBMODE_SF, // xfbMode
141+
GX_FALSE, // field_rendering
142+
GX_FALSE, // aa
143+
144+
// sample points arranged in increasing Y order
145+
{
146+
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
147+
{6,6},{6,6},{6,6}, // pix 1
148+
{6,6},{6,6},{6,6}, // pix 2
149+
{6,6},{6,6},{6,6} // pix 3
150+
},
151+
// vertical filter[7], 1/64 units, 6 bits each
152+
{
153+
0, // line n-1
154+
0, // line n-1
155+
0, // line n
156+
16, // line n
157+
16, // line n
158+
16, // line n+1
159+
16 // line n+1
160+
},
161+
GX_COPY_INTLC_EVEN // copy_interlaced
162+
};
163+
130164
GXRModeObj TVNtsc240DsAa =
131165
{
132166
VI_TVMODE_NTSC_DS, // viTVMode
@@ -501,6 +535,40 @@ GXRModeObj TVMpal240Ds =
501535
GX_COPY_PROGRESSIVE // copy_interlaced
502536
};
503537

538+
GXRModeObj TVMpal240DsVf =
539+
{
540+
VI_TVMODE_MPAL_DS, // viTVMode
541+
640, // fbWidth
542+
480, // efbHeight
543+
240, // xfbHeight
544+
(VI_MAX_WIDTH_MPAL - 640)/2, // viXOrigin
545+
(VI_MAX_HEIGHT_MPAL/2 - 480/2)/2, // viYOrigin
546+
640, // viWidth
547+
480, // viHeight
548+
VI_XFBMODE_SF, // xfbMode
549+
GX_FALSE, // field_rendering
550+
GX_FALSE, // aa
551+
552+
// sample points arranged in increasing Y order
553+
{
554+
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
555+
{6,6},{6,6},{6,6}, // pix 1
556+
{6,6},{6,6},{6,6}, // pix 2
557+
{6,6},{6,6},{6,6} // pix 3
558+
},
559+
// vertical filter[7], 1/64 units, 6 bits each
560+
{
561+
0, // line n-1
562+
0, // line n-1
563+
0, // line n
564+
16, // line n
565+
16, // line n
566+
16, // line n+1
567+
16 // line n+1
568+
},
569+
GX_COPY_INTLC_EVEN // copy_interlaced
570+
};
571+
504572
GXRModeObj TVMpal240DsAa =
505573
{
506574
VI_TVMODE_MPAL_DS, // viTVMode
@@ -875,6 +943,40 @@ GXRModeObj TVPal264Ds =
875943
GX_COPY_PROGRESSIVE // copy_interlaced
876944
};
877945

946+
GXRModeObj TVPal264DsVf =
947+
{
948+
VI_TVMODE_PAL_DS, // viTVMode
949+
640, // fbWidth
950+
528, // efbHeight
951+
264, // xfbHeight
952+
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
953+
(VI_MAX_HEIGHT_PAL/2 - 528/2)/2, // viYOrigin
954+
640, // viWidth
955+
528, // viHeight
956+
VI_XFBMODE_SF, // xfbMode
957+
GX_FALSE, // field_rendering
958+
GX_FALSE, // aa
959+
960+
// sample points arranged in increasing Y order
961+
{
962+
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
963+
{6,6},{6,6},{6,6}, // pix 1
964+
{6,6},{6,6},{6,6}, // pix 2
965+
{6,6},{6,6},{6,6} // pix 3
966+
},
967+
// vertical filter[7], 1/64 units, 6 bits each
968+
{
969+
0, // line n-1
970+
0, // line n-1
971+
0, // line n
972+
16, // line n
973+
16, // line n
974+
16, // line n+1
975+
16 // line n+1
976+
},
977+
GX_COPY_INTLC_EVEN // copy_interlaced
978+
};
979+
878980
GXRModeObj TVPal264DsAa =
879981
{
880982
VI_TVMODE_PAL_DS, // viTVMode
@@ -909,6 +1011,108 @@ GXRModeObj TVPal264DsAa =
9091011
GX_COPY_PROGRESSIVE // copy_interlaced
9101012
};
9111013

1014+
GXRModeObj TVPal288DsScale =
1015+
{
1016+
VI_TVMODE_PAL_DS, // viTVMode
1017+
640, // fbWidth
1018+
240, // efbHeight
1019+
288, // xfbHeight
1020+
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
1021+
(VI_MAX_HEIGHT_PAL/2 - 576/2)/2, // viYOrigin
1022+
640, // viWidth
1023+
576, // viHeight
1024+
VI_XFBMODE_SF, // xfbMode
1025+
GX_FALSE, // field_rendering
1026+
GX_FALSE, // aa
1027+
1028+
// sample points arranged in increasing Y order
1029+
{
1030+
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
1031+
{6,6},{6,6},{6,6}, // pix 1
1032+
{6,6},{6,6},{6,6}, // pix 2
1033+
{6,6},{6,6},{6,6} // pix 3
1034+
},
1035+
// vertical filter[7], 1/64 units, 6 bits each
1036+
{
1037+
0, // line n-1
1038+
0, // line n-1
1039+
21, // line n
1040+
22, // line n
1041+
21, // line n
1042+
0, // line n+1
1043+
0 // line n+1
1044+
},
1045+
GX_COPY_PROGRESSIVE // copy_interlaced
1046+
};
1047+
1048+
GXRModeObj TVPal288DsVfScale =
1049+
{
1050+
VI_TVMODE_PAL_DS, // viTVMode
1051+
640, // fbWidth
1052+
480, // efbHeight
1053+
288, // xfbHeight
1054+
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
1055+
(VI_MAX_HEIGHT_PAL/2 - 576/2)/2, // viYOrigin
1056+
640, // viWidth
1057+
576, // viHeight
1058+
VI_XFBMODE_SF, // xfbMode
1059+
GX_FALSE, // field_rendering
1060+
GX_FALSE, // aa
1061+
1062+
// sample points arranged in increasing Y order
1063+
{
1064+
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
1065+
{6,6},{6,6},{6,6}, // pix 1
1066+
{6,6},{6,6},{6,6}, // pix 2
1067+
{6,6},{6,6},{6,6} // pix 3
1068+
},
1069+
// vertical filter[7], 1/64 units, 6 bits each
1070+
{
1071+
0, // line n-1
1072+
0, // line n-1
1073+
0, // line n
1074+
16, // line n
1075+
16, // line n
1076+
16, // line n+1
1077+
16 // line n+1
1078+
},
1079+
GX_COPY_INTLC_EVEN // copy_interlaced
1080+
};
1081+
1082+
GXRModeObj TVPal288DsAaScale =
1083+
{
1084+
VI_TVMODE_PAL_DS, // viTVMode
1085+
640, // fbWidth
1086+
240, // efbHeight
1087+
288, // xfbHeight
1088+
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
1089+
(VI_MAX_HEIGHT_PAL/2 - 576/2)/2, // viYOrigin
1090+
640, // viWidth
1091+
576, // viHeight
1092+
VI_XFBMODE_SF, // xfbMode
1093+
GX_FALSE, // field_rendering
1094+
GX_TRUE, // aa
1095+
1096+
// sample points arranged in increasing Y order
1097+
{
1098+
{3,2},{9,6},{3,10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
1099+
{3,2},{9,6},{3,10}, // pix 1
1100+
{9,2},{3,6},{9,10}, // pix 2
1101+
{9,2},{3,6},{9,10} // pix 3
1102+
},
1103+
// vertical filter[7], 1/64 units, 6 bits each
1104+
{
1105+
0, // line n-1
1106+
0, // line n-1
1107+
21, // line n
1108+
22, // line n
1109+
21, // line n
1110+
0, // line n+1
1111+
0 // line n+1
1112+
},
1113+
GX_COPY_PROGRESSIVE // copy_interlaced
1114+
};
1115+
9121116
GXRModeObj TVPal264Int =
9131117
{
9141118
VI_TVMODE_PAL_INT, // viTVMode
@@ -1453,6 +1657,40 @@ GXRModeObj TVEurgb60Hz240Ds =
14531657
GX_COPY_PROGRESSIVE // copy_interlaced
14541658
};
14551659

1660+
GXRModeObj TVEurgb60Hz240DsVf =
1661+
{
1662+
VI_TVMODE_EURGB60_DS, // viTVMode
1663+
640, // fbWidth
1664+
480, // efbHeight
1665+
240, // xfbHeight
1666+
(VI_MAX_WIDTH_EURGB60 - 640)/2, // viXOrigin
1667+
(VI_MAX_HEIGHT_EURGB60/2 - 480/2)/2, // viYOrigin
1668+
640, // viWidth
1669+
480, // viHeight
1670+
VI_XFBMODE_SF, // xfbMode
1671+
GX_FALSE, // field_rendering
1672+
GX_FALSE, // aa
1673+
1674+
// sample points arranged in increasing Y order
1675+
{
1676+
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
1677+
{6,6},{6,6},{6,6}, // pix 1
1678+
{6,6},{6,6},{6,6}, // pix 2
1679+
{6,6},{6,6},{6,6} // pix 3
1680+
},
1681+
// vertical filter[7], 1/64 units, 6 bits each
1682+
{
1683+
0, // line n-1
1684+
0, // line n-1
1685+
0, // line n
1686+
16, // line n
1687+
16, // line n
1688+
16, // line n+1
1689+
16 // line n+1
1690+
},
1691+
GX_COPY_INTLC_EVEN // copy_interlaced
1692+
};
1693+
14561694
GXRModeObj TVEurgb60Hz240DsAa =
14571695
{
14581696
VI_TVMODE_EURGB60_DS, // viTVMode

0 commit comments

Comments
 (0)