summaryrefslogtreecommitdiff
path: root/libavcodec/h264_refs.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/h264_refs: discard mismatching referencesMichael Niedermayer2015-06-301-0/+16
| | | | | | | | Fixes inconsistency and out of array access Fixes: asan_heap-oob_17301a3_2100_cov_3226131691_ff_add_pixels_clamped_mmx.m2ts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '6d4d3fee63c46d921c4870feab79269af94e84e1'Michael Niedermayer2015-06-271-6/+9
|\ | | | | | | | | | | | | | | * commit '6d4d3fee63c46d921c4870feab79269af94e84e1': h264: make sure the current picture is not made a long ref multiple times See: 34ea5f418ef815c629b6ab38a6a2711fd7463290 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: make sure the current picture is not made a long ref multiple timesAnton Khirnov2015-06-271-0/+9
| | | | | | | | | | | | Fixes possible invalid reads, once one of those refs is freed, but the others remain. CC: libav-stable@libav.org
* | Merge commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6'Michael Niedermayer2015-04-291-12/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6': h264: use properly allocated AVFrames Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_refs.c libavcodec/h264_slice.c libavcodec/svq3.c libavcodec/vda_h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: use properly allocated AVFramesAnton Khirnov2015-04-291-9/+9
| |
* | avcodec: use av_mod_uintp2() where usefulJames Almer2015-04-211-1/+1
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-201-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-191-2/+2
| |
* | avcodec/h264_refs: More completely clear slice contexts in ↵Michael Niedermayer2015-04-041-2/+5
| | | | | | | | | | | | ff_h264_remove_all_refs() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264_refs: Do not set reference to things which dont existMichael Niedermayer2015-04-041-1/+1
| | | | | | | | | | | | | | | | Fixes deadlock Fixes Ticket4428 Fixes Ticket4429 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264_refs: fix null pointer dereference with -DTRACEMichael Niedermayer2015-03-311-4/+4
| | | | | | | | | | Found-by: carl Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/h264_refs: Fix compilation with -DTRACE.Carl Eugen Hoyos2015-03-291-4/+4
| |
* | Merge commit 'a12d3188cbec15e22070e139fa5cc541da07e2c3'Michael Niedermayer2015-03-211-36/+47
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'a12d3188cbec15e22070e139fa5cc541da07e2c3': h264: use a smaller struct for the ref lists Conflicts: libavcodec/h264_direct.c libavcodec/h264_mb.c libavcodec/h264_picture.c libavcodec/h264_refs.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: use a smaller struct for the ref listsAnton Khirnov2015-03-211-43/+47
| | | | | | | | | | | | There is no need to store a whole H264Picture, with a full AVFrame embedded in it. This should allow getting rid of the embedded AVFrame later.
* | Merge commit 'f42485dbce614b3f63182845da43db690b427b7c'Michael Niedermayer2015-03-211-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'f42485dbce614b3f63182845da43db690b427b7c': h264: use a separate GetBitContext for slice data Conflicts: libavcodec/h264.c libavcodec/h264_cavlc.c libavcodec/h264_parser.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: use a separate GetBitContext for slice dataAnton Khirnov2015-03-211-4/+4
| |
* | Merge commit '95eb35f30513e335990ad0d5dca6ddc318477291'Michael Niedermayer2015-03-211-29/+30
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '95eb35f30513e335990ad0d5dca6ddc318477291': h264: move the ref lists variables into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_direct.c libavcodec/h264_mb.c libavcodec/h264_picture.c libavcodec/h264_refs.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move the ref lists variables into the per-slice contextAnton Khirnov2015-03-211-25/+25
| |
* | Merge commit '56febc993b928ccc039a32158ca60b234c311875'Michael Niedermayer2015-03-211-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '56febc993b928ccc039a32158ca60b234c311875': h264: move the slice type variables into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move the slice type variables into the per-slice contextAnton Khirnov2015-03-211-3/+3
| |
* | Merge commit '92c6c2a605f9b077b8fbc25b7ed6625541232b87'Michael Niedermayer2015-03-211-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '92c6c2a605f9b077b8fbc25b7ed6625541232b87': h264: split weighted pred-related vars into per-slice context Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_mb.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: split weighted pred-related vars into per-slice contextAnton Khirnov2015-03-211-5/+5
| |
* | avcodec/h264: Move COPY_PICTURE() to h264.h so it can be used from other ↵Michael Niedermayer2015-02-081-7/+0
| | | | | | | | | | | | parts of the h264 decoder Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264_refs: set last_pic_for_ec only if it has not been set previouslyMichael Niedermayer2015-02-051-2/+3
| | | | | | | | | | | | | | | | | | This ensures we do not loose the frame in case or multiple clears Fixes out of array read Fixes: asan_heap-oob_2fa47ea_2100_cov_1278768963_ff_add_pixels_clamped_mmx.m2ts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264: Keep a reference to the last picture for ECMichael Niedermayer2015-01-111-0/+4
| | | | | | | | | | | | | | This and the next commit improve error concealment for green-block-artifacts-from-canon-100-hs.MOV Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'Michael Niedermayer2014-08-151-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867': cosmetics: Write NULL pointer inequality checks more compactly Conflicts: libavcodec/dvdsubdec.c libavcodec/h263dec.c libavcodec/libxvid.c libavcodec/rv10.c libavcodec/utils.c libavformat/format.c libavformat/matroskadec.c libavformat/segment.c libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-151-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/h264: in the absence of recovery points, be more tolerant on ↵Michael Niedermayer2014-06-041-1/+1
| | | | | | | | | | | | | | accepting plain I frames Fixes: Ticket3652 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cba4e6062a02d5bf684e13a770be88aa1fec717e'Michael Niedermayer2014-04-021-2/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'cba4e6062a02d5bf684e13a770be88aa1fec717e': More correct printf format specifiers Conflicts: libavcodec/h264_ps.c libavcodec/h264_refs.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * More correct printf format specifiersDiego Biurrun2014-04-021-2/+4
| | | | | | | | This avoids compiler warnings about argument and specifier type mismatch.
* | Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'Michael Niedermayer2014-03-171-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b': mpegvideo: move mpegvideo formats-related defines to mpegutils.h Conflicts: libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_mvpred.h libavcodec/svq1enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-161-0/+1
| |
* | Merge commit '9b749c8274f6b6f35dde2cf29b99fa4f719abf87'Michael Niedermayer2014-03-171-26/+26
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '9b749c8274f6b6f35dde2cf29b99fa4f719abf87': h264: move relevant fields from Picture to H264Picture Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move relevant fields from Picture to H264PictureVittorio Giovara2014-03-161-26/+26
| |
* | Merge commit 'f4bd9fe326ad1315a74206939ae56df93b940a09'Michael Niedermayer2014-03-011-1/+1
|\ \ | |/ | | | | | | | | | | * commit 'f4bd9fe326ad1315a74206939ae56df93b940a09': h264: fix clang warning about uninitialized variable Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: fix clang warning about uninitialized variableVittorio Giovara2014-02-281-1/+1
| |
* | Merge commit '17a63ff0cd187b9e50e4a47862750295976853b1'Michael Niedermayer2014-03-011-6/+7
|\ \ | |/ | | | | | | | | | | * commit '17a63ff0cd187b9e50e4a47862750295976853b1': h264: update flag name in ff_h264_decode_ref_pic_list_reordering() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: update flag name in ff_h264_decode_ref_pic_list_reordering()Vittorio Giovara2014-02-281-6/+7
| | | | | | | | This is the name used in the specifications.
* | avcodec/h264_refs: remove lost frames instead of disfavoring themMichael Niedermayer2014-02-271-1/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264: avoid using lost frames as referencesMichael Niedermayer2014-02-271-1/+1
| | | | | | | | | | | | Fixes Ticket3386 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f8c507f44b4c994895fc7ad954f009f61de69b1c'Michael Niedermayer2014-02-141-62/+70
|\ \ | |/ | | | | | | | | | | * commit 'f8c507f44b4c994895fc7ad954f009f61de69b1c': h264: Refactor ff_h264_decode_ref_pic_list_reordering Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: Refactor ff_h264_decode_ref_pic_list_reorderingLuca Barbato2014-02-131-64/+72
| | | | | | | | In preparation for MVC support.
* | Merge commit '98cc9efc5f6b4dc847ed3b9b60b1c3bcd14e6791'Michael Niedermayer2014-01-181-3/+4
|\ \ | |/ | | | | | | | | | | | | * commit '98cc9efc5f6b4dc847ed3b9b60b1c3bcd14e6791': h264: prevent two matching fields from being both a short/long ref combination See: 92002db3eb437414281ad4fb6e84e34862f7fc92 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: prevent two matching fields from being both a short/long ref combinationAnton Khirnov2014-01-181-0/+2
| | | | | | | | | | | | | | Fixes possible access to freed memory. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* | avcodec/h264_refs: improve key frame detection heuristicMichael Niedermayer2013-12-021-1/+6
| | | | | | | | | | | | Fixes Ticket3186 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264_refs: split conditions of if() up for better readabilityMichael Niedermayer2013-12-021-1/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4d388c0cd05dd4de545e8ea333ab4de7d67ad12d'Michael Niedermayer2013-11-281-5/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4d388c0cd05dd4de545e8ea333ab4de7d67ad12d': h264_refs: make sure not to write over the bounds of the default ref list Conflicts: libavcodec/h264_refs.c This condition should be impossible and was checked for by asserts. the asserts are moved up in this merge to gurantee that no out of array access can happen even if the state is "impossible". Also if such impossible states could somehow be created, that should be dealt with and not silently ignored. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_refs: make sure not to write over the bounds of the default ref listAnton Khirnov2013-11-271-10/+17
| | | | | | | | | | | | Fixes invalid writes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org