Commit Graph

83 Commits

Author SHA1 Message Date
Matthieu Bouron 9eb3da2f99 asm: FF_-prefix internal macros used in inline assembly
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
2016-06-27 17:21:18 +02:00
Ganesh Ajjanagadde 531b0a316b avutil/x86/asm: rename REG_SP to REG_sp
REG_SP is defined by Solaris system headers.
This fixes a sea of warnings while building on Solaris:
http://fate.ffmpeg.org/report.cgi?time=20150820233505&slot=x86-opensolaris-gcc4.3

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-22 02:56:53 +02:00
Carl Eugen Hoyos 3323c5f353 Remove a few occurences of "long long" from the libraries. 2015-06-13 09:28:41 +02:00
Michael Niedermayer 6f51674c91 postproc: Avoid floats in maxClipped computation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 01:40:12 +02:00
Michael Niedermayer ebe919cce2 postproc/postprocess_template: Compute packedYScale and QPCorrecture without floats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 00:59:34 +02:00
Tucker DiNapoli cbe27006ce postproc: Made QP, nonBQP, and pQPb arrays
Also pulled QP initialization out of inner loop, which removed some redundent code.

Added some dummy fields to PPContext to allow current code to work while
changing the rest of the postprocessing code to support the arrays.

I also increased alignment requirements for some fields in the PPContext struct to
support future avx2 code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-22 23:59:03 +02:00
Tucker DiNapoli 6264b6227c postproc: Replaced inline asm for prefetching with prefetch functions
Prefetching functions are defined in postprocess_template using the
RENAME macro so that prefetching is used when available. For x86
targets inline asm is used and the functions are non-empty only for
cpus where prefetching is available. For non x86 targets the gcc bultin
prefetch is used if it is available, otherwise no prefetching is done.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-22 23:32:35 +02:00
Tucker DiNapoli 303c3dada2 postproc: Removed unecessary if/else branch when getting QP.
There's still an if, as QP needs to be modified if isColor=0, but it
still removes a unecessary branch.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-28 01:49:12 +01:00
Michael Niedermayer 83020f8978 postproc/postprocess_template: split 2nd blockgroup loop out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 00:41:41 +01:00
Michael Niedermayer d9e3fe8c22 postproc/postprocess_template: split first part of block loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 00:33:16 +01:00
Michael Niedermayer 2a9b9579ab postproc/postprocess_template: Move QP initialization down
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 00:24:46 +01:00
Michael Niedermayer 330113b032 postproc/postprocess_template: Remove dead code and comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 00:22:43 +01:00
Michael Niedermayer fc90d1502a bpostproc/postprocess_template: drop avoidable #ifdef
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 00:16:07 +01:00
Michael Niedermayer 93f4538363 postproc/postprocess_template: split loop in 2 (block groups of 4, blocks)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 00:15:58 +01:00
Michael Niedermayer ac682955e9 postproc: add basic deblock filter visualization support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-24 16:58:47 +02:00
Michael Niedermayer 3c4fc6a782 postproc/postprocess_template: mark unchanged function arguments const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-22 17:49:55 +02:00
Michael Niedermayer 7f8d28f686 postproc: Replace CLIP by av_clip_uint8
drop "#define CLIP av_clip_uint8"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-19 02:52:52 +02:00
Michael Niedermayer bb8b752553 postproc: use FFMIN/FFMAX where appropriate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-04 03:50:46 +02:00
Carl Eugen Hoyos a19bcf4ee8 Fix libpostproc compilation with !HAVE_6REGS. 2014-04-24 17:50:02 +02:00
Matt Oliver 8236747511 Automatically change MANGLE() into named inline asm operands when direct symbol reference in inline asm are not supported.
This is part of the patch-set for intel C inline asm on windows support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-18 23:39:30 +01:00
Michael Niedermayer 78d2d1e027 postprocess_template: put rsp on the clobber list to prevent gcc from using it in "q"
Fixes Ticket2675

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-16 18:21:39 +02:00
Michael Niedermayer 1d3476f258 postproc/postprocess_template: remove empty comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-23 14:39:58 +02:00
Michael Niedermayer a2f7314ba2 libpostproc: silence valgrind/fate warning about using uninitialized data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-25 21:48:45 +01:00
Carl Eugen Hoyos 7a259a5fcd Fix libpostproc compilation on x86_32 with disable-optimizations. 2013-02-09 15:03:04 +01:00
Michael Niedermayer 9e04e11e83 libpostproc: alloc a few bytes more in the temporary buffer
This avoids dering reading 4 bytes prior the buffer (1 byte can
be used)

Fixes Ticket2057

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-28 02:47:25 +01:00
Michael Niedermayer f1185fbbec libpostproc: Fix off by 1 error in the C dering code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-28 01:48:40 +01:00
Clément Bœsch a1d14336d3 pp: fix a few typo in the template. 2012-12-19 17:59:25 +01:00
Clément Bœsch f48cddfe4c pp: add SSE2 deInterlaceInterpolateCubic().
2124 decicycles in deInterlaceInterpolateCubic_C, 67100774 runs, 8090 skips
458 decicycles in deInterlaceInterpolateCubic_MMX2, 67107146 runs, 1718 skips
382 decicycles in deInterlaceInterpolateCubic_SSE2, 67107086 runs, 1778 skips
2012-11-18 16:21:59 +01:00
Clément Bœsch 4e264d1c79 pp: add support for SSE2. 2012-11-18 16:21:59 +01:00
Clément Bœsch 375cd3f2ec pp: rework the way templating is done.
This refactoring simplifies the usage of the template: define the
profile and include the template is all that is required. It should now
be easier to add more instruction sets.

The HAVE_* flags are changed with TEMPLATE_PP_* setting to avoid messing
them up.

See the top comment in postprocess_template.c for details.
2012-11-16 23:13:36 +01:00
Clément Bœsch 5cd567cfb4 pp: fix typo in avg() comment. 2012-11-15 21:54:18 +01:00
Michael Niedermayer 3689ec3d28 pp: avoid overflow in w*h
Fixes CID700580
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 21:17:43 +02:00
Derek Buitenhuis e20ac54f3e postproc: Fix unprotected inline asm
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-11 20:12:14 +02:00
XhmikosR 08bd8c8ab3 rename the remaining instances of HAVE_MMX2 to HAVE_MMXEXT
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 17:47:25 +02:00
Michael Niedermayer 9f088a1ed4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: reduce excessive inlining of mpeg_motion()
  mpegvideo: convert mpegvideo_common.h to a .c file
  build: factor out mpegvideo.o dependencies to CONFIG_MPEGVIDEO
  Move MASK_ABS macro to libavcodec/mathops.h
  x86: move MANGLE() and related macros to libavutil/x86/asm.h
  x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h
  aacdec: Don't fall back to the old output configuration when no old configuration is present.
  rtmp: Add message tracking
  rtsp: Support mpegts in raw udp packets
  rtsp: Support receiving plain data over UDP without any RTP encapsulation
  rtpdec: Remove an unused include
  rtpenc: Remove an av_abort() that depends on user-supplied data
  vsrc_movie: discourage its use with avconv.
  avconv: allow no input files.
  avconv: prevent invalid reads in transcode_init()
  avconv: rename OutputStream.is_past_recording_time to finished.

Conflicts:
	configure
	doc/filters.texi
	ffmpeg.c
	ffmpeg.h
	libavcodec/Makefile
	libavcodec/aacdec.c
	libavcodec/mpegvideo.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-09 19:31:56 +02:00
Michael Niedermayer f5bf7b9f4b libpostproc: fix out of array accesses detected by AddressSanitizer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-29 04:25:13 +01:00
Diego Biurrun b315042c8c Remove libpostproc.
This library does not fit into Libav as a whole and its code is just a
maintenance burden.  Furthermore it is now available as an external project,
which completely obviates any reason to keep it around.

URL: http://git.videolan.org/?p=libpostproc.git
2012-02-23 19:36:16 +01:00
Michael Niedermayer 7f83db3124 Merge remote-tracking branch 'qatar/master'
* qatar/master: (46 commits)
  mtv: Make sure audio_subsegments is not 0
  v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined
  avconv: add symbolic names for -vsync parameters
  flvdec: Fix compiler warning for uninitialized variables
  rtsp: Fix compiler warning for uninitialized variable
  ulti: convert to new bytestream API.
  swscale: Use standard multiple inclusion guards in ppc/ header files.
  Place some START_TIMER invocations in separate blocks.
  v4l2: list available formats
  v4l2: set the proper codec_tag
  v4l2: refactor device_open
  v4l2: simplify away io_method
  v4l2: cosmetics
  v4l2: uniform and format options
  v4l2: do not force interlaced mode
  avio: exit early in fill_buffer without read_packet
  vc1dec: fix invalid memory access for small video dimensions
  rv34: fix invalid memory access for small video dimensions
  rv34: joint coefficient decoding and dequantization
  avplay: Don't call avio_set_interrupt_cb(NULL)
  ...

Conflicts:
	Changelog
	avconv.c
	doc/APIchanges
	doc/indevs.texi
	libavcodec/adxenc.c
	libavcodec/dnxhdenc.c
	libavcodec/h264.c
	libavdevice/v4l2.c
	libavformat/flvdec.c
	libavformat/mtv.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 02:03:12 +01:00
Diego Biurrun 00a1cdd264 Place some START_TIMER invocations in separate blocks.
This fixes compilation failures related to START_TIMER/STOP_TIMER macros and
-Werror=declaration-after-statement.  START_TIMER declares variables and thus
may not be placed after statements outside of a new block.
2012-01-04 15:05:49 +01:00
Michael Niedermayer 7d8f115843 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegenc: use avctx->slices as number of slices
  v410enc: fix undefined signed left shift caused by integer promotion
  Release notes: mention cleaned up header includes
  fix Changelog file
  Fix a bunch of typos.
  Drop some pointless void* return value casts from av_malloc() invocations.
  wavpack: fix typos in previous cosmetic clean-up commit
  wavpack: cosmetics: K&R pretty-printing
  avconv: remove the 'codec framerate is different from stream' warning
  wavpack: determine sample_fmt before requesting a buffer
  bmv audio: implement new audio decoding API
  mpegaudiodec: skip all channels when skipping granules
  mpegenc: simplify muxrate calculation

Conflicts:
	Changelog
	avconv.c
	doc/RELEASE_NOTES
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo.c
	libavformat/mpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 03:06:45 +01:00
Diego Biurrun 8fd35b1aac Fix a bunch of typos. 2012-01-02 16:41:25 +01:00
Michael Niedermayer 52c522c720 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  asfdec: add side data to ASFStream packet instead of output packet.
  idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
  nellymoserdec: Indicate that the decoder can handle changed parameters
  libavcodec: Apply parameter change side data when decoding audio
  flvdec: Add param change side data if the sample rate or channels have changed
  libavformat: Add a utility function for adding parameter change side data
  libavcodec: Define a side data type for parameter changes
  aacdec: Handle new extradata passed as side data
  flvdec: Export new AAC/H.264 extradata as side data on the next packet
  libavcodec: Define a side data type for new extradata
  flacdec: skip all track indices at once instead of looping.
  mxf: Add PictureEssenceCoding UL for V210.
  mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
  mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
  mxf: H.264/MPEG-4 AVC Intra support
  configure: Show whether the safe bitstream reader is enabled
  x86: Tighten register constraints for decode_significance*_x86.
  Replace Subversion revisions in comments by Git hashes.
  h264_cabac: synchronize decode_significance_*_x86 conditionals
  w32threads: wait for the waked thread in pthread_cond_signal.
  ...

Conflicts:
	libavcodec/avcodec.h
	libavcodec/version.h
	libavformat/flvdec.c
	libavformat/utils.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 01:51:53 +01:00
Mans Rullgard b1bcddfb6d postproc: altivec: fix trivial cases of mixed declarations and code
This moves declarations without initialisers or with constant
initialisers to the start of a block, and adds do {} while(0)
around some macros, thus allowing declarations within them.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-21 00:57:45 +00:00
Michael Niedermayer 8bc7fe4daf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: misc consistency, spelling and wording fixes
  vcr1: drop unnecessary emms_c() calls without MMX code
  Replace all uses of av_close_input_file() with avformat_close_input().
  lavf: add avformat_close_input().
  lavf: deprecate av_close_input_stream().
  lavf doxy: add some basic demuxing documentation.
  lavf doxy: add some general lavf information.
  lavf doxy: add misc utility functions to a group.
  lavf doxy: add av_guess_codec/format to the encoding group.
  lavf doxy: add core functions to a doxy group.
  Add basic libavdevice documentation.
  lavc: convert error_recognition to err_recognition.
  avconv: update -map option help text
  x86: Require 7 registers for the cabac asm
  x86: bswap: remove test for bswap instruction
  bswap: make generic implementation more compiler-friendly
  h264: remove useless cast
  proresdec: fix decode_slice() prototype

Conflicts:
	configure
	doc/APIchanges
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/celp_math.h
	libavcodec/h264.c
	libavfilter/src_movie.c
	libavformat/anm.c
	libavformat/avformat.h
	libavformat/version.h
	libavutil/avstring.h
	libavutil/bswap.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 00:39:48 +01:00
Diego Biurrun 58c42af722 doxygen: misc consistency, spelling and wording fixes 2011-12-12 23:06:23 +01:00
Michael Niedermayer e834f7d2bb postproc: remove stray +
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 18:11:09 +01:00
Michael Niedermayer 3419d9b891 postproc: fix compilation failure, now really
forgot git add ...

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 01:51:35 +02:00
Yuriy Kaminskiy d16ebec795 postproc: Fix compilation failure.
libpostproc/postprocess_template.c: In function 'dering_MMX2':
libpostproc/postprocess_template.c:1045:5: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
libpostproc/postprocess_template.c:1045:5: error: 'asm' operand has impossible constraints
2011-09-24 01:37:52 +02:00
Yuriy Kaminskiy 2b2617da6b libpostproc: mmx code uses stack below %esp, fix that
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-20 21:37:00 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00