Opened 7 months ago

Closed 5 months ago

#20368 closed enhancement (fixed)

x265-4.1

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 12.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

New major version.

Change History (24)

comment:1 by Xi Ruoyao, 7 months ago

Note that this will cause gst-plugins-bad and ffmpeg FTBFS.

comment:3 by Douglas R. Reno, 7 months ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:5 by Douglas R. Reno, 7 months ago

imlib2 doesn't use x265 anymore

We are missing a dependency on x265 in VLC though, and it does not build with x265-4.0. Going to look for a patch next.

comment:6 by Douglas R. Reno, 7 months ago

No patch is available, and given that gst-plugins-bad is also still broken, let's wait on this. I was able to come up with a chunk of code for VLC that allowed it to build, however crashed when trying to encode an x265 file. Here's what upstream has to say about this: https://mailman.videolan.org/pipermail/x265-devel/2024-September/013945.html, and the API docs are at https://x265.readthedocs.io/en/master/api.html#encoder

Note that you will see an update commit and then a revert commit. I had updated it in my sandbox expecting to be able to use it, but this is unusable until ffmpeg/vlc/gst-plugins-bad are updated to use it. ffmpeg's patch does seem to build but I have not tested it.

comment:7 by Xi Ruoyao, 7 months ago

Milestone: 12.399-Waiting
Summary: x265-4.0x265-4.0 (wait for downstream adaption)

comment:8 by Douglas R. Reno, 7 months ago

It looks like gst-plugins-bad now has support, but VLC does not. I requested an account at VLC's gitlab instance to see if we can get a bug report filed there.

in reply to:  8 comment:9 by Xi Ruoyao, 7 months ago

Replying to Douglas R. Reno:

It looks like gst-plugins-bad now has support, but VLC does not. I requested an account at VLC's gitlab instance to see if we can get a bug report filed there.

gst-plugins-bad still does not work.

comment:10 by Douglas R. Reno, 7 months ago

https://code.videolan.org/videolan/vlc/-/issues/28799 opened up with VLC

I had to get administrator approval from VideoLAN when creating the GitLab account, and it required MFA.

comment:11 by Xi Ruoyao, 7 months ago

A temporary work around is -D x265=disabled for gst-plugins-bad. Note that the libgstx265 plugin can only encode x265 (i.e. it cannot decode) and most people don't ever need to encode x265.

comment:12 by Douglas R. Reno, 7 months ago

There's now a pull request at VLC: https://code.videolan.org/videolan/vlc/-/merge_requests/6092

I'll give that a shot later and see how it works.

in reply to:  12 comment:13 by Joe Locash, 7 months ago

Replying to Douglas R. Reno:

There's now a pull request at VLC: https://code.videolan.org/videolan/vlc/-/merge_requests/6092

I'll give that a shot later and see how it works.

It's been merged.

comment:14 by Xi Ruoyao, 6 months ago

Summary: x265-4.0 (wait for downstream adaption)x265-4.0 (wait for the next release)

The upstream has reverted the change breaking downstream packages: https://bitbucket.org/multicoreware/x265_git/commits/78e5b703b1

comment:15 by Bruce Dubbs, 5 months ago

Owner: changed from Douglas R. Reno to blfs-book
Status: assignednew

comment:16 by Douglas R. Reno, 5 months ago

Milestone: 99-Waiting12.3
Summary: x265-4.0 (wait for the next release)x265-4.1

comment:17 by Bruce Dubbs, 5 months ago

Release notes are at https://x265.readthedocs.io/en/master/releasenotes.html

This may help: "Reverted the 4.0 api changes."

comment:18 by Xi Ruoyao, 5 months ago

But gst-plugins-bad still FTBFS:

../ext/x265/gstx265enc.c: In function 'gst_x265_enc_init_encoder_locked':
../ext/x265/gstx265enc.c:951:54: error: assignment to expression with array type
  951 |       encoder->x265param.masteringDisplayColorVolume =
      |                                                      ^

in reply to:  18 comment:19 by Xi Ruoyao, 5 months ago

Replying to Xi Ruoyao:

But gst-plugins-bad still FTBFS:

../ext/x265/gstx265enc.c: In function 'gst_x265_enc_init_encoder_locked':
../ext/x265/gstx265enc.c:951:54: error: assignment to expression with array type
  951 |       encoder->x265param.masteringDisplayColorVolume =
      |                                                      ^

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7968

comment:20 by Bruce Dubbs, 5 months ago

I checked gst-plugins-bad with the patch and it built/tested fine.

However ffmpeg FTBFS:

libavcodec/libx265.c: In function ‘libx265_encode_frame’:
libavcodec/libx265.c:813:59: error: passing argument 5 of ‘ctx->api->encoder_encode’ from incompatible pointer type [-Wincompatible-pointer-types]
  813 |                                    pic ? &x265pic : NULL, x265pic_lyrptr_out);
      |                                                           ^~~~~~~~~~~~~~~~~~
      |                                                           |
      |                                                           x265_picture **
libavcodec/libx265.c:813:59: note: expected ‘x265_picture *’ but argument is of type ‘x265_picture **’
CC      libavcodec/lossless_videodsp.o
make: *** [ffbuild/common.mak:81: libavcodec/libx265.o] Error 1

I was able to get it you build with:

   sed -i '/, x265pic_lyrptr/s/x265pic/*&/' libavcodec/libx265.c

(No, it will not apply twice.)

Unfortunately, I do not know if this "does the right thing."

comment:21 by Bruce Dubbs, 5 months ago

I should have looked upstream first. They have

sed -e 's/X265_BUILD >= 210/(X265_BUILD >= 210) \&\& (X265_BUILD < 213)/' \

-i libavcodec/libx265.c

Tested and build is OK.

in reply to:  21 comment:22 by Xi Ruoyao, 5 months ago

Replying to Bruce Dubbs:

I should have looked upstream first. They have

sed -e 's/X265_BUILD >= 210/(X265_BUILD >= 210) \&\& (X265_BUILD < 213)/' \

-i libavcodec/libx265.c

Tested and build is OK.

You can simplify it to

 sed -e 's/X265_BUILD >= 210/(&) \&\& (X265_BUILD < 213)/' \
     -i libavcodec/libx265.c

comment:23 by Bruce Dubbs, 5 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:24 by Bruce Dubbs, 5 months ago

Resolution: fixed
Status: assignedclosed

Fixed at commit 7177ed5ce5.

Note: See TracTickets for help on using tickets.