// // Copyright (C) 2015-2017 Markus Hiienkari // // This file is part of Open Source Scan Converter project. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // #include #include #include "system.h" #include "av_controller.h" #include "video_modes.h" #define LINECNT_MAX_TOLERANCE 30 extern avmode_t cm; const mode_data_t video_modes_default[] = VIDEO_MODES_DEF; mode_data_t video_modes[VIDEO_MODES_CNT]; /* TODO: rewrite, check hz etc. */ alt_8 get_mode_id(alt_u32 totlines, alt_u8 progressive, alt_u32 hz, video_type typemask) { alt_8 i; alt_u8 num_modes = sizeof(video_modes)/sizeof(mode_data_t); video_type mode_type; mode_flags valid_lm[] = { MODE_PT, (MODE_L2 | (MODE_L2<