Commit Graph

1092 Commits

Author SHA1 Message Date
Michael Niedermayer 335bbe424f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: Deprecate unused FF_ER_VERY_AGGRESSIVE
  x11grab: add show_region AVOption.
  x11grab: add follow_mouse AVOption.
  Do not convert RGB buffer at once when stride does not fit exact samples.

Conflicts:
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-01 00:35:57 +02:00
Kostya Shishkov 42ba12888b Do not convert RGB buffer at once when stride does not fit exact samples.
When converting RGB format to RGB format with the same bits per sample,
unscaled path performs conversion on the whole buffer at once. For
non-multiple-of-16 BGR24 to RGB24 conversion it means that padding at the
end of line will be converted too. Since it may be of arbitrary length
(e.g. 8 bytes), operating on the whole buffer produces obviously wrong
results.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-30 09:51:23 -07:00
Stefano Sabatini 25a53c54d1 lsws: apply logging factorization in sws_scale_init() 2011-07-28 10:27:51 +02:00
Stefano Sabatini 07f49ca1d1 lsws: remove redundant macros isSupportedIn/Out
Directly call sws_isSupportedInput/Output.
2011-07-27 01:52:09 +02:00
Stefano Sabatini 64bb656326 lsws: factorize some logging code in sws_init_context() 2011-07-27 01:28:05 +02:00
Stefano Sabatini e8794f1d5e lsws: fix weird indent 2011-07-25 13:02:53 +02:00
Stefano Sabatini c899bedbca lsws: use array for storing the supported in/out information 2011-07-25 11:11:49 +02:00
Michael Niedermayer f93f6963ba Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rv30: return AVERROR(EINVAL) instead of EINVAL
  build: add -L flags before existing LDFLAGS
  simple_idct: whitespace cosmetics
  simple_idct: make repeated code a macro
  dsputil: remove huge #if 0 block
  simple_idct: change 10-bit add/put stride from pixels to bytes
  dsputil: allow 9/10-bit functions for non-h264 codecs
  dnxhd: rename some data tables
  dnxhdenc: remove inline from function only called through pointer
  dnxhdenc: whitespace cosmetics
  swscale: mark YUV422P10(LE,BE) as supported for output
  configure: add -xc99 to LDFLAGS for Sun CC
  Remove unused and non-compiling vestigial g729 decoder
  Remove unused code under G729_BITEXACT #ifdef.
  mpegvideo: fix invalid picture unreferencing.
  dsputil: Remove extra blank line at end.
  dsputil: Replace a LONG_MAX check with HAVE_FAST_64BIT.
  simple_idct: add 10-bit version

Conflicts:
	Makefile
	libavcodec/g729data.h
	libavcodec/g729dec.c
	libavcodec/rv30.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-07-21 16:28:53 +02:00
Joseph Artsimovich eedb1f2034 swscale: mark YUV422P10(LE,BE) as supported for output
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 02:10:31 +01:00
Michael Niedermayer 042f9d62ca Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Automatically add more flags required on symbian
  mem.h: switch doxygen parameter order to match function prototype
  doxygen: replace @sa tag by the more readable but equivalent @see
  doxygen: use Doxygen markup for authors and web links where appropriate
  doxygen: do not include license boilerplate in Doxygen documentation
  ac3enc: Mark AVClasses const
  ffserver: Replace two loops with one loop.
  ffmpeg: Fix the check for experimental codecs
  swscale: extend mmx padding.
  swscale: clip unscaled colorspace conversion path.
  doxygen: misc consistency cosmetics
  doc: remove file name from @file directive in Doxygen usage example
  doxygen: consistently place brief description
  doxygen: place empty line between brief description and detailed description
  avformat_open_input(): Add braces to shut up gcc warning.

Conflicts:
	libavcodec/8svx.c
	libavcodec/tiff.c
	libavcodec/tiff.h
	libavcodec/vaapi_h264.c
	libavcodec/vorbis.c
	libavcodec/vorbisdec.c
	libavcodec/vp6.c
	libswscale/swscale_unscaled.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-15 17:51:09 +02:00
Ronald S. Bultje baba2eedac swscale: extend mmx padding.
Fixes a crash when forcing libc to strictly adhere to malloc sizes.
2011-07-14 13:27:06 -07:00
Ronald S. Bultje 55eda370cb swscale: clip unscaled colorspace conversion path.
Prevents overflows on very bright scenes when adding dither,
which may lead to black dots.
2011-07-14 13:27:06 -07:00
Michael Niedermayer 5dc6bd86f0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in missing hashes and dates.
  Add an APIChanges entry and bump minor versions for recent changes.
  ffmpeg: print the low bitrate warning after the codec is openend.
  doxygen: Move function documentation into the macro generating the function.
  doxygen: Make sure parameter names match between .c and .h files.
  h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
  H.264: Add more x86 assembly for 10-bit H.264 predict functions
  lavf: fix invalid reads in avformat_find_stream_info()
  cmdutils: replace opt_default with opt_default2() and remove set_context_opts
  ffmpeg: use new avcodec_open2 and avformat_find_stream_info API.
  ffplay: use new avcodec_open2 and avformat_find_stream_info API.
  cmdutils: store all codec options in one dict instead of video/audio/sub
  ffmpeg: check experimental flag after codec is opened.
  ffmpeg: do not set GLOBAL_HEADER flag in the options context

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/version.h
	libavformat/version.h
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 20:44:58 +02:00
Diego Biurrun 96c1e6d40d doxygen: Make sure parameter names match between .c and .h files. 2011-07-14 04:09:49 +02:00
Michael Niedermayer 3602ad7ee6 Merge commit '142e76f1055de5dde44696e71a5f63f2cb11dedf'
* commit '142e76f1055de5dde44696e71a5f63f2cb11dedf':
  swscale: fix crash with dithering due incorrect offset calculation.
  matroskadec: fix stupid typo (!= -> ==)
  build: remove duplicates from order-only directory prerequisite list
  build: rework rules for things in the tools dir
  configure: fix --cpu=host with gcc 4.6
  ARM: use const macro to define constant data in asm
  bitdepth: simplify FUNC/FUNCC macros
  dsputil: remove ff_emulated_edge_mc macro used in one place
  9/10-bit: simplify clipping macros
  matroskadec: reindent
  matroskadec: defer parsing of cues element until we seek.
  lavc: add support for codec-specific defaults.
  lavc: make avcodec_alloc_context3 officially public.
  lavc: remove a half-working attempt at different defaults for audio/video codecs.
  ac3dec: add a drc_scale private option
  lavf: add avformat_find_stream_info()
  lavc: introduce avcodec_open2() as a replacement for avcodec_open().

Conflicts:
	Makefile
	libavcodec/utils.c
	libavformat/avformat.h
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-11 04:23:25 +02:00
Michael Niedermayer 3b2d285afb Merge branch 'sws_32bit_integration'
* sws_32bit_integration:
  regtests/sws: update checksums for recent changes
  sws: dont mess with XInc when the code needing it isnt used
  sws: Fix chroma init for 32bit buffers.
  swscale: error dithering for 16/9/10-bit to 8-bit.
  swscale: fix overflow in 16-bit vertical scaling.
  swscale: fix crash in 8-bpc bilinear output without alpha.
  swscale: fix 16-bit scaling when output is 8-bits.
  sws: fix non native endian 9-15 bit input with 16bit out
  sws: disable scale16 when int32 is used
  sws: fix rgb -> 16bit
  sws: fix uv overwrite in 32bt
  sws: fix gray16_1
  sws:ix yuv2rgb48_1_c_template()
  sws: fix 16/32 bug from merge
  swscale: for >8bit scaling, read in native bit-depth.
  swscale: fix another yuv range conversion overflow in 16bit scaling. (cherry picked from commit 81cc7d0bd1)
  swscale: fix yuv range correction when using 16-bit scaling. (cherry picked from commit e0b8fff6c7)
  swscale: implement >8bit scaling support.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-11 04:01:01 +02:00
Michael Niedermayer e1d9cee13d sws: dont mess with XInc when the code needing it isnt used
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-11 03:51:46 +02:00
Michael Niedermayer 29fb1b5a06 sws: Fix chroma init for 32bit buffers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-11 03:51:46 +02:00
Ronald S. Bultje c59f9a68e2 swscale: error dithering for 16/9/10-bit to 8-bit.
Based on a somewhat similar idea in FFmpeg's swscale copy.
2011-07-11 03:51:46 +02:00
Ronald S. Bultje 93a10dd561 swscale: fix overflow in 16-bit vertical scaling.
We operated on 31-bits, but with e.g. lanczos scaling, values can
add up to beyond 0x80000000, thus leading to output of zeroes. Drop
one bit of precision fixes this.
2011-07-11 03:51:46 +02:00
Ronald S. Bultje 71a04bc19d swscale: fix crash in 8-bpc bilinear output without alpha.
We accessed the alpha array even it wasn't used and didn't
exist, hence leading to a NULL pointer segfault.
(cherry picked from commit bf2cba4532)
2011-07-11 03:51:46 +02:00
Ronald S. Bultje ac9ac45aca swscale: fix 16-bit scaling when output is 8-bits.
We would use the second half of the U plane buffer, rather than the
V plane buffer, to output the V plane pixels.
2011-07-11 03:51:46 +02:00
Michael Niedermayer 08b57574c6 sws: fix non native endian 9-15 bit input with 16bit out 2011-07-11 03:51:10 +02:00
Michael Niedermayer ca78fa24b7 sws: disable scale16 when int32 is used 2011-07-11 03:51:10 +02:00
Michael Niedermayer 987e4c1787 sws: fix rgb -> 16bit 2011-07-11 03:51:10 +02:00
Michael Niedermayer b5ff61695f sws: fix uv overwrite in 32bt 2011-07-11 03:51:10 +02:00
Michael Niedermayer d2c910b9a4 sws: fix gray16_1 2011-07-11 03:51:10 +02:00
Michael Niedermayer 9470205414 sws:ix yuv2rgb48_1_c_template() 2011-07-11 03:51:10 +02:00
Michael Niedermayer ae05dd8731 sws: fix 16/32 bug from merge 2011-07-11 03:51:10 +02:00
Ronald S. Bultje 948ccdadf4 swscale: for >8bit scaling, read in native bit-depth.
For 9/10bit, it means we don't have to upscale to 16bit before
actual scaling or pixel format conversion, and thus a performance
gain.
2011-07-11 03:51:10 +02:00
Michael Niedermayer f2db5602ba Merge branch 'ronalds_buggy_gt8bit_sws'
* ronalds_buggy_gt8bit_sws:
  swscale: fix another yuv range conversion overflow in 16bit scaling. (cherry picked from commit 81cc7d0bd1)
  swscale: fix yuv range correction when using 16-bit scaling. (cherry picked from commit e0b8fff6c7)
  swscale: implement >8bit scaling support.

Conflicts:
	libswscale/swscale.c
	libswscale/utils.c
	libswscale/x86/swscale_template.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-07-11 03:49:33 +02:00
Anton Mitrofanov 142e76f105 swscale: fix crash with dithering due incorrect offset calculation.
ptrdiff_t can be 4 bytes, which leads to the next element being 4-byte
aligned and thus at a different offset than intended. Forcing 8-byte
alignment forces equal offset of dither16/32 on x86-32 and x86-64.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-10 14:52:21 -07:00
Ronald S. Bultje 5c391a161a swscale: rename uv_off/uv_off2 to uv_off_px/byte. 2011-07-08 15:15:31 -07:00
Ronald S. Bultje 1ce724ee39 swscale: implement error dithering in planarCopyWrapper.
Based on a somewhat similar idea in FFmpeg's swscale.
2011-07-08 15:15:31 -07:00
Ronald S. Bultje 4e3e333a79 swscale: error dithering for 16/9/10-bit to 8-bit.
Based on a somewhat similar idea in FFmpeg's swscale copy.
2011-07-08 15:15:30 -07:00
Ronald S. Bultje 7d7bacf0f1 swscale: fix overflow in 16-bit vertical scaling.
We operated on 31-bits, but with e.g. lanczos scaling, values can
add up to beyond 0x80000000, thus leading to output of zeroes. Drop
one bit of precision fixes this.
2011-07-08 15:15:30 -07:00
Ronald S. Bultje bf2cba4532 swscale: fix crash in 8-bpc bilinear output without alpha.
We accessed the alpha array even it wasn't used and didn't
exist, hence leading to a NULL pointer segfault.
2011-07-08 15:15:30 -07:00
Ronald S. Bultje f44d50a94c swscale: fix 16-bit horizontal scaling underflow.
When using e.g. lanczos scaling, values can drop below 0, so they
should never be unsigned.
2011-07-08 15:15:30 -07:00
Ronald S. Bultje 42d622fab3 swscale: fix 16-bit scaling when output is 8-bits.
We would use the second half of the U plane buffer, rather than the
V plane buffer, to output the V plane pixels.
2011-07-08 15:15:30 -07:00
Michael Niedermayer c3b6cc61e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffserver: remove unused variable.
  Remove unused and outdated TODO file.
  gitignore: Drop individual .d ignore; it is already covered by a wildcard.
  lavf: deprecate AVStream.quality.
  bink: pass Bink version to audio decoder through extradata instead of codec_tag.
  libpostproc: Remove disabled code.
  flashsv: improve some comments and fix some wrong ones
  flashsv: Eliminate redundant variable indirection.
  flashsv: set reference frame type to full frame
  flashsv: replace bitstream description by a link to the specification
  flashsv: convert a debug av_log into av_dlog
  flashsv: simplify condition
  flashsv: return more meaningful error values
  flashsv: cosmetics: break some overly long lines
  flashsv: cosmetics: drop some unnecessary parentheses
  swscale: amend documentation to mention use of native depth for scaling.
  eval: add missing comma to tests.
  eval: fix memleak.
  H.264: make loopfilter bS const where applicable

Conflicts:
	libavcodec/binkaudio.c
	libavformat/bink.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-06 23:57:11 +02:00
Ronald S. Bultje f28aaae1c5 swscale: amend documentation to mention use of native depth for scaling.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-07-06 03:33:36 +02:00
Michael Niedermayer 5d4fd1d1ad Merge remote-tracking branch 'qatar/master'
* qatar/master: (36 commits)
  ARM: allow unaligned buffer in fixed-point NEON FFT4
  fate: test more FFT etc sizes
  dca: set AVCodecContext frame_size for DTS audio
  YASM: Shut up unused variable compiler warning with --disable-yasm.
  x86_32: Fix build on x86_32 with --disable-yasm.
  iirfilter: add fate test
  doxygen: Add qmul docs.
  ogg: propagate return values and return more meaningful error values
  H.264: fix overreads of qscale_table
  Remove unused static tables and static inline functions.
  eval: clear Parser instances before using
  dct-test: remove 'ref' function pointer from tables
  build: Remove deleted 'check' target from .PHONY list.
  oggdec: Abort Ogg header parsing when encountering a data packet.
  Add LGPL license boilerplate to files lacking it.
  mxfenc: small typo fix
  doxygen: Fix documentation for some VP8 functions.
  sha: use AV_RB32() instead of assuming buffer can be cast to uint32_t*
  des: allow unaligned input and output buffers
  aes: allow unaligned input and output buffers
  ...

Conflicts:
	libavcodec/dct-test.c
	libavcodec/libvpxenc.c
	libavcodec/x86/dsputil_mmx.c
	libavcodec/x86/h264_qpel_mmx.c
	libavfilter/x86/gradfun.c
	libavformat/oggdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-05 02:26:17 +02:00
Diego Biurrun e589e4b82d Remove unused static tables and static inline functions. 2011-07-04 14:59:35 +02:00
Michael Niedermayer 976a8b2179 Merge remote-tracking branch 'qatar/master'
* qatar/master: (40 commits)
  H.264: template left MB handling
  H.264: faster fill_decode_caches
  H.264: faster write_back_*
  H.264: faster fill_filter_caches
  H.264: make filter_mb_fast support the case of unavailable top mb
  Do not include log.h in avutil.h
  Do not include pixfmt.h in avutil.h
  Do not include rational.h in avutil.h
  Do not include mathematics.h in avutil.h
  Do not include intfloat_readwrite.h in avutil.h
  Remove return statements following infinite loops without break
  RTSP: Doxygen comment cleanup
  doxygen: Escape '\' in Doxygen documentation.
  md5: cosmetics
  md5: use AV_WL32 to write result
  md5: add fate test
  md5: include correct headers
  md5: fix test program
  doxygen: Drop array size declarations from Doxygen parameter names.
  doxygen: Fix parameter names to match the function prototypes.
  ...

Conflicts:
	libavcodec/x86/dsputil_mmx.c
	libavformat/flvenc.c
	libavformat/oggenc.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-04 00:45:21 +02:00
Mans Rullgard abc78a5a7c Do not include log.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Mans Rullgard d49ea4afb4 Do not include pixfmt.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:07 +01:00
Diego Biurrun 01c17c88ed doxygen: Remove spurious documentation for non-existing function parameters. 2011-07-03 18:30:02 +02:00
Ronald S. Bultje 8f440223f6 swscale: disable full_chroma_int when converting to non-24/32bpp RGB.
This functionality is only implemented for RGB24/32 and causes crashes
otherwise.
2011-07-02 08:33:52 -07:00
Michael Niedermayer 3074f03a07 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  get_bits: remove x86 inline asm in A32 bitstream reader
  doc: Remove outdated information about our issue tracker
  avidec: Factor out the sync fucntionality.
  fate-aac: Expand coverage.
  ac3dsp: add x86-optimized versions of ac3dsp.extract_exponents().
  ac3dsp: simplify extract_exponents() now that it does not need to do clipping.
  ac3enc: clip coefficients after MDCT.
  ac3enc: add int32_t array clipping function to DSPUtil, including x86 versions.
  swscale: for >8bit scaling, read in native bit-depth.
  matroskadec: matroska_read_seek after after EBML_STOP leads to failure.
  doxygen: fix usage of @file directive in libavutil/{dict,file}.h
  doxygen: Help doxygen parser to understand the DECLARE_ALIGNED and offsetof macros

Conflicts:
	doc/issue_tracker.txt
	libavformat/avidec.c
	libavutil/dict.h
	libswscale/swscale.c
	libswscale/utils.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-02 03:24:32 +02:00
Ronald S. Bultje 8a8d0ce208 swscale: for >8bit scaling, read in native bit-depth.
For 9/10bit, it means we don't have to upscale to 16bit before
actual scaling or pixel format conversion, and thus a performance
gain.
2011-07-01 09:08:26 -07:00