linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp()
@ 2019-09-09  7:28 Boris Brezillon
  2019-09-09  7:28 ` [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP() Boris Brezillon
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Boris Brezillon @ 2019-09-09  7:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media
  Cc: Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Tomasz Figa,
	Jonas Karlman, Francois Buergisser, Boris Brezillon

So it matches the code and the spec.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/staging/media/hantro/hantro_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c
index 0d758e0c0f99..f070e7174007 100644
--- a/drivers/staging/media/hantro/hantro_h264.c
+++ b/drivers/staging/media/hantro/hantro_h264.c
@@ -429,7 +429,7 @@ static int b1_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 
 	/*
 	 * Short term pics with POC > cur POC first in POC ascending order
-	 * followed by short term pics with POC > cur POC in POC descending
+	 * followed by short term pics with POC < cur POC in POC descending
 	 * order.
 	 */
 	if ((poca < builder->curpoc) != (pocb < builder->curpoc))
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP()
  2019-09-09  7:28 [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Boris Brezillon
@ 2019-09-09  7:28 ` Boris Brezillon
  2019-09-18  5:03   ` Francois Buergisser
  2019-09-09  7:28 ` [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case Boris Brezillon
  2019-09-18  5:03 ` [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Francois Buergisser
  2 siblings, 1 reply; 11+ messages in thread
From: Boris Brezillon @ 2019-09-09  7:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media
  Cc: Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Tomasz Figa,
	Jonas Karlman, Francois Buergisser, Boris Brezillon

And use it for all native type comparisons, even if it's not strictly
required. By doing that we make the code more consistent and prevent
from potential incorrect results in case of overflow or when the the
values being compared are both negative.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/staging/media/hantro/hantro_h264.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c
index f070e7174007..881d73977ff6 100644
--- a/drivers/staging/media/hantro/hantro_h264.c
+++ b/drivers/staging/media/hantro/hantro_h264.c
@@ -22,7 +22,7 @@
 #define POC_BUFFER_SIZE			34
 #define SCALING_LIST_SIZE		(6 * 16 + 6 * 64)
 
-#define POC_CMP(p0, p1) ((p0) < (p1) ? -1 : 1)
+#define HANTRO_CMP(a, b) ((a) < (b) ? -1 : 1)
 
 /* Data structure describing auxiliary buffer format. */
 struct hantro_h264_dec_priv_tbl {
@@ -353,9 +353,9 @@ static int p_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 	 * ascending order.
 	 */
 	if (!(a->flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM))
-		return b->frame_num - a->frame_num;
+		return HANTRO_CMP(b->frame_num, a->frame_num);
 
-	return a->pic_num - b->pic_num;
+	return HANTRO_CMP(a->pic_num, b->pic_num);
 }
 
 static int b0_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
@@ -381,7 +381,7 @@ static int b0_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 
 	/* Long term pics in ascending pic num order. */
 	if (a->flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM)
-		return a->pic_num - b->pic_num;
+		return HANTRO_CMP(a->pic_num, b->pic_num);
 
 	poca = builder->pocs[idxa];
 	pocb = builder->pocs[idxb];
@@ -392,11 +392,11 @@ static int b0_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 	 * order.
 	 */
 	if ((poca < builder->curpoc) != (pocb < builder->curpoc))
-		return POC_CMP(poca, pocb);
+		return HANTRO_CMP(poca, pocb);
 	else if (poca < builder->curpoc)
-		return POC_CMP(pocb, poca);
+		return HANTRO_CMP(pocb, poca);
 
-	return POC_CMP(poca, pocb);
+	return HANTRO_CMP(poca, pocb);
 }
 
 static int b1_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
@@ -422,7 +422,7 @@ static int b1_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 
 	/* Long term pics in ascending pic num order. */
 	if (a->flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM)
-		return a->pic_num - b->pic_num;
+		return HANTRO_CMP(a->pic_num, b->pic_num);
 
 	poca = builder->pocs[idxa];
 	pocb = builder->pocs[idxb];
@@ -433,11 +433,11 @@ static int b1_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 	 * order.
 	 */
 	if ((poca < builder->curpoc) != (pocb < builder->curpoc))
-		return POC_CMP(pocb, poca);
+		return HANTRO_CMP(pocb, poca);
 	else if (poca < builder->curpoc)
-		return POC_CMP(pocb, poca);
+		return HANTRO_CMP(pocb, poca);
 
-	return POC_CMP(poca, pocb);
+	return HANTRO_CMP(poca, pocb);
 }
 
 static void
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case
  2019-09-09  7:28 [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Boris Brezillon
  2019-09-09  7:28 ` [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP() Boris Brezillon
@ 2019-09-09  7:28 ` Boris Brezillon
  2019-09-09  7:31   ` Boris Brezillon
                     ` (2 more replies)
  2019-09-18  5:03 ` [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Francois Buergisser
  2 siblings, 3 replies; 11+ messages in thread
From: Boris Brezillon @ 2019-09-09  7:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media
  Cc: Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Tomasz Figa,
	Jonas Karlman, Francois Buergisser, Boris Brezillon

Step '8.2.4.1 Decoding process for picture numbers' was missing in the
reflist creation logic, leading to invalid P reflists when a
->frame_num wraparound happens.

Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding")
Reported-by: Francois Buergisser <fbuergisser@google.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/staging/media/hantro/hantro_h264.c | 23 +++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c
index 881d73977ff6..e3f757a7de34 100644
--- a/drivers/staging/media/hantro/hantro_h264.c
+++ b/drivers/staging/media/hantro/hantro_h264.c
@@ -271,6 +271,7 @@ struct hantro_h264_reflist_builder {
 	const struct v4l2_h264_dpb_entry *dpb;
 	s32 pocs[HANTRO_H264_DPB_SIZE];
 	u8 unordered_reflist[HANTRO_H264_DPB_SIZE];
+	int frame_nums[HANTRO_H264_DPB_SIZE];
 	s32 curpoc;
 	u8 num_valid;
 };
@@ -294,13 +295,20 @@ static void
 init_reflist_builder(struct hantro_ctx *ctx,
 		     struct hantro_h264_reflist_builder *b)
 {
+	const struct v4l2_ctrl_h264_slice_params *slice_params;
 	const struct v4l2_ctrl_h264_decode_params *dec_param;
+	const struct v4l2_ctrl_h264_sps *sps;
 	struct vb2_v4l2_buffer *buf = hantro_get_dst_buf(ctx);
 	const struct v4l2_h264_dpb_entry *dpb = ctx->h264_dec.dpb;
 	struct vb2_queue *cap_q = &ctx->fh.m2m_ctx->cap_q_ctx.q;
+	int cur_frame_num, max_frame_num;
 	unsigned int i;
 
 	dec_param = ctx->h264_dec.ctrls.decode;
+	slice_params = &ctx->h264_dec.ctrls.slices[0];
+	sps = ctx->h264_dec.ctrls.sps;
+	max_frame_num = 1 << (sps->log2_max_frame_num_minus4 + 4);
+	cur_frame_num = slice_params->frame_num;
 
 	memset(b, 0, sizeof(*b));
 	b->dpb = dpb;
@@ -318,6 +326,18 @@ init_reflist_builder(struct hantro_ctx *ctx,
 			continue;
 
 		buf = to_vb2_v4l2_buffer(vb2_get_buffer(cap_q, buf_idx));
+
+		/*
+		 * Handle frame_num wraparound as described in section
+		 * '8.2.4.1 Decoding process for picture numbers' of the spec.
+		 * TODO: This logic will have to be adjusted when we start
+		 * supporting interlaced content.
+		 */
+		if (dpb[i].frame_num > cur_frame_num)
+			b->frame_nums[i] = (int)dpb[i].frame_num - max_frame_num;
+		else
+			b->frame_nums[i] = dpb[i].frame_num;
+
 		b->pocs[i] = get_poc(buf->field, dpb[i].top_field_order_cnt,
 				     dpb[i].bottom_field_order_cnt);
 		b->unordered_reflist[b->num_valid] = i;
@@ -353,7 +373,8 @@ static int p_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
 	 * ascending order.
 	 */
 	if (!(a->flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM))
-		return HANTRO_CMP(b->frame_num, a->frame_num);
+		return HANTRO_CMP(builder->frame_nums[idxb],
+				  builder->frame_nums[idxa]);
 
 	return HANTRO_CMP(a->pic_num, b->pic_num);
 }
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case
  2019-09-09  7:28 ` [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case Boris Brezillon
@ 2019-09-09  7:31   ` Boris Brezillon
  2019-09-09  8:51   ` Philipp Zabel
  2019-09-18  5:04   ` Francois Buergisser
  2 siblings, 0 replies; 11+ messages in thread
From: Boris Brezillon @ 2019-09-09  7:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media
  Cc: Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Tomasz Figa,
	Jonas Karlman, Francois Buergisser

On Mon,  9 Sep 2019 09:28:15 +0200
Boris Brezillon <boris.brezillon@collabora.com> wrote:

> Step '8.2.4.1 Decoding process for picture numbers' was missing in the
> reflist creation logic, leading to invalid P reflists when a
> ->frame_num wraparound happens.  
> 
> Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding")
> Reported-by: Francois Buergisser <fbuergisser@google.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---

For those who would like to test this patch, here is a video [1] showing
artifacts without this change.

[1]http://crosvideo.commondatastorage.googleapis.com/1080.mp4

>  drivers/staging/media/hantro/hantro_h264.c | 23 +++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c
> index 881d73977ff6..e3f757a7de34 100644
> --- a/drivers/staging/media/hantro/hantro_h264.c
> +++ b/drivers/staging/media/hantro/hantro_h264.c
> @@ -271,6 +271,7 @@ struct hantro_h264_reflist_builder {
>  	const struct v4l2_h264_dpb_entry *dpb;
>  	s32 pocs[HANTRO_H264_DPB_SIZE];
>  	u8 unordered_reflist[HANTRO_H264_DPB_SIZE];
> +	int frame_nums[HANTRO_H264_DPB_SIZE];
>  	s32 curpoc;
>  	u8 num_valid;
>  };
> @@ -294,13 +295,20 @@ static void
>  init_reflist_builder(struct hantro_ctx *ctx,
>  		     struct hantro_h264_reflist_builder *b)
>  {
> +	const struct v4l2_ctrl_h264_slice_params *slice_params;
>  	const struct v4l2_ctrl_h264_decode_params *dec_param;
> +	const struct v4l2_ctrl_h264_sps *sps;
>  	struct vb2_v4l2_buffer *buf = hantro_get_dst_buf(ctx);
>  	const struct v4l2_h264_dpb_entry *dpb = ctx->h264_dec.dpb;
>  	struct vb2_queue *cap_q = &ctx->fh.m2m_ctx->cap_q_ctx.q;
> +	int cur_frame_num, max_frame_num;
>  	unsigned int i;
>  
>  	dec_param = ctx->h264_dec.ctrls.decode;
> +	slice_params = &ctx->h264_dec.ctrls.slices[0];
> +	sps = ctx->h264_dec.ctrls.sps;
> +	max_frame_num = 1 << (sps->log2_max_frame_num_minus4 + 4);
> +	cur_frame_num = slice_params->frame_num;
>  
>  	memset(b, 0, sizeof(*b));
>  	b->dpb = dpb;
> @@ -318,6 +326,18 @@ init_reflist_builder(struct hantro_ctx *ctx,
>  			continue;
>  
>  		buf = to_vb2_v4l2_buffer(vb2_get_buffer(cap_q, buf_idx));
> +
> +		/*
> +		 * Handle frame_num wraparound as described in section
> +		 * '8.2.4.1 Decoding process for picture numbers' of the spec.
> +		 * TODO: This logic will have to be adjusted when we start
> +		 * supporting interlaced content.
> +		 */
> +		if (dpb[i].frame_num > cur_frame_num)
> +			b->frame_nums[i] = (int)dpb[i].frame_num - max_frame_num;
> +		else
> +			b->frame_nums[i] = dpb[i].frame_num;
> +
>  		b->pocs[i] = get_poc(buf->field, dpb[i].top_field_order_cnt,
>  				     dpb[i].bottom_field_order_cnt);
>  		b->unordered_reflist[b->num_valid] = i;
> @@ -353,7 +373,8 @@ static int p_ref_list_cmp(const void *ptra, const void *ptrb, const void *data)
>  	 * ascending order.
>  	 */
>  	if (!(a->flags & V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM))
> -		return HANTRO_CMP(b->frame_num, a->frame_num);
> +		return HANTRO_CMP(builder->frame_nums[idxb],
> +				  builder->frame_nums[idxa]);
>  
>  	return HANTRO_CMP(a->pic_num, b->pic_num);
>  }


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case
  2019-09-09  7:28 ` [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case Boris Brezillon
  2019-09-09  7:31   ` Boris Brezillon
@ 2019-09-09  8:51   ` Philipp Zabel
  2019-09-18  5:04   ` Francois Buergisser
  2 siblings, 0 replies; 11+ messages in thread
From: Philipp Zabel @ 2019-09-09  8:51 UTC (permalink / raw)
  To: Boris Brezillon, Mauro Carvalho Chehab, Hans Verkuil,
	Laurent Pinchart, Sakari Ailus, linux-media
  Cc: Ezequiel Garcia, Nicolas Dufresne, Tomasz Figa, Jonas Karlman,
	Francois Buergisser

Hi Boris,

On Mon, 2019-09-09 at 09:28 +0200, Boris Brezillon wrote:
> Step '8.2.4.1 Decoding process for picture numbers' was missing in the
> reflist creation logic, leading to invalid P reflists when a
> ->frame_num wraparound happens.
> 
> Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding")
> Reported-by: Francois Buergisser <fbuergisser@google.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>

Thank you, excellent timing. I've just seen this corruption for the
first time last Friday. All three patches

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>

(on i.MX8MQ)

regards
Philipp

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp()
  2019-09-09  7:28 [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Boris Brezillon
  2019-09-09  7:28 ` [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP() Boris Brezillon
  2019-09-09  7:28 ` [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case Boris Brezillon
@ 2019-09-18  5:03 ` Francois Buergisser
  2019-09-18  6:18   ` Tomasz Figa
  2 siblings, 1 reply; 11+ messages in thread
From: Francois Buergisser @ 2019-09-18  5:03 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media, Philipp Zabel, Ezequiel Garcia,
	Nicolas Dufresne, Tomasz Figa, Jonas Karlman

On Mon, Sep 9, 2019 at 4:28 PM Boris Brezillon
<boris.brezillon@collabora.com> wrote:
>
> So it matches the code and the spec.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Francois Buergisser <fbuergisser@chromium.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP()
  2019-09-09  7:28 ` [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP() Boris Brezillon
@ 2019-09-18  5:03   ` Francois Buergisser
  2019-09-18  6:19     ` Tomasz Figa
  0 siblings, 1 reply; 11+ messages in thread
From: Francois Buergisser @ 2019-09-18  5:03 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media, Philipp Zabel, Ezequiel Garcia,
	Nicolas Dufresne, Tomasz Figa, Jonas Karlman

On Mon, Sep 9, 2019 at 4:28 PM Boris Brezillon
<boris.brezillon@collabora.com> wrote:
>
> And use it for all native type comparisons, even if it's not strictly
> required. By doing that we make the code more consistent and prevent
> from potential incorrect results in case of overflow or when the the
> values being compared are both negative.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Francois Buergisser <fbuergisser@chromium.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case
  2019-09-09  7:28 ` [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case Boris Brezillon
  2019-09-09  7:31   ` Boris Brezillon
  2019-09-09  8:51   ` Philipp Zabel
@ 2019-09-18  5:04   ` Francois Buergisser
  2019-09-18  6:29     ` Tomasz Figa
  2 siblings, 1 reply; 11+ messages in thread
From: Francois Buergisser @ 2019-09-18  5:04 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart,
	Sakari Ailus, linux-media, Philipp Zabel, Ezequiel Garcia,
	Nicolas Dufresne, Tomasz Figa, Jonas Karlman

On Mon, Sep 9, 2019 at 4:28 PM Boris Brezillon
<boris.brezillon@collabora.com> wrote:
>
> Step '8.2.4.1 Decoding process for picture numbers' was missing in the
> reflist creation logic, leading to invalid P reflists when a
> ->frame_num wraparound happens.
>
> Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding")
> Reported-by: Francois Buergisser <fbuergisser@google.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Francois Buergisser <fbuergisser@chromium.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp()
  2019-09-18  5:03 ` [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Francois Buergisser
@ 2019-09-18  6:18   ` Tomasz Figa
  0 siblings, 0 replies; 11+ messages in thread
From: Tomasz Figa @ 2019-09-18  6:18 UTC (permalink / raw)
  To: Francois Buergisser
  Cc: Boris Brezillon, Mauro Carvalho Chehab, Hans Verkuil,
	Laurent Pinchart, Sakari Ailus, Linux Media Mailing List,
	Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Jonas Karlman

On Wed, Sep 18, 2019 at 2:03 PM Francois Buergisser
<fbuergisser@google.com> wrote:
>
> On Mon, Sep 9, 2019 at 4:28 PM Boris Brezillon
> <boris.brezillon@collabora.com> wrote:
> >
> > So it matches the code and the spec.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Tested-by: Francois Buergisser <fbuergisser@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP()
  2019-09-18  5:03   ` Francois Buergisser
@ 2019-09-18  6:19     ` Tomasz Figa
  0 siblings, 0 replies; 11+ messages in thread
From: Tomasz Figa @ 2019-09-18  6:19 UTC (permalink / raw)
  To: Francois Buergisser
  Cc: Boris Brezillon, Mauro Carvalho Chehab, Hans Verkuil,
	Laurent Pinchart, Sakari Ailus, Linux Media Mailing List,
	Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Jonas Karlman

On Wed, Sep 18, 2019 at 2:04 PM Francois Buergisser
<fbuergisser@google.com> wrote:
>
> On Mon, Sep 9, 2019 at 4:28 PM Boris Brezillon
> <boris.brezillon@collabora.com> wrote:
> >
> > And use it for all native type comparisons, even if it's not strictly
> > required. By doing that we make the code more consistent and prevent
> > from potential incorrect results in case of overflow or when the the
> > values being compared are both negative.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Tested-by: Francois Buergisser <fbuergisser@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case
  2019-09-18  5:04   ` Francois Buergisser
@ 2019-09-18  6:29     ` Tomasz Figa
  0 siblings, 0 replies; 11+ messages in thread
From: Tomasz Figa @ 2019-09-18  6:29 UTC (permalink / raw)
  To: Francois Buergisser
  Cc: Boris Brezillon, Mauro Carvalho Chehab, Hans Verkuil,
	Laurent Pinchart, Sakari Ailus, Linux Media Mailing List,
	Philipp Zabel, Ezequiel Garcia, Nicolas Dufresne, Jonas Karlman

On Wed, Sep 18, 2019 at 2:04 PM Francois Buergisser
<fbuergisser@google.com> wrote:
>
> On Mon, Sep 9, 2019 at 4:28 PM Boris Brezillon
> <boris.brezillon@collabora.com> wrote:
> >
> > Step '8.2.4.1 Decoding process for picture numbers' was missing in the
> > reflist creation logic, leading to invalid P reflists when a
> > ->frame_num wraparound happens.
> >
> > Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding")
> > Reported-by: Francois Buergisser <fbuergisser@google.com>
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Tested-by: Francois Buergisser <fbuergisser@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-09-18  6:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09  7:28 [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Boris Brezillon
2019-09-09  7:28 ` [PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP() Boris Brezillon
2019-09-18  5:03   ` Francois Buergisser
2019-09-18  6:19     ` Tomasz Figa
2019-09-09  7:28 ` [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case Boris Brezillon
2019-09-09  7:31   ` Boris Brezillon
2019-09-09  8:51   ` Philipp Zabel
2019-09-18  5:04   ` Francois Buergisser
2019-09-18  6:29     ` Tomasz Figa
2019-09-18  5:03 ` [PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp() Francois Buergisser
2019-09-18  6:18   ` Tomasz Figa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).