summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lavfi/drawutils: reimplement ff_fill_rgba_map without hardcoding the listrcombs2022-01-04
| | | | | | Same outputs, but computed instead of statically known, so new formats will be supported more easily. Asserts in place to ensure we update this if we add anything incompatible with its logic.
* lavfi/drawutils: reject shift-packed formatsrcombs2022-01-04
| | | | Disables x2bgr10/x2rgb10 (which did not behave correctly before).
* lavfi/drawutils: remove redundant BE format checksrcombs2022-01-04
| | | | We already explicitly don't support big-endian in general
* lavfi/drawutils: move BE check out of looprcombs2022-01-04
|
* swscale/output: use isSwappedChromarcombs2022-01-04
|
* swscale/output: use isSemiPlanarYUV for NV12/21/24/42 casercombs2022-01-04
|
* swscale: introduce isSwappedChromarcombs2022-01-04
|
* swscale/output: use isDataInHighBits for 10-bit casercombs2022-01-04
| | | | | This code will need fleshing-out (probably templating) if we ever add e.g. a P012 format.
* swscale/output: use isSemiPlanarYUV for 16-bit casercombs2022-01-04
|
* swscale: introduce isDataInHighBitsrcombs2022-01-04
|
* swscale/output: template-ize yuv2nv12cX 10-bit and 16-bit casesrcombs2022-01-04
| | | | | | Fixes incorrect big-endian output introduced in 88d804b7ffa20caab2e8e2809da974c41f7fd8fc Avoids making the filter-time BE check more expensive
* avformat: remove unused v210.cLimin Wang2022-01-05
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: reuse the common code for v210/v210xLimin Wang2022-01-05
| | | | | | | | As suggested by Andreas Rheinhardt, most code of v210 demuxer is common code which is duplicated from rawvideodec, so it's better to move v210/v210x demuxer code to rawvideodec.c and reuse the common code. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/videotoolbox: Fix undefined symbol with minimal configurationLimin Wang2022-01-05
| | | | | | | | | | | | | | | | | Please reproduced with the following minimal configure command: ./configure --enable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-hwaccel=h264_videotoolbox You'll get below error: Undefined symbols for architecture x86_64: "_ff_videotoolbox_vpcc_extradata_create", referenced from: _videotoolbox_start in videotoolbox.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Reported-by: Cameron Gutman <aicommander@gmail.com> Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpeg12enc: Inline constantsAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Partially inline whether codec is MPEG-1Andreas Rheinhardt2022-01-04
| | | | | | | MPEG-1 only supports 4:2:0, so one can optimize away the checks for whether one encodes MPEG-1 in codepaths that encode 4:2:2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Also inline chroma subsamplingAndreas Rheinhardt2022-01-04
| | | | | | | | | | | ff_mpeg1_encode_mb() contains two inlined calls to mpeg1_encode_mb_internal(); these calls are supposed to inline the properties depending upon the color space used. Yet inlining vertical chroma subsampling (which allows to remove complete branches and blocks depending upon them) has been forgotten. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Remove dead code at compile timeAndreas Rheinhardt2022-01-04
| | | | | | There are no encoders for interlaced dct that support 4:4:4. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Improve inlining of chroma_formatAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | encode_mb() calls encode_mb_internal() three times, once for each supported chroma format. The reason for this is that some chroma format dependent parameters can then be inlined as encode_mb_internal() is marked as av_always_inline. Yet the most basic parameters based upon chroma format have not been inlined: The chroma format itself and the chroma subsampling parameters. This commit does so. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Remove mpegvideo dependency on me_cmpAndreas Rheinhardt2022-01-04
| | | | | | | | Forgotten in cf1e0786ed64e69614760bfb4ecd7adbde8e6094. (Both mpegvideodec as well as mpegvideoenc use me_cmp, so this doesn't affect them.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Add new mpegvideodec CONFIG_EXTRAAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | This allows to remove the spurious dependencies of mpegvideo encoders on error_resilience; some other components that do not use mpegvideo to its fullest turned out to not need it either. Adding a new CONFIG_EXTRA needs a reconfigure to take effect. In order to force this a few unnecessary headers from lavfi/allfilters.c have been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move decoding-only code into a new fileAndreas Rheinhardt2022-01-04
| | | | | | | This will allow to disable this code altogether when all decoders are disabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Remove always-false checkAndreas Rheinhardt2022-01-04
| | | | | | | | | | An AVCodecContext's private data is always allocated in avcodec_open2() and calling avcodec_flush_buffers() on an unopened AVCodecContext (or an already closed one) is not allowed (and will crash before the decoder's flush function is even called). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't initialize error resilience context for encoderAndreas Rheinhardt2022-01-04
| | | | | | It is only used for decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Check for no_rounding at compile-time if possibleAndreas Rheinhardt2022-01-04
| | | | | | | | It is partially possible if it is inlined whether we deal with MPEG-1/2, because no_rounding is never set for MPEG-1/2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Remove always-true branchAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Try to perform check for MPEG-1/2 at compile-timeAndreas Rheinhardt2022-01-04
| | | | | | This is possible if CONFIG_SMALL is not true. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Partially check for being encoder at compile-timeAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | Whether lowres is in use or not is inlined in mpv_reconstruct_mb_internal(), so one can use the fact that lowres is always zero during encoding to evaluate the checks for whether one is encoding or not at compile-time when one is in lowres mode. Also reorder the main check to check for whether it is an encoder first to shortcircuit it in the common case of a decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't check for > 8 bit MPEG-1/2Andreas Rheinhardt2022-01-04
| | | | | | It doesn't exist. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_motion: Don't duplicate identical codeAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wmv2: Move ff_wmv2_add_mb() to the wmv2decAndreas Rheinhardt2022-01-04
| | | | | | Only the decoder ever used it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Avoid needlessly calling functionAndreas Rheinhardt2022-01-04
| | | | | | | | The very first check in this if-else if-else if construct is "if (s->encoding ||", i.e. in case of the WMV2 encoder the else branches are never executed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't duplicate identical codeAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Use %c to write single charAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Don't merge decoder-only fieldsAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Move options-related fields to MPEG12EncContextAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Add custom context, move mpeg2_frame_rate_ext to itAndreas Rheinhardt2022-01-04
| | | | | | It is only used here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Simplify check for A53 closed captionsAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | The a53_cc option is only useful and meaningful for MPEG-2, yet it was accidentally added for all mpegvideo-based encoders. This means that it is possible for a53_cc to be set for other encoders as well. This commit changes this and reroutes a53_cc to the dummy field in MpegEncContext for all codecs for which it is not supported. This allows to avoid a check for the current codec in mpeg12enc.c. Also add a compile-time check for whether the MPEG-2 encoder is available while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Move updating mb_info to its only userAndreas Rheinhardt2022-01-04
| | | | | | It is a H.263 option. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/speedhqenc: Inline constantsAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Remove impossible branchAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Remove unnecessary headersAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Use AVCodecContext.codec_id directlyAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Don't call function unnecessarilyAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Pass MJpegContext for writing picture headerAndreas Rheinhardt2022-01-04
| | | | | | It is the structure that is actually used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc: Deprecate unused prediction typeAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move MJPEG/AMV-only fields to MJpegContextAndreas Rheinhardt2022-01-04
| | | | | | | This is possible now that MJpegContext is allocated jointly with MpegEncContext as part of the AVCodecContext's private data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Fix intendationAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_common: Move code for MJPEG/AMV to mjpegencAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc: Add wrapper for ff_mjpeg_encode_picture_header()Andreas Rheinhardt2022-01-04
| | | | | | | This factors the translation from MpegEncContext out and will enable further optimizations in the next commits. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>