1
0
Fork 0
Commit Graph

36 Commits

Author SHA1 Message Date
Andreas Rheinhardt fe3c2c8bbe avcodec/jrevdct: Fix UB left shifts of negative numbers
Affected the rv20-1239 FATE test.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-30 04:45:28 +02:00
Andreas Rheinhardt 636631d9db Remove unnecessary libavutil/(avutil|common|internal).h inclusions
Some of these were made possible by moving several common macros to
libavutil/macros.h.

While just at it, also improve the other headers a bit.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Carl Eugen Hoyos 5a7617136a lavc/jrevdct: Avoid an aliasing violation.
Fixes fate on different PowerPC systems with some compilers.

Analyzed-by: Lauri Kasanen
2018-11-27 01:16:28 +01:00
Ronald S. Bultje 32baeafeee jrev/xvid: hardcode use of C put/add_pixels_clamped.
This removes the last use of the ff_put/add_pixels_clamped global
function pointers, and as such they are removed.

This patch has a negative effect on performance on MIPS, since there's
a SIMD-optimized put/add_pixels_clamped, but no xvid or jrev. From a
code maintenance point of view, that is probably acceptable.

Because the global function pointers are removed, this fixes the following
tsan warnings when running e.g. fate-dnxhr-parse:

WARNING: ThreadSanitizer: data race (pid=29917)
  Write of size 8 at 0x0000025b12d8 by thread T2 (mutexes: write M1543):
    #0 ff_idctdsp_init src/libavcodec/idctdsp.c:313 (ffmpeg+0x00000044b68e)
[..]
  Previous write of size 8 at 0x0000025b12d8 by thread T1 (mutexes: write M1541):
    #0 ff_idctdsp_init src/libavcodec/idctdsp.c:313 (ffmpeg+0x00000044b68e)
2017-04-06 10:03:28 -04:00
James Almer 5a49097b42 Merge commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428'
* commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428':
  idct: Change type of array stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 14:29:52 -03:00
Diego Biurrun 2ec9fa5ec6 idct: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
2016-09-29 14:48:03 +02:00
Katerina Barone-Adesi 1389b4c18d idct8x8: Fix undefined negative shifts
The original code left-shifts negative values, which is undefined
in the C99 specification (the one used during normal Libav compilation).
This change multiplies by (1 << shift), which is functionally equivalent,
but has defined behavior.

With this change, fate-idct8x8 compiled with --fsanitize=undefined works.

Bug-Id: 686
2016-03-05 08:26:36 -05:00
Michael Niedermayer 5db23c07a3 Merge commit '95c0cec03acec0a80cc1c7db48f3b2355d9e767b'
* commit '95c0cec03acec0a80cc1c7db48f3b2355d9e767b':
  idctdsp: Add global function pointers for {add|put}_pixels_clamped functions

Conflicts:
	libavcodec/arm/idctdsp_init_arm.c
	libavcodec/dct.h
	libavcodec/idctdsp.c
	libavcodec/jrevdct.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-03 03:19:40 +02:00
Diego Biurrun 95c0cec03a idctdsp: Add global function pointers for {add|put}_pixels_clamped functions
These function pointers already existed in the ARM code. Adding them globally
allows calls to the function pointers to access arch-optimized versions of the
functions transparently.
2014-09-02 14:41:13 -07:00
Katerina Barone-Adesi e50ae60d46 avcodec/fate-idct8x8: Defined behavior: eliminate negative left-shifts.
The original code left-shifts negative values, which is undefined
in the C99 specification (the one used during normal FFmpeg compilation).
This change multiplies by (1 << shift), which is functionally equivalent,
but has defined behavior.
With this change, fate-idct8x8 compiled with --fsanitize=undefined works.

Bug-Id: 686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

The assembly generated by gcc is unchanged by this commit
2014-05-20 04:21:06 +02:00
Michael Niedermayer 5cfc0ae825 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputil: Move fdct function declarations to dct.h

Conflicts:
	libavcodec/dsputil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-09 14:45:45 +01:00
Diego Biurrun 5d3d39c72e dsputil: Move fdct function declarations to dct.h 2013-02-09 00:08:28 +01:00
Michael Niedermayer ac8987591f Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'
* commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f':
  Drop DCTELEM typedef

Conflicts:
	libavcodec/alpha/dsputil_alpha.h
	libavcodec/alpha/motion_est_alpha.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/bfin/dsputil_bfin.h
	libavcodec/bfin/pixels_bfin.S
	libavcodec/cavs.c
	libavcodec/cavsdec.c
	libavcodec/dct-test.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/dsputil_template.c
	libavcodec/eamad.c
	libavcodec/h264_cavlc.c
	libavcodec/h264idct_template.c
	libavcodec/mpeg12.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/proresdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 17:44:56 +01:00
Diego Biurrun 88bd7fdc82 Drop DCTELEM typedef
It does not help as an abstraction and adds dsputil dependencies.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2013-01-22 18:32:56 -08:00
Michael Niedermayer 70d54392f5 lowres2 support.
The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-22 22:26:55 +02:00
Mans Rullgard 2bcbd98459 Remove lowres video decoding
This feature is complex, of questionable utility, and slows down
normal decoding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-21 18:56:19 +01:00
Martin Storsjö c8e1b2fbc9 libavcodec: Add ff_ prefix to j_rev_dct*
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:46 +02:00
Diego Biurrun ce33320b30 Remove redundant filename self-references inside files.
Filenames are brittle across renames and add no useful information.
2011-11-08 17:52:56 +01:00
Diego Biurrun ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Michael Niedermayer dd08de11f6 Remove unused assignment from j_rev_dct() found by CSA.
Originally committed as revision 18558 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 14:43:28 +00:00
Michael Niedermayer 72619760f0 Remvoe useless assignment found by CSA.
Originally committed as revision 18551 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 13:59:07 +00:00
Diego Biurrun bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Diego Biurrun 245976da2a Use full path for #includes from another directory.
Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-09 11:56:36 +00:00
Diego Biurrun 73c42241b4 Add copyright notice from the Independent JPEG Group instead of referring
to a README we don't include.

Originally committed as revision 6157 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-09-03 16:15:29 +00:00
Diego Biurrun bb270c0896 COSMETICS: tabs --> spaces, some prettyprinting
Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-22 01:10:11 +00:00
Diego Biurrun 115329f160 COSMETICS: Remove all trailing whitespace.
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-17 18:14:38 +00:00
Michael Niedermayer f06afd698b porting optimizations from 4x4 dct to 8x8
Originally committed as revision 3515 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-09-26 17:36:53 +00:00
Michael Niedermayer affbf0435a optimizing 4x4 idct
Originally committed as revision 3514 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-09-26 16:33:39 +00:00
Michael Niedermayer 1aa8c57b4a 1/8 resolution decoding
Originally committed as revision 3511 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-09-26 10:01:40 +00:00
Michael Niedermayer 9ca358b951 1/4 resolution decoding
Originally committed as revision 3509 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-09-26 00:18:12 +00:00
Michael Niedermayer 178fcca848 1/2 resolution decoding
Originally committed as revision 3507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-09-25 23:18:58 +00:00
Michael Niedermayer 983e3246b7 per file doxy
Originally committed as revision 1634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-03-06 11:32:04 +00:00
Zdenek Kabelac 0c1a9edad4 * UINTX -> uintx_t INTX -> intx_t
Originally committed as revision 1578 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-02-11 16:35:48 +00:00
Zdenek Kabelac cd4af68ad5 * started to cleanup name clashes for onetime compilation
Originally committed as revision 617 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-27 16:42:14 +00:00
Fabrice Bellard 13b5475264 permuted coefs in normal IDCT to avoid having different cases there
Originally committed as revision 47 to svn://svn.ffmpeg.org/ffmpeg/trunk
2001-08-07 22:45:35 +00:00
Fabrice Bellard de6d9b6404 Initial revision
Originally committed as revision 5 to svn://svn.ffmpeg.org/ffmpeg/trunk
2001-07-22 14:18:56 +00:00