Skip to content

Commit

Permalink
Renderer: Switches priority in FillPlanes to Flyleaf instead of D3D11
Browse files Browse the repository at this point in the history
  • Loading branch information
SuRGeoNix committed Sep 7, 2023
1 parent 604b062 commit 71aad5b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions FlyleafLib/MediaFramework/MediaRenderer/Renderer.PixelShader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -630,23 +630,7 @@ internal VideoFrame FillPlanes(AVFrame* frame)
}
}

if (curPSCase == PSCase.HWD3D11VPZeroCopy)
{
mFrame.subresource = (int) frame->data[1];
mFrame.bufRef = av_buffer_ref(frame->buf[0]); // TBR: should we ref all buf refs / the whole avframe?
}

else if (curPSCase == PSCase.HWD3D11VP)
{
mFrame.textures = new ID3D11Texture2D[1];
mFrame.textures[0] = Device.CreateTexture2D(textDesc[0]);
context.CopySubresourceRegion(
mFrame.textures[0], 0, 0, 0, 0, // dst
VideoDecoder.textureFFmpeg, (int) frame->data[1], // src
cropBox); // crop decoder's padding
}

else if (curPSCase == PSCase.HWZeroCopy)
if (curPSCase == PSCase.HWZeroCopy)
{
mFrame.srvs = new ID3D11ShaderResourceView[2];
mFrame.bufRef = av_buffer_ref(frame->buf[0]);
Expand All @@ -671,6 +655,22 @@ internal VideoFrame FillPlanes(AVFrame* frame)
mFrame.srvs[1] = Device.CreateShaderResourceView(mFrame.textures[0], srvDesc[1]);
}

else if (curPSCase == PSCase.HWD3D11VPZeroCopy)
{
mFrame.subresource = (int) frame->data[1];
mFrame.bufRef = av_buffer_ref(frame->buf[0]); // TBR: should we ref all buf refs / the whole avframe?
}

else if (curPSCase == PSCase.HWD3D11VP)
{
mFrame.textures = new ID3D11Texture2D[1];
mFrame.textures[0] = Device.CreateTexture2D(textDesc[0]);
context.CopySubresourceRegion(
mFrame.textures[0], 0, 0, 0, 0, // dst
VideoDecoder.textureFFmpeg, (int) frame->data[1], // src
cropBox); // crop decoder's padding
}

else if (curPSCase == PSCase.SwsScale)
{
mFrame.textures = new ID3D11Texture2D[1];
Expand Down

0 comments on commit 71aad5b

Please sign in to comment.