aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorSeungBeom Kim <sbcrux.kim@samsung.com>2011-08-25 14:12:48 +0900
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:54:30 -0800
commitb08fa634697902ad248551f143e4b58a31b2eb0b (patch)
tree3afc445190d911daf5310821eefd2147eaaf81ad /drivers/media/video
parent895a89e28d0724c8e6c1cb5dd5d30de18bd25c6b (diff)
downloadkernel_samsung_crespo-b08fa634697902ad248551f143e4b58a31b2eb0b.zip
kernel_samsung_crespo-b08fa634697902ad248551f143e4b58a31b2eb0b.tar.gz
kernel_samsung_crespo-b08fa634697902ad248551f143e4b58a31b2eb0b.tar.bz2
S5PC11X: MFC: Adding support for NV12 encoding.
Change-Id: Ibd8ca0f64acefb1f38ba801595b44ef6cd42366b Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/samsung/mfc50/mfc_interface.h4
-rw-r--r--drivers/media/video/samsung/mfc50/mfc_opr.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/video/samsung/mfc50/mfc_interface.h b/drivers/media/video/samsung/mfc50/mfc_interface.h
index 469620a..3213f96 100644
--- a/drivers/media/video/samsung/mfc50/mfc_interface.h
+++ b/drivers/media/video/samsung/mfc50/mfc_interface.h
@@ -143,6 +143,8 @@ struct mfc_enc_init_mpeg4_arg {
int in_cb_pad_val;
int in_cr_pad_val;
+ int in_frame_map; /* [IN] Encoding input NV12 type linear(0) TILE(1) */
+
unsigned int in_mapped_addr;
struct mfc_strm_ref_buf_arg out_u_addr;
struct mfc_strm_ref_buf_arg out_p_addr;
@@ -184,6 +186,8 @@ struct mfc_enc_init_h264_arg {
int in_cb_pad_val; /* [IN] CB pel value used to fill padding area */
int in_cr_pad_val; /* [IN] CR pel value used to fill padding area */
+ int in_frame_map; /* [IN] Encoding input NV12 type linear(0) TILE(1) */
+
unsigned int in_mapped_addr;
struct mfc_strm_ref_buf_arg out_u_addr;
struct mfc_strm_ref_buf_arg out_p_addr;
diff --git a/drivers/media/video/samsung/mfc50/mfc_opr.c b/drivers/media/video/samsung/mfc50/mfc_opr.c
index a2c2464..04f2e83 100644
--- a/drivers/media/video/samsung/mfc50/mfc_opr.c
+++ b/drivers/media/video/samsung/mfc50/mfc_opr.c
@@ -667,7 +667,11 @@ static void mfc_set_encode_init_param(struct mfc_inst_ctx *mfc_ctx, union mfc_ar
/* Set circular intra refresh MB count */
WRITEL(enc_init_mpeg4_arg->in_mb_refresh, MFC_ENC_CIR_CTRL);
- WRITEL(MEM_STRUCT_TILE_ENC, MFC_ENC_MAP_FOR_CUR);
+
+ if (enc_init_mpeg4_arg->in_frame_map == 1)
+ WRITEL(MEM_STRUCT_TILE_ENC, MFC_ENC_MAP_FOR_CUR);
+ else
+ WRITEL(MEM_STRUCT_LINEAR, MFC_ENC_MAP_FOR_CUR);
/* Set padding control */
WRITEL((enc_init_mpeg4_arg->in_pad_ctrl_on << 31) |