Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit 6b01d08

Browse files
sreerenjbxhaihao
authored andcommitted
gen9_vp9_encoder: Relax the compressed frames minimum size restriction.
The current implementation of the CQP mode encode has a compressed buffer size restriction of 4Kb. The restriction doesn't make sense for low-resolution & low-bitrate video encoding use cases since inter-frames can be encoded with much less number of bytes. For eg: most of the P-frames in a video-conferencing session of 640x480 resolution at 750kbps require only 1Kb bitrate allocation and currently the hardware PAK unit fill the rest of the 3Kb (4Kb-1Kb) with zeros. This will jeopardize the quality & bit-rate allocation of the hybrid CBR encode models[1] where we run the bitrate control algorithm in software clubbed with a CQP hardware encoder: [1]: https://cgit.freedesktop.org/~sree/gstreamer-vaapi/commit/?h=VP9_SVC_and_SoftwareBRC&id=355f16bdb32965425b274aa082c1334b0edd5992).
1 parent 625d265 commit 6b01d08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gen9_vp9_encoder.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,10 @@ intel_vp9enc_construct_picstate_batchbuf(VADriverContextP ctx,
15931593
*cmd_ptr++ = 0;
15941594

15951595
/* dw31 */
1596-
*cmd_ptr++ = (0 << 30) | 1;
1596+
/* dw31 is for restricting the compressed frames minimum size
1597+
* and we don't impose any. */
1598+
*cmd_ptr++ = 0;
1599+
15971600
/* dw32 */
15981601
*cmd_ptr++ = vp9_state->frame_header.bit_offset_first_partition_size;
15991602

0 commit comments

Comments
 (0)