[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 632, Thu Nov 7 10:34:14 2002 UTC
# Line 451  Line 451 
451          frame.motion = pmvfast_presets[codec->config.motion_search];          frame.motion = pmvfast_presets[codec->config.motion_search];
452    
453          frame.image = icc->lpInput;          frame.image = icc->lpInput;
454            // dev-api-3
455            frame.stride = (((icc->lpbiInput->biWidth * icc->lpbiInput->biBitCount) + 31) & ~31) >> 3;
456    
457          if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL)          if ((frame.colorspace = get_colorspace(inhdr)) == XVID_CSP_NULL)
458                  return ICERR_BADFORMAT;                  return ICERR_BADFORMAT;
# Line 608  Line 610 
610          {          {
611                  return ICERR_ERROR;                  return ICERR_ERROR;
612          }          }
613    /* --- yv12 --- */
614            if (inhdr->biCompression == FOURCC_YV12) {
615                    return ICERR_OK;
616            }
617    /* --- yv12 --- */
618    
619          if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX)          if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX)
620          {          {
# Line 641  Line 648 
648                  return sizeof(BITMAPINFOHEADER);                  return sizeof(BITMAPINFOHEADER);
649          }          }
650    
651            /* --- yv12 --- */
652    
653            if (lpbiInput->bmiHeader.biCompression == FOURCC_YV12) {
654                    memcpy(outhdr, inhdr, sizeof(BITMAPINFOHEADER));
655                    return ICERR_OK;
656            }
657            /* --- yv12 --- */
658    
659          result = decompress_query(codec, lpbiInput, lpbiOutput);          result = decompress_query(codec, lpbiInput, lpbiOutput);
660          if (result != ICERR_OK)          if (result != ICERR_OK)
661          {          {
# Line 712  Line 727 
727          frame.length = icd->lpbiInput->biSizeImage;          frame.length = icd->lpbiInput->biSizeImage;
728    
729          frame.image = icd->lpOutput;          frame.image = icd->lpOutput;
730          frame.stride = icd->lpbiOutput->biWidth;          //frame.stride = icd->lpbiOutput->biWidth;
731            // dev-api-3:
732            frame.stride = (((icd->lpbiOutput->biWidth * icd->lpbiOutput->biBitCount) + 31) & ~31) >> 3;
733    
734            /* --- yv12 --- */
735            if (icd->lpbiInput->biCompression == FOURCC_YV12) {
736                    DEBUGFOURCC("output", icd->lpbiOutput->biCompression);
737                    if (icd->lpbiOutput->biCompression == FOURCC_YV12) {
738                            memcpy(frame.image,codec->dhandle,icd->lpbiInput->biSizeImage);
739                    }
740                    return ICERR_OK;
741            }
742            /* --- yv12 --- */
743    
744    
745          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)))
746          {          {

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

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