xref: /aosp_15_r20/external/libhevc/FrameInfo.md (revision c83a76b084498d55f252f48b2e3786804cdf24b7)
1*c83a76b0SSuyog Pawar## Frame Info exported from libHEVC
2*c83a76b0SSuyog Pawar
3*c83a76b0SSuyog Pawar### Introduction
4*c83a76b0SSuyog PawarQP and CU type maps for H265 are defined for each 8x8 coding unit.
5*c83a76b0SSuyog PawarThe QP values defined as unsigned 8-bit numbers can range from <1, 51> and CU type can be
6*c83a76b0SSuyog PawarINTER/INTRA/SKIP. HEVC defines them in ihevc_defs.h as PRED_MODE_INTER = 0, PRED_MODE_INTRA = 1
7*c83a76b0SSuyog Pawarand PRED_MODE_SKIP = 2.
8*c83a76b0SSuyog PawarSet the “u4_frame_info_enable” flag to enable encoder/decoder to populate and return the qp values
9*c83a76b0SSuyog Pawarand CU type data in its output structure ihevcd_cxa_video_decode_op_t via pu1_8x8_blk_qp_map and
10*c83a76b0SSuyog Pawarpu1_8x8_blk_type_map.
11*c83a76b0SSuyog Pawar
12*c83a76b0SSuyog Pawar### Mapping to the frame
13*c83a76b0SSuyog PawarWithin a video sequence, CTUs of a fixed size (16x16, 32x32, or 64x64) can be further divided into
14*c83a76b0SSuyog PawarCUs of size as low as 8x8 pixels. A CU’s number of QP entries (each for 8x8 blocks) can range from
15*c83a76b0SSuyog Pawar1 to 64. A frame with a resolution of WdxHt has a total of (align8(Wd) x align8(Ht)) / 64 entries
16*c83a76b0SSuyog Pawarfor QP and CU type map each. Qp and CU type values for each 8x8 block are stored in raster scan
17*c83a76b0SSuyog Pawarorder. Refer to ihevcd_cxa.h for details.
18*c83a76b0SSuyog Pawar
19*c83a76b0SSuyog Pawar### Plugin/Application
20*c83a76b0SSuyog PawarThe encoder/decoder keeps the QP and CU type map as a part of its output handle. The plugins can
21*c83a76b0SSuyog Pawaraccess these data through the output structure.
22