Changeset 4230

Show
Ignore:
Timestamp:
07/26/08 13:44:47 (6 years ago)
Author:
douglask
Message:

D1_WIDTH of 720 doesn't work with webcams and PAL capture cards,
now defaults to NTSC_WIDTH of 640 if PAL/SECAM not selected.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/mpeg4/video/grabber-video4linux.cpp

    r4221 r4230  
    356356    max_width_ = capability.maxwidth; 
    357357    max_height_ = capability.maxheight; 
    358      
    359     if(max_width_ >= D1_WIDTH || max_height_ >= D1_HEIGHT){ 
    360         base_width_ = D1_WIDTH; 
    361         base_height_ = D1_HEIGHT;        
    362     }else{ 
    363         base_width_ = max_width_; 
    364         base_height_ = max_height_; 
    365     } 
    366358     
    367359    channels = (struct video_channel *) 
     
    10621054    debug_msg("V4L: format\n"); 
    10631055 
    1064     if(decimate_!=1){ 
    1065         width_ = CIF_WIDTH * 2 / decimate_; 
    1066         height_ = CIF_HEIGHT * 2 / decimate_; 
    1067     }else{ 
     1056    base_width_ = max_width_; 
     1057    base_height_ = max_height_; 
     1058    if (norm_ == VIDEO_MODE_PAL || norm_ == VIDEO_MODE_SECAM) { 
     1059        if (max_width_ >= PAL_WIDTH && max_height_ == PAL_HEIGHT) { 
     1060            base_width_ = PAL_WIDTH; 
     1061            base_height_ = PAL_HEIGHT; 
     1062        } 
     1063    } else { 
     1064        if (max_width_ >= NTSC_WIDTH && max_height_ >= NTSC_HEIGHT) { 
     1065            base_width_ = NTSC_WIDTH; 
     1066            base_height_ = NTSC_HEIGHT; 
     1067        } 
     1068    } 
     1069 
     1070    if (decimate_ != 1) { 
     1071        width_ = CIF_WIDTH * 2 / decimate_; 
     1072        height_ = CIF_HEIGHT * 2 / decimate_; 
     1073    } else { 
    10681074        width_  = base_width_; 
    10691075        height_ = base_height_;