diff options
author | Tiffany Lin <tiffany.lin@mediatek.com> | 2016-05-11 05:21:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-12 13:29:22 -0300 |
commit | a874a170fac418f832eed4358f49c0b5edaadd40 (patch) | |
tree | 2b4f7468999a53422238b7734b08bdb1d22e9195 /drivers/media/platform | |
parent | 35697a0d99e142b795f34f183df859387068a72a (diff) |
[media] mtk-vcodec: fix sparse warning
This patch fix sparse warning when running with parameters:
C=2 CF="-D__CHECK_ENDIAN__"
Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: PoChun Lin <pochun.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c index 431ae706a427..5b4ef0f1740c 100644 --- a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c +++ b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c @@ -252,13 +252,18 @@ static int vp8_enc_compose_one_frame(struct venc_vp8_inst *inst, u32 bs_hdr_len; unsigned int ac_tag_size; u8 ac_tag[MAX_AC_TAG_SIZE]; + u32 tag; bs_frm_size = vp8_enc_read_reg(inst, VENC_BITSTREAM_FRAME_SIZE); bs_hdr_len = vp8_enc_read_reg(inst, VENC_BITSTREAM_HEADER_LEN); /* if a frame is key frame, not_key is 0 */ not_key = !inst->vpu_inst.is_key_frm; - *(u32 *)ac_tag = __cpu_to_le32((bs_hdr_len << 5) | 0x10 | not_key); + tag = (bs_hdr_len << 5) | 0x10 | not_key; + ac_tag[0] = tag & 0xff; + ac_tag[1] = (tag >> 8) & 0xff; + ac_tag[2] = (tag >> 16) & 0xff; + /* key frame */ if (not_key == 0) { ac_tag_size = MAX_AC_TAG_SIZE; |