summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf_files/sdm845/media_codecs.xml39
-rw-r--r--conf_files/sdm845/media_codecs_performance.xml3
-rw-r--r--conf_files/sdm845/media_codecs_vendor.xml26
-rw-r--r--conf_files/sdm845/media_codecs_vendor_audio.xml6
-rw-r--r--conf_files/sdm845/media_profiles.xml324
-rw-r--r--conf_files/sdm845/sdm845.mk6
-rw-r--r--mm-core/src/sdm845/registry_table.c28
-rw-r--r--mm-core/src/sdm845/registry_table_android.c28
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp22
9 files changed, 28 insertions, 454 deletions
diff --git a/conf_files/sdm845/media_codecs.xml b/conf_files/sdm845/media_codecs.xml
index 4bb507a..9d5049b 100644
--- a/conf_files/sdm845/media_codecs.xml
+++ b/conf_files/sdm845/media_codecs.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012-2013 The Android Open Source Project
- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+ Copyright (C) 2012-2019, 2021 The Linux Foundation. All rights reserved.
Not a contribution.
Licensed under the Apache License, Version 2.0 (the "License");
@@ -388,43 +388,6 @@ Only the three quirks included above are recognized at this point:
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
- <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="16x16" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="244800" />
- <Limit name="frame-rate" range="1-30" />
- <Limit name="bitrate" range="1-10000000" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-1920x1080" value="30" />
- </MediaCodec>
- <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="16x16" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="244800" />
- <Limit name="frame-rate" range="1-30" />
- <Limit name="bitrate" range="1-10000000" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-1920x1088" value="30" />
- </MediaCodec>
- <MediaCodec name="OMX.qti.video.decoder.vc1sw" type="video/x-ms-wmv" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="64x64" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="244800" />
- <Limit name="bitrate" range="1-20000000" />
- <Limit name="frame-rate" range="1-30" />
- <Feature name="adaptive-playback" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-1920x1088" value="30" />
- </MediaCodec>
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
</Decoders>
<Include href="media_codecs_google_video.xml" />
diff --git a/conf_files/sdm845/media_codecs_performance.xml b/conf_files/sdm845/media_codecs_performance.xml
index 4dfa3eb..e652d24 100644
--- a/conf_files/sdm845/media_codecs_performance.xml
+++ b/conf_files/sdm845/media_codecs_performance.xml
@@ -100,6 +100,7 @@ limitations under the License.
</MediaCodec>
<MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-320x240" range="9-21" />
+ <Limit name="measured-frame-rate-720x480" range="14-15" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -122,7 +123,7 @@ limitations under the License.
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="590-950" />
- <Limit name="measured-frame-rate-480x360" range="164-360" />
+ <Limit name="measured-frame-rate-480x360" range="930-1000" />
<Limit name="measured-frame-rate-1280x720" range="480-502" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
diff --git a/conf_files/sdm845/media_codecs_vendor.xml b/conf_files/sdm845/media_codecs_vendor.xml
index e08f20b..dff4bfd 100644
--- a/conf_files/sdm845/media_codecs_vendor.xml
+++ b/conf_files/sdm845/media_codecs_vendor.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012-2013 The Android Open Source Project
- Copyright (C) 2012-2018 The Linux Foundation. All rights reserved.
+ Copyright (C) 2012-2018, 2021 The Linux Foundation. All rights reserved.
Not a contribution.
Licensed under the Apache License, Version 2.0 (the "License");
@@ -402,30 +402,6 @@ Only the three quirks included above are recognized at this point:
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
- <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="16x16" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="244800" />
- <Limit name="frame-rate" range="1-30" />
- <Limit name="bitrate" range="1-10000000" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-1920x1080" value="30" />
- </MediaCodec>
- <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="16x16" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="244800" />
- <Limit name="frame-rate" range="1-30" />
- <Limit name="bitrate" range="1-10000000" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-1920x1088" value="30" />
- </MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.vc1sw" type="video/x-ms-wmv" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
diff --git a/conf_files/sdm845/media_codecs_vendor_audio.xml b/conf_files/sdm845/media_codecs_vendor_audio.xml
index 0cd3294..42bc8ab 100644
--- a/conf_files/sdm845/media_codecs_vendor_audio.xml
+++ b/conf_files/sdm845/media_codecs_vendor_audio.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright (C) 2015-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2015-2019, 2021 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2012 The Android Open Source Project
@@ -18,9 +18,5 @@
<Included>
<Decoders>
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
- <!-- SimpleOMXComponet based software decoder-->
- <MediaCodec name="OMX.qti.audio.decoder.flac" type="audio/flac" rank="0">
- <Limit name="concurrent-instances" max="10" />
- </MediaCodec>
</Decoders>
</Included>
diff --git a/conf_files/sdm845/media_profiles.xml b/conf_files/sdm845/media_profiles.xml
index f510bfc..3ecb767 100644
--- a/conf_files/sdm845/media_profiles.xml
+++ b/conf_files/sdm845/media_profiles.xml
@@ -186,32 +186,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -391,34 +365,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -613,32 +559,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -817,34 +737,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -971,32 +863,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1176,34 +1042,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1398,32 +1236,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1603,34 +1415,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1825,32 +1609,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -2030,34 +1788,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -2252,32 +1982,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -2457,34 +2161,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
diff --git a/conf_files/sdm845/sdm845.mk b/conf_files/sdm845/sdm845.mk
index 5ca5ae5..4a37b5c 100644
--- a/conf_files/sdm845/sdm845.mk
+++ b/conf_files/sdm845/sdm845.mk
@@ -19,8 +19,8 @@ ifeq ($(GENERIC_ODM_IMAGE),true)
PRODUCT_ODM_PROPERTIES += debug.stagefright.ccodec=4
PRODUCT_ODM_PROPERTIES += debug.stagefright.omx_default_rank=1000
else
- $(warning "Enabling codec2.0 SW only for non-generic odm build variant")
- #Rank OMX SW codecs lower than OMX HW codecs
- PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank.sw-audio=1
+ $(warning "Enabling codec2.0 non-audio SW only for non-generic odm build variant")
PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
+ PRODUCT_COPY_FILES += \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
endif
diff --git a/mm-core/src/sdm845/registry_table.c b/mm-core/src/sdm845/registry_table.c
index c2803e3..020217d 100644
--- a/mm-core/src/sdm845/registry_table.c
+++ b/mm-core/src/sdm845/registry_table.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2016 - 2018, The Linux Foundation. All rights reserved.
+Copyright (c) 2016 - 2021, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -185,32 +185,6 @@ omx_core_cb_type core[] =
}
},
{
- "OMX.qti.video.decoder.divxsw",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL
- },
- NULL, // Shared object library handle
- "libOmxSwVdec.so",
- {
- "video_decoder.divx"
- }
- },
- {
- "OMX.qti.video.decoder.divx4sw",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL
- },
- NULL, // Shared object library handle
- "libOmxSwVdec.so",
- {
- "video_decoder.divx4"
- }
- },
- {
"OMX.qti.video.decoder.h263sw",
NULL, // Create instance function
// Unique instance handle
diff --git a/mm-core/src/sdm845/registry_table_android.c b/mm-core/src/sdm845/registry_table_android.c
index 36b214c..6a5a133 100644
--- a/mm-core/src/sdm845/registry_table_android.c
+++ b/mm-core/src/sdm845/registry_table_android.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -216,32 +216,6 @@ omx_core_cb_type core[] =
}
},
{
- "OMX.qti.video.decoder.divxsw",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL
- },
- NULL, // Shared object library handle
- "libOmxSwVdec.so",
- {
- "video_decoder.divx"
- }
- },
- {
- "OMX.qti.video.decoder.divx4sw",
- NULL, // Create instance function
- // Unique instance handle
- {
- NULL
- },
- NULL, // Shared object library handle
- "libOmxSwVdec.so",
- {
- "video_decoder.divx4"
- }
- },
- {
"OMX.qti.video.decoder.h263sw",
NULL, // Create instance function
// Unique instance handle
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index d02c0b7..8e75ed1 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -7686,6 +7686,15 @@ OMX_ERRORTYPE omx_vdec::fill_this_buffer(OMX_IN OMX_HANDLETYPE hComp,
buffer = m_intermediate_out_mem_ptr + nPortIndex;
buffer->nAllocLen = drv_ctx.op_buf.buffer_size;
}
+ if (client_buffers.is_color_conversion_enabled()) {
+ buffer = m_intermediate_out_mem_ptr + nPortIndex;
+ buffer->nAllocLen = drv_ctx.op_buf.buffer_size;
+ }
+
+ //buffer->nAllocLen will be sizeof(struct VideoDecoderOutputMetaData). Overwrite
+ //this with a more sane size so that we don't compensate in rest of code
+ //We'll restore this size later on, so that it's transparent to client
+ buffer->nFilledLen = 0;
//buffer->nAllocLen will be sizeof(struct VideoDecoderOutputMetaData). Overwrite
//this with a more sane size so that we don't compensate in rest of code
@@ -10145,6 +10154,15 @@ OMX_ERRORTYPE omx_vdec::update_portdef(OMX_PARAM_PORTDEFINITIONTYPE *portDefn)
portDefn->eDomain = OMX_PortDomainVideo;
memset(&fmt, 0x0, sizeof(struct v4l2_format));
if (0 == portDefn->nPortIndex) {
+ int ret = 0;
+ fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
+ fmt.fmt.pix_mp.pixelformat = output_capability;
+ ret = ioctl(drv_ctx.video_driver_fd, VIDIOC_G_FMT, &fmt);
+ if (ret) {
+ DEBUG_PRINT_ERROR("Get Resolution failed");
+ return OMX_ErrorHardware;
+ }
+ drv_ctx.ip_buf.buffer_size = fmt.fmt.pix_mp.plane_fmt[0].sizeimage;
portDefn->eDir = OMX_DirInput;
portDefn->nBufferCountActual = drv_ctx.ip_buf.actualcount;
portDefn->nBufferCountMin = drv_ctx.ip_buf.mincount;
@@ -10156,10 +10174,6 @@ OMX_ERRORTYPE omx_vdec::update_portdef(OMX_PARAM_PORTDEFINITIONTYPE *portDefn)
portDefn->format.video.xFramerate = m_fps_received;
portDefn->bEnabled = m_inp_bEnabled;
portDefn->bPopulated = m_inp_bPopulated;
-
- fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
- fmt.fmt.pix_mp.pixelformat = output_capability;
- ioctl(drv_ctx.video_driver_fd, VIDIOC_G_FMT, &fmt);
} else if (1 == portDefn->nPortIndex) {
unsigned int buf_size = 0;
int ret = 0;