aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/coda
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-01-23 11:51:28 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-02 07:26:31 -0500
commite3cccff9aa93679f1b9d23080cc07197f58588f4 (patch)
treeac342d1d284106779cb3944de4c852594685122f /drivers/media/platform/coda
parentf4706d6e6d2d174af156b56d08cfca35121ac7cc (diff)
[media] coda: don't ever use subsampling ping-pong buffers as reconstructed reference buffers
On i.MX6, two subsampling ping-pong buffers are used for motion estimation and deblocking They should not be counted as framebuffers, or they will be also used to store reconstructed frames, causing visible artifacts in P-frames. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r--drivers/media/platform/coda/coda-bit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 6ecfd29b7d98..7cdddd55d65d 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -718,6 +718,7 @@ static int coda_start_encoding(struct coda_ctx *ctx)
718 struct vb2_buffer *buf; 718 struct vb2_buffer *buf;
719 int gamma, ret, value; 719 int gamma, ret, value;
720 u32 dst_fourcc; 720 u32 dst_fourcc;
721 int num_fb;
721 u32 stride; 722 u32 stride;
722 723
723 q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); 724 q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
@@ -983,12 +984,14 @@ static int coda_start_encoding(struct coda_ctx *ctx)
983 v4l2_err(v4l2_dev, "failed to allocate framebuffers\n"); 984 v4l2_err(v4l2_dev, "failed to allocate framebuffers\n");
984 goto out; 985 goto out;
985 } 986 }
987 num_fb = 2;
986 stride = q_data_src->bytesperline; 988 stride = q_data_src->bytesperline;
987 } else { 989 } else {
988 ctx->num_internal_frames = 0; 990 ctx->num_internal_frames = 0;
991 num_fb = 0;
989 stride = 0; 992 stride = 0;
990 } 993 }
991 coda_write(dev, ctx->num_internal_frames, CODA_CMD_SET_FRAME_BUF_NUM); 994 coda_write(dev, num_fb, CODA_CMD_SET_FRAME_BUF_NUM);
992 coda_write(dev, stride, CODA_CMD_SET_FRAME_BUF_STRIDE); 995 coda_write(dev, stride, CODA_CMD_SET_FRAME_BUF_STRIDE);
993 996
994 if (dev->devtype->product == CODA_7541) { 997 if (dev->devtype->product == CODA_7541) {