summaryrefslogtreecommitdiff
path: root/libavcodec/vc1.c
Commit message (Collapse)AuthorAge
* avcodec/vc1: cleanup and simplificationzhaoxiu.zeng2015-02-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/vc1: remove unneeded #includes, there are no assert() only av_assert*Paul B Mahol2015-01-31
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/vc1: fix time_base and framerateMichael Niedermayer2014-10-15
| | | | | | | They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'Michael Niedermayer2014-10-15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41': lavc: deprecate the use of AVCodecContext.time_base for decoding Conflicts: libavcodec/avcodec.h libavcodec/h264.c libavcodec/mpegvideo_parser.c libavcodec/utils.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: deprecate the use of AVCodecContext.time_base for decodingAnton Khirnov2014-10-15
| | | | | | | | | | | | | | | | | | | | | | When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.
* | Merge commit '1a02e78653a5c7674e6c43b6e6f2748dbd2091d7'Michael Niedermayer2014-10-09
|\| | | | | | | | | | | | | | | * commit '1a02e78653a5c7674e6c43b6e6f2748dbd2091d7': vc1: initialize color properties See: ddabecbbf5509325c6c695ccc60d67c0af2065f3 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc-1: Add platform-specific start code search routine to VC1DSPContext.Ben Avison2014-08-04
| | | | | | | | | | | | | | Initialise VC1DSPContext for parser as well as for decoder. Note, the VC-1 code doesn't actually use the function pointer yet. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'Michael Niedermayer2014-06-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2': Add av_image_check_sar() and use it to validate SAR Conflicts: libavcodec/dpx.c libavcodec/dvdec.c libavcodec/ffv1dec.c libavcodec/utils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add av_image_check_sar() and use it to validate SARJustin Ruggles2014-06-20
| |
* | avcodec: replace uses of deprecated avcodec_set_dimensions()Michael Niedermayer2014-05-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vc-1: Add platform-specific start code search routine to VC1DSPContext.Ben Avison2014-04-25
| | | | | | | | | | | | | | Initialise VC1DSPContext for parser as well as for decoder. Note, the VC-1 code doesn't actually use the function pointer yet. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-04-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegvideo: operate with pointers to AVFrames instead of whole structs Conflicts: libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/intrax8.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/mpegvideo_xvmc.c libavcodec/msmpeg4.c libavcodec/ratecontrol.c libavcodec/vaapi.c libavcodec/vc1dec.c libavcodec/vdpau_vc1.c See: fc567ac49e17151f00f31b59030cd10f952612ef Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: operate with pointers to AVFrames instead of whole structswm42014-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | The most interesting parts are initialization in ff_MPV_common_init() and uninitialization in ff_MPV_common_end(). ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL checks for Picture.f, because these functions can be called on uninitialized or partially initialized Pictures. NULL pointer checks are added to ff_thread_release_buffer() stub function. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/vc1: reset fcm/field_mode in non advanced header parsingMichael Niedermayer2014-02-01
| | | | | | | | | | | | | | Fixes NULL pointer dereference Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vc1: Check bfraction_lut_indexMichael Niedermayer2014-02-01
| | | | | | | | | | | | | | | | | | | | Fixes: out of array read Fixes: asan_static-oob_1b40507_2849_SA10143.vc1 Fixes: asan_static-oob_1b40a15_2849_cov_1182297305_SA10143.vc1 Fixes: asan_static-oob_1b40f15_2849_cov_2159513432_SA10143.vc1 Fixes: asan_static-oob_1b40f15_2849_cov_3230311510_SA10143.vc1 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vc1: factor read_bfraction() outMichael Niedermayer2014-02-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vc1: fix type of tmpMichael Niedermayer2014-01-24
| | | | | | | | | | Fixes CID1163850 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-01-21
|\| | | | | | | | | | | | | | | | | | | * qatar/master: vc1: Always reset numref when parsing a new frame header. Conflicts: libavcodec/vc1.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1: Always reset numref when parsing a new frame header.Michael Niedermayer2014-01-20
| | | | | | | | | | | | | | | | | | Fixes an issue where the B-frame coding mode switches from interlaced fields to interlaced frames, causing incorrect decisions in the motion compensation code and resulting in visual artifacts. CC: libav-stable@libav.org Signed-off-by: Tim Walker <tdskywalker@gmail.com>
| * vc1: Enable the interlaced B-frame codepath.Tim Walker2014-01-13
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * vc1: Fix intensity compensation performance regressionMason Carter2013-12-22
| | | | | | | | | | | | | | | | | | | | | | Introduced by 28243b0d35b47bbf9abbd454fc444a6e0a9e7b71 Intensity compensation is always used once it was encountered, because v->next_use_ic is never set back to zero. Reset v->next_use_ic, when resetting v->next_luty/uv. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * vc1: Fix mb_height for field picturesMichael Niedermayer2013-12-17
| | | | | | | | | | | | | | | | | | | | Tables are always allocated now with sufficient space for either progressive or interlaced content. The alternative would be to detect a change and reallocate. This fixes decoding of a sample. Signed-off-by: Martin Storsjö <martin@martin.st>
* | vc1: set chromaformat = 1 for simple/main profileHendrik Leppkes2014-01-01
| | | | | | | | | | | | | | 1 is the only valid value for VC-1/WMV3, and setting it here makes sure no invalid value is send to a hw accelerator, for example. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vc1: simplify *_use_ic initializationMichael Niedermayer2013-12-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | VC1: Fix intensity compensation performance regressionMason Carter2013-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix https://trac.ffmpeg.org/ticket/3204 The problem was that intensity compensation was always used once it was encountered. This is because v->next_use_ic was never set back to zero. To fix this, when resetting v->next_luty/uv, also reset v->next_use_ic. This improved (restored) performance by 85% when decoding http://bit.ly/bbbwmv Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vc1: fix DIFF2/NORM2 with width<=16Michael Niedermayer2013-12-14
| | | | | | | | | | | | | | Fixes read of uninitialized memory Fixes msan_uninit-mem_7f785da000e8_585_480i30__codec_WVC1__mode_2__framerate_29.970__type_2__preproc_17.wmv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vc1: fix mb_height for field picturesMichael Niedermayer2013-12-14
| | | | | | | | | | | | | | | | | | | | Fixes ticket2531 Tables are always allocated now with sufficient space for either progressive or interlaced content. The alternative would be to detect a change and reallocate. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vc1: Factorize imode enum out / remove duplicationMichael Niedermayer2013-12-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c2f7417eeb9cc31f75e71f7be2780f90f1628d7e'Michael Niedermayer2013-11-30
|\| | | | | | | | | | | | | * commit 'c2f7417eeb9cc31f75e71f7be2780f90f1628d7e': vc1: move MpegEncContext.resync_marker into VC1Context. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1: move MpegEncContext.resync_marker into VC1Context.Anton Khirnov2013-11-29
| | | | | | | | | | The field still remains in MpegEncContext because it is used by the mpeg4 decoder.
* | Merge commit 'de44dfc7c0ec02bda7d846ef713145c890bfae3f'Michael Niedermayer2013-11-26
|\| | | | | | | | | | | | | | | | | * commit 'de44dfc7c0ec02bda7d846ef713145c890bfae3f': vc1: Reset numref if fieldmode is not set This change is redundant, numref is already reset Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1: Reset numref if fieldmode is not setKostya Shishkov2013-11-26
| | | | | | | | | | | | | | | | | | There are samples in the wild with B-frames and P-frames with different interlace mode. CC: libav-stable@libav.org Reported-by: Jean-Baptiste Kempf <jb@videolan.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * vc1dec: Remove interlaced warningMichael Niedermayer2013-05-28
| | | | | | | | | | | | Also add a note about the feature in the changelog. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '28243b0d35b47bbf9abbd454fc444a6e0a9e7b71'Michael Niedermayer2013-05-29
|\| | | | | | | | | | | | | | | | | | | | | * commit '28243b0d35b47bbf9abbd454fc444a6e0a9e7b71': vc1dec: Redesign the intensity compensation Conflicts: libavcodec/vc1.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1dec: Redesign the intensity compensationMichael Niedermayer2013-05-28
| | | | | | | | | | | | | | | | | | | | | | Use the intensity-compensated reference frame for subsequent fields/B-frames. Since we currently don't change the reference frame we have to maintain lookup tables for intensity compensation in the following dependent frames. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d'Michael Niedermayer2013-05-16
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d': Remove commented-out #includes h263dec: Remove broken and disabled debug cruft vc1: Reindent INIT_LUT(), align backslashes Conflicts: libavcodec/vc1.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1: Reindent INIT_LUT(), align backslashesMartin Storsjö2013-05-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-05-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: configure: Use linker hardening flags on mingw vc1: Make INIT_LUT() self contained vc1: Simplify code by using INIT_LUT() vc1: Move INIT_LUT() further up to allow using it in more places vc1dec: Remove some now unused variables vc1dec: Do not allow field_mode to change after the first header vc1, mss2: Check for any negative return value from ff_vc1_parse_frame_header vc1dec: Fix current ptr selection in vc1_mc_4mv_chroma() vc1dec: Factorize picture pointer selection in vc1_mc_4mv_chroma() vc1dec: Factorize picture pointer selection code vc1dec: Factorize srcU/V offseting vc1dec: Fix tff == 0 handling in init_block_index() vc1dec: Update destination pointers in context for fields Conflicts: libavcodec/vc1.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1: Make INIT_LUT() self containedMichael Niedermayer2013-05-15
| | | | | | | | | | | | | | Move the local variables it uses into the macro, enclosing them in a do {} while (0) scope. Signed-off-by: Martin Storsjö <martin@martin.st>
| * vc1: Simplify code by using INIT_LUT()Michael Niedermayer2013-05-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * vc1: Move INIT_LUT() further up to allow using it in more placesMichael Niedermayer2013-05-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * vc1dec: Do not allow field_mode to change after the first headerMichael Niedermayer2013-05-15
| | | | | | | | | | | | | | | | This fixes out of array accesses. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'fe06795d783785a76c6cbcaa2cd3012e6deb5fa5'Michael Niedermayer2013-05-15
|\| | | | | | | | | | | | | | | | | | | * commit 'fe06795d783785a76c6cbcaa2cd3012e6deb5fa5': vc1: implement frame interlaced b-frame header parsing Conflicts: libavcodec/vc1.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vc1: implement frame interlaced b-frame header parsingHendrik Leppkes2013-05-14
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-04
| |
* | vc1dec: make sure next_use_ic is set correctlyMichael Niedermayer2013-04-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vc1dec: factor lut clean codeMichael Niedermayer2013-04-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vc1dec: remove interlaced warningMichael Niedermayer2013-04-26
| | | | | | | | | | | | While not yet bugfree, the warning is IMHO no longer appropriate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vc1dec: redesign the intensity compensationMichael Niedermayer2013-04-24
| | | | | | | | | | | | | | | | The existing implementation had little to do with VC1. This could be implemented by adjusting the reference frames ithemselfs but that would make frame multi-threading difficult. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>