diff mbox

[1/3] s5p-mfc: separate encoder parameters for h264 and mpeg4

Message ID 1369725976-7828-2-git-send-email-a.hajda@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrzej Hajda May 28, 2013, 7:26 a.m. UTC
This patch fixes a bug which caused overwriting h264 codec
parameters by mpeg4 parameters during V4L2 control setting.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sachin Kamat May 28, 2013, 8:31 a.m. UTC | #1
Hi Andrzej,

On 28 May 2013 12:56, Andrzej Hajda <a.hajda@samsung.com> wrote:
> This patch fixes a bug which caused overwriting h264 codec
> parameters by mpeg4 parameters during V4L2 control setting.

Just curious, what was the use case that triggered this issue?
Andrzej Hajda May 28, 2013, 9:11 a.m. UTC | #2
On 05/28/2013 10:31 AM, Sachin Kamat wrote:
> Hi Andrzej,
>
> On 28 May 2013 12:56, Andrzej Hajda <a.hajda@samsung.com> wrote:
>> This patch fixes a bug which caused overwriting h264 codec
>> parameters by mpeg4 parameters during V4L2 control setting.
> Just curious, what was the use case that triggered this issue?
>
For example it was not possible to set h264 profile and level -
they were overwritten by "struct s5p_mfc_mpeg4_enc_params" fields.

In general all 'union' fields of s5p_mfc_h264_enc_params were
overwritten by
s5p_mfc_mpeg4_enc_params and vice versa, the control which was set later
was 'the winner'.
Furthermore during stream start v4l2_ctrl_handler_setup was called so
all controls
were refreshed, so the final winners order was determined by controls
definition order.

Regards
Andrzej





--
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_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
index 202d1d7..098459e 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
@@ -438,7 +438,7 @@  struct s5p_mfc_enc_params {
 	u32 rc_framerate_num;
 	u32 rc_framerate_denom;
 
-	union {
+	struct {
 		struct s5p_mfc_h264_enc_params h264;
 		struct s5p_mfc_mpeg4_enc_params mpeg4;
 	} codec;