Commit Graph

1101 Commits

Author SHA1 Message Date
Ronald S. Bultje af2faf2076 swscale: split YUYV output out of yuv2packed[12X]_c().
This is part of the Great Evil Plan to simplify swscale.
2011-06-09 20:52:38 -04:00
Ronald S. Bultje 6b105e3ee6 swscale: extract monowhite/black output from yuv2packed[12X]_c().
This is part of the Great Evil Plan to simplify swscale.
2011-06-09 16:47:45 -04:00
Ronald S. Bultje 6d4d483eee swscale: de-macro'ify RGB15/16/32 input functions.
Inline functions are easier to read, maintain, modify and test,
which justifies the slightly increased source size. This patch
also adds support for non-native endianness RGB15/16 and fixes
isSupportedOutput() to no longer claim that we support writing
non-native RGB565/555/444.
2011-06-09 16:47:45 -04:00
Ronald S. Bultje e2babb9b47 swscale: rearrange code.
This way the code in the file is less cluttered all-over-the-
place.
2011-06-09 16:47:45 -04:00
Ronald S. Bultje dbd3183935 swscale: change 48bit RGB input macros to inline functions.
Inline functions are slightly larger in source code, but
are easier to handle in source code editors. The binary code
generated is the same.
2011-06-09 09:29:20 -04:00
Ronald S. Bultje f30ee65700 swscale: change 9/10bit YUV input macros to inline functions.
Inline functions are slightly larger in source code, but
are easier to handle in source code editors. The binary code
generated is the same.
2011-06-09 09:29:03 -04:00
Ronald S. Bultje aa39f5f6d6 swscale: extract gray16 output functions from yuv2packed[12X]().
This is part of the Great Evil Plan to simplify swscale.
2011-06-09 09:29:02 -04:00
Ronald S. Bultje f1e0b90c64 swscale: use standard clipping functions.
This generates better code on some non-x86 architectures.
2011-06-09 09:27:51 -04:00
Ronald S. Bultje e458b53605 swscale: merge macros that are used only once.
This reduces source code size without affecting the binary.
2011-06-09 09:26:00 -04:00
Ronald S. Bultje 6e5a8d3c9a swscale: fix function declarations in swscale.c.
Remove inline keyword from functions that are never inlined.
Use av_always_inline for functions that should be force-inlined
for performance reasons. Use av_cold for init functions.
2011-06-09 09:25:59 -04:00
Ronald S. Bultje a27db4c349 swscale: fix function declaration keywords in x86/swscale_template.c.
Remove inline keyword for functions that are only called through
their function pointers (and thus cannot be inlined); add av_cold
keyword to init function, and use av_always_inline instead of
inline for functions that must be inlined for performance reasons.
2011-06-09 09:25:59 -04:00
Michael Niedermayer f9ecb849ef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  crypto: Use av_freep instead of av_free
  lavf: don't try to free private options if priv_data is NULL.
  swscale: fix types of assembly arguments.
  swscale: move two macros that are only used once into caller.
  swscale: remove unused function.
  options: Add missing braces around struct initializer.
  mov: Remove leftover crufty debug statement with references to a local file.
  dvbsubdec: Fix compilation of debug code.
  Remove all uses of now deprecated metadata functions.
  Move metadata API from lavf to lavu.

Conflicts:
	doc/APIchanges
	libavformat/aiffdec.c
	libavformat/asfdec.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/cafdec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/wtv.c
	libavutil/avutil.h
	libavutil/internal.h
	libswscale/swscale.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-09 04:47:19 +02:00
Ronald S. Bultje 9bcbb250e2 swscale: fix types of assembly arguments.
This prevents the following compiler warnings: "warning:
initialization from incompatible pointer type". Since the
variables are only ever used in inline assembly, their type
is actually irrelevant (so the part where it was wrong did
not invoke any buggy behaviour).
2011-06-08 11:39:26 -04:00
Ronald S. Bultje 496d95c34c swscale: move two macros that are only used once into caller.
This way, they look like regular code, which is easier to
understand.
2011-06-08 11:33:46 -04:00
Ronald S. Bultje 9d84dfce93 swscale: remove unused function.
Use of this wrapper was removed in a previous patch, but I
forgot to actually remove the function itself.
2011-06-08 11:08:20 -04:00
Michael Niedermayer d552f616a2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  Remove some non-compiling debug messages.
  ffplay: Fix non-compiling debug printf and replace it by av_dlog.
  H264: x86 predict init cosmetics.
  ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder.
  Move E-AC-3 encoder functions to a separate eac3enc.c file.
  ac3enc: remove convenience macro, #define DEBUG
  ac3enc: remove unused #define
  vc1: re-initialize tables after width/height change.
  APIchanges: fill-in git commit hash for av_get_bytes_per_sample() addition
  samplefmt: add av_get_bytes_per_sample()
  iirfilter: fix biquad filter coefficients.
  swscale: remove duplicate conversion routine in swScale().
  swscale: add yuv2planar/packed function typedefs.
  swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers.
  swscale: reindent x86 init code.
  swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
  swscale: cosmetics.
  swscale: remove alp/chr/lumSrcOffset.
  swscale: un-special-case yuv2yuvX16_c().
  shorten: Remove stray DEBUG #define and corresponding av_dlog statement.
  ...

Conflicts:
	doc/APIchanges
	libavcodec/ac3enc.c
	libavutil/avutil.h
	libavutil/samplefmt.c
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-08 05:25:28 +02:00
Ronald S. Bultje edeb56fa31 swscale: remove duplicate conversion routine in swScale(). 2011-06-07 10:05:55 -04:00
Ronald S. Bultje b73fe70025 swscale: add yuv2planar/packed function typedefs. 2011-06-07 10:05:55 -04:00
Ronald S. Bultje df91d09174 swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers. 2011-06-07 10:05:54 -04:00
Ronald S. Bultje 0fb5193156 swscale: reindent x86 init code. 2011-06-07 10:05:50 -04:00
Ronald S. Bultje ca364a5b43 swscale: extract SWS_FULL_CHR_H_INT conditional into init code. 2011-06-07 10:03:47 -04:00
Ronald S. Bultje b3b28b080f swscale: cosmetics. 2011-06-07 10:03:46 -04:00
Ronald S. Bultje ea28175312 swscale: remove alp/chr/lumSrcOffset.
They are hacks added to reuse the same scaling function for
different formats and they may cause problems when SIMD
implementation of the same functions are used along with pure
C functions.
2011-06-07 10:03:18 -04:00
Ronald S. Bultje bda9b20fa4 swscale: un-special-case yuv2yuvX16_c().
Make yuv2yuvX16_c a function pointer for yuv2yuvX(), so that the
function pointer becomes bitdepth-independent.
2011-06-07 10:03:12 -04:00
Michael Niedermayer 7a8228c05e sws: make dither_scale const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-07 13:23:04 +02:00
Michael Niedermayer ba91bf58cd swscale: override the lack of the accurate rounding flag when needed for dither.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-05 04:47:48 +02:00
Michael Niedermayer ec4207c46a swscale: factor should_dither out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-05 04:24:45 +02:00
Michael Niedermayer 87f40364d1 Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  build: simplify commands for clean target
  swscale: split swscale.c in unscaled and generic conversion routines.
  swscale: cosmetics.
  swscale: integrate (literally) swscale_template.c in swscale.c.
  swscale: split out x86/swscale_template.c from swscale.c.
  swscale: enable hScale_altivec_real.
  swscale: split out ppc _template.c files from main swscale.c.
  swscale: remove indirections in ppc/swscale_template.c.
  swscale: split out unscaled altivec YUV converters in their own file.
  mpegvideoenc: fix multislice fate tests with threading disabled.
  mpegts: Wrap #ifdef DEBUG and av_hex_dump_log() combination in a macro.
  build: Simplify texi2html invocation through the --output option.
  Mark some variables with av_unused
  Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().
  svq3: Check negative mb_type to fix potential crash.
  svq3: Move svq3-specific fields to their own context.
  rawdec: initialize return value to 0.
  Remove unused get_psnr() prototype
  rawdec: don't leak option strings.
  bktr: get default framerate from video standard.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-04 06:35:17 +02:00
Ronald S. Bultje 6af2801088 swscale: split swscale.c in unscaled and generic conversion routines.
This duplicates the function fillPlane().
2011-06-03 09:52:09 -07:00
Ronald S. Bultje 2762ee3034 swscale: cosmetics.
Remove duplicate "inC" and "_c" functions that do the same thing;
give each function that handles data and acts as a function pointer
a "_c" suffix; remove "_c" suffix from functions that are inherently
not optimizable. Remove inline keyword from functions that are only
used through function pointers.
2011-06-03 09:52:09 -07:00
Ronald S. Bultje 1674bd2abe swscale: integrate (literally) swscale_template.c in swscale.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje 983260b0a4 swscale: split out x86/swscale_template.c from swscale.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje 075d0ae72c swscale: enable hScale_altivec_real. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje 67d80a5421 swscale: split out ppc _template.c files from main swscale.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje a3e9bb5dee swscale: remove indirections in ppc/swscale_template.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje 0e5d31b16b swscale: split out unscaled altivec YUV converters in their own file. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje 0d793db1b0 swscale: remove unused COMPILE_TEMPLATE_ALTIVEC. 2011-06-02 21:29:59 -07:00
Baptiste Coudurier 5aa70309ad In libswscale, use all lines when converting from 422p to rgb with mmx, improve quality.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 03:46:13 +02:00
Stefano Sabatini b932eb1be6 swscale: reintroduce sws_format_name() symbol
Reintroduce the internal symbol which was removed in:

commit e1197b9e17
Author: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date:   Sun May 29 17:57:40 2011 +0200

    swscale: remove sws_format_name()

    Use av_get_pix_fmt_name() instead.

The symbol is used by some external libs (hi libx264!), this gives
time to them to use the recently added av_get_pix_fmt_name() rather
than an internal symbol.
2011-06-03 00:41:14 +02:00
Michael Niedermayer 6713989c23 swscale: dither for planar yuv outputs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-02 21:03:55 +02:00
Michael Niedermayer 877f76ad33 swscale: Fix use of uninitialized values
(bug probably introduced from a marge of libav)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-02 21:03:54 +02:00
Ronald S. Bultje 808d8ff6bb swscale: allocate larger buffer to handle altivec overreads.
Altivec sws code intentionally overreads buffers for better performance,
so we need to allocate larger buffers to handle that.
2011-06-02 11:25:56 -07:00
Reimar Döffinger 3c194f390f Replace "vector const" by "const vector" otherwise gcc 4.6.0 fails.
Given that this compiles fine with the Apple compiler that is probably
a gcc bug, but "const vector" is nicer anyway.
2011-06-02 08:38:09 +02:00
Stefano Sabatini eb5a3ab7b0 swscale: fix compilation of bfin due to missing pixdesc.h header
This is required after sws_format_name() was replaced by
av_get_pix_fmt(), which is declared in libavutil/pixdesc.h.
2011-06-01 13:30:35 +02:00
Michael Niedermayer 201549d1a9 swscale: More accurate rounding in YSCALE_YUV_2_PACKEDX_FULL_C()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-01 05:01:22 +02:00
Diego Biurrun f635a233e3 swscale: Remove unused variable. 2011-05-30 23:19:06 +02:00
Reimar Döffinger 3d0424f2ff Add "const" to avoid "initialization discards qualifiers" warning. 2011-05-30 20:07:39 +02:00
Reimar Döffinger 70564983c5 Add const to fix "cast discards qualifiers" warnings. 2011-05-30 20:02:39 +02:00
Reimar Döffinger b7b62c3a53 Include pixdesc.h for av_get_pix_fmt_name.
Fixes compilation on PPC with Altivec enabled.
2011-05-30 19:35:32 +02:00
Stefano Sabatini e1197b9e17 swscale: remove sws_format_name()
Use av_get_pix_fmt_name() instead.
2011-05-30 09:07:43 +02:00
Michael Niedermayer 5a35cef4b1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: enable UAL syntax in asm.S
  v4l2: don't leak video standard string on error.
  swscale: Remove disabled code.
  avfilter: Surround function only used in debug mode by appropriate #ifdef.
  vf_crop: Replace #ifdef DEBUG + av_log() by av_dlog().
  build: remove BUILD_ROOT variable
  vp8: use av_clip_uintp2() where possible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-30 01:29:11 +02:00
Reimar Döffinger 89c687e97e Add const to vector types for input in altivec code.
Avoids a large amount of warnings about cast discarding qualifiers.
2011-05-29 15:25:17 +02:00
Reimar Döffinger 4596d0f4c4 Remove unused variable, avoiding compiler warning. 2011-05-29 15:23:28 +02:00
Reimar Döffinger 54dc95634d Cast pointers to uintptr_t rather than unsigned int.
Avoids potential warnings on PPC64 systems.
2011-05-29 15:22:15 +02:00
Diego Biurrun 06b5facd4b swscale: Remove disabled code. 2011-05-29 14:32:08 +02:00
Michael Niedermayer b8a43bc1b5 Merge remote-tracking branch 'qatar/master' into master
* qatar/master: (27 commits)
  ac3enc: fix LOCAL_ALIGNED usage in count_mantissa_bits()
  ac3dsp: do not use the ff_* prefix when referencing ff_ac3_bap_bits.
  ac3dsp: fix loop condition in ac3_update_bap_counts_c()
  ARM: unbreak build
  ac3enc: modify mantissa bit counting to keep bap counts for all values of bap instead of just 0 to 4.
  ac3enc: split mantissa bit counting into a separate function.
  ac3enc: store per-block/channel bap pointers by reference block in a 2D array rather than in the AC3Block struct.
  get_bits: add av_unused tag to cache variable
  sws: replace all long with int.
  ARM: aacdec: fix constraints on inline asm
  ARM: remove unnecessary volatile from inline asm
  ARM: add "cc" clobbers to inline asm where needed
  ARM: improve FASTDIV asm
  ac3enc: use LOCAL_ALIGNED macro
  APIchanges: fill in git hash for av_get_pix_fmt_name (0420bd7).
  lavu: add av_get_pix_fmt_name() convenience function
  cmdutils: remove OPT_FUNC2
  swscale: fix crash in bilinear scaling.
  vpxenc: add VP8E_SET_STATIC_THRESHOLD mapping
  webm: support stereo videos in matroska/webm muxer
  ...

Conflicts:
	Changelog
	cmdutils.c
	cmdutils.h
	doc/APIchanges
	doc/muxers.texi
	ffmpeg.c
	ffplay.c
	libavcodec/ac3enc.c
	libavcodec/ac3enc_float.c
	libavcodec/avcodec.h
	libavcodec/get_bits.h
	libavcodec/libvpxenc.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavformat/matroskaenc.c
	libavutil/avutil.h
	libswscale/rgb2rgb.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-29 03:34:35 +02:00
Michael Niedermayer 39d607e5bb swscale: Commits that could not be pulled earlier due to bugs #2
commit 5a5a0f1613
Author: Diego Biurrun <diego@biurrun.de>
Date:   Fri May 27 19:46:39 2011 +0200

    swscale: Remove unused variables in x86 code.

    libswscale/x86/swscale_template.c:2072: warning: unused variable ‘canMMX2BeUsed’
    libswscale/x86/swscale_template.c:2145: warning: unused variable ‘canMMX2BeUsed’
    libswscale/x86/swscale_template.c:2209: warning: unused variable ‘chrVPixBuf’
    libswscale/x86/swscale_template.c:2237: warning: unused variable ‘chrVSrcPtr’

commit 389e2000eb
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date:   Fri May 27 12:23:32 2011 -0400

    swscale: delay allocation of formatConvBuffer().

    That means it won't be allocated when not needed. Alongside
    this, it fixes valgrind/fate-detected memory leaks.

commit f327bfa6dc
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date:   Fri May 27 11:36:43 2011 -0400

    swscale: fix build with --disable-swscale-alpha.

commit 9f5d45025e
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date:   Fri May 27 09:28:38 2011 -0400

    swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
2011-05-29 02:14:45 +02:00
Michael Niedermayer 986f0d86cb Commits that could not be pulled earlier due to bugs.
commit 93681fbd50
    Author: Ronald S. Bultje <rsbultje@gmail.com>
    Date:   Thu May 26 11:32:32 2011 -0400

        swscale: fix compile on ppc.

    commit e758573a88
    Author: Ronald S. Bultje <rsbultje@gmail.com>
    Date:   Thu May 26 10:36:47 2011 -0400

        swscale: fix compile on x86-32.

    commit 0f4eb8b043
    Author: Ronald S. Bultje <rsbultje@gmail.com>
    Date:   Thu May 26 09:17:52 2011 -0400

        swscale: remove VOF/VOFW.

    commit b4a224c5e4
    Author: Ronald S. Bultje <rsbultje@gmail.com>
    Date:   Wed May 25 14:30:09 2011 -0400

        swscale: split chroma buffers into separate U/V planes.

        Preparatory step to implement support for sizes > VOFW.
2011-05-29 02:13:36 +02:00
Ronald S. Bultje 9222dddb44 swscale: use av_clip_uint8() in yuv2yuv1_c(). 2011-05-28 21:43:33 +02:00
Ronald S. Bultje 485d73ef21 swscale: replace formatConvBuffer[VOF] by allocated array.
This allows to convert between formats of arbitrary width,
regardless of the value of VOF/VOFW.
2011-05-28 21:43:33 +02:00
Anton Khirnov b8e893399f sws: replace all long with int.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-28 10:03:37 -04:00
Ronald S. Bultje 009f829dde swscale: fix crash in bilinear scaling. 2011-05-28 08:59:56 -04:00
Ronald S. Bultje 78046dadc3 rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
Many functions have such a prefix, but do not actually use any
instructions or features from that set, thus giving the false
impression that swscale is highly optimized for a particular
system, whereas in reality it is not.
2011-05-28 11:41:32 +02:00
Ronald S. Bultje fc72ec727e swscale: reindent h[cy]scale_fast() and updateDitherTables(). 2011-05-28 11:41:25 +02:00
Ronald S. Bultje c3f07903ec swscale: reformat x86/swscale_template.c.
Interleave macros and code so that it's easier to find the
actual code that belongs to a function. Also reindent where
appropriate and remove dead code.
2011-05-28 11:40:59 +02:00
Ronald S. Bultje 1dbf40c383 swscale: remove duplicate mmx/mmx2 functions if they are identical. 2011-05-28 11:34:59 +02:00
Ronald S. Bultje 264dcc63af swscale: remove if (c->dstFormat) branch from yuv2packed[12X]().
This allows cutting up the function in much smaller and easier-
to-maintain chunks.
2011-05-28 11:32:29 +02:00
Ronald S. Bultje f2a3b23051 swscale: remove if(full_chr_int) from yuv2packed1().
If that flag is set, swScale() already proxies the call to
yuv2rgbXinC_full(). Therefore, this flag is never set when
yuv2packed1() is called.
2011-05-28 11:11:58 +02:00
Ronald S. Bultje 835ab9207e swscale: remove if(accurate_rnd) branch from functions. 2011-05-28 11:11:50 +02:00
Anton Khirnov 2b04858a10 swscale: revive SWS_CPU_CAPS until next major bump. 2011-05-28 11:11:29 +02:00
Diego Biurrun 11f2eae2ae swscale: Remove commented-out printf cruft. 2011-05-28 11:09:30 +02:00
Diego Biurrun 5a5a0f1613 swscale: Remove unused variables in x86 code.
libswscale/x86/swscale_template.c:2072: warning: unused variable ‘canMMX2BeUsed’
libswscale/x86/swscale_template.c:2145: warning: unused variable ‘canMMX2BeUsed’
libswscale/x86/swscale_template.c:2209: warning: unused variable ‘chrVPixBuf’
libswscale/x86/swscale_template.c:2237: warning: unused variable ‘chrVSrcPtr’
2011-05-27 21:25:57 +02:00
Ronald S. Bultje 389e2000eb swscale: delay allocation of formatConvBuffer().
That means it won't be allocated when not needed. Alongside
this, it fixes valgrind/fate-detected memory leaks.
2011-05-27 13:22:27 -04:00
Ronald S. Bultje f327bfa6dc swscale: fix build with --disable-swscale-alpha. 2011-05-27 13:22:27 -04:00
Ronald S. Bultje 9f5d45025e swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions. 2011-05-27 09:41:48 -04:00
Michael Niedermayer 041dbd3c14 swscale: dont loose precission on RGB/BGR48 input, that is dont drop half the bits.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-27 13:21:17 +02:00
Michael Niedermayer 2b6bfff2b2 swscale: Do not loose precission on yuv values after rgb->yuv.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-26 22:00:40 +02:00
Ronald S. Bultje 93681fbd50 swscale: fix compile on ppc. 2011-05-26 11:32:32 -04:00
Ronald S. Bultje e758573a88 swscale: fix compile on x86-32. 2011-05-26 10:41:27 -04:00
Ronald S. Bultje 48520772d9 swscale: use av_clip_uint8() in yuv2yuv1_c(). 2011-05-26 09:31:27 -04:00
Ronald S. Bultje 0f4eb8b043 swscale: remove VOF/VOFW. 2011-05-26 09:31:27 -04:00
Ronald S. Bultje b4a224c5e4 swscale: split chroma buffers into separate U/V planes.
Preparatory step to implement support for sizes > VOFW.
2011-05-26 09:31:27 -04:00
Ronald S. Bultje 69645c021a swscale: replace formatConvBuffer[VOF] by allocated array.
This allows to convert between formats of arbitrary width,
regardless of the value of VOF/VOFW.
2011-05-26 09:31:02 -04:00
Ronald S. Bultje 522d65ba25 rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
Many functions have such a prefix, but do not actually use any
instructions or features from that set, thus giving the false
impression that swscale is highly optimized for a particular
system, whereas in reality it is not.
2011-05-26 09:31:02 -04:00
Ronald S. Bultje 836b82e3c9 swscale: reindent h[cy]scale_fast() and updateDitherTables(). 2011-05-26 09:31:02 -04:00
Ronald S. Bultje e2bad983b5 swscale: reformat x86/swscale_template.c.
Interleave macros and code so that it's easier to find the
actual code that belongs to a function. Also reindent where
appropriate and remove dead code.
2011-05-26 09:30:15 -04:00
Ronald S. Bultje 71d9c33c86 swscale: remove duplicate mmx/mmx2 functions if they are identical. 2011-05-26 09:30:15 -04:00
Ronald S. Bultje acb96bc268 swscale: remove if (c->dstFormat) branch from yuv2packed[12X]().
This allows cutting up the function in much smaller and easier-
to-maintain chunks.
2011-05-26 09:30:14 -04:00
Ronald S. Bultje b6cac9b3bf swscale: remove if(full_chr_int) from yuv2packed1().
If that flag is set, swScale() already proxies the call to
yuv2rgbXinC_full(). Therefore, this flag is never set when
yuv2packed1() is called.
2011-05-26 09:30:14 -04:00
Ronald S. Bultje 2159a24573 swscale: remove if(accurate_rnd) branch from functions. 2011-05-26 09:30:14 -04:00
Anton Khirnov c7a973e44a swscale: revive SWS_CPU_CAPS until next major bump. 2011-05-26 06:50:12 +02:00
Diego Biurrun 0093199184 swscale: Remove commented-out printf cruft. 2011-05-26 03:45:58 +02:00
Michael Niedermayer 39e4206dc6 Merge remote-tracking branch 'qatar/master'
* qatar/master: (32 commits)
  doc: create separate section for audio encoders
  swscale: Remove orphaned, commented-out function declaration.
  swscale: Eliminate rgb24toyv12_c() duplication.
  Remove h263_msmpeg4 from MpegEncContext.
  APIchanges: Fill in git hash for fps_probe_size (30315a8)
  avformat: Add fpsprobesize as an AVOption.
  avoptions: Return explicitly NAN or {0,0} if the option isn't found
  rtmp: Reindent
  rtmp: Don't try to do av_malloc(0)
  tty: replace AVFormatParameters.sample_rate abuse with a private option.
  Fix end time of last chapter in compute_chapters_end
  ffmpeg: get rid of useless AVInputStream.nb_streams.
  ffmpeg: simplify managing input files and streams
  ffmpeg: purge redundant AVInputStream.index.
  lavf: deprecate AVFormatParameters.channel.
  libdc1394: add a private option for channel.
  dv1394: add a private option for channel.
  v4l2: reindent.
  v4l2: add a private option for channel.
  lavf: deprecate AVFormatParameters.standard.
  ...

Conflicts:
	doc/APIchanges
	doc/encoders.texi
	ffmpeg.c
	libavdevice/alsa-audio.h
	libavformat/version.h
	libavutil/opt.c
	libswscale/rgb2rgb.h
	libswscale/rgb2rgb_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-26 03:28:22 +02:00
Diego Biurrun 6f7a280ead swscale: Remove orphaned, commented-out function declaration. 2011-05-26 00:56:07 +02:00
Michael Niedermayer 7dc303a60e swscale: Eliminate rgb24toyv12_c() duplication.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-26 00:56:06 +02:00
Michael Niedermayer b49728df73 swscale: document SWS_CPU_CAPS*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 21:04:44 +02:00
Michael Niedermayer e92bdadb2d Revert removial of SWS flags from e66149e714
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 21:03:26 +02:00
Michael Niedermayer 4a056160be swscale: remove duplicatiopn of rgb24toyv12_c()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 20:58:59 +02:00
Jean-Tiare Le Bigot 364889cf9c Return -1 on invalid input instead of crashing. 2011-05-25 20:12:17 +02:00
Michael Niedermayer 034fc7bf12 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  configure: enable memalign_hack automatically when needed
  swscale: unbreak the build on non-x86 systems.
  swscale: remove if(bitexact) branch from functions.
  swscale: remove if(canMMX2BeUsed) conditional.
  swscale: remove swScale_{c,MMX,MMX2} duplication.
  swscale: use emms_c().
  Move emms_c() from libavcodec to libavutil.
  tiff: set palette in the context when specified in TIFF_PAL tag
  rtsp: use strtoul to parse rtptime and seq values.
  pgssubdec: fix incorrect colors.
  dvdsubdec: fix incorrect colors.
  ape: Allow demuxing of files with metadata tags.
  swscale: remove dead macro WRITEBGR24OLD.
  swscale: remove AMD3DNOW "optimizations".
  swscale: remove duplicate code in ppc/ subdirectory.
  swscale: remove duplicated x86/ functions.
  swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*.
  vsrc_buffer.h: add file doxy
  vsrc_buffer: tweak error message in init()
  msmpeg4: reindent.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 06:32:45 +02:00
Michael Niedermayer d1adad3cca Merge swscale bloatup
This will be cleaned up in the next merge

Authorship / merged commits:
commit f668afd489
Author: Janne Grunau <janne-libav@jannau.net>
Date:   Fri Apr 15 09:12:34 2011 +0200

    swscale: fix "ISO C90 forbids mixed declarations and code" warning

    only hit with --enable-runtime-cpudetect

commit 7f2ae5c7af
Author: Janne Grunau <janne-libav@jannau.net>
Date:   Fri Apr 15 02:09:44 2011 +0200

    swscale: fix compilation with --enable-runtime-cpudetect

commit b6cad3df82
Author: Janne Grunau <janne-libav@jannau.net>
Date:   Fri Apr 15 00:31:04 2011 +0200

    swscale: correct include path to fix ppc altivec build

commit 6216fc70b7
Author: Luca Barbato <lu_zero@gentoo.org>
Date:   Thu Apr 14 22:03:45 2011 +0200

    swscale: simplify rgb2rgb templating

    MMX is always built. Drop the ifdefs

commit 33a0421bba
Author: Josh Allmann <joshua.allmann@gmail.com>
Date:   Wed Apr 13 20:57:32 2011 +0200

    swscale: simplify initialization code

    Simplify the fallthrough case when no accelerated functions
    can be initialized.

commit 735bf19511
Author: Josh Allmann <joshua.allmann@gmail.com>
Date:   Wed Apr 13 20:57:31 2011 +0200

    swscale: further cleanup swscale.c

    Move x86-specific constants out of swscale.c

commit 86330b4c92
Author: Luca Barbato <lu_zero@gentoo.org>
Date:   Wed Apr 13 20:57:30 2011 +0200

    swscale: partially move the arch specific code left

    PPC and x86 code is split off from swscale_template.c. Lots of code is
    still duplicated and should be removed later.

    Again uniformize the init system to be more similar to the dsputil one.

    Unset h*scale_fast in the x86 init in order to make the output
    consistent with the previous status. Thanks to Josh for spotting it.

commit c003832883
Author: Luca Barbato <lu_zero@gentoo.org>
Date:   Wed Apr 13 20:57:29 2011 +0200

    swscale: move away x86 specific code from rgb2rgb

    Keep only the plain C code in the main rgb2rgb.c and move the x86
    specific optimizations to x86/rgb2rgb.c
    Change the initialization pattern a little so some of it can be
    factorized to behave more like dsputils.

Conflicts:
	libswscale/rgb2rgb.c
	libswscale/swscale_template.c
2011-05-25 06:24:55 +02:00
Michael Niedermayer d9d56036f3 swscale: MMX optim of hscale16()
code is based on existing 8bit MMX code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 04:08:34 +02:00
Michael Niedermayer 895b616146 swscale: dont loose bits on planar >8bit yuv ind gray nput.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 04:08:34 +02:00
Michael Niedermayer 8050dfdfb2 swscale: Switch to ronalds yuv2yuvX16inC_template() its very similar to baptsites
and supports alpha

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-25 04:08:08 +02:00
Ronald S. Bultje a724ee6265 swscale: unbreak the build on non-x86 systems. 2011-05-24 15:32:03 -04:00
Ronald S. Bultje 1bb0f0c925 swscale: remove if(bitexact) branch from functions.
Instead, only set the function pointers if bitexact flag is
not set during initialization. Since a change in flags triggers
a re-init anyway, this doesn't situations where flag values
change during runtime.
2011-05-24 14:50:20 -04:00
Ronald S. Bultje 566b5fbbb3 swscale: remove if(canMMX2BeUsed) conditional.
Instead, set function pointers conditionally during init. This
patch also reveals a whole branch of dead assembly code that is
therefore also removed.
2011-05-24 14:50:19 -04:00
Ronald S. Bultje aaca69c130 swscale: remove swScale_{c,MMX,MMX2} duplication. 2011-05-24 14:50:15 -04:00
Ronald S. Bultje c4fd283a46 swscale: use emms_c(). 2011-05-24 14:48:49 -04:00
Ronald S. Bultje b9eb2136af swscale: remove dead macro WRITEBGR24OLD. 2011-05-24 10:46:40 -04:00
Ronald S. Bultje 1dd4f4be5a swscale: remove AMD3DNOW "optimizations".
The functions are identical to their MMX counterparts. Thus,
pretending that swscale is highly optimized for AMD3DNOW
extensions is a poorly executed practical joke at best.
2011-05-24 10:19:41 -04:00
Ronald S. Bultje fe43d5d71e swscale: remove duplicate code in ppc/ subdirectory. 2011-05-24 10:16:32 -04:00
Ronald S. Bultje 11ffefefdb swscale: remove duplicated x86/ functions. 2011-05-24 10:11:26 -04:00
Ronald S. Bultje e66149e714 swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. 2011-05-24 10:03:26 -04:00
Michael Niedermayer 26ed595bd0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Add -U__STRICT_ANSI__ to CPPFLAGS on Cygwin and DOS.
  aacdec: fix typo in scalefactor clipping check
  fate: fix fate-h264-conformance-frext-pph10i4-panasonic-a crcs.
  fate: update 9/10bit refs.
  h264: Properly set coded_{width, height} when parsing H.264.
  x86 asm: Add SECTION_TEXT to dct32_sse.asm.
  Fix 9/10 bit in swscale.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-24 04:35:08 +02:00
Kieran Kunhya 6465c820da Fix 9/10 bit in swscale.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-23 06:46:14 -04:00
Michael Niedermayer bf8bb94322 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffmpeg: get rid of the -vglobal option.
  dct32: Add AVX implementation of 32-point DCT
  dct32: Change pass 6 permutation to allow for AVX implementation
  dct32: port SSE 32-point DCT to YASM
  multiple inclusion guard cleanup
  avio: document buffer must created with av_malloc() and friends
  avio: check AVIOContext malloc failure
  swscale: point out an alternative to sws_getContext
  svq3: Do initialization after parsing the extradata
  add changelog entries for 0.7_beta2
  mp3lame: add #include required for AV_RB32 macro.

Conflicts:
	Changelog
	libavcodec/svq3.c
	libavcodec/x86/dct32_sse.c
	libavfilter/vsrc_buffer.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-22 04:53:19 +02:00
Clément Bœsch 7d4c4394b5 swscale: point out an alternative to sws_getContext
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-21 13:42:50 +02:00
Peter Belkner 502e858fd2 swscale: fix compile on mingw32
Compiling "swscale.c" breaks on MINGW32 because of multiple including
"libswscale_template.c"
2011-05-14 13:22:46 +02:00
Ronald S. Bultje 76f8a96e00 [PATCH] Update pixdesc_be fate refs after adding 9/10bit YUV420P formats.
Also remove code that overwrites the C versions of functions in
sws_init_swScale_altivec(), so that it uses the C functions of files
if no altivec-optimized version exists.
2011-05-14 06:37:39 -04:00
Ronald S. Bultje b025431bfe swscale: 10l forgot git add this change from ronald.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-14 02:50:10 +02:00
Michael Niedermayer 58c03f6d7d Merge remote branch 'qatar/master'
* qatar/master:
  swscale: properly inline bits/endianness in yuv2yuvX16inC().
(We didnt pull the bug)  swscale: fix clipping of 9/10bit YUV420P.
  Add av_clip_uintp2() function
(our patch / duplicate)  dfa: fix buffer overflow checks to avoid integer overflows.
(our patch / duplicate)  movenc: always write esds descriptor length using 4 bytes.
(our patch / duplicate)  ffmpeg: use parse_number_and_die() when it makes sense
(No thanks)  ffmpeg: get rid of the 'q' key schizofrenia

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-14 02:19:58 +02:00
Ronald S. Bultje 9f54e461fe swscale: properly inline bits/endianness in yuv2yuvX16inC(). 2011-05-13 16:46:24 -04:00
Ronald S. Bultje c3d68ec9c5 swscale: fix clipping of 9/10bit YUV420P. 2011-05-13 16:45:28 -04:00
Michael Niedermayer 72153419b5 Merge remote branch 'qatar/master'
* qatar/master: (33 commits)
  rtpdec_qdm2: Don't try to parse data packet if no configuration is received
  ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand.
  ac3enc: clean up count_frame_bits() and count_frame_bits_fixed()
  mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
  srtdec: make sure we don't write past the end of buffer
  wmaenc: improve channel count and bitrate error handling in encode_init()
  matroskaenc: make sure we don't produce invalid file with no codec ID
  matroskadec: check that pointers were initialized before accessing them
  lavf: fix function name in compute_pkt_fields2 av_dlog message
  lavf: fix av_find_best_stream when providing a wanted stream.
  lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.
  ffmpeg: factorize quality calculation
  tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
  tiff: Prefer enum TiffCompr over int for TiffContext.compr.
  mov: Support edit list atom version 1.
  configure: Enable libpostproc automatically if GPL code is enabled.
  Cosmetics: fix prototypes in oggdec
  oggdec: fix memleak with continuous streams.
  matroskaenc: add missing new line in av_log() call
  dnxhdenc: add AVClass in private context.
  ...

swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code.
Above code is also just in case its not obvios to a large extended duplicates that where cherry picked
from ffmpeg.

Conflicts:
	configure
	ffmpeg.c
	libavformat/matroskaenc.c
	libavutil/pixfmt.h
	libswscale/ppc/swscale_template.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	tests/fate/h264.mak
	tests/ref/lavfi/pixdesc_le
	tests/ref/lavfi/pixfmts_copy_le
	tests/ref/lavfi/pixfmts_null_le
	tests/ref/lavfi/pixfmts_scale_le
	tests/ref/lavfi/pixfmts_vflip_le

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-13 04:40:40 +02:00
Diego Biurrun 046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.

This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually.  It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.

Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems.  We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02:00
Michael Niedermayer 1cafc23288 sws-PPC: fix after VOFW change.
It seems sws-PPC did hardcode 2048 at various places instead of using VOFW.
This also means that all past VOFW benchmarks on PPC are meaningless
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-12 02:49:18 +02:00
Ronald S. Bultje c8f487deae swscale: fix YUV420P 9/10bit support.
Fix handling of input if not in native endianness, and add support for
9/10-bit output. This allows us to force endianness of YUV420P 9/10bit
in the H264/10bit fate tests, which should fix them on big-endian
systems.
2011-05-11 19:15:14 -04:00
ami_stuff 1d14edb724 Use VOFW 21503 as a default value for all types of the CPUs 2011-05-12 00:18:35 +02:00
Michael Niedermayer e3497907ef swscale: remove fork bug that i missed in the merge.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 06:26:47 +02:00
Michael Niedermayer 59eb12faff Merge remote branch 'qatar/master'
* qatar/master: (30 commits)
  AVOptions: make default_val a union, as proposed in AVOption2.
  arm/h264pred: add missing argument type.
  h264dsp_mmx: place bracket outside #if/#endif block.
  lavf/utils: fix ff_interleave_compare_dts corner case.
  fate: add 10-bit H264 tests.
  h264: do not print "too many references" warning for intra-only.
  Enable decoding of high bit depth h264.
  Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
  Add support for higher QP values in h264.
  Add the notion of pixel size in h264 related functions.
  Make the h264 loop filter bit depth aware.
  Template dsputil_template.c with respect to pixel size, etc.
  Template h264idct_template.c with respect to pixel size, etc.
  Preparatory patch for high bit depth h264 decoding support.
  Move some functions in dsputil.c into a new file dsputil_template.c.
  Move the functions in h264idct into a new file h264idct_template.c.
  Move the functions in h264pred.c into a new file h264pred_template.c.
  Preparatory patch for high bit depth h264 decoding support.
  Add pixel formats for 9- and 10-bit yuv420p.
  Choose h264 chroma dc dequant function dynamically.
  ...

Conflicts:
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/alpha/dsputil_alpha.c
	libavcodec/arm/dsputil_init_arm.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/arm/dsputil_init_neon.c
	libavcodec/arm/dsputil_iwmmxt.c
	libavcodec/arm/h264pred_init_arm.c
	libavcodec/bfin/dsputil_bfin.c
	libavcodec/dsputil.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_ps.c
	libavcodec/h264_refs.c
	libavcodec/h264dsp.c
	libavcodec/h264idct.c
	libavcodec/h264pred.c
	libavcodec/mlib/dsputil_mlib.c
	libavcodec/options.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/ppc/h264_altivec.c
	libavcodec/ps2/dsputil_mmi.c
	libavcodec/sh4/dsputil_align.c
	libavcodec/sh4/dsputil_sh4.c
	libavcodec/sparc/dsputil_vis.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/options.c
	libavformat/utils.c
	libavutil/pixfmt.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/swscale_template.c
	tests/ref/seek/lavf_avi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 05:47:02 +02:00
Anton Khirnov b66752790a AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-05-10 20:22:06 +02:00
Michael Niedermayer 7bea13f111 swscale: Fix scaling for unscaled dithered planar convertions.
This fixes some overflow in bright areas and ensures that the maximum brightness level is
mapped to the maximum without cliping and without showing dither patterens in flat max
brightness areas.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 14:43:34 +02:00
Oskar Arvidsson 42239ced65 Add pixel formats for 9- and 10-bit yuv420p.
Also add support for these formats in libswscale.

Needed for high bit depth h264 decoding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:19 -04:00
Michael Niedermayer 53789a27f8 swscale: use Nbit code to handle !is16BPS(c->srcFormat) && is16BPS(c->dstFormat)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 00:37:20 +02:00
Michael Niedermayer 42c9bd313f swscale: Support dither in is16BPS(c->srcFormat) && !is16BPS(c->dstFormat)
This is done by just letting the Nbit code handle it, which now can do it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 00:21:18 +02:00
Michael Niedermayer c4f7050bb1 swscale: support unscaled planar Nbit->8bit with non native endian source.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 00:18:27 +02:00
Michael Niedermayer 09ff3cc77b swscale: fix unscaled yuv422p16be -> yuv422p10le
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 00:15:03 +02:00
Michael Niedermayer eb8aa13b54 swscale: make DITHER_COPY() support non native endian source
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 00:09:10 +02:00
Michael Niedermayer 9c49ca0f19 swscale: factor shift out of DITHER_COPY().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 22:02:44 +02:00
Michael Niedermayer 300e497b5f swscale: factorize DITHER_COPY()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 21:38:46 +02:00
Michael Niedermayer 3dd779eb0a swscale: implement Nbit->non native endian 16bit. Fixes v210.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 00:22:12 +02:00
Baptiste Coudurier b9e608492a swscale: 9,10 bits pixel format output support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-08 14:27:13 +02:00
Reimar Döffinger b06397acd4 Fix function pointer type to match function it is assigned. 2011-05-07 20:14:48 +02:00
Reimar Döffinger 80264dc422 Store pointers in a less messy way in SWSContext. 2011-05-07 20:14:48 +02:00
Michael Niedermayer 95f163b33b swscale: Dither for unscaled 10->8bit per channel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 15:19:27 +02:00
Michael Niedermayer 7915e038c6 swscale: dont reshuffle bytes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 13:18:55 +02:00
Michael Niedermayer 9a5624a0f1 rgb24toyv12: break out in the middle before out of array reads.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 02:20:20 +02:00
Michael Niedermayer 3e173a14e9 swscale: fix src type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 23:33:59 +02:00
Michael Niedermayer ffb5a0d533 Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'
* commit '85770f2a2651497861ed938efcd0df3696ff5e45':
  AVOptions: make default_val a union, as proposed in AVOption2.
  Move ff_dynarray_add to lavu and make it public.
  lavf: remove duplicate assignment in avformat_alloc_context.
  lavf: use designated initializers for AVClasses.
  options: simplify av_find_opt by using av_next_option.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 00:26:05 +02:00