|
|
@ -407,15 +407,15 @@ void Vic::ReadInterlacedY8__V8U8_N420(const SlotStruct& slot, std::span<const Pl |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
switch (slot.config.deinterlace_mode) { |
|
|
switch (slot.config.deinterlace_mode) { |
|
|
case DxvhadDeinterlaceModePrivate::WEAVE: |
|
|
|
|
|
|
|
|
case DxvhadDeinterlaceModePrivate::Weave: |
|
|
// Due to the fact that we do not write to memory in nvdec, we cannot use Weave as it
|
|
|
// Due to the fact that we do not write to memory in nvdec, we cannot use Weave as it
|
|
|
// relies on the previous frame.
|
|
|
// relies on the previous frame.
|
|
|
DecodeBobField(); |
|
|
DecodeBobField(); |
|
|
break; |
|
|
break; |
|
|
case DxvhadDeinterlaceModePrivate::BOB_FIELD: |
|
|
|
|
|
|
|
|
case DxvhadDeinterlaceModePrivate::BobField: |
|
|
DecodeBobField(); |
|
|
DecodeBobField(); |
|
|
break; |
|
|
break; |
|
|
case DxvhadDeinterlaceModePrivate::DISI1: |
|
|
|
|
|
|
|
|
case DxvhadDeinterlaceModePrivate::Disi1: |
|
|
// Due to the fact that we do not write to memory in nvdec, we cannot use DISI1 as it
|
|
|
// Due to the fact that we do not write to memory in nvdec, we cannot use DISI1 as it
|
|
|
// relies on previous/next frames.
|
|
|
// relies on previous/next frames.
|
|
|
DecodeBobField(); |
|
|
DecodeBobField(); |
|
|
@ -431,13 +431,13 @@ void Vic::ReadInterlacedY8__V8U8_N420(const SlotStruct& slot, std::span<const Pl |
|
|
|
|
|
|
|
|
void Vic::ReadY8__V8U8_N420(const SlotStruct& slot, std::span<const PlaneOffsets> offsets, std::shared_ptr<const FFmpeg::Frame> frame, bool planar) noexcept { |
|
|
void Vic::ReadY8__V8U8_N420(const SlotStruct& slot, std::span<const PlaneOffsets> offsets, std::shared_ptr<const FFmpeg::Frame> frame, bool planar) noexcept { |
|
|
switch (slot.config.frame_format) { |
|
|
switch (slot.config.frame_format) { |
|
|
case DxvhadFrameFormat::PROGRESSIVE: |
|
|
|
|
|
|
|
|
case DxvhadFrameFormat::Progressive: |
|
|
ReadProgressiveY8__V8U8_N420(slot, offsets, std::move(frame), planar, false); |
|
|
ReadProgressiveY8__V8U8_N420(slot, offsets, std::move(frame), planar, false); |
|
|
break; |
|
|
break; |
|
|
case DxvhadFrameFormat::TOP_FIELD: |
|
|
|
|
|
|
|
|
case DxvhadFrameFormat::TopField: |
|
|
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, true); |
|
|
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, true); |
|
|
break; |
|
|
break; |
|
|
case DxvhadFrameFormat::BOTTOM_FIELD: |
|
|
|
|
|
|
|
|
case DxvhadFrameFormat::BottomField: |
|
|
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, false); |
|
|
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, false); |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
@ -860,7 +860,7 @@ void Vic::WriteY8__V8U8_N420(const OutputSurfaceConfig& output_surface_config) n |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
switch (output_surface_config.out_block_kind) { |
|
|
switch (output_surface_config.out_block_kind) { |
|
|
case BlkKind::GENERIC_16Bx2: { |
|
|
|
|
|
|
|
|
case BlkKind::Generic_16Bx2: { |
|
|
u32 const block_height = u32(output_surface_config.out_block_height); |
|
|
u32 const block_height = u32(output_surface_config.out_block_height); |
|
|
auto const out_luma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0); |
|
|
auto const out_luma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0); |
|
|
auto const out_chroma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel * 2, out_chroma_width, out_chroma_height, 1, block_height, 0); |
|
|
auto const out_chroma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel * 2, out_chroma_width, out_chroma_height, 1, block_height, 0); |
|
|
@ -889,7 +889,7 @@ void Vic::WriteY8__V8U8_N420(const OutputSurfaceConfig& output_surface_config) n |
|
|
Texture::SwizzleTexture(out_chroma, chroma_scratch, BytesPerPixel, out_chroma_width, out_chroma_height, 1, block_height, 0, 1); |
|
|
Texture::SwizzleTexture(out_chroma, chroma_scratch, BytesPerPixel, out_chroma_width, out_chroma_height, 1, block_height, 0, 1); |
|
|
} |
|
|
} |
|
|
} break; |
|
|
} break; |
|
|
case BlkKind::PITCH: { |
|
|
|
|
|
|
|
|
case BlkKind::Pitch: { |
|
|
LOG_TRACE(HW_GPU, "Writing Y8__V8U8_N420 swizzled frame\n" |
|
|
LOG_TRACE(HW_GPU, "Writing Y8__V8U8_N420 swizzled frame\n" |
|
|
"\tinput surface {}x{} stride {} size {:#X}\n" |
|
|
"\tinput surface {}x{} stride {} size {:#X}\n" |
|
|
"\toutput luma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}\n", |
|
|
"\toutput luma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}\n", |
|
|
@ -1032,7 +1032,7 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
switch (output_surface_config.out_block_kind) { |
|
|
switch (output_surface_config.out_block_kind) { |
|
|
case BlkKind::GENERIC_16Bx2: { |
|
|
|
|
|
|
|
|
case BlkKind::Generic_16Bx2: { |
|
|
const u32 block_height = u32(output_surface_config.out_block_height); |
|
|
const u32 block_height = u32(output_surface_config.out_block_height); |
|
|
auto const out_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0); |
|
|
auto const out_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0); |
|
|
LOG_TRACE(HW_GPU, "Writing ABGR swizzled frame\n" |
|
|
LOG_TRACE(HW_GPU, "Writing ABGR swizzled frame\n" |
|
|
@ -1051,7 +1051,7 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel |
|
|
Texture::SwizzleTexture(out_luma, luma_scratch, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0, 1); |
|
|
Texture::SwizzleTexture(out_luma, luma_scratch, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0, 1); |
|
|
} |
|
|
} |
|
|
} break; |
|
|
} break; |
|
|
case BlkKind::PITCH: { |
|
|
|
|
|
|
|
|
case BlkKind::Pitch: { |
|
|
LOG_TRACE(HW_GPU, "Writing ABGR pitch frame\n" |
|
|
LOG_TRACE(HW_GPU, "Writing ABGR pitch frame\n" |
|
|
"\tinput surface {}x{} stride {} size {:#X}" |
|
|
"\tinput surface {}x{} stride {} size {:#X}" |
|
|
"\toutput surface {}x{} stride {} size {:#X}", |
|
|
"\toutput surface {}x{} stride {} size {:#X}", |
|
|
|