[vlc-commits] [Git][videolan/vlc][master] 4 commits: fourcc: add VVC

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri May 31 12:40:57 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
18c0e3a4 by François Cartegnie at 2024-05-31T11:41:31+00:00
fourcc: add VVC

- - - - -
2790be79 by François Cartegnie at 2024-05-31T11:41:31+00:00
demux: mp4: map VVC

- - - - -
2932f39b by François Cartegnie at 2024-05-31T11:41:31+00:00
demux: ts: map VVC

- - - - -
b2a8bb1b by François Cartegnie at 2024-05-31T11:41:31+00:00
codec: avcodec: map VVC

- - - - -


9 changed files:

- include/vlc_fourcc.h
- modules/codec/avcodec/fourcc.c
- modules/codec/avcodec/video.c
- modules/demux/mp4/essetup.c
- modules/demux/mp4/libmp4.c
- modules/demux/mp4/libmp4.h
- modules/demux/mpeg/ts_psi.c
- src/input/decoder.c
- src/misc/fourcc_list.h


Changes:

=====================================
include/vlc_fourcc.h
=====================================
@@ -39,6 +39,7 @@
 #define VLC_CODEC_H263P           VLC_FOURCC('I','L','V','R')
 #define VLC_CODEC_FLV1            VLC_FOURCC('F','L','V','1')
 #define VLC_CODEC_H261            VLC_FOURCC('h','2','6','1')
+#define VLC_CODEC_VVC             VLC_FOURCC('h','2','6','6')
 #define VLC_CODEC_MJPG            VLC_FOURCC('M','J','P','G')
 #define VLC_CODEC_MJPGB           VLC_FOURCC('m','j','p','b')
 #define VLC_CODEC_LJPG            VLC_FOURCC('L','J','P','G')


=====================================
modules/codec/avcodec/fourcc.c
=====================================
@@ -286,6 +286,9 @@ static const struct vlc_avcodec_fourcc video_codecs[] =
 
     { VLC_CODEC_DXV, AV_CODEC_ID_DXV },
 
+#if LIBAVCODEC_VERSION_CHECK( 61, 03, 100 )
+    { VLC_CODEC_VVC, AV_CODEC_ID_VVC },
+#endif
     /* ffmpeg only: AV_CODEC_ID_BRENDER_PIX */
     /* ffmpeg only: AV_CODEC_ID_Y41P */
     /* ffmpeg only: AV_CODEC_ID_EXR */


=====================================
modules/codec/avcodec/video.c
=====================================
@@ -481,6 +481,11 @@ static int InitVideoDecCommon( decoder_t *p_dec )
     /* ***** Output always the frames ***** */
     p_context->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT;
 
+#if LIBAVCODEC_VERSION_CHECK( 61, 03, 100 )
+    if( p_dec->fmt_in->i_codec == VLC_CODEC_VVC )
+        p_context->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+#endif
+
     i_val = var_CreateGetInteger( p_dec, "avcodec-skiploopfilter" );
     if( i_val >= 4 ) p_context->skip_loop_filter = AVDISCARD_ALL;
     else if( i_val == 3 ) p_context->skip_loop_filter = AVDISCARD_NONKEY;


=====================================
modules/demux/mp4/essetup.c
=====================================
@@ -623,6 +623,19 @@ int SetupVideoES( demux_t *p_demux, const mp4_track_t *p_track, const MP4_Box_t
             break;
         }
 
+        case VLC_FOURCC( 'v', 'v', 'c', '1' ):
+        {
+            MP4_Box_t *p_vvcC = MP4_BoxGet( p_sample, "vvcC" );
+            if( p_vvcC && p_vvcC->data.p_binary &&
+                p_vvcC->data.p_binary->i_blob > 4 )
+            {
+                CopyExtradata( ((uint8_t *)p_vvcC->data.p_binary->p_blob) + 4,
+                               p_vvcC->data.p_binary->i_blob - 4,
+                               p_fmt );
+            }
+            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
=====================================
@@ -5102,6 +5102,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_vvcC,    MP4_ReadBox_Binary,       ATOM_vvc1 },
     { ATOM_hvcC,    MP4_ReadBox_Binary,       0 },
     { ATOM_jpeC,    MP4_ReadBox_Binary,       0 }, /* heif */
     { ATOM_av1C,    MP4_ReadBox_av1C,         ATOM_ipco }, /* heif */


=====================================
modules/demux/mp4/libmp4.h
=====================================
@@ -275,6 +275,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_vvc1 VLC_FOURCC( 'v', 'v', 'c', '1' )
+#define ATOM_vvcC VLC_FOURCC( 'v', 'v', 'c', 'C' )
 #define ATOM_m4ds VLC_FOURCC( 'm', '4', 'd', 's' )
 
 #define ATOM_fiel VLC_FOURCC( 'f', 'i', 'e', 'l' )


=====================================
modules/demux/mpeg/ts_psi.c
=====================================
@@ -1626,6 +1626,9 @@ static void PIDFillFormat( demux_t *p_demux, ts_stream_t *p_pes,
     //case 0x2E:  /* MPEG-H auxiliary audio */
         es_format_Change( fmt, AUDIO_ES, VLC_CODEC_MPEGH );
         break;
+    case 0x33:  /* VVC */
+        es_format_Change( fmt, VIDEO_ES, VLC_CODEC_VVC );
+        break;
     case 0x42:  /* CAVS (Chinese AVS) */
         es_format_Change( fmt, VIDEO_ES, VLC_CODEC_CAVS );
         break;


=====================================
src/input/decoder.c
=====================================
@@ -639,6 +639,7 @@ static int ModuleThread_UpdateVideoFormat( decoder_t *p_dec, vlc_video_context *
         case VLC_CODEC_HEVC:
         case VLC_CODEC_H264:
         case VLC_CODEC_DIRAC: /* FIXME valid ? */
+        case VLC_CODEC_VVC:
             dpb_size = 18;
             break;
         case VLC_CODEC_AV1:


=====================================
src/misc/fourcc_list.h
=====================================
@@ -226,6 +226,10 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_SVQ3, "SVQ-3 (Sorenson Video v3)"),
         A("SVQ3"),
 
+    /* VVC / H.266 */
+    B(VLC_CODEC_VVC, "MPEG-I Part3/VVC (H.266)"),
+        A("vvc1"),
+
     /* HEVC / H.265 */
     B(VLC_CODEC_HEVC, "MPEG-H Part2/HEVC (H.265)"),
         A("hevc"),



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/941adc9e69ad38b6011212c3085d95f2756c9ad2...b2a8bb1be60315b7d8afa1151cfc6a19890aa977

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/941adc9e69ad38b6011212c3085d95f2756c9ad2...b2a8bb1be60315b7d8afa1151cfc6a19890aa977
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