GNOME Bugzilla – Bug 785923
vaapi encoder: support to seperate QP setting for I/P/B frame
Last modified: 2017-09-18 19:44:33 UTC
Support to seperate QP setting to each I/P/B frame. 2 new properties could be provided for this feature, which might be named as "diff-qp-ip(difference of QP between I and P)" and "idff-qp-ib(difference of QP between I and B)" Suggestion for the name would be welcome!
(In reply to Hyunjun Ko from comment #0) > Support to seperate QP setting to each I/P/B frame. > 2 new properties could be provided for this feature, which might be named as > "diff-qp-ip(difference of QP between I and P)" and "idff-qp-ib(difference of > QP between I and B)" > > Suggestion for the name would be welcome! Why diff-qp-FrameTypeX instead of qp-FrameTypeX ??
(In reply to sreerenj from comment #1) > (In reply to Hyunjun Ko from comment #0) > > Support to seperate QP setting to each I/P/B frame. > > 2 new properties could be provided for this feature, which might be named as > > "diff-qp-ip(difference of QP between I and P)" and "idff-qp-ib(difference of > > QP between I and B)" > > > > Suggestion for the name would be welcome! > > Why diff-qp-FrameTypeX instead of qp-FrameTypeX ?? It's just to be clear to users. If we allow to set QP value instead of difference, I think we can name just qp-Frametype. (maybe qp-p and qp-b?) But imho, value of difference would be simple for user. Example pipeline of what I thought: raw data ! vaapih264enc (init-qp=26) diff-qp-ip=-2 diff-qp-ib=-3 ! fakesink same as raw data ! vaapih264enc (init-qp=26) qp-p=24 qp-b=23 ! fakesink But if we think documentation would be enough, we can use qp-ip and qp-ib for the value of difference like the below: raw data ! vaapih264enc (init-qp=26) qp-ip=-2 qp-ib=-3 ! fakesink So do you mean you prefer the last one?
Created attachment 357785 [details] [review] libs: encoder: h264/5: don't change the value of min_qp Creates new variable for QP for I frame and keep it at configuration and use this for pic_init_qp and slice_qp_delta setting. Since changing min qp doesn't make sense, keep min qp as is.
Created attachment 357786 [details] [review] libs: encoder: h264: support I/P/B QP setting seperatedly Creates 2 properties, qp-ip and qp-ib for setting different QP for P/B frames and set slice_qp_delta for each frame according to the value provided. In addition, remove the limitation of (<= 4) when setting slice_qp_delta.
Created attachment 358049 [details] [review] libs: encoder: h265: support I/P/B QP setting seperatedly Creates 2 properties, qp-ip and qp-ib for setting different QP for P/B frames and set slice_qp_delta for each frame according to the value provided.
Review of attachment 357786 [details] [review]: ::: gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ +3231,3 @@ + * + * The difference of QP between I and P Frame. + * This can be adjusted on CQP mode. If I understand correctly, these properties are only used if CQP mode is used. We might say also that here.
Review of attachment 357785 [details] [review]: lgtm
Review of attachment 358049 [details] [review]: ::: gst-libs/gst/vaapi/gstvaapiencoder_h265.c @@ +2626,3 @@ + * + * The difference of QP between I and P Frame. + * This can be adjusted on CQP mode. same as in H264
Created attachment 359683 [details] [review] libs: encoder: h264/h265: keep min_qp as is unless it's over init_qp Creates new variable for QP for I frame and keep it at configuration and use this for pic_init_qp and slice_qp_delta setting. Since changing min qp doesn't make sense, keep min qp as is.
Created attachment 359684 [details] [review] libs: encoder: h264: support I/P/B QP setting seperatedly Creates 2 properties, qp-ip and qp-ib for setting different QP for P/B frames and set slice_qp_delta for each frame according to the value provided. In addition, remove the limitation of (<= 4) when setting slice_qp_delta.
Created attachment 359685 [details] [review] libs: encoder: h265: support I/P/B QP setting seperatedly Creates 2 properties, qp-ip and qp-ib for setting different QP for P/B frames and set slice_qp_delta for each frame according to the value provided.
Attachment 359684 [details] pushed as 64a38a1 - libs: encoder: h264: support I/P/B QP setting seperatedly Attachment 359685 [details] pushed as 5333155 - libs: encoder: h265: support I/P/B QP setting seperatedly Attachment 359683 [details] pushed as 5796750 - libs: encoder: h264/h265: keep min_qp as is unless it's over init_qp
@hynjiun: min-qp : Minimum quantizer value init-qp : Initial quantizer value Ideally we should have, if min-qp > init-qp: init-qp = min-qp WDT ?