mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
libs: Change the parameter setting order when encode picture.
The order in gst_vaapi_enc_picture_encode when encoding one picture is not very correct. The misc parameters are set before the picture parameters. Some of the misc parameters such as ROI may change the current picture parameters. But the later setting of picture parameter will re-init all picture related parameters and clear the previous setting. The right order should be picture parameter first and then misc parameters. Signed-off-by: He Junyan <junyan.he@hotmail.com>
This commit is contained in:
parent
871aecb0d4
commit
6669a7fc57
1 changed files with 4 additions and 4 deletions
|
@ -555,6 +555,10 @@ gst_vaapi_enc_picture_encode (GstVaapiEncPicture * picture)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Submit Picture parameter */
|
||||||
|
if (!do_encode (va_display, va_context, &picture->param_id, &picture->param))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* Submit Misc Params */
|
/* Submit Misc Params */
|
||||||
for (i = 0; i < picture->misc_params->len; i++) {
|
for (i = 0; i < picture->misc_params->len; i++) {
|
||||||
GstVaapiEncMiscParam *const misc =
|
GstVaapiEncMiscParam *const misc =
|
||||||
|
@ -563,10 +567,6 @@ gst_vaapi_enc_picture_encode (GstVaapiEncPicture * picture)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Submit Picture parameter */
|
|
||||||
if (!do_encode (va_display, va_context, &picture->param_id, &picture->param))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* Submit Slice parameters */
|
/* Submit Slice parameters */
|
||||||
for (i = 0; i < picture->slices->len; i++) {
|
for (i = 0; i < picture->slices->len; i++) {
|
||||||
GstVaapiEncSlice *const slice = g_ptr_array_index (picture->slices, i);
|
GstVaapiEncSlice *const slice = g_ptr_array_index (picture->slices, i);
|
||||||
|
|
Loading…
Reference in a new issue