Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
5e2aa35c by Steve Lhomme at 2026-01-17T11:54:00+00:00
contrib: x265: do the pkg-config static changes after patching the .pc file

- - - - -
53124945 by Steve Lhomme at 2026-01-17T11:54:00+00:00
pkg-static.sh: also merge Cflags.private with Cflags

(cherry picked from commit 710a02429e4c23c445aca534358a51f5208261ff)

- - - - -
0797ddf1 by François Cartegnie at 2026-01-17T11:54:00+00:00
fourcc: add i422/16

(cherry picked from commit 87a3cb276e550843d5d315375b4b9ccc954e8f4e)

- - - - -
79fe241e by François Cartegnie at 2026-01-17T11:54:00+00:00
codec: avcodec: map i422/16 (refs #19684)

(cherry picked from commit bd6e2f2cdcfefd1e4b83665349cbc95c6ca3c4fd) (rebased)
rebased:
- the code around is slightly different

- - - - -
4a4dcf2e by François Cartegnie at 2026-01-17T11:54:00+00:00
vfilter: blend: add i422/16

(cherry picked from commit ff07ba6ec3d8da43c1eba5d863f32f2281f88c51)

- - - - -
064eecc0 by Steve Lhomme at 2026-01-17T11:54:00+00:00
gstdecode: enable VLC_CODEC_I422_16L/B support

It was left over in the backport of a6c52d8943cd172ed0853c00d61dcf5b090edd41.

- - - - -
b6ca7fb3 by Steve Lhomme at 2026-01-17T11:54:00+00:00
fourcc: add VLC_CODEC_APV

(cherry picked from commit a806130dfcd42c990e906c9c41805134de6017d2) (rebased)
rebased:
- 3.0 doesn't have some of the codec added in VLC 4

- - - - -
822dac02 by Steve Lhomme at 2026-01-17T11:54:00+00:00
codec: avcodec: map VLC_CODEC_APV

(cherry picked from commit 20ce369bc05150b6d67bdb503a98e74fd54443e1) (rebased)
rebased:
- 3.0 doesn't have some of the codec added in VLC 4

- - - - -
01d3576d by Steve Lhomme at 2026-01-17T11:54:00+00:00
demux: mp4: map APV

(cherry picked from commit 98264dd3467bcdddb9eaa39267e2f2a40d1774ef) (edited)
edited:
- VLC 4 has more atoms
- VLC 3 doesn't have a local p_fmt to set extra data

- - - - -
a4056c9f by Steve Lhomme at 2026-01-17T11:54:00+00:00
contrib: add openapv

(cherry picked from commit bdb73a0e53655c5dd206004eeff83d6fb1f88eac)

- - - - -
25939804 by Steve Lhomme at 2026-01-17T11:54:00+00:00
codec: add OpenAPV decoder using openapv library

(cherry picked from commit a1d125f68b45df3c3c2e0609713b3bfa8fd5dd7a) (edited)
edited:
- VLC 3 doesn't have meson
- add_integer_with_range() takes an extra flag
- VLC uses a hardcoded decoder_sys_t structure name
- VLC 3 doesn't have VLC_ENOTSUP
- VLC 3 doesn't use a pointer for dec->fmt_in
- VLC 3 doesn't have color_range/COLOR_RANGE_UNDEF just a boolean
- VLC 3 doesn't have decoder_UpdateVideoOutput

- - - - -
832fdd26 by Steve Lhomme at 2026-01-17T11:54:00+00:00
NEWS: add APV decoding support via openapv

(cherry picked from commit 9adb6ce4a955973ca8642aa351d0e3ad81908650) (rebased)
rebased:
- This goes in the 3.0.24 section in VLC 3

- - - - -
3447caa7 by Steve Lhomme at 2026-01-17T11:54:00+00:00
contrib: openapv: fix multiple issues in CMake file

- forcing -pthread on Windows
- including pthread. on Windows
- forcing hardcoded compiler flags
- using AVX2 not available in older compilers

- - - - -


25 changed files:

- NEWS
- configure.ac
- + contrib/src/openapv/0001-detect-Windows-builds-with-_WIN32.patch
- + 
contrib/src/openapv/0002-CMake-use-CMake-way-of-selecting-strict-C99-support.patch
- + contrib/src/openapv/0003-CMake-don-t-add-pthread-for-Windows-builds.patch
- + 
contrib/src/openapv/0004-CMake-check-compiler-flags-are-supported-before-addi.patch
- + contrib/src/openapv/0005-CMake-check-_mm256_setr_m128i-is-supported.patch
- + contrib/src/openapv/SHA512SUMS
- + contrib/src/openapv/rules.mak
- contrib/src/pkg-static.sh
- contrib/src/x265/rules.mak
- contrib/src/x265/x265-pkg-libs.patch
- include/vlc_fourcc.h
- modules/codec/Makefile.am
- modules/codec/avcodec/chroma.c
- modules/codec/avcodec/fourcc.c
- modules/codec/gstreamer/fourcc.c
- + modules/codec/openapv.c
- modules/demux/mp4/essetup.c
- modules/demux/mp4/libmp4.c
- modules/demux/mp4/libmp4.h
- modules/demux/mp4/mp4.c
- modules/video_filter/blend.cpp
- src/misc/fourcc.c
- src/misc/fourcc_list.h


Changes:

=====================================
NEWS
=====================================
@@ -1,3 +1,10 @@
+Changes between 3.0.23 and 3.0.24:
+----------------------------------
+
+Codecs:
+ * Support OpenAPV decoder (FFmpeg 8 and OpenAPV)
+
+
 Changes between 3.0.22 and 3.0.23:
 ----------------------------------
 
@@ -6204,4 +6211,3 @@ iPaq port:
   * fixed crash on directory change in Familiar interface
   * added qte_main module for use in all modules that need Opie or Qte support
   * native video output module for Qt Embedded/Opie is not working
-


=====================================
configure.ac
=====================================
@@ -2915,6 +2915,11 @@ dnl  schroedinger decoder plugin (for dirac format video)
 dnl
 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], 
[dirac decoder and encoder using schroedinger], [auto])
 
+dnl
+dnl  OpenAPV decoder plugin
+dnl
+PKG_ENABLE_MODULES_VLC([OPENAPV], [], [oapv >= 0.2], [OpenAPV decoder], [auto])
+
 dnl
 dnl  PNG decoder module
 dnl


=====================================
contrib/src/openapv/0001-detect-Windows-builds-with-_WIN32.patch
=====================================
@@ -0,0 +1,60 @@
+From f2448bb52b35f6b8305afc2a40c166890c11d442 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Wed, 14 Jan 2026 13:38:01 +0100
+Subject: [PATCH 1/5] detect Windows builds with _WIN32
+
+It's set by all Windows compilers, including x86_64 and arm64.
+
+Signed-off-by: Steve Lhomme <[email protected]>
+---
+ src/oapv_port.c  | 4 ++--
+ src/oapv_tpool.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/oapv_port.c b/src/oapv_port.c
+index 24d60f0..cc33a03 100644
+--- a/src/oapv_port.c
++++ b/src/oapv_port.c
+@@ -89,7 +89,7 @@ void oapv_trace_line(char *pre)
+     printf("%s\n", str);
+ }
+ 
+-#if defined(WIN32) || defined(WIN64) || defined(_WIN32)
++#if defined(_WIN32)
+ #include <windows.h>
+ #include <sysinfoapi.h>
+ #else /* LINUX, MACOS, Android */
+@@ -99,7 +99,7 @@ void oapv_trace_line(char *pre)
+ int oapv_get_num_cpu_cores(void)
+ {
+     int num_cores = 1; // default
+-#if defined(WIN32) || defined(WIN64) || defined(_WIN32)
++#if defined(_WIN32)
+     {
+         SYSTEM_INFO si;
+         GetNativeSystemInfo(&si);
+diff --git a/src/oapv_tpool.c b/src/oapv_tpool.c
+index 8be0740..349bf9d 100644
+--- a/src/oapv_tpool.c
++++ b/src/oapv_tpool.c
+@@ -32,7 +32,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "oapv_tpool.h"
+-#if defined(WIN32) || defined(WIN64)
++#if defined(_WIN32)
+ #include <windows.h>
+ #include <process.h>
+ #else
+@@ -41,7 +41,7 @@
+ 
+ #define WINDOWS_MUTEX_SYNC 0
+ 
+-#if !defined(WIN32) && !defined(WIN64)
++#if !defined(_WIN32)
+ 
+ typedef struct thread_ctx {
+     // synchronization members
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/openapv/0002-CMake-use-CMake-way-of-selecting-strict-C99-support.patch
=====================================
@@ -0,0 +1,28 @@
+From 33243bab9848c6a06d12696bc34a0254d52a4db2 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Wed, 14 Jan 2026 13:41:39 +0100
+Subject: [PATCH 2/5] CMake: use CMake way of selecting strict C99 support
+
+Signed-off-by: Steve Lhomme <[email protected]>
+---
+ CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1ac32b0..14035ce 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -100,6 +100,10 @@ endif()
+ # Compilation flags
+ ########################################
+ 
++set(CMAKE_C_STANDARD 99)
++set(CMAKE_C_STANDARD_REQUIRED ON)
++set(CMAKE_C_EXTENSIONS OFF)
++
+ # Set compiler flags and options.
+ if(MSVC)
+   message("Not supported yet!")
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/openapv/0003-CMake-don-t-add-pthread-for-Windows-builds.patch
=====================================
@@ -0,0 +1,51 @@
+From 08f8cb25a6029220f4dda8b7e8761c7962c0ae17 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Wed, 14 Jan 2026 13:45:01 +0100
+Subject: [PATCH 3/5] CMake: don't add -pthread for Windows builds
+
+It can generate some warnings or compilations errors.
+
+The official CMake way of picking the thread library [^1] should probably be 
used for non-Windows targets.
+
+[^1]: https://cmake.org/cmake/help/latest/module/FindThreads.html
+
+Signed-off-by: Steve Lhomme <[email protected]>
+---
+ CMakeLists.txt     | 5 ++++-
+ src/CMakeLists.txt | 3 +++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 14035ce..52bf365 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -121,8 +121,11 @@ elseif(UNIX OR MINGW)
+         set(OPT_DBG "-DNDEBUG") # disable assert
+     endif()
+ 
+-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_DBG} -${OPT_LV} 
-fomit-frame-pointer -pthread -std=c99")
++    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_DBG} -${OPT_LV} 
-fomit-frame-pointer -std=c99")
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-function 
-Wno-pointer-sign -Wno-pointer-to-int-cast")
++    if(NOT WIN32)
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
++    endif()
+     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lm")
+ else()
+     message("Unknown compiler")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index d690068..29143cf 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -182,6 +182,9 @@ if(NOT MSVC)
+         set(EXTRA_CFLAGS "-DOAPV_STATIC_DEFINE")
+         set(EXTRA_CFLAGS_PRIVATE "")
+     endif()
++    if(NOT WIN32)
++        set(EXTRA_CFLAGS_PRIVATE "${EXTRA_CFLAGS_PRIVATE} -pthread")
++    endif()
+     configure_file(
+       "${CMAKE_SOURCE_DIR}/pkgconfig/${LIB_NAME_BASE}.pc.in"
+       "${CMAKE_BINARY_DIR}/${LIB_NAME_BASE}.pc" @ONLY)
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/openapv/0004-CMake-check-compiler-flags-are-supported-before-addi.patch
=====================================
@@ -0,0 +1,94 @@
+From ad8d7eab09773ee6e8684919f85acadf9bf56e25 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Wed, 14 Jan 2026 13:45:35 +0100
+Subject: [PATCH 4/5] CMake: check compiler flags are supported before adding
+ them
+
+Signed-off-by: Steve Lhomme <[email protected]>
+---
+ CMakeLists.txt     | 25 +++++++++++++++++++++++--
+ src/CMakeLists.txt | 18 ++++++++++++++----
+ 2 files changed, 37 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 52bf365..8366800 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -104,6 +104,8 @@ set(CMAKE_C_STANDARD 99)
+ set(CMAKE_C_STANDARD_REQUIRED ON)
+ set(CMAKE_C_EXTENSIONS OFF)
+ 
++include(CheckCCompilerFlag)
++
+ # Set compiler flags and options.
+ if(MSVC)
+   message("Not supported yet!")
+@@ -121,8 +123,27 @@ elseif(UNIX OR MINGW)
+         set(OPT_DBG "-DNDEBUG") # disable assert
+     endif()
+ 
+-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_DBG} -${OPT_LV} 
-fomit-frame-pointer -std=c99")
+-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-function 
-Wno-pointer-sign -Wno-pointer-to-int-cast")
++    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_DBG} -${OPT_LV}")
++    check_c_compiler_flag("-fomit-frame-pointer" HAS_FLAG_OMIT_FRAME_POINTER)
++    if(HAS_FLAG_OMIT_FRAME_POINTER)
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer")
++    endif()
++    check_c_compiler_flag("-Wall" HAS_FLAG_WARNING_ALL)
++    if(HAS_FLAG_WARNING_ALL)
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
++    endif()
++    check_c_compiler_flag("-Wno-unused-function" HAS_FLAG_NO_UNUSED_FUNCTION)
++    if(HAS_FLAG_NO_UNUSED_FUNCTION)
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
++    endif()
++    check_c_compiler_flag("-Wno-pointer-sign" HAS_FLAG_NO_POINTER_SIGN)
++    if(HAS_FLAG_NO_POINTER_SIGN)
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-sign")
++    endif()
++    check_c_compiler_flag("-Wno-pointer-to-int-cast" 
HAS_FLAG_NO_POINTER_INT_CAST)
++    if(HAS_FLAG_NO_POINTER_INT_CAST)
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-to-int-cast")
++    endif()
+     if(NOT WIN32)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+     endif()
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 29143cf..e442e7f 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -14,6 +14,10 @@ file(GLOB LIB_AVX_INC "../src/avx/oapv_*.h" )
+ include(GenerateExportHeader)
+ include_directories("${CMAKE_BINARY_DIR}/include")
+ 
++include(CheckCCompilerFlag)
++check_c_compiler_flag("-flax-vector-conversions" HAS_ARM_VECTOR_CONVERSION)
++check_c_compiler_flag("-msse4.1" HAS_SSE41)
++check_c_compiler_flag("-mavx2" HAS_AVX2)
+ 
+ message("SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
+ 
+@@ -107,10 +111,16 @@ if(MSVC)
+   endif()
+ elseif(UNIX OR MINGW)
+   if (ARM)
+-    set_property(SOURCE ${NEON} APPEND PROPERTY COMPILE_FLAGS 
"-flax-vector-conversions")
+-elseif (X86 OR UNIVERSAL)
+-    set_property(SOURCE ${SSE} APPEND PROPERTY COMPILE_FLAGS "-msse4.1")
+-    set_property(SOURCE ${AVX} APPEND PROPERTY COMPILE_FLAGS " -mavx2")
++    if(HAS_ARM_VECTOR_CONVERSION)
++      set_property(SOURCE ${NEON} APPEND PROPERTY COMPILE_FLAGS 
"-flax-vector-conversions")
++    endif()
++  elseif (X86 OR UNIVERSAL)
++    if(HAS_SSE41)
++      set_property(SOURCE ${SSE} APPEND PROPERTY COMPILE_FLAGS "-msse4.1")
++    endif()
++    if(HAS_AVX2)
++      set_property(SOURCE ${AVX} APPEND PROPERTY COMPILE_FLAGS "-mavx2")
++    endif()
+   endif()
+ 
+   if(OAPV_BUILD_SHARED_LIB)
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/openapv/0005-CMake-check-_mm256_setr_m128i-is-supported.patch
=====================================
@@ -0,0 +1,65 @@
+From 93b6064273ea4add336936698dfdb84d93f72c58 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Wed, 14 Jan 2026 14:16:08 +0100
+Subject: [PATCH 5/5] CMake: check _mm256_setr_m128i is supported
+
+Some older AVX2 compilers don't have it, but it's possible to use a macro 
instead [^1].
+
+[^1]: https://stackoverflow.com/a/32630658/1266123
+
+Signed-off-by: Steve Lhomme <[email protected]>
+---
+ src/CMakeLists.txt    | 19 +++++++++++++++++++
+ src/avx/oapv_tq_avx.c |  6 ++++++
+ 2 files changed, 25 insertions(+)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e442e7f..35dfb89 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -120,6 +120,25 @@ elseif(UNIX OR MINGW)
+     endif()
+     if(HAS_AVX2)
+       set_property(SOURCE ${AVX} APPEND PROPERTY COMPILE_FLAGS "-mavx2")
++      # check _mm256_setr_m128i is supported
++      include(CheckCSourceCompiles)
++      include(CMakePushCheckState)
++
++      cmake_push_check_state(RESET)
++      set(CMAKE_REQUIRED_FLAGS "-mavx2")
++      check_c_source_compiles("
++      #include <immintrin.h>
++      int main(void)
++      {
++        __m128i a, b;
++        _mm256_setr_m128i(a, b);
++        return 0;
++      }
++      " HAVE_MM256_SETR)
++      cmake_pop_check_state()
++      if(HAVE_MM256_SETR)
++        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_MM256_SETR")
++      endif(HAVE_MM256_SETR)
+     endif()
+   endif()
+ 
+diff --git a/src/avx/oapv_tq_avx.c b/src/avx/oapv_tq_avx.c
+index 5939986..4332783 100644
+--- a/src/avx/oapv_tq_avx.c
++++ b/src/avx/oapv_tq_avx.c
+@@ -32,6 +32,12 @@
+ #include "oapv_def.h"
+ #include "oapv_tq_avx.h"
+ 
++#ifndef HAVE_MM256_SETR
++#define _mm256_set_m128i(v0, v1)  
_mm256_insertf128_si256(_mm256_castsi128_si256(v1), (v0), 1)
++#define _mm256_setr_m128i(v0, v1) _mm256_set_m128i((v1), (v0))
++#endif
++
++
+ #if X86_SSE
+ #ifndef _mm256_set_m128i
+ #define _mm256_set_m128i(/* __m128i */ hi, /* __m128i */ lo) \
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/openapv/SHA512SUMS
=====================================
@@ -0,0 +1 @@
+59a1d1168015e20cba984bdac098bbee1c4bd475832d553ce27f2c7c52a13fb60a19a48d94422220c007739883370a9cbce3158c7a1218063fd49a8d20270ec0
  openapv-0.2.0.4.tar.gz


=====================================
contrib/src/openapv/rules.mak
=====================================
@@ -0,0 +1,35 @@
+# openapv
+
+OPENAPV_VERSION := 0.2.0.4
+OPENAPV_URL := 
$(GITHUB)/AcademySoftwareFoundation/openapv/archive/refs/tags/v$(OPENAPV_VERSION).tar.gz
+
+PKGS += openapv
+ifeq ($(call need_pkg,"oapv >= 0.2"),)
+PKGS_FOUND += openapv
+endif
+
+$(TARBALLS)/openapv-$(OPENAPV_VERSION).tar.gz:
+       $(call download_pkg,$(OPENAPV_URL),openapv)
+
+.sum-openapv: openapv-$(OPENAPV_VERSION).tar.gz
+
+OPENAPV_CONF := -DOAPV_BUILD_SHARED_LIB=OFF -DOAPV_BUILD_APPS=OFF
+
+openapv: openapv-$(OPENAPV_VERSION).tar.gz .sum-openapv
+       $(UNPACK)
+       $(call pkg_static,"pkgconfig/oapv.pc.in")
+       # install the library in the usual <prefix>/lib place to match the .pc 
file
+       sed -i.orig 
's,$${CMAKE_INSTALL_LIBDIR}/$${LIB_NAME_BASE},$${CMAKE_INSTALL_LIBDIR},g' 
$(UNPACK_DIR)/src/CMakeLists.txt
+       $(APPLY) $(SRC)/openapv/0001-detect-Windows-builds-with-_WIN32.patch
+       $(APPLY) 
$(SRC)/openapv/0002-CMake-use-CMake-way-of-selecting-strict-C99-support.patch
+       $(APPLY) 
$(SRC)/openapv/0003-CMake-don-t-add-pthread-for-Windows-builds.patch
+       $(APPLY) 
$(SRC)/openapv/0004-CMake-check-compiler-flags-are-supported-before-addi.patch
+       $(APPLY) 
$(SRC)/openapv/0005-CMake-check-_mm256_setr_m128i-is-supported.patch
+       $(MOVE)
+
+.openapv: openapv toolchain.cmake
+       $(CMAKECLEAN)
+       $(HOSTVARS_CMAKE) $(CMAKE) $(OPENAPV_CONF)
+       +$(CMAKEBUILD)
+       $(CMAKEINSTALL)
+       touch $@


=====================================
contrib/src/pkg-static.sh
=====================================
@@ -4,7 +4,7 @@
 
 if test -z "$1" || test -n "$2"; then
        echo "Usage: $0 <file.pc>" >&2
-       echo "Merges the pkg-config {Requires/Libs}.private stanza into 
{Requires/Libs} stanzas." >&2
+       echo "Merges the pkg-config {Requires/Libs/Cflags}.private stanza into 
{Requires/Libs/Cflags} stanzas." >&2
        exit 1
 fi
 
@@ -14,12 +14,16 @@ LIBS_PUBLIC=""
 LIBS_PRIVATE=""
 REQUIRES_PUBLIC=""
 REQUIRES_PRIVATE=""
+CFLAGS_PUBLIC=""
+CFLAGS_PRIVATE=""
 
 while read LINE; do
        lpub="${LINE#Libs:}"
        lpriv="${LINE#Libs.private:}"
        rpub="${LINE#Requires:}"
        rpriv="${LINE#Requires.private:}"
+       cpub="${LINE#Cflags:}"
+       cpriv="${LINE#Cflags.private:}"
        if test "$lpub" != "$LINE"; then
                LIBS_PUBLIC="$lpub"
        elif test "$lpriv" != "$LINE"; then
@@ -28,11 +32,16 @@ while read LINE; do
                REQUIRES_PUBLIC="$rpub"
        elif test "$rpriv" != "$LINE"; then
                REQUIRES_PRIVATE="$rpriv"
+       elif test "$cpub" != "$LINE"; then
+               CFLAGS_PUBLIC="$cpub"
+       elif test "$cpriv" != "$LINE"; then
+               CFLAGS_PRIVATE="$cpriv"
        else
                echo "$LINE"
        fi
 done
 echo "Libs: $LIBS_PUBLIC $LIBS_PRIVATE"
+echo "Cflags: $CFLAGS_PUBLIC $CFLAGS_PRIVATE"
 echo "Requires: $REQUIRES_PUBLIC $REQUIRES_PRIVATE"
 
 mv -f -- "$1.tmp" "$1"


=====================================
contrib/src/x265/rules.mak
=====================================
@@ -28,10 +28,10 @@ x265: x265_$(X265_VERSION).tar.gz .sum-x265
        $(APPLY) $(SRC)/x265/0002-do-not-copy-.pdb-files-that-don-t-exist.patch
        $(APPLY) $(SRC)/x265/0003-add-patch-to-enable-detect512.patch
        $(APPLY) 
$(SRC)/x265/0001-Fix-libunwind-static-linking-on-Android-toolchains.patch
-       $(call pkg_static,"source/x265.pc.in")
 ifndef HAVE_WIN32
        $(APPLY) $(SRC)/x265/x265-pkg-libs.patch
 endif
+       $(call pkg_static,"source/x265.pc.in")
        $(MOVE)
 
 X265_CONF := -DENABLE_SHARED=OFF -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) 
-DENABLE_CLI=OFF


=====================================
contrib/src/x265/x265-pkg-libs.patch
=====================================
@@ -1,10 +1,10 @@
 diff -Nru x265.orig/source/x265.pc.in x265/source/x265.pc.in
 --- x265.orig/source/x265.pc.in        2016-08-06 17:04:25.925985965 +0300
 +++ x265/source/x265.pc.in     2016-08-06 17:07:06.548987568 +0300
-@@ -7,5 +7,5 @@
+@@ -7,5 +7,5 @@ Name: @CMAKE_PROJECT_NAME@
  Description: H.265/HEVC video encoder
  Version: @X265_LATEST_TAG@
+ Libs: -L${libdir} -lx265
+-Libs.private: @PRIVATE_LIBS@
++Libs.private: @PRIVATE_LIBS@ -ldl -lpthread
  Cflags: -I${includedir}
--Libs:  -L${libdir} -lx265  @PRIVATE_LIBS@
-+Libs:  -L${libdir} -lx265  @PRIVATE_LIBS@ -ldl -lpthread
- Requires:  


=====================================
include/vlc_fourcc.h
=====================================
@@ -186,6 +186,7 @@
 #define VLC_CODEC_CINEFORM        VLC_FOURCC('C','F','H','D')
 #define VLC_CODEC_SPEEDHQ         VLC_FOURCC('S','H','Q','2')
 #define VLC_CODEC_PIXLET          VLC_FOURCC('p','x','l','t')
+#define VLC_CODEC_APV             VLC_FOURCC('a','p','v','1')
 
 /***********
  * Chromas
@@ -229,6 +230,9 @@
 /* Planar YUV 4:2:2 Y:U:V 12-bit stored on 16 bits */
 #define VLC_CODEC_I422_12L        VLC_FOURCC('I','2','C','L')
 #define VLC_CODEC_I422_12B        VLC_FOURCC('I','2','C','B')
+/* Planar YUV 4:2:2 Y:U:V 16-bit stored on 16 bits */
+#define VLC_CODEC_I422_16L        VLC_FOURCC('I','2','F','L')
+#define VLC_CODEC_I422_16B        VLC_FOURCC('I','2','F','B')
 
 /* Planar YUV 4:4:0 Y:U:V */
 #define VLC_CODEC_I440            VLC_FOURCC('I','4','4','0')


=====================================
modules/codec/Makefile.am
=====================================
@@ -132,6 +132,13 @@ libschroedinger_plugin_la_LIBADD = $(LIBS_schroedinger)
 EXTRA_LTLIBRARIES += libschroedinger_plugin.la
 codec_LTLIBRARIES += $(LTLIBschroedinger)
 
+libopenapv_plugin_la_SOURCES = codec/openapv.c
+libopenapv_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_openapv)
+libopenapv_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
+libopenapv_plugin_la_LIBADD = $(LIBS_openapv)
+EXTRA_LTLIBRARIES += libopenapv_plugin.la
+codec_LTLIBRARIES += $(LTLIBopenapv)
+
 
 ### Image codecs ###
 


=====================================
modules/codec/avcodec/chroma.c
=====================================
@@ -100,6 +100,8 @@ static const struct
     {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 },
     {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 },
     {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 },
+    {VLC_CODEC_I422_16L, AV_PIX_FMT_YUV422P16LE, 0, 0, 0 },
+    {VLC_CODEC_I422_16B, AV_PIX_FMT_YUV422P16BE, 0, 0, 0 },
 #if LIBAVUTIL_VERSION_CHECK( 54, 17, 100 )
     {VLC_CODEC_I422_12L, AV_PIX_FMT_YUV422P12LE, 0, 0, 0 },
     {VLC_CODEC_I422_12B, AV_PIX_FMT_YUV422P12BE, 0, 0, 0 },


=====================================
modules/codec/avcodec/fourcc.c
=====================================
@@ -298,6 +298,10 @@ static const struct vlc_avcodec_fourcc video_codecs[] =
 #if LIBAVCODEC_VERSION_CHECK( 57, 79, 100 )
     { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC },
 #endif
+#if LIBAVCODEC_VERSION_CHECK( 62, 1, 100 )
+    { VLC_CODEC_APV, AV_CODEC_ID_APV },
+#endif
+
 };
 
 /*


=====================================
modules/codec/gstreamer/fourcc.c
=====================================
@@ -55,8 +55,8 @@ static const gst_vlc_rawvideo_fourcc raw_video_fmts[] =
     { "I422_10LE", VLC_CODEC_I422_10L },
     { "I422_12BE", VLC_CODEC_I422_12B },
     { "I422_12LE", VLC_CODEC_I422_12L },
-//    { "I422_16BE", VLC_CODEC_I422_16B },
-//    { "I422_16LE", VLC_CODEC_I422_16L },
+    { "I422_16BE", VLC_CODEC_I422_16B },
+    { "I422_16LE", VLC_CODEC_I422_16L },
     { "I422_9BE", VLC_CODEC_I422_9B },
     { "I422_9LE", VLC_CODEC_I422_9L },
     { "I444_10BE", VLC_CODEC_I444_10B },


=====================================
modules/codec/openapv.c
=====================================
@@ -0,0 +1,371 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+// openapv.c : APV decoder using openapv library
+// Copyright © 2025 VideoLabs, VLC authors and VideoLAN
+
+// Authors: Steve Lhomme <[email protected]>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_codec.h>
+#include <vlc_modules.h>
+#include <vlc_bits.h>
+
+#include "../packetizer/iso_color_tables.h"
+
+#include <oapv.h>
+#include <limits.h>
+
+#define THREAD_TILES_TEXT N_("Tile Threads")
+#define THREAD_TILES_LONGTEXT N_( "Max number of threads used for decoding, 
default 0=auto" )
+
+static int OpenAPVDecoder(vlc_object_t *);
+static void CloseAPVDecoder(vlc_object_t *);
+
+vlc_module_begin ()
+    set_description(N_("OpenAPV video decoder"))
+    set_capability("video decoder", 10)
+    set_callbacks(OpenAPVDecoder, CloseAPVDecoder)
+    set_subcategory(SUBCAT_INPUT_VCODEC)
+
+    add_integer_with_range( "openapv-threads", 0, 0, INT_MAX,
+                 THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT, false)
+vlc_module_end ()
+
+struct decoder_sys_t
+{
+    oapvd_t        decoder;
+    int            cs;
+};
+
+static const struct {
+    vlc_fourcc_t vlc;
+    int          oapv;
+} vlc_oapv_chromas[] = {
+    { VLC_CODEC_I422_10L, OAPV_CS_SET(OAPV_CF_YCBCR422, 10, 0) },
+    { VLC_CODEC_I422_12L, OAPV_CS_SET(OAPV_CF_YCBCR422, 12, 0) },
+    { VLC_CODEC_I422_16L, OAPV_CS_SET(OAPV_CF_YCBCR422, 16, 0) },
+    { VLC_CODEC_I444_10L, OAPV_CS_SET(OAPV_CF_YCBCR444, 10, 0) },
+    { VLC_CODEC_I444_12L, OAPV_CS_SET(OAPV_CF_YCBCR444, 12, 0) },
+    { VLC_CODEC_I444_16L, OAPV_CS_SET(OAPV_CF_YCBCR444, 16, 0) },
+    { VLC_CODEC_GREY_10L, OAPV_CS_SET(OAPV_CF_YCBCR400, 10, 0) },
+    { VLC_CODEC_GREY_12L, OAPV_CS_SET(OAPV_CF_YCBCR400, 12, 0) },
+    { VLC_CODEC_GREY_16L, OAPV_CS_SET(OAPV_CF_YCBCR400, 16, 0) },
+};
+
+static inline vlc_fourcc_t FindVlcChroma(uint8_t profile_idc, uint8_t 
bit_depth_minus8, uint8_t chroma_format_idc)
+{
+    if (profile_idc == 33) // 422-10 profile
+    {
+        assert(chroma_format_idc == 2);
+        assert(bit_depth_minus8 == 2);
+        return VLC_CODEC_I422_10L;
+    }
+    if (profile_idc == 44) // 422-12 profile
+    {
+        assert(chroma_format_idc == 2);
+        assert(bit_depth_minus8 >= 2 && bit_depth_minus8 <= 4);
+        return VLC_CODEC_I422_12L;
+    }
+    if (profile_idc == 55) // 444-10 profile
+    {
+        assert(chroma_format_idc == 2 || chroma_format_idc == 3);
+        assert(bit_depth_minus8 == 2);
+        return VLC_CODEC_I444_10L;
+    }
+    if (profile_idc == 66) // 444-12 profile
+    {
+        assert(chroma_format_idc == 2 || chroma_format_idc == 3);
+        assert(bit_depth_minus8 >= 2 && bit_depth_minus8 <= 4);
+        return VLC_CODEC_I444_12L;
+    }
+    // if (profile_idc == 77) // 4444-10 profile
+    // {
+    //     assert(chroma_format_idc >= 2 && chroma_format_idc <= 4);
+    //     assert(bit_depth_minus8 == 2);
+    //     return VLC_CODEC_V410;
+    // }
+    // if (profile_idc == 88) // 4444-12 profile
+    // {
+    //     assert(chroma_format_idc >= 2 && chroma_format_idc <= 4);
+    //     assert(bit_depth_minus8 >= 2 && bit_depth_minus8 <= 4);
+    //     return VLC_CODEC_V410;
+    // }
+    if (bit_depth_minus8 == 2) // 10-bit
+    {
+        switch(chroma_format_idc)
+        {
+            case 0: return VLC_CODEC_GREY_10L;
+            case 2: return VLC_CODEC_I422_10L;
+            case 3: return VLC_CODEC_I444_10L;
+            // case 4: return VLC_CODEC_I4444_10L;
+            default: return 0;
+        }
+    }
+    if (bit_depth_minus8 == 4) // 12-bit
+    {
+        switch(chroma_format_idc)
+        {
+            case 0: return VLC_CODEC_GREY_12L;
+            case 2: return VLC_CODEC_I422_12L;
+            case 3: return VLC_CODEC_I444_12L;
+            // case 4: return VLC_CODEC_I4444_12L;
+            default: return 0;
+        }
+    }
+    // if (bit_depth_minus8 == 6) // 14-bit
+    // {
+    //     switch(chroma_format_idc)
+    //     {
+    //         case 0: return VLC_CODEC_GREY_14L;
+    //         case 2: return VLC_CODEC_I422_14L;
+    //         case 3: return VLC_CODEC_I444_14L;
+    // //        case 4: return VLC_CODEC_I4444_14L;
+    //         default: return 0;
+    //     }
+    // }
+    if (bit_depth_minus8 == 8) // 16-bit
+    {
+        switch(chroma_format_idc)
+        {
+            case 0: return VLC_CODEC_GREY_16L;
+            case 2: return VLC_CODEC_I422_16L;
+            case 3: return VLC_CODEC_I444_16L;
+            // case 4: return VLC_CODEC_I4444_16L;
+            default: return 0;
+        }
+    }
+    return 0;
+}
+
+static int imgb_addref(oapv_imgb_t *imgb)
+{
+    return imgb->refcnt++;
+}
+
+static int imgb_getref(oapv_imgb_t *imgb)
+{
+    return imgb->refcnt;
+}
+
+static int imgb_release(oapv_imgb_t *imgb)
+{
+    if (--imgb->refcnt == 0)
+    {
+        picture_Release(imgb->pdata[0]);
+        free(imgb);
+        return 0;
+    }
+    return imgb->refcnt;
+}
+
+static oapv_imgb_t *GetImage( decoder_t *p_dec )
+{
+    decoder_sys_t *sys = p_dec->p_sys;
+
+    oapv_imgb_t *imgb = calloc(1, sizeof(*imgb));
+    if (imgb == NULL)
+        return NULL;
+
+    picture_t *pic = decoder_NewPicture( p_dec );
+    if (pic == NULL)
+        goto fail;
+
+    imgb->refcnt = 1;
+    imgb->cs = sys->cs;
+    imgb->pdata[0] = pic;
+    imgb->np = pic->i_planes;
+    for (int i = 0; i < pic->i_planes; i++)
+    {
+        imgb->w[i] = pic->p[i].i_visible_pitch / pic->p[i].i_pixel_pitch;
+        imgb->h[i] = pic->p[i].i_visible_lines / pic->p[i].i_pixel_pitch;
+
+        imgb->aw[i] = pic->p[i].i_pitch / pic->p[i].i_pixel_pitch;
+        imgb->s[i] = pic->p[i].i_pitch;
+        imgb->ah[i] = pic->p[i].i_lines / pic->p[i].i_pixel_pitch;
+        imgb->e[i] = pic->p[i].i_lines;
+        imgb->bsize[i] = imgb->s[i] * imgb->e[i];
+        imgb->a[i] = pic->p[i].p_pixels;
+    }
+
+    imgb->addref = imgb_addref;
+    imgb->getref = imgb_getref;
+    imgb->release = imgb_release;
+
+    return imgb;
+fail:
+    free(imgb);
+    return NULL;
+}
+
+static int Decode( decoder_t *p_dec, block_t *p_block )
+{
+    decoder_sys_t *sys = p_dec->p_sys;
+
+    if (p_block == NULL) // drain nothing to do
+        return VLCDEC_SUCCESS;
+
+    oapv_frms_t  ofrms = { 0 };
+    oapvm_t      mid = { 0 };
+    oapv_bitb_t  bitb = { 0 };
+    oapvd_stat_t stats = { 0 };
+    int err;
+
+    ofrms.num_frms = 1;
+    ofrms.frm[0].imgb = GetImage(p_dec);
+    if (ofrms.frm[0].imgb == NULL)
+        return VLCDEC_ECRITICAL; // no more memory ?
+
+    bitb.addr = p_block->p_buffer;
+    bitb.ssize = p_block->i_buffer;
+
+    err = oapvd_decode(sys->decoder, &bitb, &ofrms, &mid, &stats);
+    if (unlikely(err != OAPV_OK))
+    {
+        msg_Err( p_dec, "decoding error %d", err );
+        ofrms.frm[0].imgb->release(ofrms.frm[0].imgb);
+        return VLCDEC_ECRITICAL;
+    }
+
+    assert(stats.aui.num_frms == 1 || stats.aui.num_frms == 0);
+    if (stats.aui.num_frms == 1)
+    {
+        picture_t *decoded = ofrms.frm[0].imgb->pdata[0];
+        picture_Hold(decoded);
+        decoded->date = p_block->i_pts != VLC_TICK_INVALID ? p_block->i_pts : 
p_block->i_dts;
+
+        decoder_QueueVideo( p_dec, decoded );
+    }
+    for (int i=0; i<stats.aui.num_frms; i++)
+    {
+        ofrms.frm[i].imgb->release(ofrms.frm[i].imgb);
+    }
+
+    return VLCDEC_SUCCESS;
+}
+
+
+int OpenAPVDecoder(vlc_object_t *o)
+{
+    decoder_t *dec = container_of(o, decoder_t, obj);
+    if (dec->fmt_in.i_codec != VLC_CODEC_APV)
+        return VLC_EGENERIC;
+
+    uint8_t color_primaries = 2;
+    uint8_t transfer_characteristics = 2;
+    uint8_t matrix_coefficients = 2;
+    uint8_t profile_idc = 0;
+    uint8_t chroma_format_idc = 0;
+    uint8_t bit_depth_minus8 = 2;
+    bool full_range_flag = false;
+    uint32_t frame_width = dec->fmt_in.video.i_width;
+    uint32_t frame_height = dec->fmt_in.video.i_height;
+
+    // parse extradata to get stream info
+    bs_t extra;
+    bs_init(&extra, dec->fmt_in.p_extra, dec->fmt_in.i_extra);
+    uint8_t configurationVersion = bs_read(&extra, 8);
+    if (configurationVersion != 1)
+    {
+        msg_Dbg(o, "unknown configuration %" PRIu8, configurationVersion);
+        return VLC_EGENERIC;
+    }
+
+    uint32_t number_of_configuration_entry = bs_read(&extra, 8);
+    if (number_of_configuration_entry != 1)
+    {
+        msg_Err(o, "unsupported number of configurations (%u)", 
(unsigned)number_of_configuration_entry);
+        return VLC_EGENERIC;
+    }
+    bs_skip(&extra, 8); // pbu_type
+    uint8_t number_of_frame_info = bs_read(&extra, 8);
+    if (number_of_frame_info != 1)
+    {
+        msg_Err(o, "unsupported number of frames (%u)", 
(unsigned)number_of_frame_info);
+        return VLC_EGENERIC;
+    }
+    bs_skip(&extra, 6);
+    bool color_description_present_flag = bs_read1(&extra);
+    bs_skip(&extra, 1); // capture_time_distance_ignored
+    profile_idc = bs_read(&extra, 8);
+    bs_skip(&extra, 8); // level_idc
+    bs_skip(&extra, 8); // band_idc
+    frame_width = bs_read(&extra, 32);
+    frame_height = bs_read(&extra, 32);
+    chroma_format_idc = bs_read(&extra, 4);
+    bit_depth_minus8 = bs_read(&extra, 4);
+    bs_skip(&extra, 8); // capture_time_distance
+    if (color_description_present_flag)
+    {
+        color_primaries = bs_read(&extra, 8);
+        transfer_characteristics = bs_read(&extra, 8);
+        matrix_coefficients = bs_read(&extra, 8);
+        full_range_flag = bs_read1(&extra);
+        bs_skip(&extra, 7); // reserved
+    }
+
+    decoder_sys_t *sys = vlc_obj_malloc(o, sizeof(*sys));
+    if (unlikely(sys == NULL))
+        return VLC_ENOMEM;
+
+    oapvd_cdesc_t desc = { 0 };
+    desc.threads = var_InheritInteger( o, "openapv-threads" );
+    sys->decoder = oapvd_create(&desc, NULL);
+    if (sys->decoder == NULL)
+    {
+        msg_Err(o, "failed to create decoder");
+        return VLC_EGENERIC;
+    }
+
+    if (dec->fmt_in.video.primaries == COLOR_PRIMARIES_UNDEF)
+        dec->fmt_out.video.primaries = 
iso_23001_8_cp_to_vlc_primaries(color_primaries);
+    else
+        dec->fmt_out.video.primaries = dec->fmt_in.video.primaries;
+    if (dec->fmt_in.video.transfer == TRANSFER_FUNC_UNDEF)
+        dec->fmt_out.video.transfer = 
iso_23001_8_tc_to_vlc_xfer(transfer_characteristics);
+    else
+        dec->fmt_out.video.transfer = dec->fmt_in.video.transfer;
+    if (dec->fmt_in.video.space == COLOR_SPACE_UNDEF)
+        dec->fmt_out.video.space = 
iso_23001_8_mc_to_vlc_coeffs(matrix_coefficients);
+    else
+        dec->fmt_out.video.space = dec->fmt_in.video.space;
+    dec->fmt_out.video.b_color_range_full = full_range_flag ? true : false;
+
+    dec->fmt_out.video.i_width = frame_width;
+    dec->fmt_out.video.i_height = frame_height;
+
+    dec->fmt_out.i_codec = FindVlcChroma(profile_idc, bit_depth_minus8, 
chroma_format_idc);
+    dec->fmt_out.video.i_chroma = dec->fmt_out.i_codec;
+
+    if (decoder_UpdateVideoFormat(dec) != VLC_SUCCESS)
+    {
+        msg_Err(o, "decoder_UpdateVideoFormat failed");
+        CloseAPVDecoder(o);
+        return VLC_EGENERIC;
+    }
+    for (size_t i=0; i < ARRAY_SIZE(vlc_oapv_chromas); i++)
+    {
+        if (dec->fmt_out.video.i_chroma == vlc_oapv_chromas[i].vlc)
+        {
+            sys->cs = vlc_oapv_chromas[i].oapv;
+            break;
+        }
+    }
+
+    dec->p_sys = sys;
+
+    dec->pf_decode = Decode;
+
+    return VLC_SUCCESS;
+}
+
+void CloseAPVDecoder(vlc_object_t *o)
+{
+    decoder_t *dec = container_of(o, decoder_t, obj);
+    decoder_sys_t *sys = dec->p_sys;
+    oapvd_delete(sys->decoder);
+}


=====================================
modules/demux/mp4/essetup.c
=====================================
@@ -552,6 +552,24 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, 
MP4_Box_t *p_sample )
             break;
         }
 
+        case ATOM_apv1:
+        {
+            const MP4_Box_t *p_binary = MP4_BoxGet(  p_sample, "apvC" );
+            if( p_binary && p_binary->data.p_binary->i_blob > 4 &&
+                GetDWBE(p_binary->data.p_binary->p_blob) == 0 ) /* fullbox 
header */
+            {
+                size_t i_extra = p_binary->data.p_binary->i_blob - 4;
+                uint8_t *p_extra = malloc(i_extra);
+                if( likely( p_extra ) )
+                {
+                    p_track->fmt.i_extra = i_extra;
+                    p_track->fmt.p_extra = p_extra;
+                    memcpy( p_extra, ((uint8_t 
*)p_binary->data.p_binary->p_blob) + 4, i_extra);
+                }
+            }
+            break;
+        }
+
         /* avc1: send avcC (h264 without annexe B, ie without start code)*/
         case VLC_FOURCC( 'a', 'v', 'c', '3' ):
         case VLC_FOURCC( 'a', 'v', 'c', '1' ):


=====================================
modules/demux/mp4/libmp4.c
=====================================
@@ -4551,6 +4551,7 @@ static const struct
     { ATOM_av1C,    MP4_ReadBox_av1C,         ATOM_av01 },
     { ATOM_avcC,    MP4_ReadBox_avcC,         ATOM_avc1 },
     { ATOM_avcC,    MP4_ReadBox_avcC,         ATOM_avc3 },
+    { ATOM_apvC,    MP4_ReadBox_Binary,       ATOM_apv1 },
     { ATOM_hvcC,    MP4_ReadBox_Binary,       0 },
     { ATOM_vpcC,    MP4_ReadBox_vpcC,         ATOM_vp08 },
     { ATOM_vpcC,    MP4_ReadBox_vpcC,         ATOM_vp09 },


=====================================
modules/demux/mp4/libmp4.h
=====================================
@@ -254,6 +254,8 @@ typedef int64_t stime_t;
 #define ATOM_av1C VLC_FOURCC( 'a', 'v', '1', 'C' )
 #define ATOM_avcC VLC_FOURCC( 'a', 'v', 'c', 'C' )
 #define ATOM_vpcC VLC_FOURCC( 'v', 'p', 'c', 'C' )
+#define ATOM_apv1 VLC_FOURCC( 'a', 'p', 'v', '1' )
+#define ATOM_apvC VLC_FOURCC( 'a', 'p', 'v', 'C' )
 #define ATOM_m4ds VLC_FOURCC( 'm', '4', 'd', 's' )
 
 #define ATOM_fiel VLC_FOURCC( 'f', 'i', 'e', 'l' )


=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -1397,6 +1397,14 @@ static int DemuxTrack( demux_t *p_demux, mp4_track_t 
*tk, uint64_t i_readpos,
 
             p_block->i_length = MP4_GetSamplesDuration( p_demux, tk, 
i_nb_samples );
 
+            if ( tk->fmt.i_codec == VLC_CODEC_APV )
+            {
+                // the APU are preceeded by 4 bytes containing the size of the 
data
+                // this is not used by decoder like libavcodec or openapv.
+                p_block->p_buffer += 4;
+                p_block->i_buffer -= 4;
+            }
+
             MP4_Block_Send( p_demux, tk, p_block );
         }
 


=====================================
modules/video_filter/blend.cpp
=====================================
@@ -597,9 +597,11 @@ static const struct {
 #ifdef WORDS_BIGENDIAN
     YUV(VLC_CODEC_I422_9B,  CPictureI422_16,  convert8To9Bits),
     YUV(VLC_CODEC_I422_10B, CPictureI422_16,  convert8To10Bits),
+    YUV(VLC_CODEC_I422_16B, CPictureI422_16,  convert8To16Bits),
 #else
     YUV(VLC_CODEC_I422_9L,  CPictureI422_16,  convert8To9Bits),
     YUV(VLC_CODEC_I422_10L, CPictureI422_16,  convert8To10Bits),
+    YUV(VLC_CODEC_I422_16L, CPictureI422_16,  convert8To16Bits),
 #endif
 
     YUV(VLC_CODEC_J444,     CPictureI444_8,   convertNone),


=====================================
src/misc/fourcc.c
=====================================
@@ -717,6 +717,8 @@ static const struct
         VLC_CODEC_I420_10B },                  PLANAR_16(3, 2, 2, 10) },
     { { VLC_CODEC_I420_9L,
         VLC_CODEC_I420_9B },                   PLANAR_16(3, 2, 2,  9) },
+    { { VLC_CODEC_I422_16L,
+        VLC_CODEC_I422_16B },                  PLANAR_16(3, 2, 1, 16) },
     { { VLC_CODEC_I422_12L,
         VLC_CODEC_I422_12B },                  PLANAR_16(3, 2, 1, 12) },
     { { VLC_CODEC_I422_10L,


=====================================
src/misc/fourcc_list.h
=====================================
@@ -1165,6 +1165,8 @@ static const staticentry_t p_list_video[] = {
 
     B(VLC_CODEC_PIXLET, "Apple Pixlet" ),
         A("pxlt"),
+
+    B(VLC_CODEC_APV, "Advanced Professional Video (APV)"),
 };
 
 static const staticentry_t p_list_audio[] = {



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/34751538a0ba4ac6e03d8178684918ce92022241...3447caa7377df39d2b15dfcc9dbc9dc4e2b836cf

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/34751538a0ba4ac6e03d8178684918ce92022241...3447caa7377df39d2b15dfcc9dbc9dc4e2b836cf
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to