Default min_dpb is calculated by video driver when SPS/PPS is unknown.
Actual min_dpb is calculated by firmware, after first buffer arrives with SPS/PPS. Port reconfig is generated.
Default min_dbp is calculated in ddl_decoder_min_num_dpb() @kernel/drivers/video/msm/vidc/1080p/ddl
Information available in h264 standard and http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Decoded_picture_buffering
After SPS/PPS is sent to 1080p HW core, a port reconfiguration event is propagated to free (already allocated) and allocate (new requirement) output buffers, when requirements differ.
Output buffer count = min_dpb + 6 extra buffers
� Two extra buffers for the current decode and displayed frames (firmware added)
� Two for display pipeline (video driver added)
� Two for performance (video driver added)
From OMX IL logs,
E OMX-VDEC-720P: Allocated virt:0x40951000, FD: 39 of size 294912 count: 18 <-video driver estimated
E OMX-VDEC-720P: Empty this arbitrary <- SPS/PPS sent to driver
E OMX-VDEC-720P: Rxd OMX_COMPONENT_GENERATE_PORT_RECONFIG
E OMX-VDEC-720P: Allocated virt:0x41615000, FD: 39 of size 2293760 count: 14 <-After reconfig
Showing posts with label media. Show all posts
Showing posts with label media. Show all posts
6/02/2012
MSM7x30/8x55 - How to check display width/height and source width/height from video decoder
Frame buffer for video decoder output should have multiple of 16 width and multiple of 16/32 height sized buffer
because minimum processing unit of video compression is 16x16 image block, a.k.a., macroblock (MB).
For height, it must be multiple of 32 if the video is interlaced picture.
Due to this video compression characteristic, video renderer should have two kinds of width/height values from video decoder for correct display.
One is source width/height, size of frame buffer. The other is display width/height, size of real image which should be shown to user.
User can check two kinds of value by calling OMX "GetParameter" function with "OMX_IndexParamPortDefinition".
The value will be sent through "OMX_VIDEO_PORTDEFINITIONTYPE" structure as below.
portDefn->format.video.nFrameHeight = drv_ctx.video_resolution.frame_height;
---> source height (multiple of 16 or 32)
portDefn->format.video.nFrameWidth = drv_ctx.video_resolution.frame_width;
---> source width (multiple of 16)
portDefn->format.video.nStride = drv_ctx.video_resolution.stride;
---> display width (real size to be displayed)
portDefn->format.video.nSliceHeight = drv_ctx.video_resolution.scan_lines;
---> display height (real size to be displayed)
because minimum processing unit of video compression is 16x16 image block, a.k.a., macroblock (MB).
For height, it must be multiple of 32 if the video is interlaced picture.
Due to this video compression characteristic, video renderer should have two kinds of width/height values from video decoder for correct display.
One is source width/height, size of frame buffer. The other is display width/height, size of real image which should be shown to user.
User can check two kinds of value by calling OMX "GetParameter" function with "OMX_IndexParamPortDefinition".
The value will be sent through "OMX_VIDEO_PORTDEFINITIONTYPE" structure as below.
portDefn->format.video.nFrameHeight = drv_ctx.video_resolution.frame_height;
---> source height (multiple of 16 or 32)
portDefn->format.video.nFrameWidth = drv_ctx.video_resolution.frame_width;
---> source width (multiple of 16)
portDefn->format.video.nStride = drv_ctx.video_resolution.stride;
---> display width (real size to be displayed)
portDefn->format.video.nSliceHeight = drv_ctx.video_resolution.scan_lines;
---> display height (real size to be displayed)
MSM7x30 \ MSM8x55: How to capture Input and Output buffer dump in OMX IL components for Encoder and Decoder.
This solution is applicable for 7x30 builds later than 1260.
To capture the exact input and output (YUV and bitstream) on OMX IL components. The next make files need to be modified:
OMX Encoder,
\vendor\qcom-opensource\omx\mm-video\7k\venc-omx720p\Android.mk
libmm-venc-def += -DINPUT_BUFFER_LOG
libmm-venc-def += -DOUTPUT_BUFFER_LOG
Log location:
/data/input-bitstream.xxx
/data/output.yuv
OMX Decoder,
F:\vendor\qcom-opensource\omx\mm-video\7k\vdec-omx720p\Android.mk
libOmxVdec-def += -DINPUT_BUFFER_LOG
libOmxVdec-def += -DOUTPUT_BUFFER_LOG
Log location:
/data/input.yuv
/data/output-bitstream.xxx
To capture the exact input and output (YUV and bitstream) on OMX IL components. The next make files need to be modified:
OMX Encoder,
\vendor\qcom-opensource\omx\mm-video\7k\venc-omx720p\Android.mk
libmm-venc-def += -DINPUT_BUFFER_LOG
libmm-venc-def += -DOUTPUT_BUFFER_LOG
Log location:
/data/input-bitstream.xxx
/data/output.yuv
OMX Decoder,
F:\vendor\qcom-opensource\omx\mm-video\7k\vdec-omx720p\Android.mk
libOmxVdec-def += -DINPUT_BUFFER_LOG
libOmxVdec-def += -DOUTPUT_BUFFER_LOG
Log location:
/data/input.yuv
/data/output-bitstream.xxx
MSM7x30 Video Power Measurement Procedure
1. After loading the build, load the QCN for the phone and make sure phone is camped on the network (WCDMA usually used for internal testing). Load the Video file, plug in headset and reset the phone.
2. Set the screen timeout to "Never"
3. Skip this step if the regular FFA is used for measuring
- Make sure Class D configuration is enabled if Spartanized FFA is being used for measurements
a. Connect the USB
b. Run HeadsetConfig_7x30_DLegacy.bat script to configure Class D, make sure no error mssage
c. Playback Video file
d. Unplug USB
4. Headset Calibration @ .1mW(for both Spartanized and non-Spartanized FFAs)
- When the file starts playing, adjust the volume button on the left side of the FFA to mute and then increase volume 4 times from mute.
- Customer need to ensure headset output .1mW on their device.
5. For Video, start power measurement. LCD/BL needs to be on. After measurements, discount LCD\BL power consumption.
Notes: To check frame rate of video clip:
1. Before start the video test, connect the USB and enter command from window
a. adb shell
b. setprop persist.debug.pv.statistics 1
c. exit
2. Do step 1 to 5
3. Before video playback complete, plug in USB and enter command from window as below to check frame rate
- adb shell logcat | grep -i "VideoMio7x3x"
2. Set the screen timeout to "Never"
3. Skip this step if the regular FFA is used for measuring
- Make sure Class D configuration is enabled if Spartanized FFA is being used for measurements
a. Connect the USB
b. Run HeadsetConfig_7x30_DLegacy.bat script to configure Class D, make sure no error mssage
c. Playback Video file
d. Unplug USB
4. Headset Calibration @ .1mW(for both Spartanized and non-Spartanized FFAs)
- When the file starts playing, adjust the volume button on the left side of the FFA to mute and then increase volume 4 times from mute.
- Customer need to ensure headset output .1mW on their device.
5. For Video, start power measurement. LCD/BL needs to be on. After measurements, discount LCD\BL power consumption.
Notes: To check frame rate of video clip:
1. Before start the video test, connect the USB and enter command from window
a. adb shell
b. setprop persist.debug.pv.statistics 1
c. exit
2. Do step 1 to 5
3. Before video playback complete, plug in USB and enter command from window as below to check frame rate
- adb shell logcat | grep -i "VideoMio7x3x"
Subscribe to:
Posts (Atom)