If the header has been parsed or the codec is stateless
reduce the padding of the decoded frame.
In stateless codecs width and height are specified by
the application.
Signed-off-by: Fritz Koenig
---
.../platform/mtk-vcodec/mtk_vcodec_dec.c | 59 ---
1 file changed, 39
644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -5,6 +5,7 @@
> */
> #include
> #include
> +#include
> #include
> #include
> #include
>
> base-commit: 0ca0ca9805055bb0efc16890f9d6433c65bd07cc
> --
> https://chromeos.dev
Reviewed-by: Fritz Koenig
core->dev_dec and core-dev->enc are set up
by the corresponding vdec_probe and venc_probe.
If the probe fails, they will not be set
and so could be null when venus_sys_error_handler
is called.
Fixes: 43e221e485e5 ("media: venus: Rework recovery mechanism")
Signed-off
+656,19 @@ static int venc_set_properties(struct venus_inst *inst)
> if (ret)
> return ret;
>
> + if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264 ||
> + inst->fmt_cap->pixfmt == V4L2_PIX_FMT_
struct opp_table *opp_table;
> bool has_opp_table;
> - struct device_link *pd_dl_venus;
remove from comment at start of struct as well.
* @pd_dl_venus: pmdomain device-link for venus domain
The patch gives huge improvements in encoder stability!
Tested-by: Fritz Koeni
How should we resolve this patch in relation to the "venus: venc: Init
the session only once in queue_setup" [1] patch?
"venus: venc: Init the session only once in queue_setup" comes after
and reworks |venc_start_streaming| substantially. This patch
implements |venc_stop_streaming|, but maybe
eview the code yet, I'll leave that for
early next week. In the meantime I have tested the patches and found
them to be working well.
Tested-by: Fritz Koenig
On Tue, Dec 1, 2020 at 9:58 PM Alexandre Courbot wrote:
>
> On Wed, Dec 2, 2020 at 7:34 AM Stanimir Varbanov
> wrote:
> >
> > Hi Fritz,
> >
> > On 12/1/20 6:23 AM, Fritz Koenig wrote:
> > > If the DRC is near the end of the stream the client
> &g
If the DRC is near the end of the stream the client
may send a V4L2_DEC_CMD_STOP before the DRC occurs.
V4L2_DEC_CMD_STOP puts the driver into the
VENUS_DEC_STATE_DRAIN state. DRC must be aware so
that after the DRC event the state can be restored
correctly.
Signed-off-by: Fritz Koenig
---
v2
On Mon, Nov 30, 2020 at 7:24 PM Alexandre Courbot wrote:
>
> On Sun, Nov 29, 2020 at 3:05 PM Fritz Koenig wrote:
> >
> > V4L2_ENC_CMD_STOP and V4L2_ENC_CMD_START are already
> > supported. Add a way to query for support.
>
> I think your Signed-off-by is missing
On Sun, Nov 29, 2020 at 11:55 PM Stanimir Varbanov
wrote:
>
> Hi Fritz,
>
> On 11/29/20 9:17 PM, Fritz Koenig wrote:
> > Since this patchset adds support for V4L2_ENC_CMD_STOP and
> > VENUS_ENC_STATE_ENCODING it should also add support for
> > VIDIOC_TRY_ENCO
Since this patchset adds support for V4L2_ENC_CMD_STOP and
VENUS_ENC_STATE_ENCODING it should also add support for
VIDIOC_TRY_ENCODER_CMD so that those commands are discoverable. I've
made an attempt at that here:
https://www.spinics.net/lists/linux-media/msg182319.html
On Wed, Nov 11, 2020 at
et;
> vb->timestamp = timestamp_us * NSEC_PER_USEC;
> vbuf->sequence = inst->sequence_cap++;
> +
> + if ((!bytesused && m2m_ctx->is_draining) ||
> + (vbuf->flags & V4L2_BUF_FLAG_LAST)) {
> + vbuf->flags |= V4L2_BUF_FLAG_LAST;
> + v4l2_m2m_mark_stopped(inst->m2m_ctx);
> + }
> } else {
> vbuf->sequence = inst->sequence_out++;
> }
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
>vpp_freq;
> /* 21 / 20 is overhead factor */
> vpp_freq += vpp_freq / 20;
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
uf_prepare(struct vb2_buffer *vb);
> void venus_helper_vb2_buf_queue(struct vb2_buffer *vb);
> void venus_helper_process_buf(struct vb2_buffer *vb);
> -void venus_helper_vb2_stop_streaming(struct vb2_queue *q);
> int venus_helper_vb2_start_streaming(struct venus_inst *inst);
> void venus_helper_m2m_device_run(void *priv);
> void venus_helper_m2m_job_abort(void *priv);
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
On Wed, Nov 11, 2020 at 6:38 AM Stanimir Varbanov
wrote:
>
> For resolutions below 720p the size of the compressed buffer must
> be bigger. Correct this by checking the resolution when calculating
> buffer size and multiply by four.
I'm confused because the commit message doesn't appear to line
device_addr)
> + if (!cookie)
> return -EINVAL;
>
> pkt->shdr.hdr.size = sizeof(*pkt);
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
V4L2_ENC_CMD_STOP and V4L2_ENC_CMD_START are already
supported. Add a way to query for support.
---
drivers/media/platform/qcom/venus/venc.c | 26
1 file changed, 26 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/venc.c
t; @@ -87,7 +87,6 @@ struct hfi_event_data {
> #define INST_LOAD_RESOURCES4
> #define INST_START 5
> #define INST_STOP 6
> -#define INST_RELEASE_RESOURCES 7
>
> struct venus_core;
> struct venus_inst;
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
_init(struct vb2_buffer *vb);
> int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb);
> void venus_helper_vb2_buf_queue(struct vb2_buffer *vb);
> +void venus_helper_process_buf(struct vb2_buffer *vb);
> void venus_helper_vb2_stop_streaming(struct vb2_queue *q);
> int venus_helper_vb2_start_streaming(struct venus_inst *inst);
> void venus_helper_m2m_device_run(void *priv);
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
On Sun, Nov 22, 2020 at 6:48 AM Stanimir Varbanov
wrote:
>
>
>
> On 11/21/20 3:14 AM, Fritz Koenig wrote:
> > On Thu, Nov 19, 2020 at 4:12 PM Stanimir Varbanov
> > wrote:
> >>
> >> Currently we rely on firmware to return error when we reach the
_session_deinit(inst);
> -bufs_done:
> +error:
> venus_helper_buffers_done(inst, q->type, VB2_BUF_STATE_QUEUED);
> if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
> inst->streamon_out = 0;
> @@ -940,7 +987,8 @@ static void venc_vb2_buf_queue(struct vb2_buffer *vb)
>
> static const struct vb2_ops venc_vb2_ops = {
> .queue_setup = venc_queue_setup,
> - .buf_init = venus_helper_vb2_buf_init,
> + .buf_init = venc_buf_init,
> + .buf_cleanup = venc_buf_cleanup,
> .buf_prepare = venus_helper_vb2_buf_prepare,
> .start_streaming = venc_start_streaming,
> .stop_streaming = venus_helper_vb2_stop_streaming,
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
On Thu, Nov 19, 2020 at 4:12 PM Stanimir Varbanov
wrote:
>
> Currently we rely on firmware to return error when we reach the maximum
> supported number of sessions. But this errors are happened at reqbuf
> time which is a bit later. The more reasonable way looks like is to
> return the error on
On Thu, Nov 19, 2020 at 4:12 PM Stanimir Varbanov
wrote:
>
> From: Vikash Garodia
>
> For synchronous commands, update the message queue variable.
> This would inform video firmware to raise interrupt on host
> CPU whenever there is a response for such commands.
>
> Signed-off-by: Vikash Garodia
On Mon, Nov 9, 2020 at 9:48 PM Fritz Koenig wrote:
>
> On Thu, Nov 5, 2020 at 3:51 AM Stanimir Varbanov
> wrote:
> >
> >
> >
> > On 11/4/20 12:44 PM, vgaro...@codeaurora.org wrote:
> > > Hi Stan,
> > >
> > > On 2020-11-03 06:46, Fritz K
load_scale can only be safely called after
the encoder has been initialized.
Signed-off-by: Fritz Koenig
---
drivers/media/platform/qcom/venus/pm_helpers.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.h
b/drivers/media/platform/qcom/venus
On Thu, Nov 5, 2020 at 3:51 AM Stanimir Varbanov
wrote:
>
>
>
> On 11/4/20 12:44 PM, vgaro...@codeaurora.org wrote:
> > Hi Stan,
> >
> > On 2020-11-03 06:46, Fritz Koenig wrote:
> >> On Fri, Oct 23, 2020 at 5:57 AM Stanimir Varbanov
> >>
a.codec_freq_data->vpp_freq;
> /* 21 / 20 is overhead factor */
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
Reviewed-by: Fritz Koenig
On Tue, Nov 3, 2020 at 8:50 AM Dikshita Agarwal wrote:
>
> - return correct width and height for G_SELECTION
> - update capture port wxh with rectangle wxh.
> - add support for HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_INFO
> to set stride info and chroma offset to FW.
>
> Signed-off-by:
On Fri, Oct 23, 2020 at 5:57 AM Stanimir Varbanov
wrote:
>
> Redesign the encoder driver to be compliant with stateful encoder
> spec - specifically adds handling of Reset state.
>
> Signed-off-by: Stanimir Varbanov
> ---
> drivers/media/platform/qcom/venus/core.h | 10 +-
>
It looks like only h.264 streams are populating the event.input_crop
struct when receiving the HFI_INDEX_EXTRADATA_INPUT_CROP message in
event_seq_changed(). vp8/vp9 streams end up with the struct filled
with 0.
On Fri, Oct 9, 2020 at 1:45 AM Alexandre Courbot wrote:
>
> Per the stateful codec
> +
> + mutex_lock(>lock);
> + if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
> + if (!list_empty(>registeredbufs))
> + list_del_init(>reg_list);
> + mutex_unlock(>lock);
>
> inst->buf_count--;
> if (!inst->buf_count)
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
Reviewed-by: Fritz Koenig
);
> +
> + mutex_unlock(>lock);
> +}
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.h
> b/drivers/media/platform/qcom/venus/hfi_venus.h
> index 57154832090e..1b656ef2bf07 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.h
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.h
> @@ -10,5 +10,6 @@ struct venus_core;
>
> void venus_hfi_destroy(struct venus_core *core);
> int venus_hfi_create(struct venus_core *core);
> +void venus_hfi_queues_reinit(struct venus_core *core);
>
> #endif
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
alt_axi(hdev);
> venus_sfr_print(hdev);
> }
>
> @@ -1009,10 +1002,6 @@ static irqreturn_t venus_isr_thread(struct venus_core
> *core)
> res = hdev->core->res;
> pkt = hdev->pkt_buf;
>
> - if (hdev->irq_status & WRAPPER_INTR_STATUS_A2HWD_MASK) {
> - venus_sfr_print(hdev);
> - hfi_process_watchdog_timeout(core);
> - }
>
> while (!venus_iface_msgq_read(hdev, pkt)) {
> msg_ret = hfi_process_msg_packet(core, pkt);
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
gt; + core->codecs_count = 0;
> + memset(core->caps, 0, sizeof(core->caps));
> +
> while (words_count) {
> data = word + 1;
>
> --
> 2.17.1
>
Reviewed-by: Fritz Koenig
35 matches
Mail list logo