video: driver: set default_header property at session level
set default header property once per session for decoder. Change-Id: I5ca9088b8bed09907f2c9f829acec3db23e65a7c Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Bu işleme şunda yer alıyor:
@@ -218,6 +218,7 @@ int msm_vidc_remove_session(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_add_session(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_open(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_set_codec(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_set_default_header(struct msm_vidc_inst *inst);
|
||||
int msm_vidc_session_streamon(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port);
|
||||
int msm_vidc_session_streamoff(struct msm_vidc_inst *inst,
|
||||
|
@@ -579,31 +579,6 @@ static int msm_vdec_set_secure_mode(struct msm_vidc_inst *inst,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int msm_vdec_set_default_header(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port)
|
||||
{
|
||||
int rc = 0;
|
||||
u32 default_header = false;
|
||||
|
||||
if (port != INPUT_PORT) {
|
||||
i_vpr_e(inst, "%s: invalid port %d\n", __func__, port);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
default_header = inst->capabilities->cap[DEFAULT_HEADER].value;
|
||||
i_vpr_h(inst, "%s: default header: %d", __func__, default_header);
|
||||
rc = venus_hfi_session_property(inst,
|
||||
HFI_PROP_DEC_DEFAULT_HEADER,
|
||||
HFI_HOST_FLAGS_NONE,
|
||||
get_hfi_port(inst, port),
|
||||
HFI_PAYLOAD_U32,
|
||||
&default_header,
|
||||
sizeof(u32));
|
||||
if (rc)
|
||||
i_vpr_e(inst, "%s: set property failed\n", __func__);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int msm_vdec_set_rap_frame(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port)
|
||||
{
|
||||
@@ -755,10 +730,6 @@ static int msm_vdec_set_input_properties(struct msm_vidc_inst *inst)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = msm_vdec_set_default_header(inst, INPUT_PORT);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = msm_vdec_set_rap_frame(inst, INPUT_PORT);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include "msm_venc.h"
|
||||
#include "venus_hfi.h"
|
||||
#include "venus_hfi_response.h"
|
||||
#include "hfi_packet.h"
|
||||
|
||||
#define COUNT_BITS(a, out) { \
|
||||
while ((a) >= 1) { \
|
||||
@@ -2122,6 +2123,30 @@ int msm_vidc_session_set_codec(struct msm_vidc_inst *inst)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int msm_vidc_session_set_default_header(struct msm_vidc_inst *inst)
|
||||
{
|
||||
int rc = 0;
|
||||
u32 default_header = false;
|
||||
|
||||
if (!inst) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
default_header = inst->capabilities->cap[DEFAULT_HEADER].value;
|
||||
i_vpr_h(inst, "%s: default header: %d", __func__, default_header);
|
||||
rc = venus_hfi_session_property(inst,
|
||||
HFI_PROP_DEC_DEFAULT_HEADER,
|
||||
HFI_HOST_FLAGS_NONE,
|
||||
get_hfi_port(inst, INPUT_PORT),
|
||||
HFI_PAYLOAD_U32,
|
||||
&default_header,
|
||||
sizeof(u32));
|
||||
if (rc)
|
||||
i_vpr_e(inst, "%s: set property failed\n", __func__);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int msm_vidc_session_streamon(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_port_type port)
|
||||
{
|
||||
|
@@ -181,6 +181,10 @@ int msm_vidc_start_streaming(struct vb2_queue *q, unsigned int count)
|
||||
inst->buffers.arp.min_count,
|
||||
inst->buffers.arp.size);
|
||||
} else if(is_decode_session(inst)) {
|
||||
rc = msm_vidc_session_set_default_header(inst);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = msm_vidc_alloc_and_queue_session_internal_buffers(inst,
|
||||
MSM_VIDC_BUF_PERSIST);
|
||||
if (rc)
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle