Bug 1493198 - P5. Don't restrict high bit depth images on Windows r=bryce

Both D3D11 compositor and WebRender now supports 10/12 bits images.

Depends on D6688

Differential Revision: https://phabricator.services.mozilla.com/D6695

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jean-Yves Avenard 2018-09-26 15:01:57 +00:00
parent a4846efef7
commit f97bb952b9
2 changed files with 3 additions and 24 deletions

View File

@ -81,15 +81,10 @@ protected:
bool SupportsColorDepth(gfx::ColorDepth aColorDepth,
DecoderDoctorDiagnostics* aDiagnostics) const override
{
// We don't support bitDepth > 8 when compositor backend is D3D11.
// But we don't have KnowsCompositor or any object
// that we can ask for the layersbackend type.
// We should remove this restriction until
// we solve the D3D11 compositor backend issue.
#if defined(XP_LINUX) || defined(XP_MACOSX)
return true;
#endif
#if defined(MOZ_WIDGET_ANDROID)
return aColorDepth == gfx::ColorDepth::COLOR_8;
#endif
return true;
}
private:

View File

@ -237,22 +237,6 @@ FFmpegVideoDecoder<LIBAV_VER>::DoDecode(MediaRawData* aSample,
return NS_OK;
}
if ((mCodecContext->pix_fmt == AV_PIX_FMT_YUV420P10LE ||
mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P10LE
#if LIBAVCODEC_VERSION_MAJOR >= 57
|| mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P12LE
#endif
) &&
(!mImageAllocator || (mImageAllocator->GetCompositorBackendType()
!= layers::LayersBackend::LAYERS_BASIC &&
mImageAllocator->GetCompositorBackendType()
!= layers::LayersBackend::LAYERS_OPENGL &&
mImageAllocator->GetCompositorBackendType()
!= layers::LayersBackend::LAYERS_D3D11))) {
return MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
RESULT_DETAIL("unsupported format type (hdr)"));
}
// If we've decoded a frame then we need to output it
int64_t pts = mPtsContext.GuessCorrectPts(mFrame->pkt_pts, mFrame->pkt_dts);
// Retrieve duration from dts.