diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2020-04-24 16:24:34 -0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2020-06-01 08:36:10 +0800 |
commit | 6b01d08aa24937da1375263e07c3cddf5e09e3ef (patch) | |
tree | fa8b7a579fa906a5754ec77bec2caa182db6da37 | |
parent | 625d2651258db881d92eb5ffc97cb4f4f1fda239 (diff) | |
download | libva-intel-driver-6b01d08aa24937da1375263e07c3cddf5e09e3ef.tar.gz |
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).
-rw-r--r-- | src/gen9_vp9_encoder.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gen9_vp9_encoder.c b/src/gen9_vp9_encoder.c index 0180235a..0a1670ff 100644 --- a/src/gen9_vp9_encoder.c +++ b/src/gen9_vp9_encoder.c @@ -1593,7 +1593,10 @@ intel_vp9enc_construct_picstate_batchbuf(VADriverContextP ctx, *cmd_ptr++ = 0; /* dw31 */ - *cmd_ptr++ = (0 << 30) | 1; + /* dw31 is for restricting the compressed frames minimum size + * and we don't impose any. */ + *cmd_ptr++ = 0; + /* dw32 */ *cmd_ptr++ = vp9_state->frame_header.bit_offset_first_partition_size; |