summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avutil/softfloat: Assert that the exponent did not overflow the legal range ↵Michael Niedermayer2015-12-11
| | | | | | in av_normalize1_sf() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_aemphasis: more declarations abovePaul B Mahol2015-12-11
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* sbr_qmf_analysis: sanitize input for 32-bit imdctAndreas Cadhalpun2015-12-11
| | | | | | | | | | | | | If the input contains too many too large values, the imdct can overflow. Even if it didn't, the output would be larger than the valid range of 29 bits. Note that this is a very delicate limit: Allowing values up to 1<<25 does not prevent input larger than 1<<29 from arriving at sbr_sum_square, while limiting values to 1<<23 breaks the fate-aac-fixed-al_sbr_hq_cm_48_5.1 test. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* sbrdsp_fixed: assert that input values are in the valid rangeAndreas Cadhalpun2015-12-11
| | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* aacsbr: ensure strictly monotone time bordersAndreas Cadhalpun2015-12-11
| | | | | | This fixes a division by zero in the aac_fixed decoder. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* diracdec: remove duplicate codeblock decodingRostislav Pehlivanov2015-12-10
| | | | | | Broken by commit 7424a6d0a589d31100d6067ebcb47236c00f4b36 Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* diracdec: Fix FPE on invalid low_delay dataKieran Kunhya2015-12-10
|
* diracdec: Replace dirac parse codes with better onesKieran Kunhya2015-12-10
|
* diracdec: Read picture types by using parse_codeKieran Kunhya2015-12-10
|
* diracdec: Store version major/minor flagsKieran Kunhya2015-12-10
|
* diracdec: Support new extended quantiser rangeKieran Kunhya2015-12-10
|
* diracdec: Extract version parametersKieran Kunhya2015-12-10
|
* diracdec: Make slice parameters common between lowdelay and future hq profileKieran Kunhya2015-12-10
|
* diracdec: Rename lowdelay_subband to decode_subband because it is shared ↵Kieran Kunhya2015-12-10
| | | | with HQ profile
* diracdec: Template DSP functions adding 10-bit versionsKieran Kunhya2015-12-10
|
* diracdec: Move strides to bytes, and pointer types to uint8_t.Kieran Kunhya2015-12-10
| | | | | Start templating functions for move to support 10-bit Parts of this patch were written by Rostislav Pehlivanov
* lavfi/vf_alphamerge: fix unitialized pointersGanesh Ajjanagadde2015-12-10
| | | | | | Missed in commit 31f0d555e07797df1a0a141fa5e022648d480a49. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/vf_overlay: fix unitialized pointersGanesh Ajjanagadde2015-12-10
| | | | | | | Missed in commit 301c2784b35036945cd9a7049808deecce149916. Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/x86/vf_maskedmerge: move %define out of .nextrowPaul B Mahol2015-12-10
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* doc/developer: misc minor fixesGanesh Ajjanagadde2015-12-09
| | | | Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/avf_showfreqs: avoid wasteful powGanesh Ajjanagadde2015-12-09
| | | | | | | pow is a ridiculous function for computing a simple Gaussian. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* AAC encoder: fix OOB access in search_for_pnsClaudio Freire2015-12-09
| | | | | | | | | Fix OOB access in search_for_pns which was using w2 outside the window group loop, and fix a typo in which it was checking sf_idx instead of band_type Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* lavf/mpjpegdec: Fixed dereference after null checkAlex Agranovsky2015-12-09
| | | | | | Fixes Coverity CID 1341576 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Fix use of uninitialized variableMichael Niedermayer2015-12-09
| | | | | | Fixes: CID1341580 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/mathematics: Fix division by 0Michael Niedermayer2015-12-09
| | | | | | Fixes: CID1341571 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flacdec: remove unused return code assignmentMichael Niedermayer2015-12-09
| | | | | | Fixes CID1271811 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskaenc: Check codecdelay before useMichael Niedermayer2015-12-09
| | | | | | Fixes CID1238790 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/af_amix: fix memory leakGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning up usage of the formats API, and in particular fixed possible NULL pointer dereferences. This commit addresses the issue of possible resource leaks when some intermediate call fails. Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation of malloc/realloc failures. Fixes: CID 1250334. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/af_channelmap: fix memory leakGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | | Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning up usage of the formats API, and in particular fixed possible NULL pointer dereferences. This commit addresses the issue of possible resource leaks when some intermediate call fails. Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation of malloc/realloc failures. Fixes: CID 1338330. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/vf_alphamerge: fix memory leaksGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning up usage of the formats API, and in particular fixed possible NULL pointer dereferences. This commit addresses the issue of possible resource leaks when some intermediate call fails. Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation of malloc/realloc failures. Fixes: CID 1338326, 1338329. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/vf_overlay: fix memory leaksGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning up usage of the formats API, and in particular fixed possible NULL pointer dereferences. This commit addresses the issue of possible resource leaks when some intermediate call fails. Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation of malloc/realloc failures. Fixes: CID 1338327. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/show_palette: fix memory leakGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | | | | | Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning up usage of the formats API, and in particular fixed possible NULL pointer dereferences. This commit addresses the issue of possible resource leaks when some intermediate call fails. Unfortunately, even leaving aside this subtle intermediate failure aspect, commit 8087632027d755cd32ccc9e91ea025e276197055 was only partially successful in addressing memleaks. Hopefully, this commit fixes the issue completely. Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation of malloc/realloc failures. Fixes: CID 1270818. Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/aacsbr_tablegen: always initialize tables at runtimeGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | This gets rid of virtually useless hardcoded tables hackery. The reason it is useless is that a 320 element lut is anyway placed regardless of --enable-hardcoded-tables, from which all necessary tables are trivially derived at runtime at very low cost: sample benchmark (x86-64, Haswell, GNU/Linux, single run is really what is relevant here since looping drastically changes the bench). Fluctuations are on the order of 10% for the single run test: 39400 decicycles in aacsbr_tableinit, 1 runs, 0 skips 25325 decicycles in aacsbr_tableinit, 2 runs, 0 skips 18475 decicycles in aacsbr_tableinit, 4 runs, 0 skips 15008 decicycles in aacsbr_tableinit, 8 runs, 0 skips 13016 decicycles in aacsbr_tableinit, 16 runs, 0 skips 12005 decicycles in aacsbr_tableinit, 32 runs, 0 skips 11546 decicycles in aacsbr_tableinit, 64 runs, 0 skips 11506 decicycles in aacsbr_tableinit, 128 runs, 0 skips 11500 decicycles in aacsbr_tableinit, 256 runs, 0 skips 11183 decicycles in aacsbr_tableinit, 509 runs, 3 skips Tested with FATE with/without --enable-hardcoded-tables. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/vf_delogo: round to the closest valueJean Delvare2015-12-09
| | | | | | | | | | | | | When the interpolated value is divided by the sum of weights, no rounding is done, which means the value is truncated. This results in a slight bias towards dark green in the interpolated area. Rounding properly removes the bias. I measured this change to reduce the interpolation error by 1 to 2 % on average on a number of sample input and logo area combinations. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: replace pow by exp2Ganesh Ajjanagadde2015-12-08
| | | | | | | exp2 is a faster function. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/jpeg2000: replace naive pow call with smarter exp2fiGanesh Ajjanagadde2015-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pow is a very wasteful function for this purpose. A low hanging fruit would be simply to replace with exp2f, and that does yield some speedup. However, there are 2 drawbacks of this: 1. It does not exploit the integer nature of the argument. 2. (minor) Some platforms lack a proper exp2f routine, making benefits available only to non broken libm. 3. exp2f does not solve the same issue that plagues pow, namely terrible worst case performance. This is a fundamental issue known as the "table-maker's dilemma" recognized by Prof. Kahan himself and subsequently elaborated and researched by many others. All this is clear from benchmarks below. This exploits the IEEE-754 format to get very good performance even in the worst case for integer powers of 2. This solves all the issues noted above. Function tested with clang usan over [-1000, 1000] (beyond range of relevance for this, which is [-255, 255]), patch itself with FATE. Benchmarks obtained on x86-64, Haswell, GNU-Linux via 10^5 iterations of the pow call, START/STOP, and command ffplay ~/samples/jpeg2000/chiens_dcinema2K.mxf. Low number of runs also given to prove the point about worst case: pow: 216270 decicycles in pow, 1 runs, 0 skips 110175 decicycles in pow, 2 runs, 0 skips 56085 decicycles in pow, 4 runs, 0 skips 29013 decicycles in pow, 8 runs, 0 skips 15472 decicycles in pow, 16 runs, 0 skips 8689 decicycles in pow, 32 runs, 0 skips 5295 decicycles in pow, 64 runs, 0 skips 3599 decicycles in pow, 128 runs, 0 skips 2748 decicycles in pow, 256 runs, 0 skips 2304 decicycles in pow, 511 runs, 1 skips 2072 decicycles in pow, 1022 runs, 2 skips 1963 decicycles in pow, 2044 runs, 4 skips 1894 decicycles in pow, 4091 runs, 5 skips 1860 decicycles in pow, 8184 runs, 8 skips exp2f: 134140 decicycles in pow, 1 runs, 0 skips 68110 decicycles in pow, 2 runs, 0 skips 34530 decicycles in pow, 4 runs, 0 skips 17677 decicycles in pow, 8 runs, 0 skips 9175 decicycles in pow, 16 runs, 0 skips 4931 decicycles in pow, 32 runs, 0 skips 2808 decicycles in pow, 64 runs, 0 skips 1747 decicycles in pow, 128 runs, 0 skips 1208 decicycles in pow, 256 runs, 0 skips 952 decicycles in pow, 512 runs, 0 skips 822 decicycles in pow, 1024 runs, 0 skips 765 decicycles in pow, 2047 runs, 1 skips 722 decicycles in pow, 4094 runs, 2 skips 693 decicycles in pow, 8190 runs, 2 skips exp2fi: 2740 decicycles in pow, 1 runs, 0 skips 1530 decicycles in pow, 2 runs, 0 skips 955 decicycles in pow, 4 runs, 0 skips 622 decicycles in pow, 8 runs, 0 skips 477 decicycles in pow, 16 runs, 0 skips 368 decicycles in pow, 32 runs, 0 skips 317 decicycles in pow, 64 runs, 0 skips 291 decicycles in pow, 128 runs, 0 skips 277 decicycles in pow, 256 runs, 0 skips 268 decicycles in pow, 512 runs, 0 skips 265 decicycles in pow, 1024 runs, 0 skips 263 decicycles in pow, 2048 runs, 0 skips 263 decicycles in pow, 4095 runs, 1 skips 260 decicycles in pow, 8191 runs, 1 skips Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* aacenc: update max_sfb when num_swb changesAndreas Cadhalpun2015-12-08
| | | | | | | This fixes out-of-bounds reads in avoid_clipping. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* fate/api-jpeg-codec-param: rename to api-mjpeg-codec-paramMatthieu Bouron2015-12-08
|
* avcodec/h264: Set CORRUPT flag on output frames that are not fully recoveredSebastian Dröge2015-12-08
| | | | | | | | | | | | | | | | In the merge commit 78265fcfeee153e5e26ad4dbc7831a84ade447d6 this behaviour was broken and the CORRUPT flag would never ever be set on a frame. However the flag on the AVCodecContext was taken into account properly, including AV_CODEC_FLAG2_SHOW_ALL. The reason for this was that the recovered field of the next output picture was always set to TRUE whenever one of the two AVCodecContext flags was set, which made it impossible to detect later, before outputting, if the frame was really recovered or not. Now don't set it to TRUE unless the frame is really recovered and check the AVCodecContext flags right before outputting. Signed-off-by: Sebastian Dröge <sebastian@centricular.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu/frame: use AVPALETTE_SIZE instead of 1024Clément Bœsch2015-12-08
|
* aacenc_ltp: disable LTP with high lambda valuesRostislav Pehlivanov2015-12-08
| | | | | | Makes no sense to enable for high bitrates, the coder does well enough. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* aacenc_tns: use 4 bits for short windowsRostislav Pehlivanov2015-12-08
| | | | | | | | With only 7 coefficients per short window at most the extra precision makes a difference and seems to reduce crackling and stddev even further. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* Merge commit '6788baebb3680d447eabdadf3f5743c8470a4611'Hendrik Leppkes2015-12-08
|\ | | | | | | | | | | | | * commit '6788baebb3680d447eabdadf3f5743c8470a4611': log: Use a do {} while (0) for dlog Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * log: Use a do {} while (0) for dlogLuca Barbato2015-12-05
| | | | | | | | Avoid the warning `-Wempty-body`.
* | Merge commit '7d36474d1908d6267d4e11d4d9909f9604bd0c81'Hendrik Leppkes2015-12-08
|\| | | | | | | | | | | | | * commit '7d36474d1908d6267d4e11d4d9909f9604bd0c81': imgconvert: Re-enable the deprecation warnings Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * imgconvert: Re-enable the deprecation warningsLuca Barbato2015-12-05
| | | | | | | | | | | | The end-marked was typoed in f7edcac040f73635fc1127489c9bb29ca8b43532
* | Merge commit 'f7edcac040f73635fc1127489c9bb29ca8b43532'Hendrik Leppkes2015-12-08
|\| | | | | | | | | | | | | * commit 'f7edcac040f73635fc1127489c9bb29ca8b43532': avpicture: Suppress warning from deprecated code Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpicture: Suppress warning from deprecated codeLuca Barbato2015-12-05
| |
* | Merge commit 'b805482b1fba1d82fbe47023a24c9261f18979b6'Hendrik Leppkes2015-12-08
|\| | | | | | | | | | | | | * commit 'b805482b1fba1d82fbe47023a24c9261f18979b6': aac: Provide more information on the failure message Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * aac: Provide more information on the failure messageLuca Barbato2015-12-05
| | | | | | | | Bug-Id: 761