diff mbox

[media] s5p-mfc: Handle multi-frame input buffer

Message ID 1352899605-12043-1-git-send-email-arun.kk@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arun Kumar K Nov. 14, 2012, 1:26 p.m. UTC
When one input buffer has multiple frames, it should be fed
again to the hardware with the remaining bytes. Removed the
check for P frame in this scenario as this condition can come with
all frame types.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

Comments

Kamil Debski Nov. 20, 2012, 6:01 p.m. UTC | #1
> From: Arun Kumar K [mailto:arun.kk@samsung.com]
> Sent: Wednesday, November 14, 2012 2:27 PM
> To: linux-media@vger.kernel.org
> Cc: k.debski@samsung.com; jtp.park@samsung.com; arun.m@samsung.com;
> arun.kk@samsung.com
> Subject: [PATCH] [media] s5p-mfc: Handle multi-frame input buffer
> 
> When one input buffer has multiple frames, it should be fed again to
> the hardware with the remaining bytes. Removed the check for P frame in
> this scenario as this condition can come with all frame types.
> 
> Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
> Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com>

Acked-by: Kamil Debski <k.debski@samsung.com>

> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index 0ca8dbb..d3cd738 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -382,11 +382,8 @@ static void s5p_mfc_handle_frame(struct
> s5p_mfc_ctx *ctx,
>  		ctx->consumed_stream += s5p_mfc_hw_call(dev->mfc_ops,
>  						get_consumed_stream, dev);
>  		if (ctx->codec_mode != S5P_MFC_CODEC_H264_DEC &&
> -			s5p_mfc_hw_call(dev->mfc_ops,
> -				get_dec_frame_type, dev) ==
> -					S5P_FIMV_DECODE_FRAME_P_FRAME
> -					&& ctx->consumed_stream + STUFF_BYTE
<
> -
src_buf->b->v4l2_planes[0].bytesused) {
> +			ctx->consumed_stream + STUFF_BYTE <
> +			src_buf->b->v4l2_planes[0].bytesused) {
>  			/* Run MFC again on the same buffer */
>  			mfc_debug(2, "Running again the same buffer\n");
>  			ctx->after_packed_pb = 1;
> --
> 1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 0ca8dbb..d3cd738 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -382,11 +382,8 @@  static void s5p_mfc_handle_frame(struct s5p_mfc_ctx *ctx,
 		ctx->consumed_stream += s5p_mfc_hw_call(dev->mfc_ops,
 						get_consumed_stream, dev);
 		if (ctx->codec_mode != S5P_MFC_CODEC_H264_DEC &&
-			s5p_mfc_hw_call(dev->mfc_ops,
-				get_dec_frame_type, dev) ==
-					S5P_FIMV_DECODE_FRAME_P_FRAME
-					&& ctx->consumed_stream + STUFF_BYTE <
-					src_buf->b->v4l2_planes[0].bytesused) {
+			ctx->consumed_stream + STUFF_BYTE <
+			src_buf->b->v4l2_planes[0].bytesused) {
 			/* Run MFC again on the same buffer */
 			mfc_debug(2, "Running again the same buffer\n");
 			ctx->after_packed_pb = 1;