Projects
Extra
vlc-beta
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 250
View file
vlc-beta.spec
Changed
@@ -186,7 +186,7 @@ %endif BuildRequires: pkgconfig(ncursesw) BuildRequires: pkgconfig(ogg) >= 1.0 -%if 0%{?suse_version} > 1600 +%if 0%{?suse_version} > 1610 %ifarch aarch64 x86_64 BuildRequires: pkgconfig(oapv) %endif
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/NEWS -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/NEWS
Changed
@@ -49,6 +49,7 @@ * Support for DMX audio music (MUS) files Codecs: + * Remove schroedinger support for dirac in favor of avcodec * Support for experimental AV1 video encoding * WebVTT encoder * Remove iomx support for Android
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/bin/preparser/cmdline.c -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/bin/preparser/cmdline.c
Changed
@@ -180,7 +180,7 @@ fprintf(stderr, "Error: Seek pos should be greater than 0\n"); return false; } - args->seek.pos = VLC_THUMBNAILER_SEEK_POS; + args->seek.type = VLC_THUMBNAILER_SEEK_POS; return true; } @@ -487,4 +487,3 @@ return 1; } -
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/bin/preparser/main.c -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/bin/preparser/main.c
Changed
@@ -316,7 +316,7 @@ pp->req_msg.req.arg.seek.type = args->seek.type; if (args->seek.type == VLC_THUMBNAILER_SEEK_TIME) { pp->req_msg.req.arg.seek.time = args->seek.time; - } else if (args->seek.pos == VLC_THUMBNAILER_SEEK_POS) { + } else if (args->seek.type == VLC_THUMBNAILER_SEEK_POS) { pp->req_msg.req.arg.seek.pos = args->seek.pos; } pp->req_msg.req.arg.seek.speed = args->seek.speed; @@ -337,7 +337,7 @@ pp->req_msg.req.arg.seek.type = args->seek.type; if (args->seek.type == VLC_THUMBNAILER_SEEK_TIME) { pp->req_msg.req.arg.seek.time = args->seek.time; - } else if (args->seek.pos == VLC_THUMBNAILER_SEEK_POS) { + } else if (args->seek.type == VLC_THUMBNAILER_SEEK_POS) { pp->req_msg.req.arg.seek.pos = args->seek.pos; } pp->req_msg.req.arg.seek.speed = args->seek.speed;
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/configure.ac -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/configure.ac
Changed
@@ -3012,11 +3012,6 @@ PKG_ENABLE_MODULES_VLC(DAALA, , daaladec daalaenc, experimental daala codec, disabled) dnl -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)
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/ffmpeg/rules.mak -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/contrib/src/ffmpeg/rules.mak
Changed
@@ -145,7 +145,7 @@ FFMPEGCONF += --enable-pic --extra-ldflags="$(EXTRA_CFLAGS) -isysroot $(IOS_SDK)" ifdef HAVE_WATCHOS FFMPEGCONF += --disable-everything -FFMPEGCONF += --enable-decoder='aac,aac_latm,aac_fixed,aadec,ac3,adpcm_*,aiff,alac,alsdec,amrnb,amrwb,ape,atrac1,atrac3,atrac3plus,atrac9,binkaudio_dct,binkaudio_rdft,bmv_audio,cook,dca,derf,dpcm,dts,dvaudio,eaac,eac3,flac,flv,g722,g723,g726,g729,gsm,metasound,mpc7,mpc8,mpegaudiodec_fixed,mp3,m4a,nellymoser,opus,pcm_*,qdmc,qdm2,ra144,ra288,ralf,rka,shorten,tta,tak,truespeech,vorbis,wavpack,wma,wmalossless,wmapro,wmavoice' +FFMPEGCONF += --enable-decoder='aac,aac_latm,aac_fixed,aadec,ac3,adpcm_*,aiff,alac,alsdec,amrnb,amrwb,ape,atrac1,atrac3,atrac3plus,atrac9,binkaudio_dct,binkaudio_rdft,bmv_audio,cook,dca,derf,dirac,dpcm,dts,dvaudio,eaac,eac3,flac,flv,g722,g723,g726,g729,gsm,metasound,mpc7,mpc8,mpegaudiodec_fixed,mp3,m4a,nellymoser,opus,pcm_*,qdmc,qdm2,ra144,ra288,ralf,rka,shorten,tta,tak,truespeech,vorbis,wavpack,wma,wmalossless,wmapro,wmavoice' FFMPEGCONF += --enable-parser='aac,aac_latm,ac3,adpcm,amr,aac_latm,ape,cook,dca,dvaudio,flac,g723,g729,gsm,mlp,mpegaudio,opus,sipr,vorbis,xma' FFMPEGCONF += --enable-demuxer='aac,ac3,adts,aiff,ape,asf,au,avi,caf,daud,dirac,dts,dv,ea,flac,flv,gsm,ivf,matroska,mmf,mov,mp3,mpeg,ogg,pcm,rm,sbc,sdp,shorten,voc,w64,wav,wv' FFMPEGCONF += --enable-swresample
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/x265/0001-CMake-verify-the-Neon-SVE-compiler-flags-can-be-used.patch -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/contrib/src/x265/0001-CMake-verify-the-Neon-SVE-compiler-flags-can-be-used.patch
Changed
@@ -1,22 +1,21 @@ -From 5001bc0a608277eba834541e1fef872bce5ef1f2 Mon Sep 17 00:00:00 2001 +From 6948a010ef1110584498549789bceccd01a89de3 Mon Sep 17 00:00:00 2001 From: Steve Lhomme <robux4@ycbcr.xyz> Date: Thu, 15 Jan 2026 16:12:02 +0100 Subject: PATCH 1/2 CMake: verify the Neon/SVE compiler flags can be used Otherwise we can't compile the matching files. --- - source/CMakeLists.txt | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) + source/CMakeLists.txt | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index b83955e9c..a14a7277d 100755 +index b83955e9c..41118fc49 100755 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt -@@ -289,12 +289,20 @@ if(GCC) +@@ -289,12 +289,19 @@ if(GCC) message(STATUS "Configuring build for run-time CPU feature detection") endif() -+ include(CheckCCompilerFlag) + include(CMakePushCheckState) if(AARCH64_RUNTIME_CPU_DETECT OR CROSS_COMPILE_ARM64) + cmake_push_check_state(RESET) @@ -26,13 +25,13 @@ - set(CPU_HAS_NEON_I8MM 1) - set(CPU_HAS_SVE 1) - set(CPU_HAS_SVE2 1) -+ check_c_compiler_flag(${AARCH64_NEON_DOTPROD_FLAG} CPU_HAS_NEON_DOTPROD) ++ check_cxx_compiler_flag(${AARCH64_NEON_DOTPROD_FLAG} CPU_HAS_NEON_DOTPROD) + cmake_pop_check_state() -+ check_c_compiler_flag(${AARCH64_NEON_I8MM_FLAG} CPU_HAS_NEON_I8MM) ++ check_cxx_compiler_flag(${AARCH64_NEON_I8MM_FLAG} CPU_HAS_NEON_I8MM) + cmake_pop_check_state() -+ check_c_compiler_flag(${AARCH64_SVE_FLAG} CPU_HAS_SVE) ++ check_cxx_compiler_flag(${AARCH64_SVE_FLAG} CPU_HAS_SVE) + cmake_pop_check_state() -+ check_c_compiler_flag(${AARCH64_SVE2_FLAG} CPU_HAS_SVE2) ++ check_cxx_compiler_flag(${AARCH64_SVE2_FLAG} CPU_HAS_SVE2) + cmake_pop_check_state() else() if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin")
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/extras/package/apple/build.conf -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/extras/package/apple/build.conf
Changed
@@ -49,8 +49,6 @@ --disable-samplerate --disable-goom --disable-vncserver - --disable-orc - --disable-schroedinger --disable-chromaprint --disable-mad --enable-fribidi
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/extras/package/raspberry/configure.sh -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/extras/package/raspberry/configure.sh
Changed
@@ -8,7 +8,6 @@ --enable-theora --enable-avcodec --enable-merge-ffmpeg --enable-libass - --enable-schroedinger --enable-live555 --enable-dvdread --enable-shout
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/extras/package/wasm-emscripten/build.sh -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/extras/package/wasm-emscripten/build.sh
Changed
@@ -140,8 +140,8 @@ --disable-asdcplib --disable-caca --disable-gettext \ --disable-goom \ --disable-lua --disable-luac --disable-sqlite \ - --disable-medialibrary --disable-mpcdec --disable-schroedinger \ - --disable-orc --disable-protobuf --disable-sidplay2 \ + --disable-medialibrary --disable-mpcdec \ + --disable-protobuf --disable-sidplay2 \ --disable-spatialaudio --disable-speex \ --disable-speexdsp --disable-taglib --disable-zvbi \ --disable-rnnoise --disable-libaribcaption \
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/extras/package/win32/build.sh -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/extras/package/win32/build.sh
Changed
@@ -468,7 +468,7 @@ # configuration matching configure.sh (goom is called goom2, theora is theoradec+theoraenc) MCONFIGFLAGS="-Dlua=enabled -Dflac=enabled -Dtheoradec=enabled -Dtheoraenc=enabled \ -Davcodec=enabled -Dmerge-ffmpeg=true \ - -Dlibass=enabled -Dschroedinger=enabled -Dshout=enabled -Dgoom2=enabled \ + -Dlibass=enabled -Dshout=enabled -Dgoom2=enabled \ -Dsse=enabled -Dzvbi=enabled -Dtelx=disabled $MCONFIGFLAGS" MCONFIGFLAGS="$MCONFIGFLAGS --prefer-static"
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/extras/package/win32/configure.sh -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/extras/package/win32/configure.sh
Changed
@@ -6,7 +6,6 @@ --enable-theora --enable-avcodec --enable-merge-ffmpeg --enable-libass - --enable-schroedinger --enable-shout --enable-goom --enable-sse
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/meson_options.txt -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/meson_options.txt
Changed
@@ -244,11 +244,6 @@ value : 'auto', description : 'Enable/disable libmpg123 support') -option('schroedinger', - type : 'feature', - value : 'auto', - description : 'Enable/disable schroedinger support') - option('openapv', type : 'feature', value : 'auto',
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/codec/Makefile.am -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/codec/Makefile.am
Changed
@@ -95,14 +95,6 @@ codec_LTLIBRARIES += librtpvideo_plugin.la endif - -libschroedinger_plugin_la_SOURCES = codec/schroedinger.c -libschroedinger_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_schroedinger) -libschroedinger_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' -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)'
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/codec/meson.build -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/codec/meson.build
Changed
@@ -157,18 +157,6 @@ 'sources' : files('rtpvideo.c') } -# Dirac decoder and encoder using schroedinger -schroedinger_dep = dependency('schroedinger-1.0', - version: '>= 1.0.10', - required: get_option('schroedinger')) -vlc_modules += { - 'name' : 'schroedinger', - 'sources' : files('schroedinger.c'), - 'dependencies' : schroedinger_dep, - 'enabled' : schroedinger_dep.found(), -} - -# Dirac decoder and encoder using schroedinger openapv_dep = dependency('oapv', version: '>= 0.2', required: get_option('openapv'))
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m
Changed
@@ -97,7 +97,6 @@ @"mp4;1;1;0;h264;0;0;0;0;0;mpga;128;2;44100;0;1", @"webm;1;1;0;VP80;2000;0;0;0;0;vorb;128;2;44100;0;1", @"ts;1;1;0;h264;800;1;0;0;0;mpga;128;2;44100;0;0", - @"ts;1;1;0;drac;800;1;0;0;0;mpga;128;2;44100;0;0", @"ogg;1;1;0;theo;800;1;0;0;0;vorb;128;2;44100;0;0", @"ogg;1;1;0;theo;800;1;0;0;0;flac;128;2;44100;0;0", @"ts;1;1;0;mp2v;800;1;0;0;0;mpga;128;2;44100;0;0", @@ -113,7 +112,6 @@ @"Video - H.264 + MP3 (MP4)", @"Video - VP80 + Vorbis (Webm)", @"Video - H.264 + MP3 (TS)", - @"Video - Dirac + MP3 (TS)", @"Video - Theora + Vorbis (OGG)", @"Video - Theora + Flac (OGG)", @"Video - MPEG-2 + MPGA (TS)",
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/Makefile.am -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/qt/Makefile.am
Changed
@@ -1071,7 +1071,6 @@ network/qml/DiscoverDisplay.qml \ network/qml/DiscoverUrlDisplay.qml \ network/qml/NetworkAddressbar.qml \ - network/qml/NetworkCustomCover.qml \ network/qml/NetworkGridItem.qml \ network/qml/NetworkThumbnailItem.qml \ network/qml/ServicesHomeDisplay.qml \
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/menus/custom_menus.cpp -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/qt/menus/custom_menus.cpp
Changed
@@ -414,8 +414,7 @@ BookmarkMenu::BookmarkMenu(MediaLib * mediaLib, vlc_player_t * player, QWidget * parent) : QMenu(parent) { - // FIXME: Do we really need a translation call for the string shortcut ? - addAction(qtr("&Manage"), THEDP, &DialogsProvider::bookmarksDialog )->setShortcut(qtr("Ctrl+B")); + addAction(qtr("&Manage"), THEDP, &DialogsProvider::bookmarksDialog )->setShortcut(QKeySequence("Ctrl+B")); addSeparator();
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/menus/menus.cpp -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/qt/menus/menus.cpp
Changed
@@ -675,7 +675,7 @@ #endif action = menu->addAction( qfut( I_MENU_GOTOTIME ), THEDP, &DialogsProvider::gotoTimeDialog ); - action->setShortcut( qtr( "Ctrl+T" ) ); + action->setShortcut( QKeySequence( "Ctrl+T" ) ); menu->addSeparator(); }
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/menus/qml_menu_wrapper.cpp -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/qt/menus/qml_menu_wrapper.cpp
Changed
@@ -604,9 +604,7 @@ // Bookmarks if (m_ctx->hasMediaLibrary()) { - // FIXME: Do we really need a translation call for the string shortcut ? - m_menu->addAction(qtr("&Manage"), THEDP, &DialogsProvider::bookmarksDialog )->setShortcut( qtr("Ctrl+B")); - + m_menu->addAction(qtr("&Manage"), THEDP, &DialogsProvider::bookmarksDialog )->setShortcut(QKeySequence("Ctrl+B")); m_menu->addSeparator(); MLBookmarkModel * bookmarks = new MLBookmarkModel(m_menu.get());
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/meson.build -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/qt/meson.build
Changed
@@ -668,7 +668,6 @@ 'network/qml/DiscoverDisplay.qml', 'network/qml/DiscoverUrlDisplay.qml', 'network/qml/NetworkAddressbar.qml', - 'network/qml/NetworkCustomCover.qml', 'network/qml/NetworkGridItem.qml', 'network/qml/NetworkThumbnailItem.qml', 'network/qml/ServicesHomeDisplay.qml',
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/network/qml/NetworkThumbnailItem.qml -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
Changed
@@ -35,8 +35,6 @@ && (rowModel.type !== NetworkMediaModel.TYPE_NODE) && (rowModel.type !== NetworkMediaModel.TYPE_DIRECTORY) - readonly property bool _showCustomCover: (!artworkSource) || (artwork.status !== Image.Ready) - signal playClicked(int index) // Functions @@ -72,48 +70,51 @@ anchors.fill: parent spacing: VLCStyle.margin_normal - Item { - id: itemCover + Widgets.MediaCover { + id: cover anchors.verticalCenter: parent.verticalCenter - width: artwork.width - height: artwork.height + width: VLCStyle.listAlbumCover_width + height: VLCStyle.listAlbumCover_height + + pictureWidth: 0 // preserve aspect ratio + pictureHeight: height - //FIXME: implement fillMode in RoundImage and use MediaCover here instead - //or directly TableCollumns.titleHeaderDelegate in place of NetworkThumbnailItem - NetworkCustomCover { - id: artwork + fillMode: Image.PreserveAspectFit - width: VLCStyle.listAlbumCover_width - height: VLCStyle.listAlbumCover_height + source: { + if (root.rowModel?.artwork && root.rowModel.artwork.length > 0) + return VLCAccessImage.uri(root.rowModel.artwork) - // artworks can have anysize, we try to fit it using PreserveAspectFit - // in the provided size and place it in the center of itemCover - fillMode: Image.PreserveAspectFit - horizontalAlignment: Image.AlignHCenter - verticalAlignment: Image.AlignVCenter + return "" + } - networkModel: root.rowModel + fallbackImageSource: { + if (!root.rowModel) + return "" - bgColor: root.colorContext.bg.secondary - color1: root.colorContext.fg.primary - accent: root.colorContext.accent + let img = SVGColorImage.colorize(root.rowModel.artworkFallback) + .color1(root.colorContext.fg.primary) + .accent(root.colorContext.accent) - Widgets.DefaultShadow { + if (GraphicsInfo.shaderType !== GraphicsInfo.RhiShader) + img = img.background(cover.color) - } + return img.uri() + } + + color: root.colorContext.bg.secondary - Widgets.PlayCover { - x: Math.round((artwork.width - width) / 2) - y: Math.round((artwork.height - height) / 2) + playCoverVisible: root._showPlayCover + playIconSize: VLCStyle.play_cover_small - width: VLCStyle.play_cover_small + onPlayIconClicked: () => { + root.playClicked(root.index) + } - visible: root._showPlayCover + Widgets.DefaultShadow { - onTapped: playClicked(root.index) - } } }
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/stream_out/record.c -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/modules/stream_out/record.c
Changed
@@ -284,7 +284,7 @@ //M( "avformat{mux=flac}", "flac", 1, VLC_CODEC_FLAC ), BROKEN M( "ogg", "ogg", INT_MAX, VLC_CODEC_VORBIS, VLC_CODEC_SPEEX, VLC_CODEC_FLAC, - VLC_CODEC_SUBT, VLC_CODEC_THEORA, VLC_CODEC_DIRAC, + VLC_CODEC_SUBT, VLC_CODEC_THEORA, VLC_CODEC_OPUS ), M( "asf", "asf", 127, VLC_CODEC_WMA1, VLC_CODEC_WMA2, VLC_CODEC_WMAP, VLC_CODEC_WMAL, VLC_CODEC_WMAS,
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/po/POTFILES.in -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/po/POTFILES.in
Changed
@@ -313,7 +313,6 @@ modules/codec/qsv.c modules/codec/rawvideo.c modules/codec/rtpvideo.c -modules/codec/schroedinger.c modules/codec/scte18.c modules/codec/scte18.h modules/codec/scte27.c
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/po/vlc.pot -> _service:obs_scm:vlc-beta-20260129.65e744b03.obscpio/po/vlc.pot
Changed
@@ -10067,7 +10067,6 @@ #: modules/codec/avcodec/avcodec.c:147 modules/codec/jpeg.c:119 #: modules/codec/omxil/omxil.c:171 modules/codec/png.c:99 -#: modules/codec/schroedinger.c:370 msgid "Encoding" msgstr "" @@ -10540,11 +10539,11 @@ msgid "Daala video encoder" msgstr "" -#: modules/codec/daala.c:143 modules/codec/schroedinger.c:54 +#: modules/codec/daala.c:143 msgid "Chroma format" msgstr "" -#: modules/codec/daala.c:144 modules/codec/schroedinger.c:55 +#: modules/codec/daala.c:144 msgid "" "Picking chroma format will force a conversion of the video into that format" msgstr "" @@ -11343,377 +11342,6 @@ msgid "Raw video encoder for RTP" msgstr "" -#: modules/codec/schroedinger.c:60 -msgid "4:2:0" -msgstr "" - -#: modules/codec/schroedinger.c:60 -msgid "4:2:2" -msgstr "" - -#: modules/codec/schroedinger.c:60 -msgid "4:4:4" -msgstr "" - -#: modules/codec/schroedinger.c:63 -msgid "Rate control method" -msgstr "" - -#: modules/codec/schroedinger.c:64 -msgid "Method used to encode the video sequence" -msgstr "" - -#: modules/codec/schroedinger.c:77 -msgid "Constant noise threshold mode" -msgstr "" - -#: modules/codec/schroedinger.c:78 -msgid "Constant bitrate mode (CBR)" -msgstr "" - -#: modules/codec/schroedinger.c:79 -msgid "Low Delay mode" -msgstr "" - -#: modules/codec/schroedinger.c:80 -msgid "Lossless mode" -msgstr "" - -#: modules/codec/schroedinger.c:81 -msgid "Constant lambda mode" -msgstr "" - -#: modules/codec/schroedinger.c:82 -msgid "Constant error mode" -msgstr "" - -#: modules/codec/schroedinger.c:83 -msgid "Constant quality mode" -msgstr "" - -#: modules/codec/schroedinger.c:87 -msgid "GOP structure" -msgstr "" - -#: modules/codec/schroedinger.c:88 -msgid "GOP structure used to encode the video sequence" -msgstr "" - -#: modules/codec/schroedinger.c:100 -msgid "" -"No fixed gop structure. A picture can be intra or inter and refer to " -"previous or future pictures." -msgstr "" - -#: modules/codec/schroedinger.c:101 -msgid "I-frame only sequence" -msgstr "" - -#: modules/codec/schroedinger.c:102 modules/codec/schroedinger.c:103 -msgid "Inter pictures refere to previous pictures only" -msgstr "" - -#: modules/codec/schroedinger.c:104 modules/codec/schroedinger.c:105 -msgid "Inter pictures can refer to previous or future pictures" -msgstr "" - -#: modules/codec/schroedinger.c:109 -msgid "Constant quality factor" -msgstr "" - -#: modules/codec/schroedinger.c:110 -msgid "Quality factor to use in constant quality mode" -msgstr "" - -#: modules/codec/schroedinger.c:113 -msgid "Noise Threshold" -msgstr "" - -#: modules/codec/schroedinger.c:114 -msgid "Noise threshold to use in constant noise threshold mode" -msgstr "" - -#: modules/codec/schroedinger.c:117 -msgid "CBR bitrate (kbps)" -msgstr "" - -#: modules/codec/schroedinger.c:118 -msgid "Target bitrate in kbps when encoding in constant bitrate mode" -msgstr "" - -#: modules/codec/schroedinger.c:121 -msgid "Maximum bitrate (kbps)" -msgstr "" - -#: modules/codec/schroedinger.c:122 -msgid "Maximum bitrate in kbps when encoding in constant bitrate mode" -msgstr "" - -#: modules/codec/schroedinger.c:125 -msgid "Minimum bitrate (kbps)" -msgstr "" - -#: modules/codec/schroedinger.c:126 -msgid "Minimum bitrate in kbps when encoding in constant bitrate mode" -msgstr "" - -#: modules/codec/schroedinger.c:129 -msgid "GOP length" -msgstr "" - -#: modules/codec/schroedinger.c:130 -msgid "" -"Number of pictures between successive sequence headers i.e. length of the " -"group of pictures" -msgstr "" - -#: modules/codec/schroedinger.c:134 -msgid "Prefilter" -msgstr "" - -#: modules/codec/schroedinger.c:135 -msgid "Enable adaptive prefiltering" -msgstr "" - -#: modules/codec/schroedinger.c:147 -msgid "No pre-filtering" -msgstr "" - -#: modules/codec/schroedinger.c:148 -msgid "Centre Weighted Median" -msgstr "" - -#: modules/codec/schroedinger.c:149 -msgid "Gaussian Low Pass Filter" -msgstr "" - -#: modules/codec/schroedinger.c:150 -msgid "Add Noise" -msgstr "" - -#: modules/codec/schroedinger.c:151 -msgid "Gaussian Adaptive Low Pass Filter" -msgstr "" - -#: modules/codec/schroedinger.c:152 -msgid "Low Pass Filter" -msgstr "" - -#: modules/codec/schroedinger.c:156 -msgid "Amount of prefiltering" -msgstr "" - -#: modules/codec/schroedinger.c:157 -msgid "Higher value implies more prefiltering" -msgstr "" - -#: modules/codec/schroedinger.c:160 -msgid "Picture coding mode" -msgstr "" - -#: modules/codec/schroedinger.c:161 -msgid "" -"Field coding is where interlaced fields are coded separately as opposed to a " -"pseudo-progressive frame" -msgstr "" - -#: modules/codec/schroedinger.c:166 -msgid "auto - let encoder decide based upon input (Best)" -msgstr "" - -#: modules/codec/schroedinger.c:167 -msgid "force coding frame as single picture" -msgstr "" - -#: modules/codec/schroedinger.c:168 -msgid "force coding frame as separate interlaced fields" -msgstr "" - -#: modules/codec/schroedinger.c:173 -msgid "Size of motion compensation blocks" -msgstr "" - -#: modules/codec/schroedinger.c:182 modules/codec/schroedinger.c:199 -#: modules/codec/schroedinger.c:297 modules/codec/schroedinger.c:338 -msgid "automatic - let encoder decide based upon input (Best)" -msgstr "" - -#: modules/codec/schroedinger.c:183 -msgid "small - use small motion compensation blocks" -msgstr "" - -#: modules/codec/schroedinger.c:184 -msgid "medium - use medium motion compensation blocks" -msgstr "" - -#: modules/codec/schroedinger.c:185 -msgid "large - use large motion compensation blocks" -msgstr "" - -#: modules/codec/schroedinger.c:190 -msgid "Overlap of motion compensation blocks" -msgstr "" - -#: modules/codec/schroedinger.c:200 -msgid "none - Motion compensation blocks do not overlap" -msgstr "" - -#: modules/codec/schroedinger.c:201 -msgid "partial - Motion compensation blocks only partially overlap" -msgstr "" - -#: modules/codec/schroedinger.c:202 -msgid "full - Motion compensation blocks fully overlap" -msgstr "" - -#: modules/codec/schroedinger.c:207 -msgid "Motion Vector precision" -msgstr "" - -#: modules/codec/schroedinger.c:208 -msgid "Motion Vector precision in pels" -msgstr "" - -#: modules/codec/schroedinger.c:214 -msgid "Three component motion estimation" -msgstr "" - -#: modules/codec/schroedinger.c:215 -msgid "Use chroma as part of the motion estimation process" -msgstr "" - -#: modules/codec/schroedinger.c:218 -msgid "Intra picture DWT filter" -msgstr "" - -#: modules/codec/schroedinger.c:221 -msgid "Inter picture DWT filter" -msgstr "" - -#: modules/codec/schroedinger.c:244 -msgid "Number of DWT iterations" -msgstr "" - -#: modules/codec/schroedinger.c:245 -msgid "Also known as DWT levels" -msgstr "" - -#: modules/codec/schroedinger.c:250 -msgid "Enable multiple quantizers" -msgstr "" - -#: modules/codec/schroedinger.c:251 -msgid "Enable multiple quantizers per subband (one per codeblock)" -msgstr "" - -#: modules/codec/schroedinger.c:255 -msgid "Disable arithmetic coding" -msgstr "" - -#: modules/codec/schroedinger.c:256 -msgid "Use variable length codes instead, useful for very high bitrates" -msgstr "" - -#: modules/codec/schroedinger.c:261 -msgid "perceptual weighting method" -msgstr "" - -#: modules/codec/schroedinger.c:272 -msgid "perceptual distance" -msgstr "" - -#: modules/codec/schroedinger.c:273 -msgid "perceptual distance to calculate perceptual weight" -msgstr "" - -#: modules/codec/schroedinger.c:277 -msgid "Horizontal slices per frame" -msgstr "" - -#: modules/codec/schroedinger.c:278 -msgid "Number of horizontal slices per frame in low delay mode" -msgstr "" - -#: modules/codec/schroedinger.c:282 -msgid "Vertical slices per frame" -msgstr "" - -#: modules/codec/schroedinger.c:283 -msgid "Number of vertical slices per frame in low delay mode" -msgstr "" - -#: modules/codec/schroedinger.c:287 -msgid "Size of code blocks in each subband" -msgstr "" - -#: modules/codec/schroedinger.c:298 -msgid "small - use small code blocks" -msgstr "" - -#: modules/codec/schroedinger.c:299 -msgid "medium - use medium sized code blocks" -msgstr "" - -#: modules/codec/schroedinger.c:300 -msgid "large - use large code blocks" -msgstr "" - -#: modules/codec/schroedinger.c:301 -msgid "full - One code block per subband" -msgstr "" - -#: modules/codec/schroedinger.c:306 -msgid "Enable hierarchical Motion Estimation" -msgstr "" - -#: modules/codec/schroedinger.c:310 -msgid "Number of levels of downsampling" -msgstr "" - -#: modules/codec/schroedinger.c:311 -msgid "Number of levels of downsampling in hierarchical motion estimation mode" -msgstr "" - -#: modules/codec/schroedinger.c:315 -msgid "Enable Global Motion Estimation" -msgstr "" - -#: modules/codec/schroedinger.c:319 -msgid "Enable Phase Correlation Estimation" -msgstr "" - -#: modules/codec/schroedinger.c:323 -msgid "Enable Scene Change Detection" -msgstr "" - -#: modules/codec/schroedinger.c:327 -msgid "Force Profile" -msgstr "" - -#: modules/codec/schroedinger.c:339 -msgid "VC2 Low Delay Profile" -msgstr "" - -#: modules/codec/schroedinger.c:340 -msgid "VC2 Simple Profile" -msgstr "" - -#: modules/codec/schroedinger.c:341 -msgid "VC2 Main Profile" -msgstr "" - -#: modules/codec/schroedinger.c:342 -msgid "Main Profile" -msgstr "" - -#: modules/codec/schroedinger.c:363 -msgid "Dirac video decoder using libschroedinger" -msgstr "" - -#: modules/codec/schroedinger.c:371 -msgid "Dirac video encoder using libschroedinger" -msgstr "" - #: modules/codec/scte18.c:41 msgid "SCTE-18 decoder" msgstr "" @@ -14190,14 +13818,6 @@ msgid "File dumper" msgstr "" -#: modules/demux/dirac.c:41 -msgid "Value to adjust dts by" -msgstr "" - -#: modules/demux/dirac.c:54 -msgid "Dirac video demuxer" -msgstr "" - #: modules/demux/directory.c:94 msgid "Directory import" msgstr "" @@ -22273,10 +21893,6 @@ msgid "Copy packetizer" msgstr "" -#: modules/packetizer/dirac.c:87 -msgid "Dirac packetizer" -msgstr "" - #: modules/packetizer/dts.c:47 msgid "DTS audio packetizer" msgstr ""
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/orc
Deleted
-(directory)
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/orc/SHA512SUMS
Deleted
@@ -1,1 +0,0 @@ -ba832f9ded503162931c6934b2c93727d2795f31d7de4871607ce44d70ccb5a5f1452b486fda3d33722b4ca0f137809b3c3a3e561bbaae64f94c9021e52cf2c8 orc-0.4.40.tar.bz2
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/orc/rules.mak
Deleted
@@ -1,25 +0,0 @@ -# orc - -ORC_VERSION := 0.4.40 -ORC_URL := https://gitlab.freedesktop.org/gstreamer/orc/-/archive/$(ORC_VERSION)/orc-$(ORC_VERSION).tar.bz2 - -ifeq ($(call need_pkg,"orc-0.4"),) -PKGS_FOUND += orc -endif - -$(TARBALLS)/orc-$(ORC_VERSION).tar.bz2: - $(call download_pkg,$(ORC_URL),orc) - -.sum-orc: orc-$(ORC_VERSION).tar.bz2 - -orc: orc-$(ORC_VERSION).tar.bz2 .sum-orc - $(UNPACK) - $(MOVE) - -ORC_CONF := -Dauto_features=disabled - -.orc: orc crossfile.meson - $(MESONCLEAN) - $(MESON) $(ORC_CONF) - +$(MESONBUILD) - touch $@
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/schroedinger
Deleted
-(directory)
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/schroedinger/SHA512SUMS
Deleted
@@ -1,1 +0,0 @@ -a39dd5360eb87a63379de71d91f48cde309ded91632c0ab8b1dc76b73591f7d0dfa7003c606d1b546d495b18c916aae905a9540b48dff7cbeb5b289e0f880438 schroedinger-1.0.11.tar.gz
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/schroedinger/rules.mak
Deleted
@@ -1,35 +0,0 @@ -# schroedinger - -SCHROEDINGER_VERSION := 1.0.11 -SCHROEDINGER_URL := $(CONTRIB_VIDEOLAN)/schroedinger/schroedinger-$(SCHROEDINGER_VERSION).tar.gz - -PKGS += schroedinger -ifeq ($(call need_pkg,"schroedinger-1.0"),) -PKGS_FOUND += schroedinger -endif - -$(TARBALLS)/schroedinger-$(SCHROEDINGER_VERSION).tar.gz: - $(call download,$(SCHROEDINGER_URL),schroedinger) - -.sum-schroedinger: schroedinger-$(SCHROEDINGER_VERSION).tar.gz - -schroedinger: schroedinger-$(SCHROEDINGER_VERSION).tar.gz .sum-schroedinger - $(UNPACK) - # $(call update_autoconfig,.) - $(APPLY) $(SRC)/schroedinger/schroedinger-notests.patch - # disable orc compilation, the old compiler matches what was used to precompile - $(APPLY) $(SRC)/schroedinger/schroedinger-disable-orcc.patch - $(call pkg_static,"schroedinger.pc.in") - $(MOVE) - -DEPS_schroedinger = orc $(DEPS_orc) - -SCHRODINGER_CONF := --with-thread=none --disable-gtk-doc - -.schroedinger: schroedinger - $(RECONF) - $(MAKEBUILDDIR) - $(MAKECONFIGURE) $(SCHRODINGER_CONF) - +$(MAKEBUILD) - +$(MAKEBUILD) install - touch $@
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/schroedinger/schroedinger-disable-orcc.patch
Deleted
@@ -1,11 +0,0 @@ ---- schroedinger/configure.ac.orig 2024-05-24 11:11:32.059775800 +0200 -+++ schroedinger/configure.ac 2024-05-24 11:11:46.999404400 +0200 -@@ -56,7 +56,7 @@ fi - SCHRO_PKG_DEPS="$SCHRO_PKG_DEPS orc-0.4 >= $ORC_VER" - ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` - AC_SUBST(ORCC) --AM_CONDITIONAL(HAVE_ORCC, test "x$cross_compiling" != xyes) -+AM_CONDITIONAL(HAVE_ORCC, test "x$cross_compiling" = none) - - AC_ARG_WITH(thread, - AS_HELP_STRING(--with-thread=IMPL,use threading library {auto,pthread,gthread,win32,none} default=auto),
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/contrib/src/schroedinger/schroedinger-notests.patch
Deleted
@@ -1,21 +0,0 @@ ---- schroedinger/Makefile.am 2009-09-29 07:08:51.000000000 +0200 -+++ schroedinger.new/Makefile.am 2010-01-09 02:18:41.000000000 +0100 -@@ -1,6 +1,6 @@ - AUTOMAKE_OPTIONS = foreign - --SUBDIRS = schroedinger doc tools testsuite -+SUBDIRS = schroedinger doc tools - - DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc - ---- schroedinger/tools/Makefile.am 2010-01-04 03:52:01.000000000 +0100 -+++ schroedinger.new/tools/Makefile.am 2010-05-08 20:50:30.000000000 +0200 -@@ -5,7 +5,7 @@ - - - AM_CFLAGS = $(SCHRO_CFLAGS) $(ERROR_CFLAGS) \ -- $(ORC_CFLAGS) \ -+ -L$(prefix)/lib $(ORC_CFLAGS) \ - -DSCHRO_ENABLE_UNSTABLE_API - LDADD = $(SCHRO_LIBS) -
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/codec/schroedinger.c
Deleted
@@ -1,1612 +0,0 @@ -/***************************************************************************** - * schroedinger.c: Dirac decoder module making use of libschroedinger. - * (http://www.bbc.co.uk/rd/projects/dirac/index.shtml) - * (http://diracvideo.org) - ***************************************************************************** - * Copyright (C) 2008-2011 VLC authors and VideoLAN - * - * Authors: Jonathan Rosser <jonathan.rosser@gmail.com> - * David Flynn <davidf at rd dot bbc.co.uk> - * Anuradha Suraparaju <asuraparaju at gmail dot com> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ - -/***************************************************************************** - * Preamble - *****************************************************************************/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include <assert.h> - -#include <vlc_common.h> -#include <vlc_configuration.h> -#include <vlc_plugin.h> -#include <vlc_codec.h> -#include <vlc_timestamp_helper.h> - -#include <schroedinger/schro.h> - -/***************************************************************************** - * Module descriptor - *****************************************************************************/ -static int OpenDecoder ( vlc_object_t * ); -static void CloseDecoder ( vlc_object_t * ); -#ifdef ENABLE_SOUT -static int OpenEncoder ( vlc_object_t * ); -static void CloseEncoder ( encoder_t * ); - -#define ENC_CFG_PREFIX "sout-schro-" - -#define ENC_CHROMAFMT "chroma-fmt" -#define ENC_CHROMAFMT_TEXT N_("Chroma format") -#define ENC_CHROMAFMT_LONGTEXT N_("Picking chroma format will force a " \ - "conversion of the video into that format") -static const char *const enc_chromafmt_list = - { "420", "422", "444" }; -static const char *const enc_chromafmt_list_text = - { N_("4:2:0"), N_("4:2:2"), N_("4:4:4") }; - -#define ENC_RATE_CONTROL "rate-control" -#define ENC_RATE_CONTROL_TEXT N_("Rate control method") -#define ENC_RATE_CONTROL_LONGTEXT N_("Method used to encode the video sequence") - -static const char *enc_rate_control_list = { - "constant_noise_threshold", - "constant_bitrate", - "low_delay", - "lossless", - "constant_lambda", - "constant_error", - "constant_quality" -}; - -static const char *enc_rate_control_list_text = { - N_("Constant noise threshold mode"), - N_("Constant bitrate mode (CBR)"), - N_("Low Delay mode"), - N_("Lossless mode"), - N_("Constant lambda mode"), - N_("Constant error mode"), - N_("Constant quality mode") -}; - -#define ENC_GOP_STRUCTURE "gop-structure" -#define ENC_GOP_STRUCTURE_TEXT N_("GOP structure") -#define ENC_GOP_STRUCTURE_LONGTEXT N_("GOP structure used to encode the video sequence") - -static const char *enc_gop_structure_list = { - "adaptive", - "intra_only", - "backref", - "chained_backref", - "biref", - "chained_biref" -}; - -static const char *enc_gop_structure_list_text = { - N_("No fixed gop structure. A picture can be intra or inter and refer to previous or future pictures."), - N_("I-frame only sequence"), - N_("Inter pictures refer to previous pictures only"), - N_("Inter pictures refer to previous pictures only"), - N_("Inter pictures can refer to previous or future pictures"), - N_("Inter pictures can refer to previous or future pictures") -}; - -#define ENC_QUALITY "quality" -#define ENC_QUALITY_TEXT N_("Constant quality factor") -#define ENC_QUALITY_LONGTEXT N_("Quality factor to use in constant quality mode") - -#define ENC_NOISE_THRESHOLD "noise-threshold" -#define ENC_NOISE_THRESHOLD_TEXT N_("Noise Threshold") -#define ENC_NOISE_THRESHOLD_LONGTEXT N_("Noise threshold to use in constant noise threshold mode") - -#define ENC_BITRATE "bitrate" -#define ENC_BITRATE_TEXT N_("CBR bitrate (kbps)") -#define ENC_BITRATE_LONGTEXT N_("Target bitrate in kbps when encoding in constant bitrate mode") - -#define ENC_MAX_BITRATE "max-bitrate" -#define ENC_MAX_BITRATE_TEXT N_("Maximum bitrate (kbps)") -#define ENC_MAX_BITRATE_LONGTEXT N_("Maximum bitrate in kbps when encoding in constant bitrate mode") - -#define ENC_MIN_BITRATE "min-bitrate" -#define ENC_MIN_BITRATE_TEXT N_("Minimum bitrate (kbps)") -#define ENC_MIN_BITRATE_LONGTEXT N_("Minimum bitrate in kbps when encoding in constant bitrate mode") - -#define ENC_AU_DISTANCE "gop-length" -#define ENC_AU_DISTANCE_TEXT N_("GOP length") -#define ENC_AU_DISTANCE_LONGTEXT N_("Number of pictures between successive sequence headers i.e. length of the group of pictures") - - -#define ENC_PREFILTER "filtering" -#define ENC_PREFILTER_TEXT N_("Prefilter") -#define ENC_PREFILTER_LONGTEXT N_("Enable adaptive prefiltering") - -static const char *enc_filtering_list = { - "none", - "center_weighted_median", - "gaussian", - "add_noise", - "adaptive_gaussian", - "lowpass" -}; - -static const char *enc_filtering_list_text = { - N_("No pre-filtering"), - N_("Centre Weighted Median"), - N_("Gaussian Low Pass Filter"), - N_("Add Noise"), - N_("Gaussian Adaptive Low Pass Filter"), - N_("Low Pass Filter"), -}; - -#define ENC_PREFILTER_STRENGTH "filter-value" -#define ENC_PREFILTER_STRENGTH_TEXT N_("Amount of prefiltering") -#define ENC_PREFILTER_STRENGTH_LONGTEXT N_("Higher value implies more prefiltering") - -#define ENC_CODINGMODE "coding-mode" -#define ENC_CODINGMODE_TEXT N_("Picture coding mode") -#define ENC_CODINGMODE_LONGTEXT N_("Field coding is where interlaced fields are coded" \ - " separately as opposed to a pseudo-progressive frame") -static const char *const enc_codingmode_list = - { "auto", "progressive", "field" }; -static const char *const enc_codingmode_list_text = - { N_("auto - let encoder decide based upon input (Best)"), - N_("force coding frame as single picture"), - N_("force coding frame as separate interlaced fields"), - }; - -/* advanced option only */ -#define ENC_MCBLK_SIZE "motion-block-size" -#define ENC_MCBLK_SIZE_TEXT N_("Size of motion compensation blocks") - -static const char *enc_block_size_list = { - "automatic", - "small", - "medium", - "large" -}; -static const char *const enc_block_size_list_text = - { N_("automatic - let encoder decide based upon input (Best)"), - N_("small - use small motion compensation blocks"), - N_("medium - use medium motion compensation blocks"), - N_("large - use large motion compensation blocks"), - }; - -/* advanced option only */ -#define ENC_MCBLK_OVERLAP "motion-block-overlap" -#define ENC_MCBLK_OVERLAP_TEXT N_("Overlap of motion compensation blocks") - -static const char *enc_block_overlap_list = { - "automatic", - "none", - "partial", - "full" -}; -static const char *const enc_block_overlap_list_text = - { N_("automatic - let encoder decide based upon input (Best)"), - N_("none - Motion compensation blocks do not overlap"), - N_("partial - Motion compensation blocks only partially overlap"), - N_("full - Motion compensation blocks fully overlap"), - }; - - -#define ENC_MVPREC "mv-precision" -#define ENC_MVPREC_TEXT N_("Motion Vector precision") -#define ENC_MVPREC_LONGTEXT N_("Motion Vector precision in pels") -static const char *const enc_mvprec_list = - { "1", "1/2", "1/4", "1/8" }; - -/* advanced option only */ -#define ENC_ME_COMBINED "me-combined" -#define ENC_ME_COMBINED_TEXT N_("Three component motion estimation") -#define ENC_ME_COMBINED_LONGTEXT N_("Use chroma as part of the motion estimation process") - -#define ENC_DWTINTRA "intra-wavelet" -#define ENC_DWTINTRA_TEXT N_("Intra picture DWT filter") - -#define ENC_DWTINTER "inter-wavelet" -#define ENC_DWTINTER_TEXT N_("Inter picture DWT filter") - -static const char *enc_wavelet_list = { - "desl_dubuc_9_7", - "le_gall_5_3", - "desl_dubuc_13_7", - "haar_0", - "haar_1", - "fidelity", - "daub_9_7" -}; - -static const char *enc_wavelet_list_text = { - "Deslauriers-Dubuc (9,7)", - "LeGall (5,3)", - "Deslauriers-Dubuc (13,7)", - "Haar with no shift", - "Haar with single shift per level", - "Fidelity filter", - "Daubechies (9,7) integer approximation" -}; - -#define ENC_DWTDEPTH "transform-depth" -#define ENC_DWTDEPTH_TEXT N_("Number of DWT iterations") -#define ENC_DWTDEPTH_LONGTEXT N_("Also known as DWT levels") - - -/* advanced option only */ -#define ENC_MULTIQUANT "enable-multiquant" -#define ENC_MULTIQUANT_TEXT N_("Enable multiple quantizers") -#define ENC_MULTIQUANT_LONGTEXT N_("Enable multiple quantizers per subband (one per codeblock)") - -/* advanced option only */ -#define ENC_NOAC "enable-noarith" -#define ENC_NOAC_TEXT N_("Disable arithmetic coding") -#define ENC_NOAC_LONGTEXT N_("Use variable length codes instead, useful for very high bitrates") - -/* visual modelling */ -/* advanced option only */ -#define ENC_PWT "perceptual-weighting" -#define ENC_PWT_TEXT N_("perceptual weighting method") - -static const char *enc_perceptual_weighting_list = { - "none", - "ccir959", - "moo", - "manos_sakrison" -}; - -/* advanced option only */ -#define ENC_PDIST "perceptual-distance" -#define ENC_PDIST_TEXT N_("perceptual distance") -#define ENC_PDIST_LONGTEXT N_("perceptual distance to calculate perceptual weight") - -/* advanced option only */ -#define ENC_HSLICES "horiz-slices" -#define ENC_HSLICES_TEXT N_("Horizontal slices per frame") -#define ENC_HSLICES_LONGTEXT N_("Number of horizontal slices per frame in low delay mode") - -/* advanced option only */ -#define ENC_VSLICES "vert-slices" -#define ENC_VSLICES_TEXT N_("Vertical slices per frame") -#define ENC_VSLICES_LONGTEXT N_("Number of vertical slices per frame in low delay mode") - -/* advanced option only */ -#define ENC_SCBLK_SIZE "codeblock-size" -#define ENC_SCBLK_SIZE_TEXT N_("Size of code blocks in each subband") - -static const char *enc_codeblock_size_list = { - "automatic", - "small", - "medium", - "large", - "full" -}; -static const char *const enc_codeblock_size_list_text = - { N_("automatic - let encoder decide based upon input (Best)"), - N_("small - use small code blocks"), - N_("medium - use medium sized code blocks"), - N_("large - use large code blocks"), - N_("full - One code block per subband"), - }; - -/* advanced option only */ -#define ENC_ME_HIERARCHICAL "enable-hierarchical-me" -#define ENC_ME_HIERARCHICAL_TEXT N_("Enable hierarchical Motion Estimation") - -/* advanced option only */ -#define ENC_ME_DOWNSAMPLE_LEVELS "downsample-levels" -#define ENC_ME_DOWNSAMPLE_LEVELS_TEXT N_("Number of levels of downsampling") -#define ENC_ME_DOWNSAMPLE_LEVELS_LONGTEXT N_("Number of levels of downsampling in hierarchical motion estimation mode") - -/* advanced option only */ -#define ENC_ME_GLOBAL_MOTION "enable-global-me" -#define ENC_ME_GLOBAL_MOTION_TEXT N_("Enable Global Motion Estimation") - -/* advanced option only */ -#define ENC_ME_PHASECORR "enable-phasecorr-me" -#define ENC_ME_PHASECORR_TEXT N_("Enable Phase Correlation Estimation") - -/* advanced option only */ -#define ENC_SCD "enable-scd" -#define ENC_SCD_TEXT N_("Enable Scene Change Detection") - -/* advanced option only */ -#define ENC_FORCE_PROFILE "force-profile" -#define ENC_FORCE_PROFILE_TEXT N_("Force Profile") - -static const char *enc_profile_list = { - "auto", - "vc2_low_delay", - "vc2_simple", - "vc2_main", - "main" -}; - -static const char *const enc_profile_list_text = - { N_("automatic - let encoder decide based upon input (Best)"), - N_("VC2 Low Delay Profile"), - N_("VC2 Simple Profile"), - N_("VC2 Main Profile"), - N_("Main Profile"), - }; - -static const char *const ppsz_enc_options = { - ENC_RATE_CONTROL, ENC_GOP_STRUCTURE, ENC_QUALITY, ENC_NOISE_THRESHOLD, ENC_BITRATE, - ENC_MIN_BITRATE, ENC_MAX_BITRATE, ENC_AU_DISTANCE, ENC_CHROMAFMT, - ENC_PREFILTER, ENC_PREFILTER_STRENGTH, ENC_CODINGMODE, ENC_MCBLK_SIZE, - ENC_MCBLK_OVERLAP, ENC_MVPREC, ENC_ME_COMBINED, ENC_DWTINTRA, ENC_DWTINTER, - ENC_DWTDEPTH, ENC_MULTIQUANT, ENC_NOAC, ENC_PWT, ENC_PDIST, ENC_HSLICES, - ENC_VSLICES, ENC_SCBLK_SIZE, ENC_ME_HIERARCHICAL, ENC_ME_DOWNSAMPLE_LEVELS, - ENC_ME_GLOBAL_MOTION, ENC_ME_PHASECORR, ENC_SCD, ENC_FORCE_PROFILE, - NULL -}; -#endif // !ENABLE_SOUT - - -/* Module declaration */ - -vlc_module_begin () - set_subcategory( SUBCAT_INPUT_VCODEC ) - set_shortname( "Schroedinger" ) - set_description( N_("Dirac video decoder using libschroedinger") ) - set_capability( "video decoder", 200 ) - set_callbacks( OpenDecoder, CloseDecoder ) - add_shortcut( "schroedinger" ) - -#ifdef ENABLE_SOUT - /* encoder */ - add_submodule() - set_section( N_("Encoding") , NULL ) - set_description( N_("Dirac video encoder using libschroedinger") ) - set_capability( "video encoder", 110 ) - set_callback( OpenEncoder ) - add_shortcut( "schroedinger", "schro" ) - - add_string( ENC_CFG_PREFIX ENC_RATE_CONTROL, NULL, - ENC_RATE_CONTROL_TEXT, ENC_RATE_CONTROL_LONGTEXT ) - change_string_list( enc_rate_control_list, enc_rate_control_list_text ) - - add_float( ENC_CFG_PREFIX ENC_QUALITY, -1., - ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT ) - change_float_range(-1., 10.) - - add_float( ENC_CFG_PREFIX ENC_NOISE_THRESHOLD, -1., - ENC_NOISE_THRESHOLD_TEXT, ENC_NOISE_THRESHOLD_LONGTEXT ) - change_float_range(-1., 100.) - - add_integer( ENC_CFG_PREFIX ENC_BITRATE, -1, - ENC_BITRATE_TEXT, ENC_BITRATE_LONGTEXT ) - change_integer_range(-1, INT_MAX) - - add_integer( ENC_CFG_PREFIX ENC_MAX_BITRATE, -1, - ENC_MAX_BITRATE_TEXT, ENC_MAX_BITRATE_LONGTEXT ) - change_integer_range(-1, INT_MAX) - - add_integer( ENC_CFG_PREFIX ENC_MIN_BITRATE, -1, - ENC_MIN_BITRATE_TEXT, ENC_MIN_BITRATE_LONGTEXT ) - change_integer_range(-1, INT_MAX) - - add_string( ENC_CFG_PREFIX ENC_GOP_STRUCTURE, NULL, - ENC_GOP_STRUCTURE_TEXT, ENC_GOP_STRUCTURE_LONGTEXT ) - change_string_list( enc_gop_structure_list, enc_gop_structure_list_text ) - - add_integer( ENC_CFG_PREFIX ENC_AU_DISTANCE, -1, - ENC_AU_DISTANCE_TEXT, ENC_AU_DISTANCE_LONGTEXT ) - change_integer_range(-1, INT_MAX) - - add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420", - ENC_CHROMAFMT_TEXT, ENC_CHROMAFMT_LONGTEXT ) - change_string_list( enc_chromafmt_list, enc_chromafmt_list_text ) - - add_string( ENC_CFG_PREFIX ENC_CODINGMODE, "auto", - ENC_CODINGMODE_TEXT, ENC_CODINGMODE_LONGTEXT ) - change_string_list( enc_codingmode_list, enc_codingmode_list_text ) - - add_string( ENC_CFG_PREFIX ENC_MVPREC, NULL, - ENC_MVPREC_TEXT, ENC_MVPREC_LONGTEXT ) - change_string_list( enc_mvprec_list, enc_mvprec_list ) - - /* advanced option only */ - add_string( ENC_CFG_PREFIX ENC_MCBLK_SIZE, NULL, - ENC_MCBLK_SIZE_TEXT, NULL ) - change_string_list( enc_block_size_list, enc_block_size_list_text ) - - - /* advanced option only */ - add_string( ENC_CFG_PREFIX ENC_MCBLK_OVERLAP, NULL, - ENC_MCBLK_OVERLAP_TEXT, NULL ) - change_string_list( enc_block_overlap_list, enc_block_overlap_list_text ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_ME_COMBINED, -1, - ENC_ME_COMBINED_TEXT, ENC_ME_COMBINED_LONGTEXT ) - change_integer_range(-1, 1 ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_ME_HIERARCHICAL, -1, - ENC_ME_HIERARCHICAL_TEXT, NULL ) - change_integer_range(-1, 1 ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_ME_DOWNSAMPLE_LEVELS, -1, - ENC_ME_DOWNSAMPLE_LEVELS_TEXT, ENC_ME_DOWNSAMPLE_LEVELS_LONGTEXT ) - change_integer_range(-1, 8 ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_ME_GLOBAL_MOTION, -1, - ENC_ME_GLOBAL_MOTION_TEXT, NULL ) - change_integer_range(-1, 1 ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_ME_PHASECORR, -1, - ENC_ME_PHASECORR_TEXT, NULL ) - change_integer_range(-1, 1 ) - - add_string( ENC_CFG_PREFIX ENC_DWTINTRA, NULL, - ENC_DWTINTRA_TEXT, NULL ) - change_string_list( enc_wavelet_list, enc_wavelet_list_text ) - - add_string( ENC_CFG_PREFIX ENC_DWTINTER, NULL, - ENC_DWTINTER_TEXT, NULL ) - change_string_list( enc_wavelet_list, enc_wavelet_list_text ) - - add_integer( ENC_CFG_PREFIX ENC_DWTDEPTH, -1, - ENC_DWTDEPTH_TEXT, ENC_DWTDEPTH_LONGTEXT ) - change_integer_range(-1, SCHRO_LIMIT_ENCODER_TRANSFORM_DEPTH ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_MULTIQUANT, -1, - ENC_MULTIQUANT_TEXT, ENC_MULTIQUANT_LONGTEXT ) - change_integer_range(-1, 1 ) - - /* advanced option only */ - add_string( ENC_CFG_PREFIX ENC_SCBLK_SIZE, NULL, - ENC_SCBLK_SIZE_TEXT, NULL ) - change_string_list( enc_codeblock_size_list, enc_codeblock_size_list_text ) - - add_string( ENC_CFG_PREFIX ENC_PREFILTER, NULL, - ENC_PREFILTER_TEXT, ENC_PREFILTER_LONGTEXT ) - change_string_list( enc_filtering_list, enc_filtering_list_text ) - - add_float( ENC_CFG_PREFIX ENC_PREFILTER_STRENGTH, -1., - ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT ) - change_float_range(-1., 100.0) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_SCD, -1, - ENC_SCD_TEXT, NULL ) - change_integer_range(-1, 1 ) - - /* advanced option only */ - add_string( ENC_CFG_PREFIX ENC_PWT, NULL, - ENC_PWT_TEXT, NULL ) - change_string_list( enc_perceptual_weighting_list, enc_perceptual_weighting_list ) - - /* advanced option only */ - add_float( ENC_CFG_PREFIX ENC_PDIST, -1, - ENC_PDIST_TEXT, ENC_PDIST_LONGTEXT ) - change_float_range(-1., 100.) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_NOAC, -1, - ENC_NOAC_TEXT, ENC_NOAC_LONGTEXT ) - change_integer_range(-1, 1 ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_HSLICES, -1, - ENC_HSLICES_TEXT, ENC_HSLICES_LONGTEXT ) - change_integer_range(-1, INT_MAX ) - - /* advanced option only */ - add_integer( ENC_CFG_PREFIX ENC_VSLICES, -1, - ENC_VSLICES_TEXT, ENC_VSLICES_LONGTEXT ) - change_integer_range(-1, INT_MAX ) - - /* advanced option only */ - add_string( ENC_CFG_PREFIX ENC_FORCE_PROFILE, NULL, - ENC_FORCE_PROFILE_TEXT, NULL ) - change_string_list( enc_profile_list, enc_profile_list_text ) -#endif // !ENABLE_SOUT - -vlc_module_end () - - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static int DecodeBlock ( decoder_t *p_dec, block_t *p_block ); -static void Flush( decoder_t * ); - -struct picture_free_t -{ - picture_t *p_pic; - decoder_t *p_dec; -}; - -/***************************************************************************** - * decoder_sys_t : Schroedinger decoder descriptor - *****************************************************************************/ -typedef struct -{ - /* - * Dirac properties - */ - vlc_tick_t i_lastpts; - vlc_tick_t i_frame_pts_delta; - SchroDecoder *p_schro; - SchroVideoFormat *p_format; -} decoder_sys_t; - -/***************************************************************************** - * OpenDecoder: probe the decoder and return score - *****************************************************************************/ -static int OpenDecoder( vlc_object_t *p_this ) -{ - decoder_t *p_dec = (decoder_t*)p_this; - decoder_sys_t *p_sys; - SchroDecoder *p_schro; - - if( p_dec->fmt_in->i_codec != VLC_CODEC_DIRAC ) - { - return VLC_EGENERIC; - } - - /* Allocate the memory needed to store the decoder's structure */ - p_sys = malloc(sizeof(decoder_sys_t)); - if( p_sys == NULL ) - return VLC_ENOMEM; - - /* Initialise the schroedinger (and hence liboil libraries */ - /* This does no allocation and is safe to call */ - schro_init(); - - /* Initialise the schroedinger decoder */ - if( !(p_schro = schro_decoder_new()) ) - { - free( p_sys ); - return VLC_EGENERIC; - } - - p_dec->p_sys = p_sys; - p_sys->p_schro = p_schro; - p_sys->p_format = NULL; - p_sys->i_lastpts = VLC_TICK_INVALID; - p_sys->i_frame_pts_delta = 0; - - /* Set output properties */ - p_dec->fmt_out.i_codec = VLC_CODEC_I420; - - /* Set callbacks */ - p_dec->pf_decode = DecodeBlock; - p_dec->pf_flush = Flush; - - return VLC_SUCCESS; -} - -/***************************************************************************** - * SetPictureFormat: Set the decoded picture params to the ones from the stream - *****************************************************************************/ -static void SetVideoFormat( decoder_t *p_dec ) -{ - decoder_sys_t *p_sys = p_dec->p_sys; - - p_sys->p_format = schro_decoder_get_video_format(p_sys->p_schro); - if( p_sys->p_format == NULL ) return; - - p_sys->i_frame_pts_delta = VLC_TICK_FROM_SEC(1) - * p_sys->p_format->frame_rate_denominator - / p_sys->p_format->frame_rate_numerator; - - switch( p_sys->p_format->chroma_format ) - { - case SCHRO_CHROMA_420: p_dec->fmt_out.i_codec = VLC_CODEC_I420; break; - case SCHRO_CHROMA_422: p_dec->fmt_out.i_codec = VLC_CODEC_I422; break; - case SCHRO_CHROMA_444: p_dec->fmt_out.i_codec = VLC_CODEC_I444; break; - default: - p_dec->fmt_out.i_codec = 0; - break; - } - - p_dec->fmt_out.video.i_visible_width = p_sys->p_format->clean_width; - p_dec->fmt_out.video.i_x_offset = p_sys->p_format->left_offset; - p_dec->fmt_out.video.i_width = p_sys->p_format->width; - - p_dec->fmt_out.video.i_visible_height = p_sys->p_format->clean_height; - p_dec->fmt_out.video.i_y_offset = p_sys->p_format->top_offset; - p_dec->fmt_out.video.i_height = p_sys->p_format->height; - - /* aspect_ratio_numerator|denominator describes the pixel aspect ratio */ - p_dec->fmt_out.video.i_sar_num = p_sys->p_format->aspect_ratio_numerator; - p_dec->fmt_out.video.i_sar_den = p_sys->p_format->aspect_ratio_denominator; - - p_dec->fmt_out.video.i_frame_rate = - p_sys->p_format->frame_rate_numerator; - p_dec->fmt_out.video.i_frame_rate_base = - p_sys->p_format->frame_rate_denominator; -} - -/***************************************************************************** - * SchroFrameFree: schro_frame callback to release the associated picture_t - * When schro_decoder_reset() is called there will be pictures in the - * decoding pipeline that need to be released rather than displayed. - *****************************************************************************/ -static void SchroFrameFree( SchroFrame *frame, void *priv) -{ - struct picture_free_t *p_free = priv; - - if( !p_free ) - return; - - picture_Release( p_free->p_pic ); - free(p_free); - (void)frame; -} - -/***************************************************************************** - * CreateSchroFrameFromPic: wrap a picture_t in a SchroFrame - *****************************************************************************/ -static SchroFrame *CreateSchroFrameFromPic( decoder_t *p_dec ) -{ - decoder_sys_t *p_sys = p_dec->p_sys; - SchroFrame *p_schroframe = schro_frame_new(); - picture_t *p_pic = NULL; - struct picture_free_t *p_free; - - if( !p_schroframe ) - return NULL; - - if( decoder_UpdateVideoFormat( p_dec ) ) - return NULL; - p_pic = decoder_NewPicture( p_dec ); - - if( !p_pic ) - return NULL; - - p_schroframe->format = SCHRO_FRAME_FORMAT_U8_420; - if( p_sys->p_format->chroma_format == SCHRO_CHROMA_422 ) - { - p_schroframe->format = SCHRO_FRAME_FORMAT_U8_422; - } - else if( p_sys->p_format->chroma_format == SCHRO_CHROMA_444 ) - { - p_schroframe->format = SCHRO_FRAME_FORMAT_U8_444; - } - - p_schroframe->width = p_sys->p_format->width; - p_schroframe->height = p_sys->p_format->height; - - p_free = malloc( sizeof( *p_free ) ); - p_free->p_pic = p_pic; - p_free->p_dec = p_dec; - schro_frame_set_free_callback( p_schroframe, SchroFrameFree, p_free ); - - for( int i=0; i<3; i++ ) - { - p_schroframe->componentsi.width = p_pic->pi.i_visible_pitch; - p_schroframe->componentsi.stride = p_pic->pi.i_pitch; - p_schroframe->componentsi.height = p_pic->pi.i_visible_lines; - p_schroframe->componentsi.length = - p_pic->pi.i_pitch * p_pic->pi.i_lines; - p_schroframe->componentsi.data = p_pic->pi.p_pixels; - - if(i!=0) - { - p_schroframe->componentsi.v_shift = - SCHRO_FRAME_FORMAT_V_SHIFT( p_schroframe->format ); - p_schroframe->componentsi.h_shift = - SCHRO_FRAME_FORMAT_H_SHIFT( p_schroframe->format ); - } - } - - p_pic->b_progressive = !p_sys->p_format->interlaced; - p_pic->b_top_field_first = p_sys->p_format->top_field_first; - p_pic->i_nb_fields = 2; - - return p_schroframe; -} - -/***************************************************************************** - * SchroBufferFree: schro_buffer callback to release the associated block_t - *****************************************************************************/ -static void SchroBufferFree( SchroBuffer *buf, void *priv ) -{ - block_t *p_block = priv; - - if( !p_block ) - return; - - block_Release( p_block ); - (void)buf; -} - -/***************************************************************************** - * CloseDecoder: decoder destruction - *****************************************************************************/ -static void CloseDecoder( vlc_object_t *p_this ) -{ - decoder_t *p_dec = (decoder_t *)p_this; - decoder_sys_t *p_sys = p_dec->p_sys; - - schro_decoder_free( p_sys->p_schro ); - free( p_sys ); -} - -/***************************************************************************** - * Flush: - *****************************************************************************/ -static void Flush( decoder_t *p_dec ) -{ - decoder_sys_t *p_sys = p_dec->p_sys; - - schro_decoder_reset( p_sys->p_schro ); - p_sys->i_lastpts = VLC_TICK_INVALID; -} - -/**************************************************************************** - * DecodeBlock: the whole thing - **************************************************************************** - * Blocks need not be Dirac dataunit aligned. - * If a block has a PTS signaled, it applies to the first picture at or after p_block - ****************************************************************************/ -static int DecodeBlock( decoder_t *p_dec, block_t *p_block ) -{ - decoder_sys_t *p_sys = p_dec->p_sys; - - if( !p_block ) /* No Drain */ - return VLCDEC_SUCCESS; - else { - - /* reset the decoder when seeking as the decode in progress is invalid */ - /* discard the block as it is just a null magic block */ - if( p_block->i_flags & (BLOCK_FLAG_CORRUPTED|BLOCK_FLAG_DISCONTINUITY) ) - { - Flush( p_dec ); - if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) - { - block_Release( p_block ); - return VLCDEC_SUCCESS; - } - } - - SchroBuffer *p_schrobuffer; - p_schrobuffer = schro_buffer_new_with_data( p_block->p_buffer, p_block->i_buffer ); - p_schrobuffer->free = SchroBufferFree; - p_schrobuffer->priv = p_block; - if( p_block->i_pts != VLC_TICK_INVALID ) { - vlc_tick_t *p_pts = malloc( sizeof(*p_pts) ); - if( p_pts ) { - *p_pts = p_block->i_pts; - /* if this call fails, p_pts is freed automatically */ - p_schrobuffer->tag = schro_tag_new( p_pts, free ); - } - } - - /* this stops the same block being fed back into this function if - * we were on the next iteration of this loop to output a picture */ - schro_decoder_autoparse_push( p_sys->p_schro, p_schrobuffer ); - /* DO NOT refer to p_block after this point, it may have been freed */ - } - - while( 1 ) - { - SchroFrame *p_schroframe; - picture_t *p_pic; - int state = schro_decoder_autoparse_wait( p_sys->p_schro ); - - switch( state ) - { - case SCHRO_DECODER_FIRST_ACCESS_UNIT: - SetVideoFormat( p_dec ); - break; - - case SCHRO_DECODER_NEED_BITS: - return VLCDEC_SUCCESS; - - case SCHRO_DECODER_NEED_FRAME: - p_schroframe = CreateSchroFrameFromPic( p_dec ); - - if( !p_schroframe ) - { - msg_Err( p_dec, "Could not allocate picture for decoder"); - return VLCDEC_SUCCESS; - } - - schro_decoder_add_output_picture( p_sys->p_schro, p_schroframe); - break; - - case SCHRO_DECODER_OK: { - SchroTag *p_tag = schro_decoder_get_picture_tag( p_sys->p_schro ); - p_schroframe = schro_decoder_pull( p_sys->p_schro ); - if( !p_schroframe || !p_schroframe->priv ) - { - /* frame can't be one that was allocated by us - * -- no private data: discard */ - if( p_tag ) schro_tag_free( p_tag ); - if( p_schroframe ) schro_frame_unref( p_schroframe ); - break; - } - p_pic = ((struct picture_free_t*) p_schroframe->priv)->p_pic; - p_schroframe->priv = NULL; - - if( p_tag ) - { - /* free is handled by schro_frame_unref */ - p_pic->date = *(vlc_tick_t*) p_tag->value; - schro_tag_free( p_tag ); - } - else if( p_sys->i_lastpts != VLC_TICK_INVALID ) - { - /* NB, this shouldn't happen since the packetizer does a - * very thorough job of inventing timestamps. The - * following is just a very rough fall back in case packetizer - * is missing. */ - /* maybe it would be better to set p_pic->b_force ? */ - p_pic->date = p_sys->i_lastpts + p_sys->i_frame_pts_delta; - } - p_sys->i_lastpts = p_pic->date; - - schro_frame_unref( p_schroframe ); - decoder_QueueVideo( p_dec, p_pic ); - return VLCDEC_SUCCESS; - } - case SCHRO_DECODER_EOS: - /* NB, the new api will not emit _EOS, it handles the reset internally */ - break; - - case SCHRO_DECODER_ERROR: - msg_Err( p_dec, "SCHRO_DECODER_ERROR"); - return VLCDEC_SUCCESS; - } - } -} - -#ifdef ENABLE_SOUT -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ); - - -/***************************************************************************** - * picture_pts_t : store pts alongside picture number, not carried through - * encoder - *****************************************************************************/ -struct picture_pts_t -{ - vlc_tick_t i_pts; /* associated pts */ - uint32_t u_pnum; /* dirac picture number */ - bool b_empty; /* entry is invalid */ -}; - -/***************************************************************************** - * encoder_sys_t : Schroedinger encoder descriptor - *****************************************************************************/ -#define SCHRO_PTS_TLB_SIZE 256 -typedef struct -{ - /* - * Schro properties - */ - SchroEncoder *p_schro; - SchroVideoFormat *p_format; - int started; - bool b_auto_field_coding; - - uint32_t i_input_picnum; - timestamp_fifo_t *p_dts_fifo; - - block_t *p_chain; - - struct picture_pts_t pts_tlbSCHRO_PTS_TLB_SIZE; - vlc_tick_t i_pts_offset; - vlc_tick_t i_field_duration; - - bool b_eos_signalled; - bool b_eos_pulled; -} encoder_sys_t; - -static struct -{ - unsigned int i_height; - int i_approx_fps; - SchroVideoFormatEnum i_vf; -} schro_format_guess = { - /* Important: Keep this list ordered in ascending picture height */ - {1, 0, SCHRO_VIDEO_FORMAT_CUSTOM}, - {120, 15, SCHRO_VIDEO_FORMAT_QSIF}, - {144, 12, SCHRO_VIDEO_FORMAT_QCIF}, - {240, 15, SCHRO_VIDEO_FORMAT_SIF}, - {288, 12, SCHRO_VIDEO_FORMAT_CIF}, - {480, 30, SCHRO_VIDEO_FORMAT_SD480I_60}, - {480, 15, SCHRO_VIDEO_FORMAT_4SIF}, - {576, 12, SCHRO_VIDEO_FORMAT_4CIF}, - {576, 25, SCHRO_VIDEO_FORMAT_SD576I_50}, - {720, 50, SCHRO_VIDEO_FORMAT_HD720P_50}, - {720, 60, SCHRO_VIDEO_FORMAT_HD720P_60}, - {1080, 24, SCHRO_VIDEO_FORMAT_DC2K_24}, - {1080, 25, SCHRO_VIDEO_FORMAT_HD1080I_50}, - {1080, 30, SCHRO_VIDEO_FORMAT_HD1080I_60}, - {1080, 50, SCHRO_VIDEO_FORMAT_HD1080P_50}, - {1080, 60, SCHRO_VIDEO_FORMAT_HD1080P_60}, - {2160, 24, SCHRO_VIDEO_FORMAT_DC4K_24}, - {0, 0, 0}, -}; - -/***************************************************************************** - * ResetPTStlb: Purge all entries in @p_enc@'s PTS-tlb - *****************************************************************************/ -static void ResetPTStlb( encoder_t *p_enc ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - for( int i = 0; i < SCHRO_PTS_TLB_SIZE; i++ ) - { - p_sys->pts_tlbi.b_empty = true; - } -} - - -/***************************************************************************** - * StorePicturePTS: Store the PTS value for a particular picture number - *****************************************************************************/ -static void StorePicturePTS( encoder_t *p_enc, uint32_t u_pnum, vlc_tick_t i_pts ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - - for( int i = 0; i<SCHRO_PTS_TLB_SIZE; i++ ) - { - if( p_sys->pts_tlbi.b_empty ) - { - p_sys->pts_tlbi.u_pnum = u_pnum; - p_sys->pts_tlbi.i_pts = i_pts; - p_sys->pts_tlbi.b_empty = false; - - return; - } - } - - msg_Err( p_enc, "Could not store PTS %"PRId64" for frame %u", i_pts, u_pnum ); -} - -/***************************************************************************** - * GetPicturePTS: Retrieve the PTS value for a particular picture number - *****************************************************************************/ -static vlc_tick_t GetPicturePTS( encoder_t *p_enc, uint32_t u_pnum ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - - for( int i = 0; i < SCHRO_PTS_TLB_SIZE; i++ ) - { - if( !p_sys->pts_tlbi.b_empty && - p_sys->pts_tlbi.u_pnum == u_pnum ) - { - p_sys->pts_tlbi.b_empty = true; - return p_sys->pts_tlbi.i_pts; - } - } - - msg_Err( p_enc, "Could not retrieve PTS for picture %u", u_pnum ); - return VLC_TICK_INVALID; -} - -static inline bool SchroSetEnum( encoder_t *p_enc, int i_list_size, const char *list, - const char *psz_name, const char *psz_name_text, const char *psz_value) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - if( list && psz_name_text && psz_name && psz_value ) { - for( int i = 0; i < i_list_size; ++i ) { - if( strcmp( listi, psz_value ) ) - continue; - schro_encoder_setting_set_double( p_sys->p_schro, psz_name, i ); - return true; - } - msg_Err( p_enc, "Invalid %s: %s", psz_name_text, psz_value ); - } - return false; -} - -static bool SetEncChromaFormat( encoder_t *p_enc, vlc_fourcc_t chroma ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - - switch( chroma ) { - case VLC_CODEC_I420: - p_enc->fmt_in.video.i_chroma = p_enc->fmt_in.i_codec = chroma; - p_sys->p_format->chroma_format = SCHRO_CHROMA_420; - break; - case VLC_CODEC_I422: - p_enc->fmt_in.video.i_chroma = p_enc->fmt_in.i_codec = chroma; - p_sys->p_format->chroma_format = SCHRO_CHROMA_422; - break; - case VLC_CODEC_I444: - p_enc->fmt_in.video.i_chroma = p_enc->fmt_in.i_codec = chroma; - p_sys->p_format->chroma_format = SCHRO_CHROMA_444; - break; - default: - return false; - } - - return true; -} - -#define SCHRO_SET_FLOAT(psz_name, pschro_name) \ - f_tmp = var_GetFloat( p_enc, ENC_CFG_PREFIX psz_name ); \ - if( f_tmp >= 0.0 ) \ - schro_encoder_setting_set_double( p_sys->p_schro, pschro_name, f_tmp ); - -#define SCHRO_SET_INTEGER(psz_name, pschro_name, ignore_val) \ - i_tmp = var_GetInteger( p_enc, ENC_CFG_PREFIX psz_name ); \ - if( i_tmp > ignore_val ) \ - schro_encoder_setting_set_double( p_sys->p_schro, pschro_name, i_tmp ); - -#define SCHRO_SET_ENUM(list, psz_name, psz_name_text, pschro_name) \ - psz_tmp = var_GetString( p_enc, ENC_CFG_PREFIX psz_name ); \ - if( !psz_tmp ) \ - goto error; \ - else if ( *psz_tmp != '\0' ) { \ - int i_list_size = ARRAY_SIZE(list); \ - if( !SchroSetEnum( p_enc, i_list_size, list, pschro_name, psz_name_text, psz_tmp ) ) { \ - free( psz_tmp ); \ - goto error; \ - } \ - } \ - free( psz_tmp ); - -/***************************************************************************** - * OpenEncoder: probe the encoder and return score - *****************************************************************************/ -static int OpenEncoder( vlc_object_t *p_this ) -{ - encoder_t *p_enc = (encoder_t *)p_this; - encoder_sys_t *p_sys; - int i_tmp; - float f_tmp; - char *psz_tmp; - - if( p_enc->fmt_out.i_codec != VLC_CODEC_DIRAC && - !p_enc->obj.force ) - { - return VLC_EGENERIC; - } - - if( !p_enc->fmt_in.video.i_frame_rate || !p_enc->fmt_in.video.i_frame_rate_base || - !p_enc->fmt_in.video.i_visible_height || !p_enc->fmt_in.video.i_visible_width ) - { - msg_Err( p_enc, "Framerate and picture dimensions must be non-zero" ); - return VLC_EGENERIC; - } - - /* Allocate the memory needed to store the decoder's structure */ - if( ( p_sys = calloc( 1, sizeof( *p_sys ) ) ) == NULL ) - return VLC_ENOMEM; - - p_enc->p_sys = p_sys; - p_enc->fmt_out.i_codec = VLC_CODEC_DIRAC; - p_enc->fmt_out.i_cat = VIDEO_ES; - - if( ( p_sys->p_dts_fifo = timestamp_FifoNew(32) ) == NULL ) - { - CloseEncoder( p_enc ); - return VLC_ENOMEM; - } - - ResetPTStlb( p_enc ); - - /* guess the video format based upon number of lines and picture height */ - int i = 0; - SchroVideoFormatEnum guessed_video_fmt = SCHRO_VIDEO_FORMAT_CUSTOM; - /* Pick the dirac_video_format in this order of preference: - * 1. an exact match in frame height and an approximate fps match - * 2. the previous preset with a smaller number of lines. - */ - do - { - if( schro_format_guessi.i_height > p_enc->fmt_in.video.i_height ) - { - guessed_video_fmt = schro_format_guessi-1.i_vf; - break; - } - if( schro_format_guessi.i_height != p_enc->fmt_in.video.i_height ) - continue; - int src_fps = p_enc->fmt_in.video.i_frame_rate / p_enc->fmt_in.video.i_frame_rate_base; - int delta_fps = abs( schro_format_guessi.i_approx_fps - src_fps ); - if( delta_fps > 2 ) - continue; - - guessed_video_fmt = schro_format_guessi.i_vf; - break; - } while( schro_format_guess++i.i_height ); - - schro_init(); - p_sys->p_schro = schro_encoder_new(); - if( !p_sys->p_schro ) { - msg_Err( p_enc, "Failed to initialize libschroedinger encoder" ); - return VLC_EGENERIC; - } - schro_encoder_set_packet_assembly( p_sys->p_schro, true ); - - if( !( p_sys->p_format = schro_encoder_get_video_format( p_sys->p_schro ) ) ) { - msg_Err( p_enc, "Failed to get Schroedigner video format" ); - schro_encoder_free( p_sys->p_schro ); - return VLC_EGENERIC; - } - - /* initialise the video format parameters to the guessed format */ - schro_video_format_set_std_video_format( p_sys->p_format, guessed_video_fmt ); - - /* constants set from the input video format */ - p_sys->p_format->width = p_enc->fmt_in.video.i_visible_width; - p_sys->p_format->height = p_enc->fmt_in.video.i_visible_height; - p_sys->p_format->frame_rate_numerator = p_enc->fmt_in.video.i_frame_rate; - p_sys->p_format->frame_rate_denominator = p_enc->fmt_in.video.i_frame_rate_base; - unsigned u_asr_num, u_asr_den; - vlc_ureduce( &u_asr_num, &u_asr_den, - p_enc->fmt_in.video.i_sar_num, - p_enc->fmt_in.video.i_sar_den, 0 ); - p_sys->p_format->aspect_ratio_numerator = u_asr_num; - p_sys->p_format->aspect_ratio_denominator = u_asr_den; - - config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg ); - - SCHRO_SET_ENUM(enc_rate_control_list, ENC_RATE_CONTROL, ENC_RATE_CONTROL_TEXT, "rate_control") - - SCHRO_SET_ENUM(enc_gop_structure_list, ENC_GOP_STRUCTURE, ENC_GOP_STRUCTURE_TEXT, "gop_structure") - - psz_tmp = var_GetString( p_enc, ENC_CFG_PREFIX ENC_CHROMAFMT ); - if( !psz_tmp ) - goto error; - else { - vlc_fourcc_t i_chroma; - if( !strcmp( psz_tmp, "420" ) ) { - i_chroma = VLC_CODEC_I420; - } - else if( !strcmp( psz_tmp, "422" ) ) { - i_chroma = VLC_CODEC_I422; - } - else if( !strcmp( psz_tmp, "444" ) ) { - i_chroma = VLC_CODEC_I444; - } - else { - msg_Err( p_enc, "Invalid chroma format: %s", psz_tmp ); - free( psz_tmp ); - goto error; - } - SetEncChromaFormat( p_enc, i_chroma ); - } - free( psz_tmp ); - - SCHRO_SET_FLOAT(ENC_QUALITY, "quality") - - SCHRO_SET_FLOAT(ENC_NOISE_THRESHOLD, "noise_threshold") - - /* use bitrate from sout-transcode-vb in kbps */ - i_tmp = var_GetInteger( p_enc, ENC_CFG_PREFIX ENC_BITRATE ); - if( i_tmp > -1 ) - schro_encoder_setting_set_double( p_sys->p_schro, "bitrate", i_tmp * 1000 ); - else - schro_encoder_setting_set_double( p_sys->p_schro, "bitrate", p_enc->fmt_out.i_bitrate ); - - p_enc->fmt_out.i_bitrate = schro_encoder_setting_get_double( p_sys->p_schro, "bitrate" ); - - i_tmp = var_GetInteger( p_enc, ENC_CFG_PREFIX ENC_MIN_BITRATE ); - if( i_tmp > -1 ) - schro_encoder_setting_set_double( p_sys->p_schro, "min_bitrate", i_tmp * 1000 ); - - i_tmp = var_GetInteger( p_enc, ENC_CFG_PREFIX ENC_MAX_BITRATE ); - if( i_tmp > -1 ) - schro_encoder_setting_set_double( p_sys->p_schro, "max_bitrate", i_tmp * 1000 ); - - SCHRO_SET_INTEGER(ENC_AU_DISTANCE, "au_distance", -1) - - SCHRO_SET_ENUM(enc_filtering_list, ENC_PREFILTER, ENC_PREFILTER_TEXT, "filtering") - - SCHRO_SET_FLOAT(ENC_PREFILTER_STRENGTH, "filter_value") - - - psz_tmp = var_GetString( p_enc, ENC_CFG_PREFIX ENC_CODINGMODE ); - if( !psz_tmp ) - goto error; - else if( !strcmp( psz_tmp, "auto" ) ) { - p_sys->b_auto_field_coding = true; - } - else if( !strcmp( psz_tmp, "progressive" ) ) { - p_sys->b_auto_field_coding = false; - schro_encoder_setting_set_double( p_sys->p_schro, "interlaced_coding", false); - } - else if( !strcmp( psz_tmp, "field" ) ) { - p_sys->b_auto_field_coding = false; - schro_encoder_setting_set_double( p_sys->p_schro, "interlaced_coding", true); - } - else { - msg_Err( p_enc, "Invalid codingmode: %s", psz_tmp ); - free( psz_tmp ); - goto error; - } - free( psz_tmp ); - - SCHRO_SET_ENUM(enc_block_size_list, ENC_MCBLK_SIZE, ENC_MCBLK_SIZE_TEXT, "motion_block_size") - - SCHRO_SET_ENUM(enc_block_overlap_list, ENC_MCBLK_OVERLAP, ENC_MCBLK_OVERLAP_TEXT, "motion_block_overlap") - - psz_tmp = var_GetString( p_enc, ENC_CFG_PREFIX ENC_MVPREC ); - if( !psz_tmp ) - goto error; - else if( *psz_tmp != '\0') { - if( !strcmp( psz_tmp, "1" ) ) { - schro_encoder_setting_set_double( p_sys->p_schro, "mv_precision", 0 ); - } - else if( !strcmp( psz_tmp, "1/2" ) ) { - schro_encoder_setting_set_double( p_sys->p_schro, "mv_precision", 1 ); - } - else if( !strcmp( psz_tmp, "1/4" ) ) { - schro_encoder_setting_set_double( p_sys->p_schro, "mv_precision", 2 ); - } - else if( !strcmp( psz_tmp, "1/8" ) ) { - schro_encoder_setting_set_double( p_sys->p_schro, "mv_precision", 3 ); - } - else { - msg_Err( p_enc, "Invalid mv_precision: %s", psz_tmp ); - free( psz_tmp ); - goto error; - } - } - free( psz_tmp ); - - SCHRO_SET_INTEGER(ENC_ME_COMBINED, "enable_chroma_me", -1) - - SCHRO_SET_ENUM(enc_wavelet_list, ENC_DWTINTRA, ENC_DWTINTRA_TEXT, "intra_wavelet") - - SCHRO_SET_ENUM(enc_wavelet_list, ENC_DWTINTER, ENC_DWTINTER_TEXT, "inter_wavelet") - - SCHRO_SET_INTEGER(ENC_DWTDEPTH, "transform_depth", -1) - - SCHRO_SET_INTEGER(ENC_MULTIQUANT, "enable_multiquant", -1) - - SCHRO_SET_INTEGER(ENC_NOAC, "enable_noarith", -1) - - SCHRO_SET_ENUM(enc_perceptual_weighting_list, ENC_PWT, ENC_PWT_TEXT, "perceptual_weighting") - - SCHRO_SET_FLOAT(ENC_PDIST, "perceptual_distance") - - SCHRO_SET_INTEGER(ENC_HSLICES, "horiz_slices", -1) - - SCHRO_SET_INTEGER(ENC_VSLICES, "vert_slices", -1) - - SCHRO_SET_ENUM(enc_codeblock_size_list, ENC_SCBLK_SIZE, ENC_SCBLK_SIZE_TEXT, "codeblock_size") - - SCHRO_SET_INTEGER(ENC_ME_HIERARCHICAL, "enable_hierarchical_estimation", -1) - - SCHRO_SET_INTEGER(ENC_ME_DOWNSAMPLE_LEVELS, "downsample_levels", 1) - - SCHRO_SET_INTEGER(ENC_ME_GLOBAL_MOTION, "enable_global_motion", -1) - - SCHRO_SET_INTEGER(ENC_ME_PHASECORR, "enable_phasecorr_estimation", -1) - - SCHRO_SET_INTEGER(ENC_SCD, "enable_scene_change_detection", -1) - - SCHRO_SET_ENUM(enc_profile_list, ENC_FORCE_PROFILE, ENC_FORCE_PROFILE_TEXT, "force_profile") - - p_sys->started = 0; - - static const struct vlc_encoder_operations ops = - { - .close = CloseEncoder, - .encode_video = Encode, - }; - p_enc->ops = &ops; - - return VLC_SUCCESS; -error: - CloseEncoder( p_enc ); - return VLC_EGENERIC; -} - - -struct enc_picture_free_t -{ - picture_t *p_pic; - encoder_t *p_enc; -}; - -/***************************************************************************** - * EncSchroFrameFree: schro_frame callback to release the associated picture_t - * When schro_encoder_reset() is called there will be pictures in the - * encoding pipeline that need to be released rather than displayed. - *****************************************************************************/ -static void EncSchroFrameFree( SchroFrame *frame, void *priv ) -{ - struct enc_picture_free_t *p_free = priv; - - if( !p_free ) - return; - - picture_Release( p_free->p_pic ); - free( p_free ); - (void)frame; -} - -/***************************************************************************** - * CreateSchroFrameFromPic: wrap a picture_t in a SchroFrame - *****************************************************************************/ -static SchroFrame *CreateSchroFrameFromInputPic( encoder_t *p_enc, picture_t *p_pic ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - SchroFrame *p_schroframe = schro_frame_new(); - struct enc_picture_free_t *p_free; - - if( !p_schroframe ) - return NULL; - - if( !p_pic ) - return NULL; - - p_schroframe->format = SCHRO_FRAME_FORMAT_U8_420; - if( p_sys->p_format->chroma_format == SCHRO_CHROMA_422 ) - { - p_schroframe->format = SCHRO_FRAME_FORMAT_U8_422; - } - else if( p_sys->p_format->chroma_format == SCHRO_CHROMA_444 ) - { - p_schroframe->format = SCHRO_FRAME_FORMAT_U8_444; - } - - p_schroframe->width = p_sys->p_format->width; - p_schroframe->height = p_sys->p_format->height; - - p_free = malloc( sizeof( *p_free ) ); - if( unlikely( p_free == NULL ) ) { - schro_frame_unref( p_schroframe ); - return NULL; - } - - p_free->p_pic = p_pic; - p_free->p_enc = p_enc; - schro_frame_set_free_callback( p_schroframe, EncSchroFrameFree, p_free ); - - for( int i=0; i<3; i++ ) - { - p_schroframe->componentsi.width = p_pic->pi.i_visible_pitch; - p_schroframe->componentsi.stride = p_pic->pi.i_pitch; - p_schroframe->componentsi.height = p_pic->pi.i_visible_lines; - p_schroframe->componentsi.length = - p_pic->pi.i_pitch * p_pic->pi.i_lines; - p_schroframe->componentsi.data = p_pic->pi.p_pixels; - - if( i!=0 ) - { - p_schroframe->componentsi.v_shift = - SCHRO_FRAME_FORMAT_V_SHIFT( p_schroframe->format ); - p_schroframe->componentsi.h_shift = - SCHRO_FRAME_FORMAT_H_SHIFT( p_schroframe->format ); - } - } - - return p_schroframe; -} - -/* Attempt to find dirac picture number in an encapsulation unit */ -static int ReadDiracPictureNumber( uint32_t *p_picnum, block_t *p_block ) -{ - uint32_t u_pos = 4; - /* protect against falling off the edge */ - while( u_pos + 13 < p_block->i_buffer ) - { - /* find the picture startcode */ - if( p_block->p_bufferu_pos & 0x08 ) - { - *p_picnum = GetDWBE( p_block->p_buffer + u_pos + 9 ); - return 1; - } - /* skip to the next dirac data unit */ - uint32_t u_npo = GetDWBE( p_block->p_buffer + u_pos + 1 ); - assert( u_npo <= UINT32_MAX - u_pos ); - if( u_npo == 0 ) - u_npo = 13; - u_pos += u_npo; - } - return 0; -} - - -static block_t *Encode( encoder_t *p_enc, picture_t *p_pic ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - block_t *p_block, *p_output_chain = NULL; - SchroFrame *p_frame; - bool b_go = true; - - if( !p_pic ) { - if( !p_sys->started || p_sys->b_eos_pulled ) - return NULL; - - if( !p_sys->b_eos_signalled ) { - p_sys->b_eos_signalled = 1; - schro_encoder_end_of_stream( p_sys->p_schro ); - } - } else { - /* we only know if the sequence is interlaced when the first - * picture arrives, so final setup is done here */ - /* XXX todo, detect change of interlace */ - p_sys->p_format->interlaced = !p_pic->b_progressive; - p_sys->p_format->top_field_first = p_pic->b_top_field_first; - - if( p_sys->b_auto_field_coding ) - schro_encoder_setting_set_double( p_sys->p_schro, "interlaced_coding", !p_pic->b_progressive ); - } - - if( !p_sys->started ) { - date_t date; - - if( p_pic->format.i_chroma != p_enc->fmt_in.i_codec ) { - msg_Warn( p_enc, "Resetting chroma from %4.4s to %4.4s", - (const char*)&p_enc->fmt_in.i_codec, - (const char*)&p_pic->format.i_chroma ); - if( !SetEncChromaFormat( p_enc, p_pic->format.i_chroma ) ) { - msg_Err( p_enc, "Could not reset chroma format to %4.4s", - (const char*)&p_pic->format.i_chroma ); - return NULL; - } - } - - date_Init( &date, p_enc->fmt_in.video.i_frame_rate * 2, p_enc->fmt_in.video.i_frame_rate_base ); - date_Set( &date, VLC_TICK_0 ); - /* FIXME - Unlike dirac-research codec Schro doesn't have a function that returns the delay in pics yet. - * Use a default of 1 - */ - date_Increment( &date, 2 /* 2 fields, 1 frame */ ); - p_sys->i_pts_offset = date_Get( &date ) - VLC_TICK_0; - if( schro_encoder_setting_get_double( p_sys->p_schro, "interlaced_coding" ) > 0.0 ) { - date_Set( &date, VLC_TICK_0 ); - date_Increment( &date, 1 /* field */ ); - p_sys->i_field_duration = date_Get( &date ) - VLC_TICK_0; - } - - schro_video_format_set_std_signal_range( p_sys->p_format, SCHRO_SIGNAL_RANGE_8BIT_VIDEO ); - schro_encoder_set_video_format( p_sys->p_schro, p_sys->p_format ); - schro_encoder_start( p_sys->p_schro ); - p_sys->started = 1; - } - - if( !p_sys->b_eos_signalled ) { - /* create a schro frame from the input pic and load */ - /* Increase ref count by 1 so that the picture is not freed until - Schro finishes with it */ - picture_Hold( p_pic ); - - p_frame = CreateSchroFrameFromInputPic( p_enc, p_pic ); - if( !p_frame ) - return NULL; - schro_encoder_push_frame( p_sys->p_schro, p_frame ); - - - /* store pts in a lookaside buffer, so that the same pts may - * be used for the picture in coded order */ - StorePicturePTS( p_enc, p_sys->i_input_picnum, p_pic->date ); - p_sys->i_input_picnum++; - - /* store dts in a queue, so that they appear in order in - * coded order */ - timestamp_FifoPut( p_sys->p_dts_fifo, p_pic->date - p_sys->i_pts_offset ); - - /* for field coding mode, insert an extra value into both the - * pts lookaside buffer and dts queue, offset to correspond - * to a one field delay. */ - if( schro_encoder_setting_get_double( p_sys->p_schro, "interlaced_coding" ) > 0.0 ) { - StorePicturePTS( p_enc, p_sys->i_input_picnum, p_pic->date + p_sys->i_field_duration ); - p_sys->i_input_picnum++; - - timestamp_FifoPut( p_sys->p_dts_fifo, p_pic->date - p_sys->i_pts_offset + p_sys->i_field_duration ); - } - } - - do - { - SchroStateEnum state; - state = schro_encoder_wait( p_sys->p_schro ); - switch( state ) - { - case SCHRO_STATE_NEED_FRAME: - b_go = false; - break; - case SCHRO_STATE_AGAIN: - break; - case SCHRO_STATE_END_OF_STREAM: - p_sys->b_eos_pulled = 1; - b_go = false; - break; - case SCHRO_STATE_HAVE_BUFFER: - { - SchroBuffer *p_enc_buf; - uint32_t u_pic_num; - int i_presentation_frame; - p_enc_buf = schro_encoder_pull( p_sys->p_schro, &i_presentation_frame ); - p_block = block_Alloc( p_enc_buf->length ); - if( !p_block ) - return NULL; - - memcpy( p_block->p_buffer, p_enc_buf->data, p_enc_buf->length ); - schro_buffer_unref( p_enc_buf ); - - /* Presence of a Sequence header indicates a seek point */ - if( 0 == p_block->p_buffer4 ) - { - p_block->i_flags |= BLOCK_FLAG_TYPE_I; - - if( !p_enc->fmt_out.p_extra ) { - const uint8_t eos = { 'B','B','C','D',0x10,0,0,0,13,0,0,0,0 }; - uint32_t len = GetDWBE( p_block->p_buffer + 5 ); - /* if it hasn't been done so far, stash a copy of the - * sequence header for muxers such as ogg */ - /* The OggDirac spec advises that a Dirac EOS DataUnit - * is appended to the sequence header to allow guard - * against poor streaming servers */ - /* XXX, should this be done using the packetizer ? */ - - if( len > UINT32_MAX - sizeof( eos ) ) - return NULL; - - p_enc->fmt_out.p_extra = malloc( len + sizeof( eos ) ); - if( !p_enc->fmt_out.p_extra ) - return NULL; - memcpy( p_enc->fmt_out.p_extra, p_block->p_buffer, len ); - memcpy( (uint8_t*)p_enc->fmt_out.p_extra + len, eos, sizeof( eos ) ); - SetDWBE( (uint8_t*)p_enc->fmt_out.p_extra + len + sizeof(eos) - 4, len ); - p_enc->fmt_out.i_extra = len + sizeof( eos ); - } - } - - if( ReadDiracPictureNumber( &u_pic_num, p_block ) ) { - p_block->i_dts = timestamp_FifoGet( p_sys->p_dts_fifo ); - p_block->i_pts = GetPicturePTS( p_enc, u_pic_num ); - block_ChainAppend( &p_output_chain, p_block ); - } else { - /* End of sequence */ - block_ChainAppend( &p_output_chain, p_block ); - } - break; - } - default: - break; - } - } while( b_go ); - - return p_output_chain; -} - -/***************************************************************************** - * CloseEncoder: Schro encoder destruction - *****************************************************************************/ -static void CloseEncoder( encoder_t *p_enc ) -{ - encoder_sys_t *p_sys = p_enc->p_sys; - - /* Free the encoder resources */ - if( p_sys->p_schro ) - schro_encoder_free( p_sys->p_schro ); - - free( p_sys->p_format ); - - if( p_sys->p_dts_fifo ) - timestamp_FifoRelease( p_sys->p_dts_fifo ); - - block_ChainRelease( p_sys->p_chain ); - - free( p_sys ); - /* We need to reset p_sys since CloseEncoder is also called during error. */ - p_enc->p_sys = NULL; -} -#endif // !ENABLE_SOUT
View file
_service:obs_scm:vlc-beta-20260129.a6e1dd02c.obscpio/modules/gui/qt/network/qml/NetworkCustomCover.qml
Deleted
@@ -1,97 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2020 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick -import QtQuick.Controls - - -import VLC.Widgets as Widgets -import VLC.Style -import VLC.Network -import VLC.Util - -Item { - id: root - - property var networkModel - property color bgColor - property color color1 - property color accent - - - // Image properties - property int fillMode: Image.Stretch - property int horizontalAlignment: Image.AlignHCenter - property int verticalAlignment: Image.AlignVCenter - - readonly property var paintedWidth: _image.paintedWidth - readonly property var paintedHeight: _image.paintedHeight - - // currently shown image - property var _image: typeImage.visible ? typeImage : artwork - - Widgets.ScaledImage { - // failsafe cover, we show this while loading artwork or if loading fails - - id: typeImage - - anchors.fill: parent - - visible: !artwork.visible - - sourceSize: Qt.size(0, height) // preserve aspect ratio - - fillMode: root.fillMode - horizontalAlignment: root.horizontalAlignment - verticalAlignment: root.verticalAlignment - - source: { - if (!networkModel || !visible) - return "" - - const img = SVGColorImage.colorize(networkModel.artworkFallback) - .color1(root.color1) - .accent(root.accent) - - if (bgColor !== undefined) - img.background(root.bgColor) - - return img.uri() - } - } - - Widgets.ScaledImage { - id: artwork - - anchors.fill: parent - - visible: status === Image.Ready - - sourceSize: Qt.size(width, height) - - fillMode: root.fillMode - horizontalAlignment: root.horizontalAlignment - verticalAlignment: root.verticalAlignment - - source: { - if (networkModel?.artwork && networkModel.artwork.length > 0) - return VLCAccessImage.uri(networkModel.artwork) - - return "" - } - } -}
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,4 +1,4 @@ name: vlc-beta -version: 20260129.a6e1dd02c -mtime: 1769675716 -commit: a6e1dd02cf98632a7e84f3e5d82461ed1a369cc2 +version: 20260129.65e744b03 +mtime: 1769710632 +commit: 65e744b037de1e965b259f9bae2715924502862b
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.