6/02/2012

MSM8660: H264 Min_dpb and ouput buffer number calculation

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

No comments:

Post a Comment