diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2019-12-09 12:30:06 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2019-12-09 12:30:06 -0800 |
commit | fe2418a9324a3768fee78e3f473da0cd3f430f80 (patch) | |
tree | 0f4938ccc4f49ae0c31b889a52c684e050c867c1 | |
parent | c49295f4dc53c2fca0c04922e733697154220da2 (diff) | |
parent | aadd94a4d5fefe21e11b2ee427677fea11fd1b77 (diff) | |
download | android_hardware_qcom_media-fe2418a9324a3768fee78e3f473da0cd3f430f80.tar.gz android_hardware_qcom_media-fe2418a9324a3768fee78e3f473da0cd3f430f80.tar.bz2 android_hardware_qcom_media-fe2418a9324a3768fee78e3f473da0cd3f430f80.zip |
Merge aadd94a4d5fefe21e11b2ee427677fea11fd1b77 on remote branch
Change-Id: Ie8a87f3791e23b74ce976b2e06d44e05718bb3ef
-rw-r--r-- | conf_files/sm6150/media_codecs.xml | 54 | ||||
-rw-r--r-- | conf_files/sm6150/media_codecs_performance.xml | 12 | ||||
-rw-r--r-- | conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml | 12 | ||||
-rw-r--r-- | conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml | 12 | ||||
-rw-r--r-- | conf_files/sm6150/media_codecs_sdmmagpie_v1.xml | 33 | ||||
-rw-r--r-- | conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml | 33 | ||||
-rw-r--r-- | conf_files/sm6150/sm6150.mk | 2 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/vdec/inc/omx_vdec.h | 1 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp | 34 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h | 1 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/venc/inc/omx_video_common.h | 5 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp | 93 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp | 1 | ||||
-rwxr-xr-x | mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp | 7 |
14 files changed, 211 insertions, 89 deletions
diff --git a/conf_files/sm6150/media_codecs.xml b/conf_files/sm6150/media_codecs.xml index 38aec856..bdb2869f 100644 --- a/conf_files/sm6150/media_codecs.xml +++ b/conf_files/sm6150/media_codecs.xml @@ -82,14 +82,14 @@ Only the three quirks included above are recognized at this point: <!-- SM6150 Non-Secure decoder capabilities - _________________________________________________________ - | Codec | W H fps Mbps MB/s | + ________________________________________________________ + | Codec | W H fps Mbps MB/s | |_____________|_________________________________________| - | h264 | 4096 2160 24 100 829440 | - | hevc | 4096 2160 24 100 829440 | + | h264 | 3840 2160 30 100 972000 | + | hevc | 3840 2160 30 100 972000 | | mpeg4-sw | 1920 1088 30 40 244800 | | vp8 | 1920 1088 60 100 489600 | - | vp9 | 4096 2160 24 100 829440 | + | vp9 | 3840 2160 30 100 972000 | | vc1 | 1920 1088 30 20 244800 | | div4/5/6-sw | 1920 1088 30 10 244800 | | h263-sw | 864 480 30 16 48600 | @@ -100,18 +100,18 @@ Only the three quirks included above are recognized at this point: ______________________________________________________ | Codec | W H fps Mbps MB/s | |__________|_________________________________________| - | h264 | 3840 2160 30 35 972000 | - | vp9 | 3840 2160 30 35 972000 | - | hevc | 3840 2160 30 35 972000 | - | mpeg2 | 1920 1088 30 35 244800 | + | h264 | 3840 2160 30 40 972000 | + | vp9 | 3840 2160 30 40 972000 | + | hevc | 3840 2160 30 40 972000 | + | mpeg2 | 1920 1088 30 40 244800 | |__________|_________________________________________| SM6150 Non-Secure encoder capabilities (Secure not supported) ______________________________________________________ | Codec | W H fps Mbps MB/s | |__________|_________________________________________| - | h264 | 4096 2160 24 100 829440 | - | hevc | 4096 2160 24 100 829440 | + | h264 | 3840 2160 30 100 972000 | + | hevc | 3840 2160 30 100 972000 | | mpeg4-sw | 1280 720 30 4 108000 | | vp8 | 1920 1088 60 40 489600 | | h263-sw | 864 480 30 2 48600 | @@ -133,7 +133,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="979200" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Limit name="concurrent-instances" max="16" /> @@ -162,7 +162,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="979200" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Limit name="concurrent-instances" max="16" /> @@ -207,7 +207,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="979200" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -220,12 +220,12 @@ Only the three quirks included above are recognized at this point: <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" > <Quirk name="requires-allocate-on-input-ports" /> <Quirk name="requires-allocate-on-output-ports" /> - <Limit name="size" min="96x96" max="3840x2160" /> + <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> <Limit name="blocks-per-second" min="24" max="972000" /> - <Limit name="bitrate" range="1-35000000" /> - <Limit name="frame-rate" range="1-30" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> <Feature name="secure-playback" required="true" /> <Limit name="concurrent-instances" max="3" /> @@ -251,7 +251,7 @@ Only the three quirks included above are recognized at this point: <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> <Limit name="blocks-per-second" min="24" max="244800" /> - <Limit name="bitrate" range="1-35000000" /> + <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-30" /> <Feature name="adaptive-playback" /> <Feature name="secure-playback" required="true" /> @@ -279,8 +279,8 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="979200" /> - <Limit name="bitrate" range="1-120000000" /> + <Limit name="blocks-per-second" min="24" max="972000" /> + <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> <Limit name="concurrent-instances" max="6" /> @@ -292,12 +292,12 @@ Only the three quirks included above are recognized at this point: <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" > <Quirk name="requires-allocate-on-input-ports" /> <Quirk name="requires-allocate-on-output-ports" /> - <Limit name="size" min="96x96" max="3840x2160" /> + <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> <Limit name="blocks-per-second" min="24" max="972000" /> - <Limit name="bitrate" range="1-35000000" /> - <Limit name="frame-rate" range="1-30" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> <Feature name="secure-playback" required="true" /> <Limit name="concurrent-instances" max="3" /> @@ -309,7 +309,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="979200" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -322,12 +322,12 @@ Only the three quirks included above are recognized at this point: <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" > <Quirk name="requires-allocate-on-input-ports" /> <Quirk name="requires-allocate-on-output-ports" /> - <Limit name="size" min="96x96" max="3840x2160" /> + <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> <Limit name="blocks-per-second" min="24" max="972000" /> - <Limit name="bitrate" range="1-35000000" /> - <Limit name="frame-rate" range="1-30" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> <Feature name="secure-playback" required="true" /> <Limit name="concurrent-instances" max="3" /> diff --git a/conf_files/sm6150/media_codecs_performance.xml b/conf_files/sm6150/media_codecs_performance.xml index 720dbb92..5004dc99 100644 --- a/conf_files/sm6150/media_codecs_performance.xml +++ b/conf_files/sm6150/media_codecs_performance.xml @@ -68,6 +68,12 @@ limitations under the License. <Limit name="measured-frame-rate-1280x720" range="17-24" /> <Limit name="measured-frame-rate-1920x1080" range="8-12" /> </MediaCodec> + <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="81-182" /> + <Limit name="measured-frame-rate-720x480" range="58-91" /> + <Limit name="measured-frame-rate-1280x720" range="36-56" /> + <Limit name="measured-frame-rate-1920x1080" range="18-27" /> + </MediaCodec> <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true"> <Limit name="measured-frame-rate-320x240" range="137-175" /> <Limit name="measured-frame-rate-720x480" range="62-92" /> @@ -161,6 +167,12 @@ limitations under the License. <Limit name="measured-frame-rate-1280x720" range="38-117" /> <Limit name="measured-frame-rate-1920x1080" range="19-23" /> </MediaCodec> + <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="126-544" /> + <Limit name="measured-frame-rate-720x480" range="185-528" /> + <Limit name="measured-frame-rate-1280x720" range="116-281" /> + <Limit name="measured-frame-rate-1920x1080" range="108-151" /> + </MediaCodec> <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true"> <Limit name="measured-frame-rate-320x240" range="108-155" /> <Limit name="measured-frame-rate-720x480" range="40-58" /> diff --git a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml index 35ee5ae6..a19c5638 100644 --- a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml +++ b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml @@ -68,6 +68,12 @@ limitations under the License. <Limit name="measured-frame-rate-1280x720" range="17-24" /> <Limit name="measured-frame-rate-1920x1080" range="8-12" /> </MediaCodec> + <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="83-211" /> + <Limit name="measured-frame-rate-720x480" range="72-102" /> + <Limit name="measured-frame-rate-1280x720" range="37-59" /> + <Limit name="measured-frame-rate-1920x1080" range="23-32" /> + </MediaCodec> <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true"> <Limit name="measured-frame-rate-320x240" range="178-250" /> <Limit name="measured-frame-rate-720x480" range="69-95" /> @@ -162,6 +168,12 @@ limitations under the License. <Limit name="measured-frame-rate-1280x720" range="60-85" /> <Limit name="measured-frame-rate-1920x1080" range="33-55" /> </MediaCodec> + <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="375-450" /> + <Limit name="measured-frame-rate-720x480" range="362-444" /> + <Limit name="measured-frame-rate-1280x720" range="157-470" /> + <Limit name="measured-frame-rate-1920x1080" range="104-209" /> + </MediaCodec> <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true"> <Limit name="measured-frame-rate-320x240" range="117-160" /> <Limit name="measured-frame-rate-720x480" range="36-49" /> diff --git a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml index 44c6e22c..da993ffd 100644 --- a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml +++ b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml @@ -68,6 +68,12 @@ limitations under the License. <Limit name="measured-frame-rate-1280x720" range="17-24" /> <Limit name="measured-frame-rate-1920x1080" range="8-12" /> </MediaCodec> + <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="88-210" /> + <Limit name="measured-frame-rate-720x480" range="80-106" /> + <Limit name="measured-frame-rate-1280x720" range="41-59" /> + <Limit name="measured-frame-rate-1920x1080" range="22-32" /> + </MediaCodec> <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true"> <Limit name="measured-frame-rate-320x240" range="178-250" /> <Limit name="measured-frame-rate-720x480" range="69-95" /> @@ -162,6 +168,12 @@ limitations under the License. <Limit name="measured-frame-rate-1280x720" range="60-85" /> <Limit name="measured-frame-rate-1920x1080" range="33-55" /> </MediaCodec> + <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="220-631" /> + <Limit name="measured-frame-rate-720x480" range="190-519" /> + <Limit name="measured-frame-rate-1280x720" range="182-249" /> + <Limit name="measured-frame-rate-1920x1080" range="83-118" /> + </MediaCodec> <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true"> <Limit name="measured-frame-rate-320x240" range="117-160" /> <Limit name="measured-frame-rate-720x480" range="36-49" /> diff --git a/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml b/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml index 72853dda..2ba64c2b 100644 --- a/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml +++ b/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml @@ -87,12 +87,11 @@ Only the three quirks included above are recognized at this point: _________________________________________________________ | Codec | W H fps Mbps MB/s | |_____________|_________________________________________| - | h264 | 4096 2160 30 100 1036800 | - | hevc | 4096 2160 30 100 1036800 | + | h264 | 3840 2160 30 100 972000 | + | hevc | 3840 2160 30 100 972000 | | mpeg4-sw | 1920 1088 30 40 244800 | | vp8 | 1920 1088 60 100 489600 | - | vp9 | 4096 2160 30 100 1036800 | - | | (4096) (2304) (30) (120) | + | vp9 | 3840 2160 30 100 972000 | | vc1 | 1920 1088 30 20 244800 | | div4/5/6-sw | 1920 1088 30 10 244800 | | h263-sw | 864 480 30 16 48600 | @@ -103,9 +102,9 @@ Only the three quirks included above are recognized at this point: ______________________________________________________ | Codec | W H fps Mbps MB/s | |__________|_________________________________________| - | h264 | 4096 2160 30 40 1036800 | - | vp9 | 4096 2160 30 40 1036800 | - | hevc | 4096 2160 30 40 1036800 | + | h264 | 3840 2160 30 40 972000 | + | vp9 | 3840 2160 30 40 972000 | + | hevc | 3840 2160 30 40 972000 | | mpeg2 | 1920 1088 30 40 244800 | |__________|_________________________________________| @@ -113,8 +112,8 @@ Only the three quirks included above are recognized at this point: ______________________________________________________ | Codec | W H fps Mbps MB/s | |__________|_________________________________________| - | h264 | 4096 2160 30 100 1036800 | - | hevc | 4096 2160 30 100 1036800 | + | h264 | 3840 2160 30 100 972000 | + | hevc | 3840 2160 30 100 972000 | | mpeg4-sw | 1280 720 30 4 108000 | | vp8 | 1920 1088 60 40 489600 | | h263-sw | 864 480 30 2 48600 | @@ -136,7 +135,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Limit name="concurrent-instances" max="16" /> @@ -160,7 +159,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Limit name="concurrent-instances" max="16" /> @@ -201,7 +200,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -213,7 +212,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> @@ -263,7 +262,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -275,7 +274,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> @@ -288,7 +287,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -300,7 +299,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> diff --git a/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml b/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml index 0b2270f5..0dfb94d3 100644 --- a/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml +++ b/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml @@ -87,12 +87,11 @@ Only the three quirks included above are recognized at this point: _________________________________________________________ | Codec | W H fps Mbps MB/s | |_____________|_________________________________________| - | h264 | 4096 2160 30 100 1036800 | - | hevc | 4096 2160 30 100 1036800 | + | h264 | 3840 2160 30 100 972000 | + | hevc | 3840 2160 30 100 972000 | | mpeg4-sw | 1920 1088 30 40 244800 | | vp8 | 1920 1088 60 100 489600 | - | vp9 | 4096 2160 30 100 1036800 | - | | (4096) (2304) (30) (120) | + | vp9 | 3840 2160 30 100 972000 | | vc1 | 1920 1088 30 20 244800 | | div4/5/6-sw | 1920 1088 30 10 244800 | | h263-sw | 864 480 30 16 48600 | @@ -103,9 +102,9 @@ Only the three quirks included above are recognized at this point: ______________________________________________________ | Codec | W H fps Mbps MB/s | |__________|_________________________________________| - | h264 | 4096 2160 30 40 1036800 | - | vp9 | 4096 2160 30 40 1036800 | - | hevc | 4096 2160 30 40 1036800 | + | h264 | 3840 2160 30 40 972000 | + | vp9 | 3840 2160 30 40 972000 | + | hevc | 3840 2160 30 40 972000 | | mpeg2 | 1920 1088 30 40 244800 | |__________|_________________________________________| @@ -113,8 +112,8 @@ Only the three quirks included above are recognized at this point: ______________________________________________________ | Codec | W H fps Mbps MB/s | |__________|_________________________________________| - | h264 | 4096 2160 30 100 1036800 | - | hevc | 4096 2160 30 100 1036800 | + | h264 | 3840 2160 30 100 972000 | + | hevc | 3840 2160 30 100 972000 | | mpeg4-sw | 1280 720 30 4 108000 | | vp8 | 1920 1088 60 40 489600 | | h263-sw | 864 480 30 2 48600 | @@ -137,7 +136,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Limit name="concurrent-instances" max="16" /> @@ -167,7 +166,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Limit name="concurrent-instances" max="16" /> @@ -242,7 +241,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -258,7 +257,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> @@ -315,7 +314,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -331,7 +330,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> @@ -347,7 +346,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-100000000" /> <Limit name="frame-rate" range="1-240" /> <Feature name="adaptive-playback" /> @@ -363,7 +362,7 @@ Only the three quirks included above are recognized at this point: <Limit name="size" min="96x96" max="4096x2160" /> <Limit name="alignment" value="2x2" /> <Limit name="block-size" value="16x16" /> - <Limit name="blocks-per-second" min="24" max="1036800" /> + <Limit name="blocks-per-second" min="24" max="972000" /> <Limit name="bitrate" range="1-40000000" /> <Limit name="frame-rate" range="1-60" /> <Feature name="adaptive-playback" /> diff --git a/conf_files/sm6150/sm6150.mk b/conf_files/sm6150/sm6150.mk index ced4276b..57f55fea 100644 --- a/conf_files/sm6150/sm6150.mk +++ b/conf_files/sm6150/sm6150.mk @@ -46,6 +46,4 @@ else endif # Enable Codec2.0 HAL for pure AOSP variants. -ifeq ($(GENERIC_ODM_IMAGE),true) DEVICE_MANIFEST_FILE += hardware/qcom/media/conf_files/$(MSMSTEPPE)/c2_manifest.xml -endif
\ No newline at end of file diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h index 689a637d..54e8f27b 100644 --- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h +++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h @@ -1108,6 +1108,7 @@ class omx_vdec: public qc_omx_component ts_arr_list m_timestamp_list; #endif + char m_platform_name[PROPERTY_VALUE_MAX] = {0}; bool input_flush_progress; bool output_flush_progress; bool input_use_buffer; 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 dbff8f44..829555c2 100644 --- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp +++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp @@ -2307,10 +2307,9 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role) struct v4l2_ext_controls controls; int conceal_color_8bit = 0, conceal_color_10bit = 0; + property_get("ro.board.platform", m_platform_name, "0"); #ifdef _ANDROID_ - char platform_name[PROPERTY_VALUE_MAX]; - property_get("ro.board.platform", platform_name, "0"); - if (!strncmp(platform_name, "msm8610", 7)) { + if (!strncmp(m_platform_name, "msm8610", 7)) { device_name = (OMX_STRING)"/dev/video/q6_dec"; is_q6_platform = true; maxSmoothStreamingWidth = 1280; @@ -7378,6 +7377,16 @@ OMX_ERRORTYPE omx_vdec::empty_this_buffer(OMX_IN OMX_HANDLETYPE hComp, buffer->pBuffer = (OMX_U8*)drv_ctx.ptr_inputbuffer[nBufferIndex].bufferaddr; } + /* Check if the input timestamp in seconds is greater than LONG_MAX + or lesser than LONG_MIN. */ + if (buffer->nTimeStamp / 1000000 > LONG_MAX || + buffer->nTimeStamp / 1000000 < LONG_MIN) { + /* This timestamp cannot be contained in driver timestamp field */ + DEBUG_PRINT_ERROR("[ETB] BHdr(%p) pBuf(%p) nTS(%lld) nFL(%u) >> Invalid timestamp", + buffer, buffer->pBuffer, buffer->nTimeStamp, (unsigned int)buffer->nFilledLen); + return OMX_ErrorBadParameter; + } + DEBUG_PRINT_LOW("[ETB] BHdr(%p) pBuf(%p) nTS(%lld) nFL(%u)", buffer, buffer->pBuffer, buffer->nTimeStamp, (unsigned int)buffer->nFilledLen); if (arbitrary_bytes) { @@ -8548,11 +8557,6 @@ OMX_ERRORTYPE omx_vdec::fill_buffer_done(OMX_HANDLETYPE hComp, } } - if (buffer->nTimeStamp < 0) { - DEBUG_PRINT_ERROR("[FBD] Invalid buffer timestamp %lld", (long long)buffer->nTimeStamp); - return OMX_ErrorBadParameter; - } - VIDC_TRACE_INT_LOW("FBD-TS", buffer->nTimeStamp / 1000); if (m_cb.FillBufferDone) { @@ -9854,14 +9858,18 @@ bool omx_vdec::alloc_map_ion_memory(OMX_U32 buffer_size, vdec_ion *ion_info, int } #ifdef HYPERVISOR - flag = 0; + flag &= ~ION_FLAG_CACHED; #endif ion_info->alloc_data.flags = flag; ion_info->alloc_data.len = buffer_size; ion_info->alloc_data.heap_id_mask = ION_HEAP(ION_SYSTEM_HEAP_ID); if (secure_mode && (ion_info->alloc_data.flags & ION_FLAG_SECURE)) { +#ifdef HYPERVISOR + ion_info->alloc_data.heap_id_mask = ION_HEAP(ION_SECURE_DISPLAY_HEAP_ID); +#else ion_info->alloc_data.heap_id_mask = ION_HEAP(MEM_HEAP_ID); +#endif } /* Use secure display cma heap for obvious reasons. */ @@ -11140,6 +11148,14 @@ void omx_vdec::get_preferred_color_aspects(ColorAspects& preferredColorAspects) const ColorAspects &defaultColor = preferClientColor ? m_internal_color_space.sAspects : m_client_color_space.sAspects; + /* atoll does not support BT2020 color primaries, hence overriding with + BT709 to avoid tone mapping issue at display*/ + if (!strncmp(m_platform_name, "atoll", 5) && + (m_client_color_space.sAspects.mPrimaries == ColorAspects::PrimariesBT2020)) { + m_client_color_space.sAspects.mPrimaries = ColorAspects::PrimariesBT709_5; + m_client_color_space.sAspects.mMatrixCoeffs = ColorAspects::MatrixBT709_5; + } + preferredColorAspects.mPrimaries = preferredColor.mPrimaries != ColorAspects::PrimariesUnspecified ? preferredColor.mPrimaries : defaultColor.mPrimaries; preferredColorAspects.mTransfer = preferredColor.mTransfer != ColorAspects::TransferUnspecified ? diff --git a/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h b/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h index da0f98ab..99f8cb39 100644 --- a/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h +++ b/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h @@ -199,6 +199,7 @@ class omx_venc: public omx_video OMX_U32 port ); int swvenc_input_log_buffers(const char *buffer, int bufferlen); + int swvenc_input_log_rotated_buffers(const char *buffer, int bufferlen); bool dev_get_hevc_profile(OMX_U32*) { return false; } bool dev_handle_client_input_extradata(void*) { return false; } void dev_get_color_format_as_string(char *, int, unsigned) {}; diff --git a/mm-video-v4l2/vidc/venc/inc/omx_video_common.h b/mm-video-v4l2/vidc/venc/inc/omx_video_common.h index 49a1384a..0f173c86 100644 --- a/mm-video-v4l2/vidc/venc/inc/omx_video_common.h +++ b/mm-video-v4l2/vidc/venc/inc/omx_video_common.h @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------------- -Copyright (c) 2010-2018, The Linux Foundation. All rights reserved. +Copyright (c) 2010-2019, 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 met: @@ -99,13 +99,16 @@ struct pmem { struct venc_debug_cap { bool in_buffer_log; + bool in_buffer_rotated_log; bool out_buffer_log; bool extradata_log; char infile_name[PROPERTY_VALUE_MAX]; + char inrotatedfile_name[PROPERTY_VALUE_MAX]; char outfile_name[PROPERTY_VALUE_MAX]; char extradatafile_name[PROPERTY_VALUE_MAX]; char log_loc[PROPERTY_VALUE_MAX]; FILE *infile; + FILE *inrotatedfile; FILE *outfile; FILE *extradatafile; }; diff --git a/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp b/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp index 6fd85a90..0cb6ef20 100644 --- a/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp +++ b/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp @@ -90,6 +90,10 @@ omx_venc::omx_venc() m_debug.in_buffer_log = atoi(property_value); property_value[0] = '\0'; + property_get("vendor.vidc.enc.log.in.rotated", property_value, "0"); + m_debug.in_buffer_rotated_log = atoi(property_value); + + property_value[0] = '\0'; property_get("vendor.vidc.enc.log.out", property_value, "0"); m_debug.out_buffer_log = atoi(property_value); @@ -552,17 +556,21 @@ OMX_ERRORTYPE omx_venc::set_parameter RETURN(OMX_ErrorUnsupportedSetting); } - /* set the frame size */ - Prop.id = SWVENC_PROPERTY_ID_FRAME_SIZE; - Prop.info.frame_size.height = portDefn->format.video.nFrameHeight; - Prop.info.frame_size.width = portDefn->format.video.nFrameWidth; + // don't update frame size if it's unchanged + if (m_sInPortDef.format.video.nFrameWidth != portDefn->format.video.nFrameWidth + || m_sInPortDef.format.video.nFrameHeight != portDefn->format.video.nFrameHeight) { + /* set the frame size */ + Prop.id = SWVENC_PROPERTY_ID_FRAME_SIZE; + Prop.info.frame_size.height = portDefn->format.video.nFrameHeight; + Prop.info.frame_size.width = portDefn->format.video.nFrameWidth; - Ret = swvenc_setproperty(m_hSwVenc, &Prop); - if (Ret != SWVENC_S_SUCCESS) - { - DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", - __FUNCTION__, Ret); - RETURN(OMX_ErrorUnsupportedSetting); + Ret = swvenc_setproperty(m_hSwVenc, &Prop); + if (Ret != SWVENC_S_SUCCESS) + { + DEBUG_PRINT_ERROR("%s, swvenc_setproperty failed (%d)", + __FUNCTION__, Ret); + RETURN(OMX_ErrorUnsupportedSetting); + } } /* set the input frame-rate */ @@ -1849,7 +1857,7 @@ OMX_ERRORTYPE omx_venc::swvenc_do_flip_inport() { Prop.info.frame_size.width = inHeight; DEBUG_PRINT_HIGH("setting flipped dimensions to swencoder, WxH (%d x %d)", - inWidth, inHeight); + Prop.info.frame_size.width, Prop.info.frame_size.height); Ret = swvenc_setproperty(m_hSwVenc, &Prop); if (Ret != SWVENC_S_SUCCESS) { // currently, set dimensions to encoder can only be called when encoder is @@ -2388,6 +2396,7 @@ bool omx_venc::dev_empty_buf if (m_debug.in_buffer_log) { + // dump before rotation, un-rotated buffer swvenc_input_log_buffers((const char*)ipbuffer.p_buffer, ipbuffer.filled_length); } @@ -2396,6 +2405,11 @@ bool omx_venc::dev_empty_buf DEBUG_PRINT_ERROR("rotate failed"); return OMX_ErrorUndefined; } + if (m_debug.in_buffer_rotated_log) { + // dump after rotation, rotated buffer + DEBUG_PRINT_ERROR("dump rotated"); + swvenc_input_log_rotated_buffers((const char*)ipbuffer.p_buffer, ipbuffer.filled_length); + } } Ret = swvenc_emptythisbuffer(m_hSwVenc, &ipbuffer); @@ -2873,8 +2887,8 @@ int omx_venc::dev_output_log_buffers(const char *buffer, int bufferlen, uint64_t if (m_debug.out_buffer_log && !m_debug.outfile) { int size = 0; - int width = m_sInPortDef.format.video.nFrameWidth; - int height = m_sInPortDef.format.video.nFrameHeight; + int width = m_sOutPortDef.format.video.nFrameWidth; + int height = m_sOutPortDef.format.video.nFrameHeight; if(SWVENC_CODEC_MPEG4 == m_codec) { size = snprintf(m_debug.outfile_name, PROPERTY_VALUE_MAX, @@ -2960,6 +2974,59 @@ int omx_venc::swvenc_input_log_buffers(const char *buffer, int bufferlen) RETURN(0); } +int omx_venc::swvenc_input_log_rotated_buffers(const char *buffer, int bufferlen) +{ + int width = m_sInPortDef.format.video.nFrameWidth; + int height = m_sInPortDef.format.video.nFrameHeight; + if (m_bIsInFlipDone) { + auto v = width; + width = height; + height = v; + } + int stride = SWVENC_Y_STRIDE(COLOR_FMT_NV12, width); + int scanlines = SWVENC_Y_SCANLINES(COLOR_FMT_NV12, height); + char *temp = (char*)buffer; + + if (!m_debug.inrotatedfile) + { + int size = snprintf(m_debug.inrotatedfile_name, PROPERTY_VALUE_MAX, + "%s/input_enc_rotated_%d_%d_%p.yuv", + m_debug.log_loc, width, height, this); + if ((size > PROPERTY_VALUE_MAX) || (size < 0)) + { + DEBUG_PRINT_ERROR("Failed to open input rotated file: %s for logging size:%d", + m_debug.inrotatedfile_name, size); + RETURN(-1); + } + DEBUG_PRINT_LOW("input rotated filename = %s", m_debug.inrotatedfile_name); + m_debug.inrotatedfile = fopen (m_debug.inrotatedfile_name, "ab"); + if (!m_debug.inrotatedfile) + { + DEBUG_PRINT_HIGH("Failed to open input rotated file: %s for logging", + m_debug.inrotatedfile_name); + m_debug.inrotatedfile_name[0] = '\0'; + RETURN(-1); + } + } + if (m_debug.inrotatedfile && buffer && bufferlen) + { + DEBUG_PRINT_LOW("%s buffer length: %d", __func__, bufferlen); + for (int i = 0; i < height; i++) + { + fwrite(temp, width, 1, m_debug.inrotatedfile); + temp += stride; + } + temp = (char*)(buffer + (stride * scanlines)); + for(int i = 0; i < height/2; i++) + { + fwrite(temp, width, 1, m_debug.inrotatedfile); + temp += stride; + } + } + + RETURN(0); +} + int omx_venc::dev_extradata_log_buffers(char *buffer, bool input) { ENTER_FUNC(); diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp index 7eb5bf13..10faa15a 100644 --- a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp +++ b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp @@ -501,6 +501,7 @@ OMX_ERRORTYPE omx_venc::component_init(OMX_STRING role) &m_sOutPortDef.nBufferSize, m_sOutPortDef.nPortIndex) != true) { eRet = OMX_ErrorUndefined; + goto init_error; } // Initialize the video color format for input port diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp index 139047d4..0d2c09aa 100755 --- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp +++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp @@ -4162,7 +4162,7 @@ bool venc_dev::venc_empty_buf(void *buffer, void *pmem_data_buf, unsigned index, struct v4l2_buffer buf; struct v4l2_requestbuffers bufreq; struct v4l2_plane plane[VIDEO_MAX_PLANES]; - int rc = 0, extra_idx; + int rc = 0, extra_idx, c2d_enabled = 0; bool interlace_flag = false; struct OMX_BUFFERHEADERTYPE *bufhdr; LEGACY_CAM_METADATA_TYPE * meta_buf = NULL; @@ -4538,6 +4538,7 @@ bool venc_dev::venc_empty_buf(void *buffer, void *pmem_data_buf, unsigned index, // color_format == 1 ==> RGBA to YUV Color-converted buffer // Buffers color-converted via C2D have 601-Limited color if (!streaming[OUTPUT_PORT]) { + c2d_enabled = 1; DEBUG_PRINT_HIGH("Setting colorspace 601-L for Color-converted buffer"); venc_set_colorspace(MSM_VIDC_BT601_6_625, 0 /*range-limited*/, MSM_VIDC_TRANSFER_601_6_525, MSM_VIDC_MATRIX_601_6_525); @@ -4559,9 +4560,9 @@ bool venc_dev::venc_empty_buf(void *buffer, void *pmem_data_buf, unsigned index, } } - if (!streaming[OUTPUT_PORT] && + if (!streaming[OUTPUT_PORT] && (c2d_enabled || (m_sVenc_cfg.inputformat != V4L2_PIX_FMT_NV12_TP10_UBWC && - m_sVenc_cfg.inputformat != V4L2_PIX_FMT_NV12_UBWC)) { + m_sVenc_cfg.inputformat != V4L2_PIX_FMT_NV12_UBWC))) { if (bframe_implicitly_enabled) { DEBUG_PRINT_HIGH("Disabling implicitly enabled B-frames"); intra_period.num_pframes = nPframes_cache; |