[svn] / trunk / vfw / src / codec.c Repository:
ViewVC logotype

Diff of /trunk/vfw/src/codec.c

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

revision 137, Thu Apr 25 07:16:00 2002 UTC revision 278, Wed Jul 10 13:02:15 2002 UTC
# Line 23  Line 23 
23   *   *
24   *      History:   *      History:
25   *   *
26     *      23.06.2002      XVID_CPU_CHKONLY; loading speed up
27   *      25.04.2002      ICDECOMPRESS_PREROLL   *      25.04.2002      ICDECOMPRESS_PREROLL
28   *      17.04.2002      re-enabled lumi masking for 1st pass   *      17.04.2002      re-enabled lumi masking for 1st pass
29   *      15.04.2002      updated cbr support   *      15.04.2002      updated cbr support
# Line 218  Line 219 
219    
220  LRESULT compress_get_size(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput)  LRESULT compress_get_size(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput)
221  {  {
222          return lpbiOutput->bmiHeader.biWidth * lpbiOutput->bmiHeader.biHeight * 3;          return
223    #ifdef BFRAMES
224             2 *
225    #endif
226            lpbiOutput->bmiHeader.biWidth * lpbiOutput->bmiHeader.biHeight * 3;
227  }  }
228    
229    
# Line 289  Line 294 
294          param.max_quantizer = codec->config.max_pquant;          param.max_quantizer = codec->config.max_pquant;
295          param.max_key_interval = codec->config.max_key_interval;          param.max_key_interval = codec->config.max_key_interval;
296    
297    #ifdef BFRAMES
298            param.global = 0;
299            if (codec->config.packed) param.global |= XVID_GLOBAL_PACKED;
300            if (codec->config.dx50bvop) param.global |= XVID_GLOBAL_DX50BVOP;
301            if (codec->config.debug) param.global |= XVID_GLOBAL_DEBUG;
302            param.max_bframes = codec->config.max_bframes;
303            param.bquant_ratio = codec->config.bquant_ratio;
304    #endif
305    
306          switch(xvid_encore(0, XVID_ENC_CREATE, &param, NULL))          switch(xvid_encore(0, XVID_ENC_CREATE, &param, NULL))
307          {          {
308          case XVID_ERR_FAIL :          case XVID_ERR_FAIL :
# Line 374  Line 388 
388    
389          if (codec->config.interlacing)          if (codec->config.interlacing)
390                  frame.general |= XVID_INTERLACING;                  frame.general |= XVID_INTERLACING;
391    // fix 1pass modes/hinted MV by koepi
392            if (codec->config.hinted_me && (codec->config.mode == DLG_MODE_CBR || codec->config.mode == DLG_MODE_VBR_QUAL || codec->config.mode == DLG_MODE_VBR_QUANT))
393            {
394                    codec->config.hinted_me = 0;
395            }
396    // end of ugly hack
397    
398          if (codec->config.hinted_me && codec->config.mode == DLG_MODE_2PASS_1)          if (codec->config.hinted_me && codec->config.mode == DLG_MODE_2PASS_1)
399          {          {
# Line 490  Line 510 
510                  frame.intra = 0;                  frame.intra = 0;
511          }          }
512    
513    #ifdef BFRAMES
514            frame.bquant = 0;
515    #endif
516    
517            OutputDebugString(" ");
518          switch (xvid_encore(codec->ehandle, XVID_ENC_ENCODE, &frame, &stats))          switch (xvid_encore(codec->ehandle, XVID_ENC_ENCODE, &frame, &stats))
519          {          {
520          case XVID_ERR_FAIL :          case XVID_ERR_FAIL :

Legend:
Removed from v.137  
changed lines
  Added in v.278

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