[vlc-commits] [Git][videolan/vlc][master] codec: x265: handle 4.0 encoding API change

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 26 11:04:54 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
83e2c395 by François Cartegnie at 2024-09-26T10:49:03+00:00
codec: x265: handle 4.0 encoding API change

refs #28799

- - - - -


1 changed file:

- modules/codec/x265.c


Changes:

=====================================
modules/codec/x265.c
=====================================
@@ -71,6 +71,11 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
     x265_picture pic;
 
     x265_picture_init(&p_sys->param, &pic);
+#ifdef MAX_SCALABLE_LAYERS
+    /* Handle API changes for scalable layers output in x265 4.0 */
+    x265_picture *pics[MAX_SCALABLE_LAYERS] = {NULL};
+    pics[0] = &pic;
+#endif
 
     if (likely(p_pict)) {
         pic.pts = p_pict->date;
@@ -89,8 +94,13 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
 
     x265_nal *nal;
     uint32_t i_nal = 0;
+#ifdef MAX_SCALABLE_LAYERS
+    x265_encoder_encode(p_sys->h, &nal, &i_nal,
+                        likely(p_pict) ? &pic : NULL, pics);
+#else
     x265_encoder_encode(p_sys->h, &nal, &i_nal,
             likely(p_pict) ? &pic : NULL, &pic);
+#endif
 
     if (!i_nal)
         return NULL;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/83e2c3955a563b60f74f05cea57e3ab5f447c8fb

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/83e2c3955a563b60f74f05cea57e3ab5f447c8fb
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list