Small size HDMI input surface distorts video out

Which system do you use? Android, Ubuntu, OOWOW or others?

Android 11

Which version of system do you use? Please provide the version of the system here:

Android 11
vim4-android-11-64bit-v240620

Please describe your issue below:

I’m using the Hdmi2InputService to display Hdmi input video in a view. If the view size small enough the video output to the display gets distorted. This effect is only shown when frame buffer compression is turned off.

The reason for us disabling frame buffer compression is to be able do frame captures of the video stream. If you could advice how to access decompressed image data while frame buffer compression is enabled we would appreciate it.

Post a console log of your issue below:


2024-06-20 06:17:08.567   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:08.668   539-4861  chatty                  media.swcodec                        I  uid=1046(mediacodec) oid.vp8.encoder identical 1 line
2024-06-20 06:17:08.766   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:08.804   385-1541  android.ha...droidlogic and...etooth@1.0-service-droidlogic  I  wole_config_cback, status = 0, opcode=0xfe54
2024-06-20 06:17:08.868   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:08.882   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:08.882   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:08.883   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:08.883   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:08.941   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  Error connecting rild-nmea (Connection refused)
2024-06-20 06:17:08.941   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  fail to open GPS channel <rild-nmea>!
2024-06-20 06:17:08.969   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.049   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.049   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.049   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.049   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.070   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.152   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.152   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.152   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.152   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.160   412-990   hash_map_utils          audioserver                          I  key: 'HDMIIN Audio Type' value: ''
2024-06-20 06:17:09.162  1142-1142  TvInputBaseSession      com.droidlogic.tvinput               D  parseFirstValidIntergerByPattern not matched
2024-06-20 06:17:09.171   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.258   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.258   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.258   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.259   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.277   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.360   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.360   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.360   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.360   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.383   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.464   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.464   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.464   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.464   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.484   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.568   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.569   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.569   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.569   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.582   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.604   385-1541  android.ha...droidlogic and...etooth@1.0-service-droidlogic  I  wole_config_cback, status = 0, opcode=0xfe54
2024-06-20 06:17:09.678   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 733
2024-06-20 06:17:09.693   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.693   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.693   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.693   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.773   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.850   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.850   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.850   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:09.850   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:09.868   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:09.941   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  Error connecting rild-nmea (Connection refused)
2024-06-20 06:17:09.941   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  fail to open GPS channel <rild-nmea>!
2024-06-20 06:17:09.964   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:10.001   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.001   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.001   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.001   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.059   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:10.120   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.120   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.120   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.120   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.154   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:10.224   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.224   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.225   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.225   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.248   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:10.337   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.337   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.337   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.337   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.343   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 733
2024-06-20 06:17:10.405   385-1541  android.ha...droidlogic and...etooth@1.0-service-droidlogic  I  wole_config_cback, status = 0, opcode=0xfe54
2024-06-20 06:17:10.439   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 733
2024-06-20 06:17:10.505   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.505   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.505   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.505   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.534   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 733
2024-06-20 06:17:10.629   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 733
2024-06-20 06:17:10.705   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.705   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.705   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:10.705   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:10.724   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:10.818   539-4861  chatty                  media.swcodec                        I  uid=1046(mediacodec) oid.vp8.encoder identical 1 line
2024-06-20 06:17:10.913   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:10.942   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  Error connecting rild-nmea (Connection refused)
2024-06-20 06:17:10.942   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  fail to open GPS channel <rild-nmea>!
2024-06-20 06:17:11.008   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:11.027   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:11.027   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:11.027   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:11.027   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:11.029  4484-4484  MainActivity            com.example.tvtest                   D  slider val 0.054746
2024-06-20 06:17:11.040  1142-1142  TvInputBaseSession      com.droidlogic.tvinput               D  onSurfaceChanged: format=4 width=105 height=59
2024-06-20 06:17:11.040  1142-1142  TvControlManager        com.droidlogic.tvinput               I  sendCmdToTv is abandoned in Android O, please use cmd HIDL way!!cmd:0
2024-06-20 06:17:11.041  1142-1142  TvInputBaseSession      com.droidlogic.tvinput               D  onOverlayViewSizeChanged: 105,59
2024-06-20 06:17:11.044  4484-4484  View                    com.example.tvtest                   W  requestLayout() improperly called by com.google.android.material.textview.MaterialTextView{6864cc0 V.ED..... ......ID 0,43-450,100 #7f0801c6 app:id/text_view} during layout: running second layout pass
2024-06-20 06:17:11.051   382-537   SystemControl           systemcontrol                        I  SystemControlHal frameRateDisplay 1,[1867 882 1972 941]
2024-06-20 06:17:11.052   382-537   SystemControl           systemcontrol                        I  [/FrameRateAutoAdaption.cpp, setVideoLayerOn, 184] policycontrol by setVideoLayerOn 3200 on 1
2024-06-20 06:17:11.053   382-537   MesonDisplayClient      systemcontrol                        D  Client SendSync :{
                                                                                                       "cmd" : "getDisplayMode",
                                                                                                       "p_displayType" : 1
                                                                                                    }
2024-06-20 06:17:11.053   393-3289  MesonHwc                and...mposer@2.4-service.droidlogic  D  get existing connector 11-0xb40000756c154b28
2024-06-20 06:17:11.053   382-537   SystemControl           systemcontrol                        D  [/FrameRateAutoAdaption.cpp, policyControl, 220] mPlayFlag 1 frameRateValue3200
2024-06-20 06:17:11.053   382-537   SystemControl           systemcontrol                        E  [/SysWrite.cpp, readSys, 537] readSysFs, open /sys/class/display/fr_range fail. Error info [No such file or directory]
2024-06-20 06:17:11.053   382-537   SystemControl           systemcontrol                        D  [/FrameRateAutoAdaption.cpp, outputDispatch, 446] Read panel 6000 final outputmode frameRate6000
2024-06-20 06:17:11.057   382-537   SystemControl           systemcontrol                        I  SystemControlHal frameRateDisplay 1,[934 441 986 471]
2024-06-20 06:17:11.058   382-537   SystemControl           systemcontrol                        I  [/FrameRateAutoAdaption.cpp, setVideoLayerOn, 184] policycontrol by setVideoLayerOn 3200 on 1
2024-06-20 06:17:11.059   382-537   MesonDisplayClient      systemcontrol                        D  Client SendSync :{
                                                                                                       "cmd" : "getDisplayMode",
                                                                                                       "p_displayType" : 1
                                                                                                    }
2024-06-20 06:17:11.059   393-3289  MesonHwc                and...mposer@2.4-service.droidlogic  D  get existing connector 11-0xb40000756c154b28
2024-06-20 06:17:11.059   382-537   SystemControl           systemcontrol                        D  [/FrameRateAutoAdaption.cpp, policyControl, 220] mPlayFlag 1 frameRateValue3200
2024-06-20 06:17:11.059   382-537   SystemControl           systemcontrol                        E  [/SysWrite.cpp, readSys, 537] readSysFs, open /sys/class/display/fr_range fail. Error info [No such file or directory]
2024-06-20 06:17:11.059   382-537   SystemControl           systemcontrol                        D  [/FrameRateAutoAdaption.cpp, outputDispatch, 446] Read panel 6000 final outputmode frameRate6000
2024-06-20 06:17:11.059   415-916   BufferQueueProducer     surfaceflinger                       E  [#0](id:19f00000047,api:0,p:-1,c:415) disconnect: not connected (req=1)
2024-06-20 06:17:11.060  1142-3515  libEGL                  com.droidlogic.tvinput               W  EGLNativeWindowType 0xe9e47e08 disconnect failed
2024-06-20 06:17:11.083   382-536   SystemControl           systemcontrol                        D  [CPQControl]:onVframeSizeChange: event value = 16(0x10)
2024-06-20 06:17:11.083   382-536   SystemControl           systemcontrol                        D  [CPQControl]:onVframeSizeChange: invalid case
2024-06-20 06:17:11.083   382-536   SystemControl           systemcontrol                        D  [CPQControl]:onVframeSizeChange: not hdrInfo event
2024-06-20 06:17:11.113   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:11.136   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:11.136   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:11.136   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:11.136   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:11.163   412-990   hash_map_utils          audioserver                          I  key: 'HDMIIN Audio Type' value: ''
2024-06-20 06:17:11.163  1142-1142  TvInputBaseSession      com.droidlogic.tvinput               D  parseFirstValidIntergerByPattern not matched
2024-06-20 06:17:11.205   385-1541  android.ha...droidlogic and...etooth@1.0-service-droidlogic  I  wole_config_cback, status = 0, opcode=0xfe54
2024-06-20 06:17:11.233   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:11.361   539-4861  chatty                  media.swcodec                        I  uid=1046(mediacodec) oid.vp8.encoder identical 1 line
2024-06-20 06:17:11.484   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:11.537   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:11.537   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:11.537   401-401   android.ha...libperfmgr and...power.aidl-service.droidlogic  I  Power setBoost: INTERACTION duration: 0
2024-06-20 06:17:11.537   401-401   libperfmgr              and...power.aidl-service.droidlogic  I  Do Powerhint: INTERACTION
2024-06-20 06:17:11.584   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:11.711   539-4861  chatty                  media.swcodec                        I  uid=1046(mediacodec) oid.vp8.encoder identical 1 line
2024-06-20 06:17:11.810   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 824
2024-06-20 06:17:11.918   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 1729
2024-06-20 06:17:11.942   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  Error connecting rild-nmea (Connection refused)
2024-06-20 06:17:11.942   391-1132  gps_ql                  android.hardware.gnss@1.0-service    D  fail to open GPS channel <rild-nmea>!
2024-06-20 06:17:12.006   385-1541  android.ha...droidlogic and...etooth@1.0-service-droidlogic  I  wole_config_cback, status = 0, opcode=0xfe54
2024-06-20 06:17:12.012   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 956
2024-06-20 06:17:12.107   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 859
2024-06-20 06:17:12.201   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 873
2024-06-20 06:17:12.295   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 985
2024-06-20 06:17:12.389   539-4861  C2SoftVpxEnc            media.swcodec                        D  bytes generated 1082

Here is the Android project used to recreate the issue.

https://www.dropbox.com/scl/fi/9vas440tulwllh8sgmtcj/TvTest.zip?rlkey=3pywbunqkn6by3b4i7b7i5q1m&st=cawkcl4c&dl=0

@ms_mt I downloaded your code and compiled APK to successfully reproduce the issue you mentioned. But you described another requirement in your article. So what are your specific real needs? Can you describe your real needs more clearly?

Hi @goenjoy
What I want to achieve is to be able to make video frame captures of an active HDMI input stream. The HDMI input video shall be visible in a resize-able window in our application.
In the current solution we are using the Android tv input framework and the Hdmi2InputService to set up the HDMI input video stream, similarly to the test application I provided. To enable frame captures we have done modifications in the kernel to hook into the video tunneling and access the vframes. We are using ge2d to copy image data from the vframes into the application.

The main issue we are having is that by default the image data is compressed if the video source resolution is 4k and I don’t know how to decompress the image data. When the compression is active the vframe also contain uncompressed image data but this image is down scaled to 1/4 of the original source and we want a full resolution image.
We would like to know if and how it’s possible to get decompressed image data from a vframe.

At the moment we have disabled the frame buffer compression on vdin0 which makes it possible to copy the image data. However with the frame buffer compression disabled we get the video distortion issue described in the first post when we minimize our window.

Long term we would like to keep frame buffer compression enabled so If you could provide some help on how to solve the image data decompression it would be very appreciated. For now we are using the workaround with compression disabled but we need to solve the video distortion issue so we also need a fix for that one.

The problem is a bit messy. We will only discuss one situation. Just don’t modify the code and keep the frame buffer compression enabled by default. Can you provide a more detailed description of the problem you encountered? It is best to provide the corresponding demo code to facilitate understanding of the problem you are describing. This is how we can provide you with advice.
Also, what do you want to use the data for?

Hi @goenjoy

Basically I want to run the Hdmi2InputService to display a video stream from HDMI in as is done in the sample code. But I also need a function to capture a bitmap from the same video stream while it’s playing by e.g. pressing a button.
This is to be able to take a “screenshot” of the HDMI in.

The problem is that I don’t know where I can access the uncompressed video data.

I have done some tests by modifying the videotunnel kernel module and copy frames there which works for full HD resolution since the video frames are not compressed.
But when switching to 4k resolution the video frames are compressed (afbc) and I’m not sure if and how I can access them in a decompressed format.

@ms_mt Our HDMI-IN can be used as a camera, and you can open the camera application to take photos or record videos. Can you call the camera API1 or camera API2 interface to meet your project requirements?

We did use the Camera API before but it had a few issues:

  • Tearing
  • Did not handle resolution switching well
  • No audio
  • The video stream turned black for a couple of seconds from time to time

The tv input api handles all of these bullets fine. It’s just the issue of image captures that is not solved.
I believe some of these issues were solved in your latest update but we have not had the time to test them and have already spent some time to switch to the tv input api so we would prefer to keep it.

@ms_mt BDS Screen Capture And Record Debug Guide (0.2)_CN.pdf - Google Drive