[svn] / branches / release-1_3-branch / xvidcore / dshow / src / CXvidDecoder.cpp Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/dshow/src/CXvidDecoder.cpp

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

revision 2116, Mon Jun 15 13:00:46 2015 UTC revision 2131, Fri Jan 8 17:44:53 2016 UTC
# Line 319  Line 319 
319    
320          m_tray_icon = 0;          m_tray_icon = 0;
321          m_startClock = clock();          m_startClock = clock();
322            interlaced = 0;
323    
324  #if defined(XVID_USE_MFT)  #if defined(XVID_USE_MFT)
325          InitializeCriticalSection(&m_mft_lock);          InitializeCriticalSection(&m_mft_lock);
# Line 728  Line 729 
729                          vih->dwPictAspectRatioY = abs(m_create.height);                          vih->dwPictAspectRatioY = abs(m_create.height);
730                          forced_ar = false;                          forced_ar = false;
731                  }                  }
732                    if (interlaced) {
733                            vih->dwInterlaceFlags = AMINTERLACE_IsInterlaced;
734                            if (interlaced > 1) {
735                                    vih->dwInterlaceFlags |= AMINTERLACE_Field1First;
736                            }
737                    }
738                    else {
739                            vih->dwInterlaceFlags = 0;
740                    }
741          } else {          } else {
742    
743                  VIDEOINFOHEADER * vih = (VIDEOINFOHEADER *) mtOut->ReallocFormatBuffer(sizeof(VIDEOINFOHEADER));                  VIDEOINFOHEADER * vih = (VIDEOINFOHEADER *) mtOut->ReallocFormatBuffer(sizeof(VIDEOINFOHEADER));
# Line 1159  Line 1169 
1169                                  {                                  {
1170                                          vihOut2->dwPictAspectRatioX = ar_x;                                          vihOut2->dwPictAspectRatioX = ar_x;
1171                                          vihOut2->dwPictAspectRatioY = ar_y;                                          vihOut2->dwPictAspectRatioY = ar_y;
1172                                            if (interlaced) {
1173                                                    vihOut2->dwInterlaceFlags = AMINTERLACE_IsInterlaced;
1174                                                    if (interlaced > 2) {
1175                                                            vihOut2->dwInterlaceFlags |= AMINTERLACE_Field1First;
1176                                                    }
1177                                            }
1178                                            else {
1179                                                    vihOut2->dwInterlaceFlags = 0;
1180                                            }
1181                                          pOut2->SetMediaType(&mtOut2);                                          pOut2->SetMediaType(&mtOut2);
1182                                          m_pOutput->SetMediaType(&mtOut2);                                          m_pOutput->SetMediaType(&mtOut2);
1183                                  }                                  }
# Line 1583  Line 1602 
1602          }          }
1603    
1604          if (SUCCEEDED(hr)) {          if (SUCCEEDED(hr)) {
1605                    if (interlaced > 1) {
1606                            hr = pOutputType->SetUINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_FieldInterleavedUpperFirst);
1607                    }
1608                    else if (interlaced) {
1609                            hr = pOutputType->SetUINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_FieldInterleavedLowerFirst);
1610                    }
1611                    else {
1612                  hr = pOutputType->SetUINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive);                  hr = pOutputType->SetUINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive);
1613          }          }
1614            }
1615    
1616          if (SUCCEEDED(hr)) {          if (SUCCEEDED(hr)) {
1617                  hr = MFSetAttributeRatio(pOutputType, MF_MT_PIXEL_ASPECT_RATIO, ar_x, ar_y);                  hr = MFSetAttributeRatio(pOutputType, MF_MT_PIXEL_ASPECT_RATIO, ar_x, ar_y);
# Line 2049  Line 2076 
2076                                                                                                             or it'll have no effect at all... */                                                                                                             or it'll have no effect at all... */
2077                  }                  }
2078    
2079                    if (stats.data.vol.general & XVID_VOL_INTERLACING) {
2080                            interlaced = (stats.data.vop.general & XVID_VOP_TOPFIELDFIRST) ? 2 : 1;
2081                    }
2082                    else {
2083                            interlaced = 0;
2084                    }
2085    
2086                  m_frame.bitstream = (BYTE*)m_frame.bitstream + length;                  m_frame.bitstream = (BYTE*)m_frame.bitstream + length;
2087                  m_frame.length -= length;                  m_frame.length -= length;
2088                  goto repeat;                  goto repeat;
# Line 2151  Line 2185 
2185    
2186                  convert.width = m_create.width;                  convert.width = m_create.width;
2187                  convert.height = m_create.height;                  convert.height = m_create.height;
2188                  convert.interlacing = 0;                  convert.interlacing = (interlaced > 0) ? 1 : 0;
2189    
2190                  if (m_frame.output.plane[1] != NULL && Dst != NULL && xvid_global_func != NULL)                  if (m_frame.output.plane[1] != NULL && Dst != NULL && xvid_global_func != NULL)
2191                          if (xvid_global_func(0, XVID_GBL_CONVERT, &convert, NULL) < 0) /* CSP convert into output buffer */                          if (xvid_global_func(0, XVID_GBL_CONVERT, &convert, NULL) < 0) /* CSP convert into output buffer */

Legend:
Removed from v.2116  
changed lines
  Added in v.2131

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