- // 3 lines opt. video data
- info.xyz = &FIELD_2_ACTIVE;
- for (info.ln = 279; info.ln <= 281; info.ln++) {
- mkline(line_buffer, &info, BLACK);
- p = pack(p, line_buffer, elements);
- }
- for (info.ln = 282; info.ln <= 521; info.ln++) {
- create_HD_SDI_Line(line_buffer, &info, active_video_line, ACTIVE_VIDEO, vBuffer);
- p = pack(p, line_buffer, elements);
- active_video_line += 2;
+
+ // 480 or 486 lines
+ if (info.fmt == &FMT_480i5994) {
+ // 3 lines opt. video data
+ info.xyz = &FIELD_2_ACTIVE;
+ for (info.ln = 279; info.ln <= 281; info.ln++) {
+ mkline(line_buffer, &info, BLACK);
+ p = pack(p, line_buffer, elements);
+ }
+ // 240 lines
+ for (info.ln = 282; info.ln <= 521; info.ln++) {
+ create_HD_SDI_Line(line_buffer, &info, active_video_line, ACTIVE_VIDEO, vBuffer);
+ p = pack(p, line_buffer, elements);
+ active_video_line += 2;
+ }
+ } else {
+ // 243 lines
+ for (info.ln = 279; info.ln <= 521; info.ln++) {
+ create_HD_SDI_Line(line_buffer, &info, active_video_line, ACTIVE_VIDEO, vBuffer);
+ p = pack(p, line_buffer, elements);
+ active_video_line += 2;
+ }