[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 127, Wed Apr 17 14:04:41 2002 UTC revision 324, Sun Jul 21 03:49:47 2002 UTC
# Line 23  Line 23 
23   *   *
24   *      History:   *      History:
25   *   *
26     *      12.07.2002      num_threads
27     *      23.06.2002      XVID_CPU_CHKONLY; loading speed up
28     *      25.04.2002      ICDECOMPRESS_PREROLL
29   *      17.04.2002      re-enabled lumi masking for 1st pass   *      17.04.2002      re-enabled lumi masking for 1st pass
30   *      15.04.2002      updated cbr support   *      15.04.2002      updated cbr support
31   *      04.04.2002      separated 2-pass code to 2pass.c   *      04.04.2002      separated 2-pass code to 2pass.c
# Line 217  Line 220 
220    
221  LRESULT compress_get_size(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput)  LRESULT compress_get_size(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput)
222  {  {
223          return lpbiOutput->bmiHeader.biWidth * lpbiOutput->bmiHeader.biHeight * 3;          return
224    #ifdef BFRAMES
225             2 *
226    #endif
227            lpbiOutput->bmiHeader.biWidth * lpbiOutput->bmiHeader.biHeight * 3;
228  }  }
229    
230    
# Line 288  Line 295 
295          param.max_quantizer = codec->config.max_pquant;          param.max_quantizer = codec->config.max_pquant;
296          param.max_key_interval = codec->config.max_key_interval;          param.max_key_interval = codec->config.max_key_interval;
297    
298    #ifdef _SMP
299            param.num_threads = codec->config.num_threads;
300    #endif
301    
302    #ifdef BFRAMES
303            param.global = 0;
304            if (codec->config.packed) param.global |= XVID_GLOBAL_PACKED;
305            if (codec->config.dx50bvop) param.global |= XVID_GLOBAL_DX50BVOP;
306            if (codec->config.debug) param.global |= XVID_GLOBAL_DEBUG;
307            param.max_bframes = codec->config.max_bframes;
308            param.bquant_ratio = codec->config.bquant_ratio;
309            param.frame_drop_ratio = codec->config.frame_drop_ratio;
310    #endif
311    
312          switch(xvid_encore(0, XVID_ENC_CREATE, &param, NULL))          switch(xvid_encore(0, XVID_ENC_CREATE, &param, NULL))
313          {          {
314          case XVID_ERR_FAIL :          case XVID_ERR_FAIL :
# Line 373  Line 394 
394    
395          if (codec->config.interlacing)          if (codec->config.interlacing)
396                  frame.general |= XVID_INTERLACING;                  frame.general |= XVID_INTERLACING;
397    // fix 1pass modes/hinted MV by koepi
398            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))
399            {
400                    codec->config.hinted_me = 0;
401            }
402    // end of ugly hack
403    
404          if (codec->config.hinted_me && codec->config.mode == DLG_MODE_2PASS_1)          if (codec->config.hinted_me && codec->config.mode == DLG_MODE_2PASS_1)
405          {          {
# Line 489  Line 516 
516                  frame.intra = 0;                  frame.intra = 0;
517          }          }
518    
519    #ifdef BFRAMES
520            frame.bquant = 0;
521    #endif
522    
523    //      OutputDebugString(" ");
524          switch (xvid_encore(codec->ehandle, XVID_ENC_ENCODE, &frame, &stats))          switch (xvid_encore(codec->ehandle, XVID_ENC_ENCODE, &frame, &stats))
525          {          {
526          case XVID_ERR_FAIL :          case XVID_ERR_FAIL :
# Line 667  Line 699 
699          frame.image = icd->lpOutput;          frame.image = icd->lpOutput;
700          frame.stride = icd->lpbiOutput->biWidth;          frame.stride = icd->lpbiOutput->biWidth;
701    
702          if (~((icd->dwFlags & ICDECOMPRESS_HURRYUP) | (icd->dwFlags & ICDECOMPRESS_UPDATE)))          if (~((icd->dwFlags & ICDECOMPRESS_HURRYUP) | (icd->dwFlags & ICDECOMPRESS_UPDATE) | (icd->dwFlags & ICDECOMPRESS_PREROLL)))
703          {          {
704                  if ((frame.colorspace = get_colorspace(icd->lpbiOutput)) == XVID_CSP_NULL)                  if ((frame.colorspace = get_colorspace(icd->lpbiOutput)) == XVID_CSP_NULL)
705                  {                  {

Legend:
Removed from v.127  
changed lines
  Added in v.324

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