Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a72c9c0 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Add enc pixel fmt constraint entry for NV12_512"

parents 92070015 7f167b41
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1211,6 +1211,13 @@ static struct msm_vidc_format venc_formats[] = {
		.get_frame_size = get_frame_size_p010,
		.type = OUTPUT_PORT,
	},
	{
		.name = "YCbCr Semiplanar 4:2:0 512 aligned",
		.description = "Y/CbCr 4:2:0 512 aligned",
		.fourcc = V4L2_PIX_FMT_NV12_512,
		.get_frame_size = get_frame_size_nv12_512,
		.type = OUTPUT_PORT,
	},
};

struct msm_vidc_format_constraint enc_pix_format_constraints[] = {
@@ -1226,6 +1233,18 @@ struct msm_vidc_format_constraint enc_pix_format_constraints[] = {
		.uv_min_plane_buffer_height_multiple = 16,
		.uv_buffer_alignment = 256,
	},
	{
		.fourcc = V4L2_PIX_FMT_NV12_512,
		.num_planes = 2,
		.y_stride_multiples = 512,
		.y_max_stride = 8192,
		.y_min_plane_buffer_height_multiple = 512,
		.y_buffer_alignment = 512,
		.uv_stride_multiples = 512,
		.uv_max_stride = 8192,
		.uv_min_plane_buffer_height_multiple = 256,
		.uv_buffer_alignment = 256,
	},
};


+4 −0
Original line number Diff line number Diff line
@@ -5976,6 +5976,10 @@ u32 get_frame_size_p010(int plane, u32 height, u32 width)
	return VENUS_BUFFER_SIZE(COLOR_FMT_P010, width, height);
}

u32 get_frame_size_nv12_512(int plane, u32 height, u32 width)
{
	return VENUS_BUFFER_SIZE(COLOR_FMT_NV12_512, width, height);
}

void print_vidc_buffer(u32 tag, const char *str, struct msm_vidc_inst *inst,
		struct msm_vidc_buffer *mbuf)
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ int msm_comm_session_continue(void *instance);
int msm_vidc_send_pending_eos_buffers(struct msm_vidc_inst *inst);
enum hal_uncompressed_format msm_comm_get_hal_uncompressed(int fourcc);
u32 get_frame_size_nv12(int plane, u32 height, u32 width);
u32 get_frame_size_nv12_512(int plane, u32 height, u32 width);
u32 get_frame_size_nv12_ubwc(int plane, u32 height, u32 width);
u32 get_frame_size_rgba(int plane, u32 height, u32 width);
u32 get_frame_size_nv21(int plane, u32 height, u32 width);
+3 −0
Original line number Diff line number Diff line
@@ -554,6 +554,9 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_NV24    v4l2_fourcc('N', 'V', '2', '4') /* 24  Y/CbCr 4:4:4  */
#define V4L2_PIX_FMT_NV42    v4l2_fourcc('N', 'V', '4', '2') /* 24  Y/CrCb 4:4:4  */

/* NV12_512 8-bit Y/CbCr 4:2:0  */
#define V4L2_PIX_FMT_NV12_512         v4l2_fourcc('Q', '5', '1', '2')

/* UBWC 8-bit Y/CbCr 4:2:0  */
#define V4L2_PIX_FMT_NV12_UBWC        v4l2_fourcc('Q', '1', '2', '8')
/* UBWC 10-bit Y/CbCr 4:2:0 */