Due to recent change on drivers level, it's now possible
to use texturing on X22UD products. To get valid data from
the hardware decoder, we need to set additional flag to
notify it about needed format translation.
Note that it is usable on newest product only, so need
for GPU workaround to dynamically detect applicable
environment. For others, texturing should still be disabled.
This reverts
edef3601ee127144faca80e81c3aa5065d7df97b:
"[WebRTC][GS] Disable texturing on X22UD products"
Bug: https://jira-eu.sec.samsung.net/browse/VDGAME-686
Change-Id: I856fc2b77a7aabd904029fb09827b2ac7ec1b91f
Signed-off-by: Jakub Gajownik <j.gajownik2@samsung.com>
"type": "linux"
},
"machine_model_name": ["X22UD"],
+ "machine_model_version": {
+ "op": "=",
+ "value": "23"
+ },
"features": [
"disable_ttvd_texturing"
]
"features": [
"ttvd_disable_manual_rendering"
]
+ },
+ {
+ "id": 435,
+ "description": "Some SoCs might need additional setting to give proper decoded data for texturing, but overlay mode stops work then",
+ "os": {
+ "type": "linux"
+ },
+ "machine_model_name": ["X22UD"],
+ "machine_model_version": {
+ "op": ">=",
+ "value": "25"
+ },
+ "features": [
+ "ttvd_texturing_breaks_overlay_mode"
+ ]
}
]
}
ttvd_disable_faster_decoder_selection
ttvd_disable_manual_rendering
ttvd_prefer_manual_rendering_for_low_latency
+ttvd_texturing_breaks_overlay_mode
scalarize_vec_and_mat_constructor_args
supports_two_yuv_hardware_overlays
unbind_attachments_on_bound_render_fbo_delete
namespace media {
+enum class ForceTexturingOnlyMode {
+ kNo,
+ // Force usage of texture only mode for decoder. Client won't be able to
+ // render decoded data using direct rendering mode with overlay.
+ kYes,
+};
+
class DecoderFacadeVideo : virtual public DecoderFacade {
public:
struct OutputData {
LatencyMode latency_mode,
bool secure_mode,
DecodingMode decoding_mode,
+ ForceTexturingOnlyMode texturing_only_mode,
const std::string& component_name,
DecoderFacade::InitCB init_cb,
const DecoderFacade::InputCB& input_cb,
LatencyMode latency_mode,
bool secure_mode,
DecodingMode decoding_mode,
+ ForceTexturingOnlyMode texturing_only_mode,
const std::string& component_name,
OmxFacade::InitCB init_cb,
const OmxFacade::InputCB& input_cb,
coded_size_ = coded_size;
latency_mode_ = latency_mode;
decoding_mode_ = decoding_mode;
+ texturing_only_mode_ = texturing_only_mode;
output_cb_ = output_cb;
hdr_metadata_cb_ = hdr_cb;
color_space_cb_ = color_space_cb;
param.bErrorConcealment = OMX_FALSE;
const bool is_mfc = component_name.find("mfc") != std::string::npos;
- if (is_mfc && latency_mode_ != LatencyMode::kNormal &&
- workarounds_.ttvd_prefer_manual_rendering_for_low_latency) {
+ if (is_mfc && ((latency_mode_ != LatencyMode::kNormal &&
+ workarounds_.ttvd_prefer_manual_rendering_for_low_latency) ||
+ texturing_only_mode_ == ForceTexturingOnlyMode::kYes)) {
param.bNoVideoOut = OMX_TRUE;
}
LatencyMode latency_mode,
bool secure_mode,
DecodingMode decoding_mode,
+ ForceTexturingOnlyMode texturing_only_mode,
const std::string& component_name,
OmxFacade::InitCB init_cb,
const OmxFacade::InputCB& input_cb,
gfx::Size coded_size_;
LatencyMode latency_mode_;
DecodingMode decoding_mode_;
+ ForceTexturingOnlyMode texturing_only_mode_;
OutputCB output_cb_;
HdrMetadataCB hdr_metadata_cb_;
facade_->Initialize(
MediaVideoCodec::kCodecH264, gfx::Size(1, 1), LatencyMode::kNormal,
- false, DecodingMode::kDecodingNormal, "testing",
+ false, DecodingMode::kDecodingNormal, ForceTexturingOnlyMode::kNo,
+ "testing",
base::BindOnce(
[](bool* result, base::RunLoop* run_loop, bool init_result) {
*result = init_result;
decoder_facade_->Initialize(
codec, coded_size, low_delay ? LatencyMode::kLow : LatencyMode::kNormal,
false /* secure_mode */, allocated_decoder_->decoding_mode,
- allocated_decoder_->component_name,
+ ForceTexturingOnlyMode::kNo, allocated_decoder_->component_name,
base::BindOnce(&TTvdVideoDecoderBase::OnInitDone,
weak_factory_.GetWeakPtr()),
base::BindRepeating(&TTvdVideoDecoderBase::OnInputDone,
const bool is_secure_mode = cdm_bridge_ != nullptr;
decoder_facade_->Initialize(
codec, config_.visible_rect().size(), FacadeLatencyMode(), is_secure_mode,
- allocated_decoder_->decoding_mode, allocated_decoder_->component_name,
+ allocated_decoder_->decoding_mode,
+ workarounds_.ttvd_texturing_breaks_overlay_mode && supports_texturing_
+ ? ForceTexturingOnlyMode::kYes
+ : ForceTexturingOnlyMode::kNo,
+ allocated_decoder_->component_name,
base::BindOnce(&TTvdVideoDecoderImpl::OnInitializationDone,
weak_factory_.GetWeakPtr()),
base::BindRepeating(&TTvdVideoDecoderImpl::OnBufferEmptied,
}
}
+ if (supports_texturing && supports_overlay_ &&
+ workarounds_.ttvd_texturing_breaks_overlay_mode) {
+ // Some SoC requires additional setting to allow getting proper raw data
+ // from hardware decoder. Additionally, this setting will disable
+ // possibility of using overlay mode, so we need to decide here which mode
+ // should be used.
+
+ if (config_.needs_raw_access()) {
+ // In case of WebCodecs (or any other that requires access to decoded
+ // data), prefer texturing instead overlay if we cannot have both.
+ TIZEN_MEDIA_LOG(INFO) << "Disable overlay support";
+ supports_overlay_ = false;
+ } else {
+ TIZEN_MEDIA_LOG(INFO) << "Disable texturing support";
+ supports_texturing = false;
+ }
+ }
+
TIZEN_MEDIA_LOG(VERBOSE) << "Texturing: " << supports_texturing
<< ", overlay: " << supports_overlay_;