Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit c6c35d8

Browse files
committed
Update render to use 3d pipeline instead of vpp for CSC.
1 parent be059ce commit c6c35d8

File tree

6 files changed

+2720
-192
lines changed

6 files changed

+2720
-192
lines changed

talk/owt/sdk/base/stream.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ Stream::Stream()
8181
: media_stream_(nullptr),
8282
renderer_impl_(nullptr),
8383
audio_renderer_impl_(nullptr),
84-
d3d9_renderer_impl_(nullptr),
8584
d3d11_renderer_impl_(nullptr),
8685
#ifdef OWT_ENABLE_QUIC
8786
source_(AudioSourceInfo::kUnknown,
@@ -96,7 +95,6 @@ Stream::Stream(const std::string& id)
9695
: media_stream_(nullptr),
9796
renderer_impl_(nullptr),
9897
audio_renderer_impl_(nullptr),
99-
d3d9_renderer_impl_(nullptr),
10098
d3d11_renderer_impl_(nullptr),
10199
#ifdef OWT_ENABLE_QUIC
102100
source_(AudioSourceInfo::kUnknown,

talk/owt/sdk/base/win/d3d11_allocator.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ mfxStatus D3D11FrameAllocator::AllocImpl(mfxFrameAllocRequest *request, mfxFrame
422422
desc.Height = request->Info.Height;
423423

424424
desc.MipLevels = 1;
425-
//number of subresources is 1 in case of not single texture
425+
// Number of subresources is 1 in case of not single texture
426426
desc.ArraySize = m_initParams.bUseSingleTexture ? request->NumFrameSuggested : 1;
427427
desc.Format = ConverColortFormat(request->Info.FourCC);
428428
desc.SampleDesc.Count = 1;
@@ -432,10 +432,9 @@ mfxStatus D3D11FrameAllocator::AllocImpl(mfxFrameAllocRequest *request, mfxFrame
432432
if ((request->Type&MFX_MEMTYPE_VIDEO_MEMORY_ENCODER_TARGET) && (request->Type & MFX_MEMTYPE_INTERNAL_FRAME))
433433
{
434434
desc.BindFlags = D3D11_BIND_DECODER | D3D11_BIND_VIDEO_ENCODER;
435-
}
436-
else
435+
} else // Jianlin: adds the shader resource flag so renderer can use this as staging texture.
437436
#endif
438-
desc.BindFlags = D3D11_BIND_DECODER;
437+
desc.BindFlags = D3D11_BIND_DECODER | D3D11_BIND_SHADER_RESOURCE;
439438

440439
if ( (MFX_MEMTYPE_FROM_VPPIN & request->Type) && (DXGI_FORMAT_YUY2 == desc.Format) ||
441440
(DXGI_FORMAT_B8G8R8A8_UNORM == desc.Format) ||

talk/owt/sdk/base/win/mediacapabilities.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
#include <string>
66
#include <vector>
7-
#include "talk/owt/sdk/base/win/mediacapabilities.h"
87
#ifdef OWT_USE_MSDK
98
#include "mfxcommon.h"
109
#include "mfxstructures.h"
1110
#endif
11+
#include "talk/owt/sdk/base/win/mediacapabilities.h"
12+
#include "webrtc/rtc_base/logging.h"
1213

1314
namespace owt {
1415
namespace base {
@@ -295,8 +296,9 @@ MediaCapabilities::SupportedCapabilitiesForVideoDecoder(
295296
else if (codec == owt::base::VideoCodec::kH265) {
296297
memset(&video_param, 0, sizeof(video_param));
297298
video_param.mfx.CodecId = MFX_CODEC_HEVC;
298-
299299
sts = mfx_decoder->Query(nullptr, &video_param);
300+
RTC_LOG(LS_ERROR) << "Johny---H265 query result:" << sts;
301+
300302
if (sts == MFX_ERR_NONE) {
301303
VideoDecoderCapability h265_cap;
302304
h265_cap.codec_type = owt::base::VideoCodec::kH265;

0 commit comments

Comments
 (0)