linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Kamil Debski <kamil@wypas.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	linux-media@vger.kernel.org, kernel@pengutronix.de,
	Philipp Zabel <p.zabel@pengutronix.de>
Subject: [PATCH 03/10] [media] coda: fix bitstream preloading for MPEG4 decoding
Date: Thu,  9 Jul 2015 12:10:14 +0200	[thread overview]
Message-ID: <1436436621-12291-3-git-send-email-p.zabel@pengutronix.de> (raw)
In-Reply-To: <1436436621-12291-1-git-send-email-p.zabel@pengutronix.de>

All decoder instances using the BIT processor should preload buffers
into the bitstream ring buffer, including MPEG4 decoding. Fix this
by explicitly stating the above condition instead of listing all
relevant input formats.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/coda/coda-common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 58f6548..3259ea6 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1244,9 +1244,7 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count)
 
 	q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
-		if (q_data_src->fourcc == V4L2_PIX_FMT_H264 ||
-		    (q_data_src->fourcc == V4L2_PIX_FMT_JPEG &&
-		     ctx->dev->devtype->product == CODA_7541)) {
+		if (ctx->inst_type == CODA_INST_DECODER && ctx->use_bit) {
 			/* copy the buffers that were queued before streamon */
 			mutex_lock(&ctx->bitstream_mutex);
 			coda_fill_bitstream(ctx, false);
-- 
2.1.4


  parent reply	other threads:[~2015-07-09 10:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 10:10 [PATCH 01/10] [media] coda: clamp frame sequence counters to 16 bit Philipp Zabel
2015-07-09 10:10 ` [PATCH 02/10] [media] coda: fix mvcol buffer for MPEG4 decoding Philipp Zabel
2015-07-09 10:10 ` Philipp Zabel [this message]
2015-07-09 10:10 ` [PATCH 04/10] [media] coda: keep buffers on the queue in bitstream end mode Philipp Zabel
2015-07-09 10:10 ` [PATCH 05/10] [media] coda: avoid calling SEQ_END twice Philipp Zabel
2015-07-09 10:10 ` [PATCH 06/10] [media] coda: reset stream end in stop_streaming Philipp Zabel
2015-07-09 10:10 ` [PATCH 07/10] [media] coda: drop custom list of pixel format descriptions Philipp Zabel
2015-07-09 10:10 ` [PATCH 08/10] [media] coda: use event class to deduplicate v4l2 trace events Philipp Zabel
2015-07-09 10:10 ` [PATCH 09/10] [media] coda: reuse src_bufs in coda_job_ready Philipp Zabel
2015-07-09 10:10 ` [PATCH 10/10] [media] coda: rework meta counting and add separate lock Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436436621-12291-3-git-send-email-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=kamil@wypas.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).