2 * drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h
4 * Header file for Samsung MFC (Multi Function Codec - FIMV) driver
5 * Contains declarations of hw related functions.
7 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
8 * http://www.samsung.com/
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #ifndef S5P_MFC_OPR_V6_H_
16 #define S5P_MFC_OPR_V6_H_
18 #include "s5p_mfc_common.h"
19 #include "s5p_mfc_opr.h"
21 #define MFC_CTRL_MODE_CUSTOM MFC_CTRL_MODE_SFR
23 #define MB_WIDTH(x_size) DIV_ROUND_UP(x_size, 16)
24 #define MB_HEIGHT(y_size) DIV_ROUND_UP(y_size, 16)
25 #define S5P_MFC_DEC_MV_SIZE_V6(x, y) (MB_WIDTH(x) * \
26 (((MB_HEIGHT(y)+1)/2)*2) * 64 + 128)
27 #define S5P_MFC_DEC_MV_SIZE_V10(x, y) (MB_WIDTH(x) * \
28 (((MB_HEIGHT(y)+1)/2)*2) * 64 + 512)
29 #define S5P_MFC_LCU_WIDTH(x_size) DIV_ROUND_UP(x_size, 32)
30 #define S5P_MFC_LCU_HEIGHT(y_size) DIV_ROUND_UP(y_size, 32)
32 #define s5p_mfc_dec_hevc_mv_size(x, y) \
33 (DIV_ROUND_UP(x, 64) * DIV_ROUND_UP(y, 64) * 256 + 512)
36 #define ENC_MULTI_SLICE_MB_MAX ((1 << 30) - 1)
37 #define ENC_MULTI_SLICE_BIT_MIN 2800
38 #define ENC_INTRA_REFRESH_MB_MAX ((1 << 18) - 1)
39 #define ENC_VBV_BUF_SIZE_MAX ((1 << 30) - 1)
40 #define ENC_H264_LOOP_FILTER_AB_MIN -12
41 #define ENC_H264_LOOP_FILTER_AB_MAX 12
42 #define ENC_H264_RC_FRAME_RATE_MAX ((1 << 16) - 1)
43 #define ENC_H263_RC_FRAME_RATE_MAX ((1 << 16) - 1)
44 #define ENC_H264_PROFILE_MAX 3
45 #define ENC_H264_LEVEL_MAX 42
46 #define ENC_MPEG4_VOP_TIME_RES_MAX ((1 << 16) - 1)
47 #define FRAME_DELTA_H264_H263 1
48 #define TIGHT_CBR_MAX 10
49 #define ENC_HEVC_RC_FRAME_RATE_MAX ((1 << 16) - 1)
50 #define ENC_HEVC_QP_INDEX_MIN -12
51 #define ENC_HEVC_QP_INDEX_MAX 12
52 #define ENC_HEVC_LOOP_FILTER_MIN -12
53 #define ENC_HEVC_LOOP_FILTER_MAX 12
54 #define ENC_HEVC_LEVEL_MAX 62
56 #define FRAME_DELTA_DEFAULT 1
58 struct s5p_mfc_hw_ops
*s5p_mfc_init_hw_ops_v6(void);
59 const struct s5p_mfc_regs
*s5p_mfc_init_regs_v6_plus(struct s5p_mfc_dev
*dev
);
60 #endif /* S5P_MFC_OPR_V6_H_ */