summaryrefslogtreecommitdiff
path: root/libavcodec/libaomenc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: deprecate AVCodecContext.ticks_per_frameAnton Khirnov2023-05-151-1/+7
| | | | | | | | For encoding, this field is entirely redundant with AVCodecContext.framerate. For decoding, this field is entirely redundant with AV_CODEC_PROP_FIELDS.
* libaomenc: use AVCodecContext.framerate when availableAnton Khirnov2023-05-151-2/+6
|
* lavc/libaomenc: pass through frame durations to encoded packetsAnton Khirnov2023-01-291-2/+12
|
* avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt2022-09-031-1/+1
| | | | | | | | It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libaomenc: fix the check for presence of encoder interfaceJames Almer2022-08-251-1/+1
| | | | | | ctx->encoder is not a pointer. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: check return value of queue_frames()James Almer2022-08-251-0/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: add init cleanup flagJames Almer2022-08-251-1/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: use av_fast_realloc() to resize the stats bufferJames Almer2022-08-241-5/+9
| | | | | Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: support AV_CODEC_CAP_ENCODER_RECON_FRAMEJames Almer2022-08-021-0/+97
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFEAndreas Rheinhardt2022-07-181-1/+2
| | | | | | | This is in preparation of switching the default init-thread-safety to a codec being init-thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libaomenc: Get number of operating pointsWan-Teh Chang2022-06-231-6/+14
| | | | | | | | | Use the new codec control AV1E_GET_NUM_OPERATING_POINTS to get the number of operating points. This is the size of the output arrays of AV1E_GET_SEQ_LEVEL_IDX and AV1E_GET_TARGET_SEQ_LEVEL_IDX. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc: Expose the allintra usage modeVignesh Venkatasubramanian2022-05-311-0/+1
| | | | | | | | | libaom added an usage=allintra mode for doing better with still images. Expose that in the ffmpeg's wrapper. This is especially useful for encoding still AVIF images. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: Add unmet target level warningBohan Li2022-05-271-0/+64
| | | | | | | | | | | When target levels are set, this patch checks whether they are satisfied by libaom. If not, a warning is shown. Otherwise the output levels are also logged. This patch applies basically the same approach used for libvpx. Signed-off-by: Bohan Li <bohanli@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc: Add parameter for avif single image encodingVignesh Venkatasubramanian2022-05-131-0/+14
| | | | | | | | | | | | | | Add a parameter to libaom-av1 encoder to enforce some of the single image constraints in the AV1 encoder. Setting this flag will limit the encoder to producing exactly one frame and the sequence header that is produced by the encoder will be conformant to the AVIF specification [1]. Part of Fixing Trac ticket #7621 [1] https://aomediacodec.github.io/av1-avif Signed-off-by:: Vignesh Venkatasubramanian <vigneshv@google.com>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-051-1/+1
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Rename AVCodecDefault->FFCodecDefaultAndreas Rheinhardt2022-03-211-1/+1
| | | | | | | This structure is no longer declared in a public header, so using an FF-prefix is more appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-211-15/+15
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-211-0/+1
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libaomenc: remove the redundant initializationLimin Wang2021-11-231-1/+0
| | | | | | | For dst->have_sse will be assigned by ctx->have_sse soon(code line 23). Reviewed-by: James Zern <jzern-at-google.com@ffmpeg.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libaomenc: use ctx->usage to get default cfgJames Zern2021-08-231-3/+1
| | | | | | | | | | | this prevents some mismatches in config values for realtime and all intra modes, avoiding failures like: [libaom-av1 @ ...] Failed to initialize encoder: Invalid parameter [libaom-av1 @ ...] Additional information: g_lag_in_frames out of range [..0] Signed-off-by: James Zern <jzern@google.com>
* avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt2021-07-221-0/+1
| | | | | | | It is not used here at all; instead, add it where it is used without including it or any of the arch-specific CPU headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including bsf.h in avcodec.hAndreas Rheinhardt2021-07-221-0/+1
| | | | | | Also include bsf.h directly wherever it is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/libaomenc: Show encoder config as a warning in case of failed ↵Matthieu Patou2021-06-141-4/+5
| | | | | | initialization Suggested-By: ffmpeg@fb.com
* avcodec/libaomenc: Avoid copying data, allow user-supplied buffersAndreas Rheinhardt2021-05-231-2/+4
| | | | | | | | | | | | Here the packet size is known before allocating the packet because the encoder provides said information (and works with internal buffers itself), so one can use this information to avoid the implicit use of another intermediate buffer for the packet data; and by switching to ff_get_encode_buffer() one can also allow user-supplied buffers. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: James Zern <jzern@google.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/aomenc: Force default qmax of 0 if crf was set to 0.Carl Eugen Hoyos2021-03-211-1/+4
| | | | Fixes lossless encoding without setting qmax to 0.
* lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADSAnton Khirnov2021-03-161-1/+1
| | | | | | | | | | This cap is currently used to mark multithreading-capable codecs that wrap external libraries with their own multithreading code. The name is highly confusing for our API users, since libavcodec ALWAYS handles thread_count=0 (see commit message in previous commit). Therefore rename the cap and update its documentation to make its meaning clear. The old name is kept deprecated until next+1 major bump.
* lavc: replace internal use of AV_CODEC_CAP_AUTO_THREADS with an internal capAnton Khirnov2021-03-161-0/+1
| | | | | | | | | | | | | | | | AV_CODEC_CAP_AUTO_THREADS was originally added in b4d44a45f9a to mark codecs that spawn threads internally and are able to select an optimal threads count by themselves (all such codecs are wrappers around external libraries). It is used by lavc generic code to check whether it should handle thread_count=0 itself or pass the zero directly to the codec implementation. Within this meaning, it is clearly supposed to be an internal cap rather than a public one, since from the viewpoint of a libavcodec user, lavc ALWAYS handles thread_count=0. Whether it happens in the generic code or within the codec internals is not a meaningful difference for the caller. External aspects of this flag will be dealt with in the following commit.
* avcodec/libaomenc: add support for setting arbitrary libaom optionsBohan Li2021-02-101-0/+18
| | | | | | | | | A new key & value API lets us gain access to newly added parameters without adding explicit support for them in our wrapper. Add an option utilizing this functionality in a similar manner to other encoder libraries' wrappers. Signed-off-by: Bohan Li <bohanli@google.com>
* avcodec/libaom: Support monochrome encoding with libaom >= 2.0.1Philip Langdale2020-12-081-2/+40
| | | | | | | | | | | Monochrome encoding with libaom was buggy for a long time, but this was finally sorted out in libaom 2.0.1 (2.0.0 is almost there but was still buggy in realtime mode). We'll keep support for libaom 1.x around until the LTS distros that include it are EOL (which is still a long time from now). Fixes: https://trac.ffmpeg.org/ticket/7599
* libavcodec/libaomenc.c: Add command-line options for inter-coding toolsWang Cao2020-07-241-0/+60
| | | | | Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
* libavcodec/libaomenc.c: Add command-line options for tx tools.Wang Cao2020-07-241-0/+30
| | | | | Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc: use pix_fmt descriptors where usefulJames Almer2020-07-171-11/+4
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: James Almer <jamrial@gmail.com>
* libaomenc: enable 8, 10 and 12 bit RGB encodingLynne2020-07-171-5/+21
| | | | | | | RGB pixel formats are one occasion where by pixel format we mean pixel format, primaries, transfer characteristic, and matrix coeffs, so we have to manually set them as they're set to unspecified by default, despite there only being a single possible combination.
* avcodec/libaomenc: fix build w/libaom v1.0.0James Zern2020-07-081-0/+4
| | | | | | | | broken since: aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc: Add command-line options for intra-coding toolsWang Cao2020-07-011-0/+35
| | | | | Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc: Add command-line options to control the use of partition ↵Wang Cao2020-07-011-0/+15
| | | | | | | | | | tools This patch adds the control for enabling rectangular partitions, 1:4/4:1 partitions and AB shape partitions. Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec: add AV1 profiles to profile.hJames Almer2020-06-251-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: remove the experimental flag when using libaom 2.0.0 or newerJames Almer2020-06-061-1/+4
| | | | | Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/internal: move packet related functions to their own headerJames Almer2020-06-021-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc,cosmetics: fix a typoJames Zern2020-04-111-1/+1
| | | | | | tradeof -> trade-off Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc.c: Add a libaom command-line option 'tune'Wang Cao2020-04-111-0/+7
| | | | | Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libaomenc: add an option to set the encoder "usage"James Almer2020-01-241-0/+6
| | | | | | | This allows the user enable the realtime encoding speed mode Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Add a commandline option to control loop restoration for libaomWang Cao2020-01-171-0/+6
| | | | | Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
* Delete unused branch in libaomencelliottk2019-09-191-9/+5
| | | | | | this branch is leftover from libvpxenc+vp8 Signed-off-by: James Zern <jzern@google.com>
* Change libaom default to crf=32.elliottk2019-08-231-4/+5
| | | | | | | | Current default is 256kbps, which produces inconsistent results (too high for low-res, too low for hi-res). Use CRF instead, which will adapt. Signed-off-by: James Zern <jzern@google.com>
* lavc/libaomenc: Mark a potentially unused variable as av_unused.Carl Eugen Hoyos2019-04-161-1/+1
| | | | | Fixes a warning: libavcodec/libaomenc.c:816:9: warning: unused variable ‘pict_type’
* avcodec/libaomenc: fix range of values for enable-intrabc optionJames Almer2019-04-021-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: fix default value for row-mt optionJames Almer2019-03-291-2/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: Added more commandline optionsSam John via ffmpeg-devel2019-03-291-4/+93
| | | | | | | | | | | The following are the newly added options: arnr_max_frames, arnr_strength, aq_mode, denoise_noise_level, denoise_block_size, rc_undershoot_pct, rc_overshoot_pct, minsection_pct, maxsection_pct, frame_parallel, enable_cdef, enable_global_motion, and intrabc. Also added macros for compiling for aom 1.0.0 and fixed the default values. Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/libaomenc: fix breakage from upstreamHelmut K. C. Tessarek2018-12-191-2/+7
| | | | | | | commit https://aomedia.googlesource.com/aom/+/4667aa1a373566e9c124afcd58c71731ab0d7377 changed parts of the code that broke compilation of libavcodec/libaomenc.c Signed-off-by: James Almer <jamrial@gmail.com>