summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* swscale/yuv2rgb: fix conversion to X2RGB10Manuel Stoeckl2021-09-26
| | | | | | | | | This resolves a problem where conversions from YUV to X2RGB10LE would produce color values a factor 4 too small, because an 8-bit value was placed in a 10-bit channel. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/internal: Update AVCodecInternal.is_copy documentationAndreas Rheinhardt2021-09-26
| | | | | | Forgotten in 1f4cf92cfbd3accbae582ac63126ed5570ddfd37. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Simplify check for flushing of bsfAndreas Rheinhardt2021-09-26
| | | | | | | Just check for the existence of the bsf. This is equivalent to the old criterion of the AVCodecContext being a decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Remove redundant assertAndreas Rheinhardt2021-09-26
| | | | | | | | It is now checked by FATE that no encoder capable of flushing uses frame threads, so this now redundant runtime check can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Check codec caps for consistencyAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Make sanity check stricterAndreas Rheinhardt2021-09-26
| | | | | | | | | | | | | If an AVCodec has a private class, its priv_data_size must be > 0 and at the end of a successful call to avcodec_open2() the AVCodecContext's priv_data must exist and its first element must be a pointer to said AVClass. This should not be conditional on priv_data_size being > 0 (which is tested by FATE) or on the private context having been successfully allocated (which has to have happened at that point). So remove these preconditions to make the test stricter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Sanity check AVCodec.priv_data_sizeAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/j2kenc: Fix AV_OPT_TYPE_CONST offsetsAndreas Rheinhardt2021-09-26
| | | | | | They are supposed to be zero. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Check consistency of function pointersAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Test AVCodec and AVCodecDescriptor consistencyAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Add basic sanity checks for AVCodec propertiesAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/utils: Rename to avcodecAndreas Rheinhardt2021-09-26
| | | | | | | The current name comes from a time in which libavcodec/utils.c contained the whole core of libavcodec. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Avoid reallocations for video in ff_all_formats()Andreas Rheinhardt2021-09-26
| | | | | | | | | | | | | Up until now, the list of pixfmts is reallocated every time an entry is added to it; there are currently 196 pixel formats, so this matters: It causes 5541704 calls to av_realloc_array() in a typical FATE run, which is the majority for said function (8095768 calls) and even a large chunk of the calls to av_realloc() itself (12589508 calls). Fix this by using ff_formats_pixdesc_filter() instead. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Make ff_formats_pixdesc_filter return AVFilterFormats*Andreas Rheinhardt2021-09-26
| | | | | | | | | | | | | | | | Up until now, it has returned the AVFilterFormats list via an AVFilterFormats** parameter; the actual return value was an int that was always AVERROR(ENOMEM) on error. The AVFilterFormats** argument was a pure output parameter which was only documented by naming the parameter rfmts. Yet nevertheless all callers initialized the underlying AVFilterFormats* to NULL. This commit changes this to return a pointer to AVFilterFormats directly. This is more in line with the API in general, as it allows to avoid checks for intermediate values. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_swaprect: Use ff_formats_pixdesc_filter()Andreas Rheinhardt2021-09-26
| | | | | | Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_colorbalance: fix min/max check that can never be truePaul B Mahol2021-09-26
| | | | While here change doubles to floats.
* avfilter/vf_selectivecolor: reduce number of operations with r/g/b/a pointersPaul B Mahol2021-09-26
|
* avfilter/vf_selectivecolor: refactor some repeating calculationsPaul B Mahol2021-09-26
|
* avformat/dv: Set AVFMTCTX_NOHEADER flagAndreas Rheinhardt2021-09-26
| | | | | | Audio streams are only added when a packet is read. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/argo_asf: Use memcpy to copy string without its NULAndreas Rheinhardt2021-09-26
| | | | | | | | This avoids a -Wstringop-truncation warning from GCC which takes issue with the fact that the destination might not be NUL-terminated. Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/jvdec: Make sizeof(JVFrame) smaller to save memoryAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* webp: fix transforms after a palette with pixel packing.Maryla2021-09-25
| | | | | | | | | | | | | | | When a color indexing transform with 16 or fewer colors is used, WebP uses "pixel packing", i.e. storing several pixels in one byte, which virtually reduces the width of the image (see WebPContext's reduced_width field). This reduced_width should always be used when reading and applying subsequent transforms. Updated patch with added fate test. The source image dual_transform.webp can be downloaded by cloning https://chromium.googlesource.com/webm/libwebp-test-data/ Fixes: 9368 Signed-off-by: James Zern <jzern@google.com>
* fate/subtitles: Add JACOsub remuxing testAndreas Rheinhardt2021-09-25
| | | | | | | This muxer was untested up until now; had it been tested, it would have been obvious that it has been broken for years. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/jacosubenc: Fix writing extradataAndreas Rheinhardt2021-09-25
| | | | | | | | | | | The terminating '\0' is no longer included in the size of the extradata output by the demuxer since commit 36e61e24e7ac737b38c4382d439329352d9e0c29. E.g. if one remuxes the JACOsub sample JACOsub_capability_tester.jss from the FATE suite, one receives a file not recognized as JACOsub before this patch. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsvenc: Remove dead code for user-provided buffersAndreas Rheinhardt2021-09-25
| | | | | | | Dead since commit 93016f5d1d280f9cb7856883af287fa66affc04c which ensured that the packets received by encoders are always blank. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsvenc: Fix memleaks upon allocation errorsAndreas Rheinhardt2021-09-25
| | | | | | | Fixes leaks in case the allocation of the H.264-specific stuff fails. Fixes Coverity issues #1442911 and #1442914. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample/aarch64: fix relocation out of range errorZhao Zhili2021-09-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc/aarch64: fix relocation out of range errorZhao Zhili2021-09-25
| | | | | | Use a temporary label instead of global function symbol for b.gt. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/libsvtav1: Fix value range for rc modeLimin Wang2021-09-25
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libsvtav1: make coded GOP type configurableLimin Wang2021-09-25
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libsvtav1: Fix duplicate definition of caps_internalLimin Wang2021-09-25
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_v360: refactor uf/vf scalingPaul B Mahol2021-09-24
|
* avcodec/av1_parser: constify some variablesJames Almer2021-09-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavutil/hwcontext_qsv: fix a bug for mapping qsv frame to vaapiWenbin Chen2021-09-23
| | | | | | | | | | | | | | Command below failed. ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device qsv=qs@va -hwaccel qsv -hwaccel_device qs -filter_hw_device va -c:v h264_qsv -i 1080P.264 -vf "hwmap,format=vaapi" -c:v h264_vaapi output.264 Cause: Assign pair->first directly to data[3] in vaapi frame. pair->first is *VASurfaceID while data[3] in vaapi frame is VASurfaceID. I fix this line of code. Now the command above works. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* avformat/aviobuf: Extend ffio_fill to 64bitsAndreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/omadec: Don't output uninitialized valuesAndreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/riffenc: Fix indentationAndreas Rheinhardt2021-09-24
| | | | | | | Forgotten after bf9a8d183ddcc65b5ae473bb048a3d38bd6df9f3. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenchint: Simplify writing paddingAndreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Mark ELBGContext as being unaliased by using av_restrictAndreas Rheinhardt2021-09-24
| | | | | | | | | | | This improves performance: For msvideo1, the performance improved by 4.8% when encoding the sample from the fate-vsynth1-msvideo1 test; when encoding the sample from fate-vsynth1-cinepak, performance improved by 2%. The compiler user was GCC 10 and the calls to encode2 have been timed. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Add flags to avpriv_elbg_do()Andreas Rheinhardt2021-09-24
| | | | | | | | | This is currently unused and it is only added to enable changes while maintaining ABI compatibility. The type is uintptr_t in order to potentially accept a pointer argument. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_elbg: Check call to avpriv_elbg_do()Andreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/msvideo1enc: Check all calls to avpriv_elbg_do()Andreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/cinepakenc: Check all calls to avpriv_elbg_do()Andreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Also allocate buffers for recursion only onceAndreas Rheinhardt2021-09-23
| | | | | | | | | | This is possible because the number of elements needed in each recursion step decreases geometrically, so the geometric series provides an upper bound for the sum of number of elements of the needed buffers. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mlpenc: fix encoding stereo single stream in TrueHDPaul B Mahol2021-09-23
|
* avcodec/mlpdec: fix decoding single stereo stream in TrueHDPaul B Mahol2021-09-23
|
* avfilter/af_silenceremove: improve trimming middle silencePaul B Mahol2021-09-23
|
* avfilter/framesync: Remove redundant setting of AVClassAndreas Rheinhardt2021-09-23
| | | | | | | | | Every filter exposing the framesync options via its child_next callback already calls framesync_preinit() in its preinit callback. So the filter is already preinited whenever its child_next is called. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_convolve: Deduplicate framesync auxiliary functionsAndreas Rheinhardt2021-09-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_lut3d: Deduplicate optionsAndreas Rheinhardt2021-09-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>