summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/zerocodec: implement flushingPaul B Mahol2020-04-10
|
* avcodec: add MV30 decoderPaul B Mahol2020-04-10
|
* avcodec/jpeg2000dec: Fix mixed declaration and codeAndreas Rheinhardt2020-04-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavcodec/jpeg2000dec.c: Add support for PPT markerGautam Ramakrishnan2020-04-09
| | | | | | | This patch adds functional changes to support the PPT marker. This patch fixes bug ticket #4610. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/v4l2_context: Use av_freep()Andriy Gelman2020-04-08
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/flacdsp_template: Fix invalid shifts in decorrelateMichael Niedermayer2020-04-07
| | | | | | | | Fixes: left shift of negative value -2 Fixes: 20303/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLAC_fuzzer-5096829297623040 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/xvididct: Fix integer overflow in MULT()Michael Niedermayer2020-04-07
| | | | | | | | Fixes: signed integer overflow: 23170 * 95058 cannot be represented in type 'int' Fixes: 20295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5800212870463488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffwavesynth: Correct undefined overflow of PINK_UNITMichael Niedermayer2020-04-07
| | | | | | | | Fixes: signed integer overflow: 9223372036854775775 + 128 cannot be represented in type 'long' Fixes: 20054/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5686385113825280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp3: propagate error codesPeter Ross2020-04-07
| | | | | | | throughout vp3_decode_frame the error code was being captured (ret) but never returned. Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Anton Khirnov <anton@khirnov.net>
* avcodec/cbs_h264_syntax_template: fix off by 1 error with ↵Michael Niedermayer2020-04-05
| | | | | | | | | | slice_group_change_cycle Fixes: assertion failure Fixes: 20390/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-5683400772157440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/amrwbdec: Use av_samples_set_silence().Carl Eugen Hoyos2020-04-05
| | | | Suggested-by: James Almer
* lavc/amrwbdec: Do not ignore NO_DATA frames.Carl Eugen Hoyos2020-04-05
| | | | Fixes the actual output duration of the sample in ticket #7113.
* lavc/aacdec_template: Only warn once about unusual 7.1 encoding.Carl Eugen Hoyos2020-04-04
|
* lavc/sbc: Remove bool usage.Carl Eugen Hoyos2020-04-04
|
* lavc/qsvenc: Fix format specifiers for two variables of type int.Carl Eugen Hoyos2020-04-04
|
* lavc: Use supported_samplerates for Dolby Digital encoders.Carl Eugen Hoyos2020-04-04
| | | | Fixes ticket #8518.
* libavcodec/jpeg2000dec.c: Fix indentationGautam Ramakrishnan2020-04-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/jpeg2000dec.c: Handle non EOC streamsGautam Ramakrishnan2020-04-04
| | | | | | | This patch allows decoding of j2k streams which do not have an EOC marker. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/v4l2_m2m_dec: Init reserved bytes to zero before ioctl callAndriy Gelman2020-03-31
| | | | | | | | | | struct v4l2_selection contains reserved bytes which should be set to zero before the ioctl call. Fixes valgrind error: Syscall param ioctl(VKI_V4L2_S_SELECTION) points to uninitialised byte(s) Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/v4l2_m2m: fix setting frame periodMing Qian2020-03-31
| | | | | | | | Currently the driver's frame period is incorrectly set to the frame rate. This is fixed in the commit. Signed-off-by: Ming Qian <ming.qian@nxp.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/hcadec: Check scale_factorsMichael Niedermayer2020-03-31
| | | | | | | | | Fixes: out of array read Fixes: 21286/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5683183715876864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* nvdec: attach real hw_frames to post-processed framesTimo Rothenpieler2020-03-28
|
* ffplay, avcodec, avformat: Don't initialize before av_packet_ref()Andreas Rheinhardt2020-03-28
| | | | | | | It already initializes the packet. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec, avpacket: Return blank packet on av_packet_ref() failureAndreas Rheinhardt2020-03-28
| | | | | | | | | | | | Up until now, it was completely unspecified what the content of the destination packet dst was on error. Depending upon where the error happened calling av_packet_unref() on dst might be dangerous. This commit changes this by making sure that dst is blank on error, so unreferencing it again is safe (and still pointless). This behaviour is documented. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avpacket: Always treat dst in av_packet_ref as uninitializedAndreas Rheinhardt2020-03-28
| | | | | | | | | | | | | | | | | | av_packet_ref() mostly treated the destination packet dst as uninitialized, i.e. the destination fields were simply overwritten. But if the source packet was not reference-counted, dst->buf was treated as if it pointed to an already allocated buffer (if != NULL) to be reallocated to the desired size. The documentation did not explicitly state whether the dst will be treated as uninitialized, but it stated that if the source packet is not refcounted, a new buffer in dst will be allocated. This and the fact that the side-data as well as the codepath taken in case src is refcounted always treated the packet as uninitialized means that dst should always be treated as uninitialized for the sake of consistency. And this behaviour has been explicitly documented. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/jpeg2000dec: error check when processing tlm markerGautam Ramakrishnan2020-03-27
| | | | | | | Validate the value of ST field in the TLM marker of JPEG2000. Throw an error when ST takes value of 0b11. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* h264_ps: pass AVCodecContext as void* where possibleAnton Khirnov2020-03-27
| | | | Makes sure it is only used for logging and nothing else.
* lavc/x86/hevc_add_res: Fix coeff overflow in ADD_RES_SSE_16_32_8Linjie Fu2020-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix overflow for coeff -32768 in function ADD_RES_SSE_16_32_8 with no performance drop.(SSE2/AVX/AVX2) ./checkasm --test=hevc_add_res --bench Mainline: - hevc_add_res.add_residual [OK] hevc_add_res_32x32_8_sse2: 127.5 hevc_add_res_32x32_8_avx: 127.0 hevc_add_res_32x32_8_avx2: 86.5 Add overflow test case: - hevc_add_res.add_residual [FAILED] After: - hevc_add_res.add_residual [OK] hevc_add_res_32x32_8_sse2: 126.8 hevc_add_res_32x32_8_avx: 128.3 hevc_add_res_32x32_8_avx2: 86.8 Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc/x86/hevc_add_res: Fix overflow in ADD_RES_SSE_8_8Linjie Fu2020-03-27
| | | | | | | | | | | | | | | | | | | | | | Fix overflow for coeff -32768 in function ADD_RES_SSE_8_8 with no performance drop. ./checkasm --test=hevc_add_res --bench Mainline: - hevc_add_res.add_residual [OK] hevc_add_res_8x8_8_sse2: 15.5 Add overflow test case: - hevc_add_res.add_residual [FAILED] After: - hevc_add_res.add_residual [OK] hevc_add_res_8x8_8_sse2: 15.5 Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc/x86/hevc_add_res: Fix overflow in ADD_RES_MMX_4_8Linjie Fu2020-03-27
| | | | | | | | | | | | | | | | | | | | | | Fix overflow for coeff -32768 in function ADD_RES_MMX_4_8 with no performance drop. ./checkasm --test=hevc_add_res --bench Mainline: - hevc_add_res.add_residual [OK] hevc_add_res_4x4_8_mmxext: 15.5 Add overflow test case: - hevc_add_res.add_residual [FAILED] After: - hevc_add_res.add_residual [OK] hevc_add_res_4x4_8_mmxext: 15.0 Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc/pthread_frame: Update user context in ff_frame_thread_freeLinjie Fu2020-03-27
| | | | | | | | | | | | | | | | | | | | | | Resolution/format changes lead to re-initialization of hardware accelerations(vaapi/dxva2/..) with new hwaccel_priv_data in the worker-thread. But hwaccel_priv_data in user context won't be updated until the resolution changing frame is output. A termination with "-vframes" just after the reinit will lead to: 1. memory leak in worker-thread. 2. double free in user-thread. Update user context in ff_frame_thread_free with the last thread submit_packet() was called on. To reproduce: ffmpeg -hwaccel vaapi(dxva2) -v verbose -i fate-suite/h264/reinit-large_420_8-to-small_420_8.h264 -pix_fmt nv12 -f rawvideo -vsync passthrough -vframes 47 -y out.yuv Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* libavcodec/jpeg2000.h: fix comments for JPEG2000 markersGautam Ramakrishnan2020-03-27
| | | | | | | The comments for some of the markers were incorrect. This patch fixes the comments associated with the markers. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp9: use a buffer pool to allocate VP9Frame extradataJames Almer2020-03-26
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dvbsubdec: replace data_size with got_sub_ptr for better readabilityLimin Wang2020-03-25
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libzvbi-teletextdec: replace data_size with got_sub_ptr for better ↵Limin Wang2020-03-25
| | | | | | | readability Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pgssubdec: replace data_size with got_sub_ptr for better readabilityLimin Wang2020-03-25
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/xsubdec: replace data_size with got_sub_ptr for better readabilityLimin Wang2020-03-25
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc: Cosmetics: Realign after last commitAndreas Rheinhardt2020-03-24
| | | | | Suggested-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/hevc, h2645_parse: Fix HEVC NAL unit names and constantsAndreas Rheinhardt2020-03-24
| | | | | | | | | | | This commit fixes the names and constants of the reserved NAL units with nal_unit_type 22 resp. 23. They were "IRAP_IRAP_VLC2x", but are actually "RSV_IRAP_VLC2x". This also required a change to cbs_h265_syntax_template.c. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dfa: Use array of fixed-sized strings for fixed-sized stringsAndreas Rheinhardt2020-03-24
| | | | | | | Surprisingly neither GCC nor Clang did this transformation on their own. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/wmadec: cosmeticsRamiro Polla2020-03-22
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/get_bits: cosmeticsRamiro Polla2020-03-22
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/decode: increase nb_bsfs after av_bsf_alloc in case alloc failedLimin Wang2020-03-22
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/bsf: Beautify log messages from bitstream filtersAndreas Rheinhardt2020-03-21
| | | | | | | | | | | | | | | | Up until now, the name of every AVBSFContext for logging purposes was "AVBSFContext", so that the default logging callback produced output like "[AVBSFContext @ 0x55813bae92c0] Extradata". This has been changed to "[trace_headers @ 0x60a000000700] Extradata" by adding an item_name- function to the AVClass for bitstream filters. Furthermore, the correct category has been set so that the introductory part before the actual message (everything before "Extradata" in the above examples) are displayed in a different colour than the rest. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/bsf: Don't set defaults for AVClass without optionsAndreas Rheinhardt2020-03-21
| | | | | | | | This happened for AVBSFContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* h264dec: do not export the chroma sample location immediately on parsing the SPSAnton Khirnov2020-03-20
| | | | | This SPS is not necessarily the one that will be used. Export the chroma location along with all the other SPS properties.
* sbcdec: do not unnecessarily set frame propertiesAnton Khirnov2020-03-20
| | | | | Decoders are supposed to export stream properties in AVCodecContext, the AVFrame properties are set from those in ff_get_buffer().
* avcodec/mpeg12dec: Add CPB coded side dataNicolas Gaullier2020-03-20
| | | | | | | This fixes mpeg2video stream copies to mpeg muxer like this: ffmpeg -i xdcamhd.mxf -c:v copy output.mpg Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/utils: Fix ff_add_cpb_side_data() add twiceNicolas Gaullier2020-03-20
| | | | | | Makes it behave similarly to av_stream_add_side_data(). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/mpeg12dec: Do not alter avctx->rc_buffer_sizeNicolas Gaullier2020-03-20
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>