19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: CXvidDecoder.cpp,v 1.1.2.6 2003-12-17 17:08:29 Isibaar Exp $ |
* $Id: CXvidDecoder.cpp,v 1.1.2.7 2003-12-27 14:33:13 Isibaar Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
228 |
|
|
229 |
// Set the default post-processing settings |
// Set the default post-processing settings |
230 |
REG_GET_N("Brightness", PPSettings.nBrightness, 25) |
REG_GET_N("Brightness", PPSettings.nBrightness, 25) |
231 |
REG_GET_N("Deblock_Y", PPSettings.bDeblock_Y, 0) |
REG_GET_N("Deblock_Y", PPSettings.bDeblock_Y, 1) |
232 |
REG_GET_N("Deblock_UV", PPSettings.bDeblock_UV, 0) |
REG_GET_N("Deblock_UV", PPSettings.bDeblock_UV, 1) |
233 |
REG_GET_N("Dering", PPSettings.bDering, 0) |
REG_GET_N("Dering", PPSettings.bDering, 1) |
234 |
REG_GET_N("FilmEffect", PPSettings.bFilmEffect, 0) |
REG_GET_N("FilmEffect", PPSettings.bFilmEffect, 1) |
235 |
REG_GET_N("ForceColorspace", PPSettings.nForceColorspace, 0) |
REG_GET_N("ForceColorspace", PPSettings.nForceColorspace, 0) |
236 |
|
|
237 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
697 |
} |
} |
698 |
} |
} |
699 |
else |
else |
700 |
{ |
{ /* Preroll frame - won't be displayed */ |
701 |
int tmp = m_frame.output.csp; |
int tmp = m_frame.output.csp; |
702 |
|
int tmp_gen = m_frame.general; |
703 |
|
|
704 |
m_frame.output.csp = XVID_CSP_NULL; |
m_frame.output.csp = XVID_CSP_NULL; |
705 |
|
|
706 |
|
/* Disable postprocessing to speed-up seeking */ |
707 |
|
m_frame.general &= ~XVID_DEBLOCKY; |
708 |
|
m_frame.general &= ~XVID_DEBLOCKUV; |
709 |
|
/* m_frame.general &= ~XVID_DERING; */ |
710 |
|
m_frame.general &= ~XVID_FILMEFFECT; |
711 |
|
|
712 |
length = xvid_decore(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats); |
length = xvid_decore(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats); |
713 |
if (length < 0) |
if (length < 0) |
714 |
{ |
{ |
717 |
} |
} |
718 |
|
|
719 |
m_frame.output.csp = tmp; |
m_frame.output.csp = tmp; |
720 |
|
m_frame.general = tmp_gen; |
721 |
} |
} |
722 |
|
|
723 |
if (stats.type == XVID_TYPE_NOTHING) { |
if (stats.type == XVID_TYPE_NOTHING) { |
735 |
return S_FALSE; |
return S_FALSE; |
736 |
} |
} |
737 |
|
|
738 |
|
pOut->SetDiscontinuity(TRUE); |
739 |
|
pOut->SetSyncPoint(TRUE); |
740 |
|
|
741 |
m_frame.bitstream = (BYTE*)m_frame.bitstream + length; |
m_frame.bitstream = (BYTE*)m_frame.bitstream + length; |
742 |
m_frame.length -= length; |
m_frame.length -= length; |
743 |
goto repeat; |
goto repeat; |
744 |
} |
} |
745 |
|
|
746 |
|
if (pIn->IsPreroll() == S_OK) { |
747 |
|
return S_FALSE; |
748 |
|
} |
749 |
|
|
750 |
return S_OK; |
return S_OK; |
751 |
} |
} |
752 |
|
|