lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1555404834.22504.9.camel@mhfsdcap03>
Date:   Tue, 16 Apr 2019 16:53:54 +0800
From:   gtk_ruiwang <gtk_ruiwang@...iatek.com>
To:     Hans Verkuil <hverkuil@...all.nl>,
        Tiffany Lin <tiffany.lin@...iatek.com>,
        <maoguang.meng@...iatek.com>
CC:     Longfei Wang <longfei.wang@...iatek.com>,
        Yunfei Dong <yunfei.dong@...iatek.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        <linux-media@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>, <gtk_ruiwang@...iatek.com>
Subject: Re: [PATCH,v1] media: mtk-vcodec: fix vp9 content playback error
 with show exist frame

Dear Hans, all,

Could you please help to review this patch?

This is a fix about vp9 show_existing_frames.

Sincerely thanks,
BR

On Mon, 2019-04-01 at 16:18 +0800, maoguang.meng@...iatek.com wrote:
> From: Maoguang Meng <maoguang.meng@...iatek.com>
> 
> Update referenced frame buffer's reference count when playing vp9
> content which has show_existing_frame flag, and copy enough buffer
> data to current shown frame.
> 
> Signed-off-by: Maoguang Meng <maoguang.meng@...iatek.com>
> ---
>  .../media/platform/mtk-vcodec/vdec/vdec_vp9_if.c   |   16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> index bc8349b..d950837 100644
> --- a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> +++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> @@ -481,15 +481,15 @@ static void vp9_swap_frm_bufs(struct vdec_vp9_inst *inst)
>  		 */
>  		if ((frm_to_show->fb != NULL) &&
>  			(inst->cur_fb->base_y.size >=
> -			frm_to_show->fb->base_y.size)) {
> +			frm_to_show->fb->base_y.size) &&
> +			(inst->cur_fb->base_c.size >=
> +			frm_to_show->fb->base_c.size)) {
>  			memcpy((void *)inst->cur_fb->base_y.va,
>  				(void *)frm_to_show->fb->base_y.va,
> -				vsi->buf_w *
> -				vsi->buf_h);
> +				frm_to_show->fb->base_y.size);
>  			memcpy((void *)inst->cur_fb->base_c.va,
>  				(void *)frm_to_show->fb->base_c.va,
> -				vsi->buf_w *
> -				vsi->buf_h / 2);
> +				frm_to_show->fb->base_c.size);
>  		} else {
>  			/* After resolution change case, current CAPTURE buffer
>  			 * may have less buffer size than frm_to_show buffer
> @@ -895,7 +895,7 @@ static int vdec_vp9_decode(unsigned long h_vdec, struct mtk_vcodec_mem *bs,
>  
>  		if (vsi->resolution_changed) {
>  			if (!vp9_alloc_work_buf(inst)) {
> -				ret = -EINVAL;
> +				ret = -EIO;
>  				goto DECODE_ERROR;
>  			}
>  		}
> @@ -924,14 +924,12 @@ static int vdec_vp9_decode(unsigned long h_vdec, struct mtk_vcodec_mem *bs,
>  
>  		if (vsi->show_existing_frame && (vsi->frm_to_show_idx <
>  					VP9_MAX_FRM_BUF_NUM)) {
> -			mtk_vcodec_err(inst,
> +			mtk_vcodec_debug(inst,
>  				"Skip Decode drv->new_fb_idx=%d, drv->frm_to_show_idx=%d",
>  				vsi->new_fb_idx, vsi->frm_to_show_idx);
>  
>  			vp9_ref_cnt_fb(inst, &vsi->new_fb_idx,
>  					vsi->frm_to_show_idx);
> -			ret = -EINVAL;
> -			goto DECODE_ERROR;
>  		}
>  
>  		/* VPU assign the buffer pointer in its address space,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ