Changeset 752 for trunk/core/gui_osd.c
- Timestamp:
- 04/24/09 20:43:35 (4 years ago)
- File:
-
- 1 edited
-
trunk/core/gui_osd.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/gui_osd.c
r747 r752 225 225 // returns 1 if zebra should be drawn 226 226 static int gui_osd_zebra_init(int show) { 227 unsigned i; 228 227 229 if(show) { 228 230 if (!buf) { … … 247 249 gui_osd_zebra_free(); 248 250 } 251 #if CAM_HAS_VARIABLE_ASPECT 252 else // in variable aspect, the borders would never be cleared 253 memset(buf,0,screen_buffer_size); 254 #endif 249 255 } 250 256 } … … 355 361 }; 356 362 363 unsigned bWide = 1; // if wide (16:9) or standard (4:3) aspect ratio (but 1 in cameras that only have 4:3) 364 unsigned aspOffset = 0; // offset to add to x-coord (or buffer address) when drawing zebra 365 366 #if CAM_HAS_VARIABLE_ASPECT 367 if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 0) // standard requires x-shift to overlay drawing 368 { 369 bWide = 0; 370 //aspOffset = (screen_width - (screen_width * 12 / 16)) / 2; // = actual calculation, simplified below 371 aspOffset = screen_width / 8; // half of the difference in width between equal height 16:9 and 4:3 screens, = black bar width 372 } 373 #endif 374 357 375 if (!gui_osd_zebra_init(show)) 358 376 return 0; … … 425 443 over = 255-conf.zebra_over; 426 444 if (conf.zebra_multichannel) {step_x=2; step_v=6;} else {step_x=1; step_v=3;} 427 for (s=0, y=1, v=0; y<=viewport_height; ++y) { 445 s = aspOffset; 446 for (y=1, v=0; y<=viewport_height; ++y) { 428 447 for (x=0; x<screen_width; x+=step_x, s+=step_x, v+=step_v) { 429 448 register int yy, uu, vv; 430 449 int sel; 450 451 if (!bWide && (x + aspOffset >= screen_width - aspOffset)) continue; // do not draw "outside screen" 452 431 453 yy = img_buf[v+1]; 432 454 if (conf.zebra_multichannel) {
Note: See TracChangeset
for help on using the changeset viewer.