After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753229 - encoder: HEVC: Fix pic_width/height calculation
encoder: HEVC: Fix pic_width/height calculation
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
P3
Depends on:
Blocks: 758397
 
 
Reported: 2015-08-04 10:09 UTC by sreerenj
Modified: 2018-04-16 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libs: encoder: h265: 16 bit rounding of picture width and height (2.30 KB, patch)
2017-10-16 03:15 UTC, Hyunjun Ko
committed Details | Review

Description sreerenj 2015-08-04 10:09:27 UTC
As per HEVC spec, pic_width_in_luma_samples and pic_height_in_luma_samples should be multiple of MinCbSizeY. Right now we are using 32 bit rounding, better to change the default case to 16 bit rounding otherwise it will slightly impact the bitrate because of extra pixels.

eg: 720p video is encoding as pic_height=736 (even though we are setting the crop-rectangle, this is unnecessary).

Note: When I was testing it last time, 16 bit rounding caused issues in mulit-slice encoding. But IMHO it should not be that difficult to fix :)
Comment 1 Hyunjun Ko 2017-10-16 03:15:55 UTC
Created attachment 361649 [details] [review]
libs: encoder: h265: 16 bit rounding of picture width and height

pic_width_in_luma_samples/pic_height_in_luma_samples can be 16-bit rounded
instead of 32-bit.

In addition, codedbuf_size could be calculated according to this change.
Comment 2 Víctor Manuel Jáquez Leal 2018-04-10 12:59:58 UTC
Review of attachment 361649 [details] [review]:

@sree, what do you think about this patch?
@hyunjun, do you remember if this patch fixed any visible issue or just for correctness?
Comment 3 sreerenj 2018-04-10 18:28:35 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #2)
> Review of attachment 361649 [details] [review] [review]:
> 
> @sree, what do you think about this patch?

patch is fine. but please make sure there is no issue with multi-slice encode.
IIRC there were some driver bugs, hopefully, fixed by now.


> @hyunjun, do you remember if this patch fixed any visible issue or just for
> correctness?

This is for correctness and will also slightly improve bitrate (explained in the bug description)
Comment 4 Víctor Manuel Jáquez Leal 2018-04-16 15:10:57 UTC
Attachment 361649 [details] pushed as e19570a - libs: encoder: h265: 16 bit rounding of picture width and height