summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/x86/lossless_videoencdsp: Fix handling of small widthsMichael Niedermayer2017-10-05
| | | | | | | | | | | | Fixes out of array access Fixes: crash-huf.avi Regression since: 6b41b4414934cc930468ccd5db598dd6ef643987 This could also be fixed by adding checks in the C code that calls the dsp Found-by: Zhibin Hu and 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/v4l2: set sizeimage param for non-raw buffers [fixes #6716]Jorge Ramirez-Ortiz2017-10-04
| | | | | | | | | | | | | | | | | Some V4L2 drivers fail to allocate buffers when sizeimage is not set to a max value. This is indeed the case for s5p-mfc [1] Most drivers should be able to calculate this value from the frame dimensions and format - or at least have their own default. However since this work around should not impact those drivers doing the "right thing" this commit just provides such a default. The calculations were extracted from the v4l2 driver used to develop the ffmpeg v4l2_m2m support [2]. See venc.c and vdec.c [1] linux.git/drivers/media/platform/s5p-mfc [2] linux.git/drivers/media/platform/qcom/venus/
* lavc/v4l2: Mark static const tables as suchMark Thompson2017-10-04
|
* lavc/v4l2: Remove use of lfind()Mark Thompson2017-10-04
| | | | | This is not present in older bionic and therefore fails to build there, and the code is much simpler without it anyway.
* avcodec/dxv: Check for end of input in dxv_decompress_dxt5()Michael Niedermayer2017-10-04
| | | | | | | | Fixes: Timeout Fixes: 3291/clusterfuzz-testcase-4630024655208448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/truemotion2: Fix integer overflows in tm2_high_chroma()Michael Niedermayer2017-10-04
| | | | | | | | Fixes: runtime error: signed integer overflow: -1408475220 + -1408475220 cannot be represented in type 'int' Fixes: 3336/clusterfuzz-testcase-minimized-5656839179993088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec_template: Clear tns present flag on errorMichael Niedermayer2017-10-04
| | | | | | | Fixes: 3444/clusterfuzz-testcase-minimized-6270352105668608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpegdec: fix redundant dummy frames issue of interlaced clipsZhong Li2017-10-04
| | | | | | | | | It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a regression of commit 99e07a4453732058df90885f80b3db3b4f37cb3c which always inserts a dummy frame when decode the first key field picture. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '984736dd9e5b50987a5910e22495304e4a6d975c'James Almer2017-10-03
|\ | | | | | | | | | | | | * commit '984736dd9e5b50987a5910e22495304e4a6d975c': lavc: make sure not to return EAGAIN from codecs Merged-by: James Almer <jamrial@gmail.com>
| * lavc: make sure not to return EAGAIN from codecsAnton Khirnov2017-02-25
| | | | | | | | | | | | This error is treated specially by the API. CC: libav-stable@libav.org
* | Merge commit 'b2788fe9347c02b1355574f3d28d60bfe1250ea7'James Almer2017-10-03
|\| | | | | | | | | | | | | * commit 'b2788fe9347c02b1355574f3d28d60bfe1250ea7': svq3: fix the slice size check Merged-by: James Almer <jamrial@gmail.com>
| * svq3: fix the slice size checkAnton Khirnov2017-02-25
| | | | | | | | | | | | | | | | | | Currently it incorrectly compares bits with bytes. Also, move the check right before where it's relevant, so that the correct number of remaining bits is used. CC: libav-stable@libav.org
* | Merge commit '248dc5c1646dcdd96fe79761105c4ae889e711fd'James Almer2017-10-03
|\| | | | | | | | | | | | | * commit '248dc5c1646dcdd96fe79761105c4ae889e711fd': h264dec: fix dropped initial SEI recovery point Merged-by: James Almer <jamrial@gmail.com>
| * h264dec: fix dropped initial SEI recovery pointJohn Stebbins2017-02-24
| |
| * aarch64: vp9itxfm: Reorder iadst16 coeffsMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | This matches the order they are in the 16 bpp version. There they are in this order, to make sure we access them in the same order they are declared, easing loading only half of the coefficients at a time. This makes the 8 bpp version match the 16 bpp version better. Signed-off-by: Martin Storsjö <martin@martin.st>
| * arm: vp9itxfm: Reorder iadst16 coeffsMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | This matches the order they are in the 16 bpp version. There they are in this order, to make sure we access them in the same order they are declared, easing loading only half of the coefficients at a time. This makes the 8 bpp version match the 16 bpp version better. Signed-off-by: Martin Storsjö <martin@martin.st>
| * aarch64: vp9itxfm: Reorder the idct coefficients for better pairingMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | All elements are used pairwise, except for the first one. Previously, the 16th element was unused. Move the unused element to the second slot, to make the later element pairs not split across registers. This simplifies loading only parts of the coefficients, reducing the difference to the 16 bpp version. Signed-off-by: Martin Storsjö <martin@martin.st>
| * arm: vp9itxfm: Reorder the idct coefficients for better pairingMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | All elements are used pairwise, except for the first one. Previously, the 16th element was unused. Move the unused element to the second slot, to make the later element pairs not split across registers. This simplifies loading only parts of the coefficients, reducing the difference to the 16 bpp version. Signed-off-by: Martin Storsjö <martin@martin.st>
| * aarch64: vp9itxfm: Avoid reloading the idct32 coefficientsMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idct32x32 function actually pushed d8-d15 onto the stack even though it didn't clobber them; there are plenty of registers that can be used to allow keeping all the idct coefficients in registers without having to reload different subsets of them at different stages in the transform. After this, we still can skip pushing d12-d15. Before: vp9_inv_dct_dct_32x32_sub32_add_neon: 8128.3 After: vp9_inv_dct_dct_32x32_sub32_add_neon: 8053.3 Signed-off-by: Martin Storsjö <martin@martin.st>
| * arm: vp9itxfm: Avoid reloading the idct32 coefficientsMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idct32x32 function actually pushed q4-q7 onto the stack even though it didn't clobber them; there are plenty of registers that can be used to allow keeping all the idct coefficients in registers without having to reload different subsets of them at different stages in the transform. Since the idct16 core transform avoids clobbering q4-q7 (but clobbers q2-q3 instead, to avoid needing to back up and restore q4-q7 at all in the idct16 function), and the lanewise vmul needs a register in the q0-q3 range, we move the stored coefficients from q2-q3 into q4-q5 while doing idct16. While keeping these coefficients in registers, we still can skip pushing q7. Before: Cortex A7 A8 A9 A53 vp9_inv_dct_dct_32x32_sub32_add_neon: 18553.8 17182.7 14303.3 12089.7 After: vp9_inv_dct_dct_32x32_sub32_add_neon: 18470.3 16717.7 14173.6 11860.8 Signed-off-by: Martin Storsjö <martin@martin.st>
| * arm: vp9lpf: Implement the mix2_44 function with one single filter passMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For this case, with 8 inputs but only changing 4 of them, we can fit all 16 input pixels into a q register, and still have enough temporary registers for doing the loop filter. The wd=8 filters would require too many temporary registers for processing all 16 pixels at once though. Before: Cortex A7 A8 A9 A53 vp9_loop_filter_mix2_v_44_16_neon: 289.7 256.2 237.5 181.2 After: vp9_loop_filter_mix2_v_44_16_neon: 221.2 150.5 177.7 138.0 Signed-off-by: Martin Storsjö <martin@martin.st>
| * aarch64: vp9lpf: Use dup+rev16+uzp1 instead of dup+lsr+dup+trn1Martin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | This is one cycle faster in total, and three instructions fewer. Before: vp9_loop_filter_mix2_v_44_16_neon: 123.2 After: vp9_loop_filter_mix2_v_44_16_neon: 122.2 Signed-off-by: Martin Storsjö <martin@martin.st>
| * arm/aarch64: vp9lpf: Keep the comparison to E within 8 bitMartin Storsjö2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The theoretical maximum value of E is 193, so we can just saturate the addition to 255. Before: Cortex A7 A8 A9 A53 A53/AArch64 vp9_loop_filter_v_4_8_neon: 143.0 127.7 114.8 88.0 87.7 vp9_loop_filter_v_8_8_neon: 241.0 197.2 173.7 140.0 136.7 vp9_loop_filter_v_16_8_neon: 497.0 419.5 379.7 293.0 275.7 vp9_loop_filter_v_16_16_neon: 965.2 818.7 731.4 579.0 452.0 After: vp9_loop_filter_v_4_8_neon: 136.0 125.7 112.6 84.0 83.0 vp9_loop_filter_v_8_8_neon: 234.0 195.5 171.5 136.0 133.7 vp9_loop_filter_v_16_8_neon: 490.0 417.5 377.7 289.0 271.0 vp9_loop_filter_v_16_16_neon: 951.2 814.7 732.3 571.0 446.7 Signed-off-by: Martin Storsjö <martin@martin.st>
| * Place attribute_deprecated in the right position for struct declarationsDiego Biurrun2017-02-23
| | | | | | | | libavcodec/vaapi.h:58:1: warning: attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]
| * nvenc: Fix nvec vs. nvenc typoDiego Biurrun2017-02-20
| |
| * webp: Fix alpha decodingMark Thompson2017-02-18
| | | | | | | | | | | | | | | | | | This was broken by 4e528206bc4d968706401206cf54471739250ec7 - the webp decoder was assuming that it could set the output pixfmt of the vp8 decoder directly, but after that change it no longer could because ff_get_format() was used instead. This adds an internal get_format() callback to webp use of the vp8 decoder to override the pixfmt appropriately.
| * vaapi_encode: Discard output buffer if picture submission failsMark Thompson2017-02-16
| | | | | | | | | | Previously this was leaking, though it actually hit an assert making sure that the buffer had already been cleared when freeing the picture.
* | libavcodec/blockdsp : add AVX versionMartin Vignali2017-10-03
| | | | | | | | | | | | | | Also modify the required alignment, to 32 instead of 16 for several codecs Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/proresdec2: Use LAST_SKIP_BITS where possibleMichael Niedermayer2017-10-03
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/proresdec2: SKIP_BITS() does not work with len=32Michael Niedermayer2017-10-03
| | | | | | | | | | | | | | | | Fixes: invalid shift Fixes: 3482/clusterfuzz-testcase-minimized-5446915875405824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevcdsp_template: Fix undefined shiftMichael Niedermayer2017-10-03
| | | | | | | | | | | | | | | | Fixes: runtime error: left shift of negative value -255 Fixes: 3373/clusterfuzz-testcase-minimized-5604083912146944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/encode: do proper cleanup on failureJames Almer2017-10-03
| | | | | | | | | | | | Fixes the last remaining memleaks introduced by a22c6a4796ca1f2cbee6784262515da876fbec22. Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/encode: free non-referenced packets' side data in the old encode API ↵James Almer2017-10-02
| | | | | | | | | | | | functions Fixes memleaks introduced by a22c6a4796ca1f2cbee6784262515da876fbec22.
* | avcodec/encode: remove usage of av_dup_packet()James Almer2017-10-02
| | | | | | | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/avpacket: deprecate av_copy_packet_side_data()James Almer2017-10-01
| | | | | | | | | | | | | | | | | | It leaks memory and destroys the dst packet in case of failure, and it ultimately duplicates functionality already existing in the saner av_packet_copy_props(). Reviewed-by: wm4 Signed-off-by: James Almer <jamrial@gmail.com>
* | libavcodec/exr : add x86 SIMD for predictorMartin Vignali2017-10-01
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/v4l2_context: Reduce spelling variationsMichael Niedermayer2017-10-01
| | | | | | | | | | Reviewed-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/v4l2_buffers: More clear return code documentationMichael Niedermayer2017-10-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/jpeg2000: Check that codsty->log2_prec_widths/heights has been ↵Michael Niedermayer2017-09-30
| | | | | | | | | | | | | | | | | | | | initialized Fixes: OOM Fixes: 2225/clusterfuzz-testcase-minimized-5505632079708160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc_sei: Support HEVC paired fields.Brian Matherly2017-09-30
| | | | | | | | | | | | | | Correctly set the interlaced_frame and top_field_first fields when pic_struct indicates paired fields. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/videotoolbox: add hevc supportAman Gupta2017-09-28
| | | | | | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* | avcodec/hevc_ps: extract SPS fields required for hvcC constructionAman Gupta2017-09-28
| | | | | | | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | opus_pvq: make max_den a floatRostislav Pehlivanov2017-09-28
| | | | | | | | | | | | | | | | Prevents int->float conversions on every loop. Performance gain on synthetic benchmarks: 13%. Suggested by kamedo2. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | avcodec/decode: Pass on the Closed Captions Side DataKarthick J2017-09-28
| | | | | | | | | | Signed-off-by: Karthick J <kjeyapal@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avdevice/decklink_dec: Added Closed caption decode from VANCKarthick J2017-09-28
| | | | | | | | | | Signed-off-by: Karthick J <kjeyapal@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avcodec/libopenh264dec: check for ff_set_dimensions() return valueJames Almer2017-09-28
| | | | | | | | | | | | Was removed by accident in e9b6212de29a966f200833220ed35f51852f05f6. Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '030de53e9cc225dc767458aedcc87efd457b4f3b'James Almer2017-09-28
|\| | | | | | | | | | | | | * commit '030de53e9cc225dc767458aedcc87efd457b4f3b': libopenh264dec: Let the framework use the h264_mp4toannexb bitstream filter Merged-by: James Almer <jamrial@gmail.com>
| * libopenh264dec: Let the framework use the h264_mp4toannexb bitstream filterMartin Storsjö2017-02-15
| | | | | | | | | | | | This avoids a lot of boilerplate code within the decoder wrapper itself. Signed-off-by: Martin Storsjö <martin@martin.st>
| * vaapi: Implement device-only setupMark Thompson2017-02-13
| | | | | | | | | | In this case, the user only supplies a device and the frame context is allocated internally by lavc.
| * lavc: Add device context field to AVCodecContextMark Thompson2017-02-13
| | | | | | | | For use by codec implementations which can allocate frames internally.