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 772584 - pbutils/h265: add support for the "format range extensions profiles" values
pbutils/h265: add support for the "format range extensions profiles" values
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-07 17:13 UTC by Florent Thiéry
Modified: 2018-11-03 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codec-utils: Add parsing H265 range extensions profiles (6.58 KB, patch)
2018-10-15 15:49 UTC, Seungha Yang
none Details | Review
tests: pbutils: Add test parsing H265 profiles (14.11 KB, patch)
2018-10-15 15:49 UTC, Seungha Yang
none Details | Review

Description Florent Thiéry 2016-10-07 17:13:43 UTC
gst-launch-1.0 videotestsrc ! "video/x-raw, format=(string)Y444" ! x265enc ! fakesink -v

gstx265enc.c(785): gst_x265_enc_set_level_tier_and_profile (): /GstPipeline:pipeline0/GstX265Enc:x265enc0:
Failed to find correct level, tier or profile in VPS

I saw this by trying to encode UYVY with an intermediate videoconvert; i am guessing that videoconvert prefers Y444 ti I420 to preserve data, but x265 apparently doesn't work with Y444

gst-launch-1.0 videotestsrc ! "video/x-raw, format=(string)UYVY" ! queue name=encoder ! videoconvert ! queue ! x265enc ! fakesink -v
Comment 1 Matthew Waters (ystreet00) 2016-10-19 11:14:54 UTC
So, the problem here is that pbutils only knows how to handle profile_idc between 1 and 3 inclusive where x265 outputs a profile_idc of 4 corresponding to the, "A.3.5 Format range extensions profiles" in the H.265 spec.  Now, x265 calls this one "Rext" (from https://github.com/videolan/x265/blob/master/source/encoder/level.cpp#L219) and chooses the exact configuration based on other conditions.

Adding a profile_idc == 4 check makes the pipeline above succeed.

The question now is what to do about detecting these profiles.  Split them properly or just lump them all in together with a 'Rext' profile like x265.
Comment 2 Sebastian Dröge (slomo) 2016-10-20 11:29:17 UTC
The spec says "profileS", so I guess we should invent different names for them. What does ffmpeg or others do?
Comment 3 Matthew Waters (ystreet00) 2016-10-20 11:59:26 UTC
x265 invents names (as above).  ffmpeg doesn't seem to.
Comment 4 Seungha Yang 2018-10-15 15:46:54 UTC
Currently following pipeline will be failed.
libx265 produces "main-intra" profile when all-intra encoding case but range-extensions profiles are not defined in codec-utils.
gst-launch-1.0 videotestsrc ! x265enc key-int-max=1 ! fakesink

This bug seems to related to bug #793876
Comment 5 Seungha Yang 2018-10-15 15:49:16 UTC
Created attachment 373929 [details] [review]
codec-utils: Add parsing H265 range extensions profiles
Comment 6 Seungha Yang 2018-10-15 15:49:40 UTC
Created attachment 373930 [details] [review]
tests: pbutils: Add test parsing H265 profiles
Comment 7 GStreamer system administrator 2018-11-03 11:50:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/299.