46 |
REG_GET_N("Brightness", g_config.nBrightness, 25) |
REG_GET_N("Brightness", g_config.nBrightness, 25) |
47 |
REG_GET_N("Deblock_Y", g_config.nDeblock_Y, 0) |
REG_GET_N("Deblock_Y", g_config.nDeblock_Y, 0) |
48 |
REG_GET_N("Deblock_UV", g_config.nDeblock_UV, 0) |
REG_GET_N("Deblock_UV", g_config.nDeblock_UV, 0) |
49 |
REG_GET_N("Dering", g_config.nDering, 0) |
REG_GET_N("Dering_Y", g_config.nDering_Y, 0) |
50 |
|
REG_GET_N("Dering_UV", g_config.nDering_UV, 0) |
51 |
REG_GET_N("FilmEffect", g_config.nFilmEffect, 0) |
REG_GET_N("FilmEffect", g_config.nFilmEffect, 0) |
52 |
REG_GET_N("ForceColorspace", g_config.nForceColorspace, 0) |
REG_GET_N("ForceColorspace", g_config.nForceColorspace, 0) |
53 |
REG_GET_N("FlipVideo", g_config.nFlipVideo, 0) |
REG_GET_N("FlipVideo", g_config.nFlipVideo, 0) |
54 |
REG_GET_N("Supported_4CC", g_config.supported_4cc, 0) |
REG_GET_N("Supported_4CC", g_config.supported_4cc, 0) |
55 |
REG_GET_N("Videoinfo_Compat", g_config.videoinfo_compat, 0) |
REG_GET_N("Videoinfo_Compat", g_config.videoinfo_compat, 0) |
56 |
|
REG_GET_N("Aspect_Ratio", g_config.aspect_ratio, 0) |
57 |
|
|
58 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
59 |
} |
} |
81 |
REG_SET_N("Brightness", g_config.nBrightness); |
REG_SET_N("Brightness", g_config.nBrightness); |
82 |
REG_SET_N("Deblock_Y", g_config.nDeblock_Y); |
REG_SET_N("Deblock_Y", g_config.nDeblock_Y); |
83 |
REG_SET_N("Deblock_UV", g_config.nDeblock_UV); |
REG_SET_N("Deblock_UV", g_config.nDeblock_UV); |
84 |
REG_SET_N("Dering", g_config.nDering); |
REG_SET_N("Dering_Y", g_config.nDering_Y); |
85 |
|
REG_SET_N("Dering_UV", g_config.nDering_UV); |
86 |
REG_SET_N("FilmEffect", g_config.nFilmEffect); |
REG_SET_N("FilmEffect", g_config.nFilmEffect); |
87 |
REG_SET_N("ForceColorspace", g_config.nForceColorspace); |
REG_SET_N("ForceColorspace", g_config.nForceColorspace); |
88 |
REG_SET_N("FlipVideo", g_config.nFlipVideo); |
REG_SET_N("FlipVideo", g_config.nFlipVideo); |
89 |
REG_SET_N("Supported_4CC", g_config.supported_4cc); |
REG_SET_N("Supported_4CC", g_config.supported_4cc); |
90 |
REG_SET_N("Videoinfo_Compat", g_config.videoinfo_compat); |
REG_SET_N("Videoinfo_Compat", g_config.videoinfo_compat); |
91 |
|
REG_SET_N("Aspect_Ratio", g_config.aspect_ratio); |
92 |
|
|
93 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
94 |
} |
} |
104 |
case WM_DESTROY: |
case WM_DESTROY: |
105 |
{ |
{ |
106 |
int nForceColorspace; |
int nForceColorspace; |
107 |
|
int aspect_ratio; |
108 |
|
|
109 |
nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0); |
nForceColorspace = SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_GETCURSEL, 0, 0); |
110 |
if ( g_config.nForceColorspace != nForceColorspace ) |
if ( g_config.nForceColorspace != nForceColorspace ) |
111 |
{ |
{ |
112 |
MessageBox(0, "You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect.", "XviD DShow", 0); |
MessageBox(0, "You have changed the output colorspace.\r\nClose the movie and open it for the new colorspace to take effect.", "XviD DShow", MB_TOPMOST); |
113 |
} |
} |
114 |
g_config.nForceColorspace = nForceColorspace; |
g_config.nForceColorspace = nForceColorspace; |
115 |
|
|
116 |
|
aspect_ratio = SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_GETCURSEL, 0, 0); |
117 |
|
if ( g_config.aspect_ratio != aspect_ratio ) |
118 |
|
{ |
119 |
|
MessageBox(0, "You have changed the default aspect ratio.\r\nClose the movie and open it for the new aspect ratio to take effect.", "XviD DShow", MB_TOPMOST); |
120 |
|
} |
121 |
|
g_config.aspect_ratio = aspect_ratio; |
122 |
SaveRegistryInfo(); |
SaveRegistryInfo(); |
123 |
} |
} |
124 |
break; |
break; |
140 |
SendMessage(hBrightness, TBM_SETTICFREQ, (WPARAM)16, (LPARAM)0); |
SendMessage(hBrightness, TBM_SETTICFREQ, (WPARAM)16, (LPARAM)0); |
141 |
SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness); |
SendMessage(hBrightness, TBM_SETPOS, (WPARAM)TRUE, (LPARAM) g_config.nBrightness); |
142 |
|
|
143 |
|
// Load Aspect Ratio Box |
144 |
|
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"Auto"); |
145 |
|
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"4:3"); |
146 |
|
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"16:9"); |
147 |
|
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_ADDSTRING, 0, (LPARAM)"2.35:1"); |
148 |
|
|
149 |
|
// Select Aspect Ratio |
150 |
|
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_SETCURSEL, g_config.aspect_ratio, 0); |
151 |
|
|
152 |
|
|
153 |
// Load Buttons |
// Load Buttons |
154 |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_Y), BM_SETCHECK, g_config.nDeblock_Y, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_Y), BM_SETCHECK, g_config.nDeblock_Y, 0); |
155 |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_UV), BM_SETCHECK, g_config.nDeblock_UV, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_UV), BM_SETCHECK, g_config.nDeblock_UV, 0); |
156 |
SendMessage(GetDlgItem(hwnd, IDC_DERING), BM_SETCHECK, g_config.nDering, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DERINGY), BM_SETCHECK, g_config.nDering_Y, 0); |
157 |
|
SendMessage(GetDlgItem(hwnd, IDC_DERINGUV), BM_SETCHECK, g_config.nDering_UV, 0); |
158 |
SendMessage(GetDlgItem(hwnd, IDC_FILMEFFECT), BM_SETCHECK, g_config.nFilmEffect, 0); |
SendMessage(GetDlgItem(hwnd, IDC_FILMEFFECT), BM_SETCHECK, g_config.nFilmEffect, 0); |
159 |
SendMessage(GetDlgItem(hwnd, IDC_FLIPVIDEO), BM_SETCHECK, g_config.nFlipVideo, 0); |
SendMessage(GetDlgItem(hwnd, IDC_FLIPVIDEO), BM_SETCHECK, g_config.nFlipVideo, 0); |
160 |
|
|
164 |
SendMessage(GetDlgItem(hwnd, IDC_MP4V), BM_SETCHECK, g_config.supported_4cc & SUPPORT_MP4V, 0); |
SendMessage(GetDlgItem(hwnd, IDC_MP4V), BM_SETCHECK, g_config.supported_4cc & SUPPORT_MP4V, 0); |
165 |
SendMessage(GetDlgItem(hwnd, IDC_COMPAT), BM_SETCHECK, g_config.videoinfo_compat, 0); |
SendMessage(GetDlgItem(hwnd, IDC_COMPAT), BM_SETCHECK, g_config.videoinfo_compat, 0); |
166 |
|
|
167 |
|
EnableWindow(GetDlgItem(hwnd,IDC_DERINGY),g_config.nDeblock_Y); |
168 |
|
EnableWindow(GetDlgItem(hwnd,IDC_DERINGUV),g_config.nDeblock_UV); |
169 |
|
|
170 |
|
|
171 |
// Set Date & Time of Compilation |
// Set Date & Time of Compilation |
172 |
DPRINTF("(%s %s)", __DATE__, __TIME__); |
DPRINTF("(%s %s)", __DATE__, __TIME__); |
173 |
break; |
break; |
182 |
// Load Buttons |
// Load Buttons |
183 |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_Y), BM_SETCHECK, g_config.nDeblock_Y, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_Y), BM_SETCHECK, g_config.nDeblock_Y, 0); |
184 |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_UV), BM_SETCHECK, g_config.nDeblock_UV, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DEBLOCK_UV), BM_SETCHECK, g_config.nDeblock_UV, 0); |
185 |
SendMessage(GetDlgItem(hwnd, IDC_DERING), BM_SETCHECK, g_config.nDering, 0); |
SendMessage(GetDlgItem(hwnd, IDC_DERINGY), BM_SETCHECK, g_config.nDering_Y, 0); |
186 |
|
SendMessage(GetDlgItem(hwnd, IDC_DERINGUV), BM_SETCHECK, g_config.nDering_UV, 0); |
187 |
SendMessage(GetDlgItem(hwnd, IDC_FILMEFFECT), BM_SETCHECK, g_config.nFilmEffect, 0); |
SendMessage(GetDlgItem(hwnd, IDC_FILMEFFECT), BM_SETCHECK, g_config.nFilmEffect, 0); |
188 |
SendMessage(GetDlgItem(hwnd, IDC_FLIPVIDEO), BM_SETCHECK, g_config.nFlipVideo, 0); |
SendMessage(GetDlgItem(hwnd, IDC_FLIPVIDEO), BM_SETCHECK, g_config.nFlipVideo, 0); |
189 |
g_config.nForceColorspace = 0; |
g_config.nForceColorspace = 0; |
190 |
SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_SETCURSEL, g_config.nForceColorspace, 0); |
SendMessage(GetDlgItem(hwnd, IDC_COLORSPACE), CB_SETCURSEL, g_config.nForceColorspace, 0); |
191 |
|
g_config.aspect_ratio = 0; |
192 |
|
SendMessage(GetDlgItem(hwnd, IDC_USE_AR), CB_SETCURSEL, g_config.aspect_ratio, 0); |
193 |
break; |
break; |
194 |
case IDC_DEBLOCK_Y: |
case IDC_DEBLOCK_Y: |
195 |
g_config.nDeblock_Y = !g_config.nDeblock_Y; |
g_config.nDeblock_Y = !g_config.nDeblock_Y; |
197 |
case IDC_DEBLOCK_UV: |
case IDC_DEBLOCK_UV: |
198 |
g_config.nDeblock_UV = !g_config.nDeblock_UV; |
g_config.nDeblock_UV = !g_config.nDeblock_UV; |
199 |
break; |
break; |
200 |
case IDC_DERING: |
case IDC_DERINGY: |
201 |
g_config.nDering = !g_config.nDering; |
g_config.nDering_Y = !g_config.nDering_Y; |
202 |
|
break; |
203 |
|
case IDC_DERINGUV: |
204 |
|
g_config.nDering_UV = !g_config.nDering_UV; |
205 |
break; |
break; |
206 |
case IDC_FILMEFFECT: |
case IDC_FILMEFFECT: |
207 |
g_config.nFilmEffect = !g_config.nFilmEffect; |
g_config.nFilmEffect = !g_config.nFilmEffect; |
224 |
default : |
default : |
225 |
return FALSE; |
return FALSE; |
226 |
} |
} |
227 |
|
EnableWindow(GetDlgItem(hwnd,IDC_DERINGY),g_config.nDeblock_Y); |
228 |
|
EnableWindow(GetDlgItem(hwnd,IDC_DERINGUV),g_config.nDeblock_UV); |
229 |
SaveRegistryInfo(); |
SaveRegistryInfo(); |
230 |
|
|
231 |
|
|
232 |
break; |
break; |
233 |
case WM_NOTIFY: |
case WM_NOTIFY: |
234 |
hBrightness = GetDlgItem(hwnd, IDC_BRIGHTNESS); |
hBrightness = GetDlgItem(hwnd, IDC_BRIGHTNESS); |