[svn] / branches / dev-api-4 / xvidcore / vfw / src / codec.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/vfw/src/codec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1267, Wed Dec 17 15:16:16 2003 UTC revision 1277, Thu Dec 18 14:51:40 2003 UTC
# Line 557  Line 557 
557          if ((profiles[codec->config.profile].flags & PROFILE_INTERLACE) && codec->config.interlacing)          if ((profiles[codec->config.profile].flags & PROFILE_INTERLACE) && codec->config.interlacing)
558                  frame.vol_flags |= XVID_VOL_INTERLACING;                  frame.vol_flags |= XVID_VOL_INTERLACING;
559    
560          if (codec->config.display_aspect_ratio !=0) {          if (codec->config.ar_mode == 0) { /* PAR */
561                  int ar_x;                  if (codec->config.display_aspect_ratio != 5) {
562                  int ar_y;                          frame.par = codec->config.display_aspect_ratio + 1;
563                    } else {
564                  if (codec->config.display_aspect_ratio == 1) {                          frame.par = XVID_PAR_EXT;
565                          ar_x = 4;                          frame.par_width = codec->config.par_x;
566                          ar_y = 3;                          frame.par_height= codec->config.par_y;
                 }  
                 if (codec->config.display_aspect_ratio == 2) {  
                         ar_x = 16;  
                         ar_y = 9;  
567                  }                  }
568            } else { /* AR */
569                  /* custom pixel aspect ratio -> calculated from DAR */                  /* custom pixel aspect ratio -> calculated from DAR */
570                  frame.par = XVID_PAR_EXT;                  frame.par = XVID_PAR_EXT;
571                  frame.par_width = (100 * inhdr->biHeight) / ar_y;                  frame.par_width = (100 * inhdr->biHeight) / codec->config.ar_y;
572                  frame.par_height= (100 * inhdr->biWidth) / ar_x;                  frame.par_height= (100 * inhdr->biWidth) / codec->config.ar_x;;
         } else {  
                 /* assuming defaults for now... */  
                 frame.par = XVID_PAR_11_VGA;  
573          }          }
574    
575      /* vop stuff */      /* vop stuff */

Legend:
Removed from v.1267  
changed lines
  Added in v.1277

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4