From 3ae57f76cda45e8b0a802d958b26e62bc0253ed7 Mon Sep 17 00:00:00 2001 From: Maheshwar Ajja Date: Fri, 14 Sep 2012 16:44:00 +0530 Subject: [PATCH] msm: vidc: Correct the display size of small resolution clips We change the frame height in the decoder to MDP_MIN_TILE_HEIGHT for the videos with frame height less than 96. Due to which these videos were not being displayed properly. This change fixes the display change. Change-Id: I7acc74742a8cfbdfc79b02bd20bb9109f4389fa2 Signed-off-by: Maheshwar Ajja --- drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c index 6fb8f6c80e13..af19912ddcef 100644 --- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c +++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c @@ -1969,6 +1969,7 @@ u32 ddl_set_default_decoder_buffer_req(struct ddl_decoder_data *decoder, struct vcd_buffer_requirement *input_buf_req; struct vcd_buffer_requirement *output_buf_req; u32 min_dpb, y_cb_cr_size; + u32 frame_height_actual = 0; if (!decoder->codec.codec) return false; @@ -1992,6 +1993,7 @@ u32 ddl_set_default_decoder_buffer_req(struct ddl_decoder_data *decoder, if ((decoder->buf_format.buffer_format == VCD_BUFFER_FORMAT_TILE_4x2) && (frame_size->height < MDP_MIN_TILE_HEIGHT)) { + frame_height_actual = frame_size->height; frame_size->height = MDP_MIN_TILE_HEIGHT; ddl_calculate_stride(frame_size, !decoder->progressive_only); @@ -2030,6 +2032,10 @@ u32 ddl_set_default_decoder_buffer_req(struct ddl_decoder_data *decoder, input_buf_req->sz = (1024 * 1024 * 2); input_buf_req->align = DDL_LINEAR_BUFFER_ALIGN_BYTES; decoder->min_input_buf_req = *input_buf_req; + if (frame_height_actual) { + frame_size->height = frame_height_actual; + ddl_calculate_stride(frame_size, !decoder->progressive_only); + } return true; }