summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* lavc/hevcdec: Treat clean random access nals as keyframes for -skip_frame.Carl Eugen Hoyos2018-05-27
| | | | | | Fixes ticket #7227. Reviewed-by: Mark Thompson
* lavc/cfhd: interlaced frame decoding addedGagandeep Singh2018-05-27
| | | | ticket #5522 output of given samples significantly improved
* avcodec/mlpdec: Only change noise_type if the related fields are validMichael Niedermayer2018-05-26
| | | | | | | | | Fixes: inconsistency Fixes:runtime error: index 8 out of bounds for type 'int32_t [8]' Fixes: 6686/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5191383498358784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* indeo4: Decode all or nothing of a band header.Michael Niedermayer2018-05-26
| | | | | | | | | | | | | | This avoids inconsistent value combinations. Alternatively it would be possible to add more checks and careful use of temporary variables, but my try of this quickly seemed to become a rather large change. The disadvantage of this, is that the struct is copied back and forth. Fixes: index 6 out of bounds for type 'const uint16_t [5][16]' Fixes: 6557/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-4787296550256640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ac3dec: Use frame_size if superframe_size is 0Michael Niedermayer2018-05-26
| | | | | | | | | | Fixes: Infinite loop Fixes: 7669/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-4689042185650176 Fixes: 7670/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_AC3_fuzzer-4706306762997760 Fixes: 7672/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-4702108499574784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/hevc_ps: Use correct pix_fmt AV_PIX_FMT_GRAY9 for 9-bit 4:0:0 input.Carl Eugen Hoyos2018-05-25
|
* lavc/j2kenc: Support AV_PIX_FMT_PAL8.Carl Eugen Hoyos2018-05-25
|
* lavc/jpeg2000dec: Move a variable declaration closer to its usage.Carl Eugen Hoyos2018-05-22
|
* lavc/jpeg2000dec: Use a define to clarify the meaning of a constant.Carl Eugen Hoyos2018-05-22
|
* lavc/h264_parse: Remove a superfluous linebreak.Carl Eugen Hoyos2018-05-22
|
* avcodec/libvpxenc: fix setting amount of threads used for encodingJames Almer2018-05-21
| | | | | | | | | | | | The libvpx doxy says that a value of 0 for the g_threads field is equivalent to a value of 1, whereas for avctx->thread_count it means the maximum amount of threads possible for the host system. Use av_cpu_count() to get the correct thread count when auto threads is requested. Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vc1: FIELDTX is only present in interlaced frame I/BI picturesJerome Borsboom2018-05-20
| | | | | | | | If v->fieldtx_is_raw is not reset to zero, it may spill over from a previous interlaced frame I/BI picture. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1: fix calculation of the last line of a sliceJerome Borsboom2018-05-20
| | | | | | | | Only for the last slice of the first field is the last line of the slice equal to the height of the field. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1: DIRECTBIT is only present in inter MBsJerome Borsboom2018-05-20
| | | | | | | | | DIRECTBIT was decoded before the intra/inter MB branching when decoding interlace frame B pictures. Resulting in mistakenly also decoding it for intra MBs where this syntax element is not present. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/videotoolbox: fix decoding of some HEVC videosAman Gupta2018-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a normal hwaccel, the AVHWFramesContext sets AVFrame.hw_frames_ctx when it initializes a new AVFrame in av_hwframe_get_buffer(). But the VT hwaccel doesn't know what hw_frames_ctx to assign when the AVFrame is first created, because it depends on the format of the pixbuf that the decoder eventually decides to return. Thus newly created AVFrames always have a NULL hw_frames_ctx, and the hwaccel would only assign the ctx once a frame was done decoding. This worked fine with the H264 decoder, but with the HEVC decoder the frame's data may be moved to another empty AVFrame. Since the empty AVFrame never had hw_frames_ctx set, a frame with a NULL ctx could be returned to the API user. This patch works around the issue by moving the derived hw_frames_ctx from the AVFrame to a new VTHWFrame which now holds both the CVPixelBufferRef and the AVBuffer. The hw_frames_ctx is only copied to the AVFrame right before it is about to be returned to the user in videotoolbox_postproc_frame() (since in the case of VT, the hw_frames_ctx is only there for the API user anyway). Fixes playback on macOS and iOS of some hevc videos like https://s3.amazonaws.com/tmm1/videotoolbox/germany-hevc-zdf.ts Signed-off-by: Aman Gupta <aman@tmm1.net>
* opusenc: use for loops with declarationsRostislav Pehlivanov2018-05-18
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* lavc/v210dec: Skip Canopus C210 extradata.Carl Eugen Hoyos2018-05-17
| | | | | | | | Unbreaks files with unknown extradata, the Canopus decoder accepts both files with and without this extradata (24 byte "INFO", 16 byte "RDRT", rest "FIEL"). Reported-by: Peter Bubestinger Tested-by: Piotr Bandurski
* avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0Michael Niedermayer2018-05-17
| | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); Fixes: 6500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-4523620274536448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fic: Check available input space for cursorMichael Niedermayer2018-05-17
| | | | | | | | Fixes: out of array read Fixes: 6546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-6317064647081984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fic: Avoid some magic numbers related to cursorsMichael Niedermayer2018-05-17
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4video: Detect reference studio streams as studio streamsMichael Niedermayer2018-05-17
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Check bps (VOL header) before VOP for studio profileMichael Niedermayer2018-05-17
| | | | | | | | | | | Fixes: runtime error: shift exponent -1 is negative Fixes: 7486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4977380939530240 Fixes: runtime error: index 36 out of bounds for type 'const uint8_t [32]' Fixes: 7566/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6536620682510336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Do not corrupt bits_per_raw_sampleMichael Niedermayer2018-05-17
| | | | | Reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videode: Eliminate out of loop VOP startcode reading for studio ↵Michael Niedermayer2018-05-17
| | | | | | profile Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/g2meet: ask for sample with overflowing RGBMichael Niedermayer2018-05-17
| | | | | | Suggested-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/g2meet: Check RGB upper limitMichael Niedermayer2018-05-17
| | | | | | | | Fixes: runtime error: left shift of 1876744317 by 16 places cannot be represented in type 'int' Fixes: 6799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5115274731716608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/xwddec: fix palette alphaMarton Balint2018-05-16
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavc/h2645_parse: add h264_nal_unit_name for h264 NAL type.Jun Zhao2018-05-16
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavc/h2645_parse: rename the nal_unit_name to hevc_nal_unit_name.Jun Zhao2018-05-16
| | | | | | | Rename the nal_unit_name to hevc_nal_unit_name, will add a h264_nal_unit_name function. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavc/h2645_parse: log more HEVC NAL type.Jun Zhao2018-05-16
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* avcodec: Disable new iterate API for ossfuzzMichael Niedermayer2018-05-16
| | | | | | | | | | | | | | | | | A few days ago ossfuzz stoped testing new FFmpeg as it run out of diskspacee https://oss-fuzz-build-logs.storage.googleapis.com/index.html An alternative would be to revert the API. This changes for example -rwxr-x--- 1 michael michael 144803654 May 14 12:54 tools/target_dec_ac3_fixed_fuzzer* to -rwxr-x--- 1 michael michael 30333852 May 14 12:51 tools/target_dec_ac3_fixed_fuzzer* Which should massively decrease space requirements Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h2645_parse: skip NALUs with no content after stripping all the ↵James Almer2018-05-14
| | | | | | | | trailing zeros The GetBitContext is effectively empty in them. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vp3: Check that there will be sufficient input for the coded ↵Michael Niedermayer2018-05-13
| | | | | | | | | | fragments in unpack_superblocks() Fixes: Timeout Fixes: 6292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4871218218926080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cbs_h264: Add support for mastering display SEI messagesMark Thompson2018-05-10
|
* cbs_h264: Add support for pan-scan rectangle SEI messagesMark Thompson2018-05-10
|
* h264_metadata: Fix AUD writingMark Thompson2018-05-10
| | | | | The aud structure exists on the stack, so the variable was previously out-of-scope when the unit is written.
* h264_metadata: Remove redundant setting of SEI payload sizeMark Thompson2018-05-10
| | | | This should be derived from the data length rather than set explicitly.
* cbs_h264: Fix handling of unknown SEIMark Thompson2018-05-10
| | | | | The user should only interact directly with the data length, not the payload size.
* lavc/qdrw: Read PixMap palette.Carl Eugen Hoyos2018-05-10
| | | | Fixes ticket #6195.
* vaapi_encode_h265: Insert content light level informationHaihao Xiang2018-05-10
| | | | Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* cbs_h265: read/write content light level information SEI messageHaihao Xiang2018-05-10
| | | | Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* vaapi_encode_h265: Insert mastering display colour volumeHaihao Xiang2018-05-10
| | | | | | | '-sei xxx' is added to control SEI insertion, so far only mastering display colour volume is available for testing. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* cbs_h265: read/write HEVC PREFIX SEIHaihao Xiang2018-05-10
| | | | | | | | Similar to H264, cbs_h265_{read, write}_nal_unit() can handle HEVC prefix SEI NAL units. Currently mastering display colour volume SEI message is added only, we may add more SEI message if needed later Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* vaapi_encode: Add an assert in vaapi_encode_truncate_gop()Haihao Xiang2018-05-10
| | | | | | | | The flag of input_available must be set when pic_start is not NULL, so add an assert to ensure it is true. In addition, the assert on last_pic is unnecessary now, so remove this assert. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/nvdec_hevc: fix scaling listsPhilip Langdale2018-05-10
| | | | | | | | | | | The main issue here was the use of [i] instead of [i * 3] for the 32x32 matrix. As part of fixing this, I changed the code to match that used in vdpau_hevc, which I spent a lot of time verifying. I also changed to calculating NumPocTotalCurr using the existing helper, which is what vdpau does. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/hevcdec: make ff_hevc_frame_nb_refs take a const pointerTimo Rothenpieler2018-05-10
|
* avcodec/cuviddec: explicitly synchronize cuMemcpy callsTimo Rothenpieler2018-05-10
|
* avcodec/nvdec: pass CUstream in vpp parametersTimo Rothenpieler2018-05-10
|
* avcodec/nvdec: avoid needless copy of output frameTimo Rothenpieler2018-05-10
| | | | | | | Replaces the data pointers with the mapped cuvid ones. Adds buffer_refs to the frame to ensure the needed contexts stay alive and the cuvid idx stays allocated. Adds another buffer_ref to unmap the frame when it's unreferenced itself.
* Revert "avcodec/nvenc: make hw_frames_ctx fully optional"Timo Rothenpieler2018-05-10
| | | | | | | | This reverts commit 7d4e1f7cfb667585514bfa0a4d0fee2f717a93ed. Accidentially pushed this with a batch of other patches, and it didn't seem to break anything, so I went with it. Except it does, so reverting it it is.