From cabc8b0e58cb016418cee604c5f45cdc7c80be14 Mon Sep 17 00:00:00 2001 From: Rong Zhang Date: Fri, 22 Feb 2019 16:28:29 +0800 Subject: [PATCH] media_module: h264/mpeg2/h265 [2/2] PD#SWPL-3654 Problem: provide aspect_ratio information by AMSTREAM_IOC_VDECSTAT Solution: add ration_control information in vdec_status function for h264/mh264/vh265/mpeg12/mmpeg12, and normalized it for aspect_ratio in AMSTREAM_IOC_VDECSTAT message. Verify: Verified U212 Change-Id: Icd9270eb8f2ce2f6f7455ec28780d26ac6c56348 Signed-off-by: Rong Zhang --- include/linux/amlogic/media/utils/amstream.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/amlogic/media/utils/amstream.h b/include/linux/amlogic/media/utils/amstream.h index a398003ce4b1..1343d436ffb2 100644 --- a/include/linux/amlogic/media/utils/amstream.h +++ b/include/linux/amlogic/media/utils/amstream.h @@ -303,12 +303,20 @@ struct buf_status { #define DECODER_ERROR_MASK (0xffff<<16) + +enum E_ASPECT_RATIO { + ASPECT_RATIO_4_3, + ASPECT_RATIO_16_9, + ASPECT_UNDEFINED = 255 +}; + struct vdec_status { unsigned int width; unsigned int height; unsigned int fps; unsigned int error_count; unsigned int status; + enum E_ASPECT_RATIO euAspectRatio; }; struct vdec_info { @@ -328,6 +336,7 @@ struct vdec_info { unsigned long long total_data; unsigned int samp_cnt; unsigned int offset; + unsigned int ratio_control; char reserved[32]; };