Commit 85a921f4 authored by hwren's avatar hwren Committed by Mark Thompson

lavc, doc, configure: add libxavs2 video encoder wrapper

Signed-off-by: 's avatarhwren <hwrenx@126.com>
parent 092cbbfa
...@@ -26,6 +26,7 @@ version <next>: ...@@ -26,6 +26,7 @@ version <next>:
- cue and acue filters - cue and acue filters
- support for AV1 in MP4 - support for AV1 in MP4
- transpose_npp filter - transpose_npp filter
- AVS2 video encoder via libxavs2
version 4.0: version 4.0:
......
...@@ -281,6 +281,7 @@ External library support: ...@@ -281,6 +281,7 @@ External library support:
--enable-libx264 enable H.264 encoding via x264 [no] --enable-libx264 enable H.264 encoding via x264 [no]
--enable-libx265 enable HEVC encoding via x265 [no] --enable-libx265 enable HEVC encoding via x265 [no]
--enable-libxavs enable AVS encoding via xavs [no] --enable-libxavs enable AVS encoding via xavs [no]
--enable-libxavs2 enable AVS2 encoding via xavs2 [no]
--enable-libxcb enable X11 grabbing using XCB [autodetect] --enable-libxcb enable X11 grabbing using XCB [autodetect]
--enable-libxcb-shm enable X11 grabbing shm communication [autodetect] --enable-libxcb-shm enable X11 grabbing shm communication [autodetect]
--enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect] --enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect]
...@@ -1667,6 +1668,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" ...@@ -1667,6 +1668,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
libx264 libx264
libx265 libx265
libxavs libxavs
libxavs2
libxvid libxvid
" "
...@@ -3135,6 +3137,7 @@ libx264rgb_encoder_deps="libx264 x264_csp_bgr" ...@@ -3135,6 +3137,7 @@ libx264rgb_encoder_deps="libx264 x264_csp_bgr"
libx264rgb_encoder_select="libx264_encoder" libx264rgb_encoder_select="libx264_encoder"
libx265_encoder_deps="libx265" libx265_encoder_deps="libx265"
libxavs_encoder_deps="libxavs" libxavs_encoder_deps="libxavs"
libxavs2_encoder_deps="libxavs2"
libxvid_encoder_deps="libxvid" libxvid_encoder_deps="libxvid"
libzvbi_teletext_decoder_deps="libzvbi" libzvbi_teletext_decoder_deps="libzvbi"
vapoursynth_demuxer_deps="vapoursynth" vapoursynth_demuxer_deps="vapoursynth"
...@@ -6171,6 +6174,7 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x ...@@ -6171,6 +6174,7 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x
enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
require_cpp_condition libx265 x265.h "X265_BUILD >= 68" require_cpp_condition libx265 x265.h "X265_BUILD >= 68"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.2.77" "stdint.h xavs2.h" xavs2_api_get
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version
enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
......
...@@ -2726,6 +2726,55 @@ Reduces detail but attempts to preserve color at extremely low bitrates. ...@@ -2726,6 +2726,55 @@ Reduces detail but attempts to preserve color at extremely low bitrates.
@end table @end table
@section libxavs2
xavs2 AVS2-P2/IEEE1857.4 encoder wrapper.
This encoder requires the presence of the libxavs2 headers and library
during configuration. You need to explicitly configure the build with
@option{--enable-libxavs2}.
@subsection Options
@table @option
@item lcu_row_threads
Set the number of parallel threads for rows from 1 to 8 (default 5).
@item initial_qp
Set the xavs2 quantization parameter from 1 to 63 (default 34). This is
used to set the initial qp for the first frame.
@item qp
Set the xavs2 quantization parameter from 1 to 63 (default 34). This is
used to set the qp value under constant-QP mode.
@item max_qp
Set the max qp for rate control from 1 to 63 (default 55).
@item min_qp
Set the min qp for rate control from 1 to 63 (default 20).
@item speed_level
Set the Speed level from 0 to 9 (default 0). Higher is better but slower.
@item log_level
Set the log level from -1 to 3 (default 0). -1: none, 0: error,
1: warning, 2: info, 3: debug.
@item hierarchical_ref
Set the hierarchical reference or not (default true).
@item xavs2-params
Set xavs2 options using a list of @var{key}=@var{value} couples separated
by ":".
For example to specify libxavs2 encoding options with @option{-xavs2-params}:
@example
ffmpeg -i input -c:v libxavs2 -xavs2-params preset_level=5 output.avs2
@end example
@end table
@c man end VIDEO ENCODERS @c man end VIDEO ENCODERS
@chapter Subtitles Encoders @chapter Subtitles Encoders
......
...@@ -17,6 +17,20 @@ for more formats. None of them are used by default, their use has to be ...@@ -17,6 +17,20 @@ for more formats. None of them are used by default, their use has to be
explicitly requested by passing the appropriate flags to explicitly requested by passing the appropriate flags to
@command{./configure}. @command{./configure}.
@section libxavs2
FFmpeg can make use of the xavs2 library for AVS2-P2/IEEE1857.4 video encoding.
Go to @url{https://github.com/pkuvcl/xavs2} and follow the instructions for
installing the library. Then pass @code{--enable-libxavs2} to configure to
enable it.
@float NOTE
libxavs2 is under the GNU Public License Version 2 or later
(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for
details), you must upgrade FFmpeg's license to GPL in order to use it.
@end float
@section libdavs2 @section libdavs2
FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video decoding. FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video decoding.
......
...@@ -993,6 +993,7 @@ OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o ...@@ -993,6 +993,7 @@ OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
OBJS-$(CONFIG_LIBXAVS2_ENCODER) += libxavs2.o
OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o
OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER) += libzvbi-teletextdec.o ass.o OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER) += libzvbi-teletextdec.o ass.o
......
...@@ -712,6 +712,7 @@ extern AVCodec ff_libx264_encoder; ...@@ -712,6 +712,7 @@ extern AVCodec ff_libx264_encoder;
extern AVCodec ff_libx264rgb_encoder; extern AVCodec ff_libx264rgb_encoder;
extern AVCodec ff_libx265_encoder; extern AVCodec ff_libx265_encoder;
extern AVCodec ff_libxavs_encoder; extern AVCodec ff_libxavs_encoder;
extern AVCodec ff_libxavs2_encoder;
extern AVCodec ff_libxvid_encoder; extern AVCodec ff_libxvid_encoder;
extern AVCodec ff_libzvbi_teletext_decoder; extern AVCodec ff_libzvbi_teletext_decoder;
......
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 29 #define LIBAVCODEC_VERSION_MINOR 30
#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment