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

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

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

revision 611, Thu Oct 24 14:45:24 2002 UTC revision 625, Sun Nov 3 03:22:03 2002 UTC
# Line 401  Line 401 
401                  frame.general |= XVID_INTERLACING;                  frame.general |= XVID_INTERLACING;
402    
403    
   
404  // added by koepi for credits greyscale  // added by koepi for credits greyscale
405    
406          check_greyscale_mode(&codec->config, &frame, codec->framenum);          check_greyscale_mode(&codec->config, &frame, codec->framenum);
# Line 451  Line 450 
450          frame.motion = pmvfast_presets[codec->config.motion_search];          frame.motion = pmvfast_presets[codec->config.motion_search];
451    
452          frame.image = icc->lpInput;          frame.image = icc->lpInput;
453            // dev-api-3 frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3;
454    
455          if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL)          if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL)
456                  return ICERR_BADFORMAT;                  return ICERR_BADFORMAT;
# Line 608  Line 608 
608          {          {
609                  return ICERR_ERROR;                  return ICERR_ERROR;
610          }          }
611    /* --- yv12 --- */
612            if (inhdr->biCompression == FOURCC_YV12) {
613                    return ICERR_OK;
614            }
615    /* --- yv12 --- */
616    
617          if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX)          if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX)
618          {          {
# Line 641  Line 646 
646                  return sizeof(BITMAPINFOHEADER);                  return sizeof(BITMAPINFOHEADER);
647          }          }
648    
649            /* --- yv12 --- */
650    
651            if (lpbiInput->bmiHeader.biCompression == FOURCC_YV12) {
652                    memcpy(outhdr, inhdr, sizeof(BITMAPINFOHEADER));
653                    return ICERR_OK;
654            }
655            /* --- yv12 --- */
656    
657          result = decompress_query(codec, lpbiInput, lpbiOutput);          result = decompress_query(codec, lpbiInput, lpbiOutput);
658          if (result != ICERR_OK)          if (result != ICERR_OK)
659          {          {
# Line 713  Line 726 
726    
727          frame.image = icd->lpOutput;          frame.image = icd->lpOutput;
728          frame.stride = icd->lpbiOutput->biWidth;          frame.stride = icd->lpbiOutput->biWidth;
729            // dev-api-3: frame.stride = (((icd->lpbiOutput->biWidth * icd->lpbiOutput->biBitCount) + 31) & ~31) >> 3;
730    
731            /* --- yv12 --- */
732            if (icd->lpbiInput->biCompression == FOURCC_YV12) {
733                    DEBUGFOURCC("output", icd->lpbiOutput->biCompression);
734                    if (icd->lpbiOutput->biCompression == FOURCC_YV12) {
735                            memcpy(frame.image,codec->dhandle,icd->lpbiInput->biSizeImage);
736                    }
737                    return ICERR_OK;
738            }
739            /* --- yv12 --- */
740    
741    
742          if (~((icd->dwFlags & ICDECOMPRESS_HURRYUP) | (icd->dwFlags & ICDECOMPRESS_UPDATE) | (icd->dwFlags & ICDECOMPRESS_PREROLL)))          if (~((icd->dwFlags & ICDECOMPRESS_HURRYUP) | (icd->dwFlags & ICDECOMPRESS_UPDATE) | (icd->dwFlags & ICDECOMPRESS_PREROLL)))
743          {          {

Legend:
Removed from v.611  
changed lines
  Added in v.625

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