Commit Graph

1101 Commits

Author SHA1 Message Date
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
Anton Khirnov 85770f2a26 AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-04-30 08:34:16 +02:00
Michael Niedermayer 455ce979d0 Merge remote branch 'qatar/master'
* qatar/master:
LOTS of duplicates ...
  avio: Fix the deprecated fallback URL-prefixed open flags
  avoid duplicate -lm in .pc files
  mpeg12: terminate mpeg2_video_profiles arrays
  network: Check POLLERR and POLLHUP in ff_network_wait_fd
  mpegtsenc: make PMT PID really start on pmt_start_pid
  nut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
  rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
  hflip: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
  crop: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
  libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation

Conflicts:
	configure
	libswscale/swscale.h
	tests/ref/lavf/ts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 04:29:21 +02:00
Peter Ross 1afbae100b libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-28 07:25:27 +02:00
Baptiste Coudurier 624a7e005c Correctly support pal8 with alpha in libswscale, fix png pal8 with alpha.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 21:52:09 +02:00
Baptiste Coudurier dbfdb288c1 Set alpha of palettes to 0xff.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 21:49:45 +02:00
Baptiste Coudurier e91946ed23 Rename y400a to gray8a.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 21:36:30 +02:00
tateu 93c28a55fd Fix runtime CPU detection in libswscale. 2011-04-27 01:52:36 +02:00
Stefano Sabatini bd2a3700c0 lsws: prevent overflow in sws_init_context()
In the loop:
    for (i=0; i<dstH; i++) {
        int chrI= i*c->chrDstH / dstH;

when i*c->chrDstH > INT_MAX this leads to an integer overflow, which
results in a negative value for chrI and in out-of-buffer reads. The
overflow is avoided by forcing int64_t arithmetic by casting i to
int64_t.

Fix crash, and trac issue #72.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:19 +02:00
Manfred Tremmel 03a91c7453 Patch from Packman (OpenSuse - packages) to silence rpmlint.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-25 19:53:47 +02:00
unknown author 2671ab3996 Check mmap() return against correct value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-25 01:54:29 +02:00
Michael Niedermayer efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Anton Khirnov 7dfe244fbd sws: remove disabled cruft. 2011-04-19 21:50:12 +02:00
Anton Khirnov 41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov 139f3ac42d Bump major versions of all libraries.
They've accumulated enough new APIs and corresponding deprecated cruft.

This breaks API and ABI.
2011-04-18 20:19:47 +02:00
Janne Grunau f668afd489 swscale: fix "ISO C90 forbids mixed declarations and code" warning
only hit with --enable-runtime-cpudetect
2011-04-15 10:06:53 +02:00
Janne Grunau 7f2ae5c7af swscale: fix compilation with --enable-runtime-cpudetect 2011-04-15 09:07:37 +02:00
Janne Grunau b6cad3df82 swscale: correct include path to fix ppc altivec build 2011-04-15 00:41:10 +02:00
Luca Barbato 6216fc70b7 swscale: simplify rgb2rgb templating
MMX is always built. Drop the ifdefs
2011-04-14 22:16:47 +02:00
Josh Allmann 33a0421bba swscale: simplify initialization code
Simplify the fallthrough case when no accelerated functions
can be initialized.
2011-04-14 22:16:47 +02:00
Josh Allmann 735bf19511 swscale: further cleanup swscale.c
Move x86-specific constants out of swscale.c
2011-04-14 22:16:47 +02:00
Luca Barbato 86330b4c92 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.
2011-04-14 22:16:47 +02:00
Luca Barbato c003832883 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.
2011-04-14 22:16:47 +02:00
Michael Niedermayer c55780dcef Merge remote branch 'qatar/master'
* qatar/master: (32 commits)
  libopencore-amr, libvo-amrwbenc: Allow enabling DTX via private AVOptions
  libopencore-amr, libvo-amrwbenc: Only check the bitrate when changed
  libopencore-amr, libvo-amrwbenc: Find the closest matching bitrate
  libvo-*: Fix up the long codec names
  libavcodec: Mark AVCodec->priv_class const
  swscale: Factorize FAST_BGR2YV12 definition.
  libvo-aacenc: Only produce extradata if the global header flag is set
  lavf: postpone removal of public metadata conversion API
  lavc: postpone removal of request_channels
  lavc: postpone removal of audioconvert and sample_fmt wrappers
  lavf: postpone removal of deprecated avio functions
  libopencore-amr: Cosmetics: Rewrap and align
  libopencore-amr, libvo-amrbwenc: Rename variables and functions
  libopencore-amr: Convert commented out debug logging into av_dlog
  libopencore-amr: Remove an unused state variable
  libvo-amrwbenc: Don't explicitly store bitrate modes in the bitrate table
  libopencore-amr: Remove a useless local variable
  libopencore-amr, libvo-amrwbenc: Make the bitrate/mode mapping array static const
  libopencore-amr, libvo-amrwbenc: Return proper error codes in most places
  libopencore-amr: Don't print carriage returns in log messages
  ...

Conflicts:
	doc/developer.texi
	libavcodec/avcodec.h
	libavcodec/libvo-aacenc.c
	libavcodec/libvo-amrwbenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-14 03:21:38 +02:00
Luca Barbato 0e1a5434e2 swscale: Factorize FAST_BGR2YV12 definition.
It is used only for x86 so it will eventually be moved with that code
into the x86 arch subdirectory.
2011-04-13 17:24:53 +02:00
Diego Biurrun db46be01ec Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().
When HAVE_7REGS was not defined these functions had an empty body
causing the following warnings during compilation.
In file included from libswscale/x86/yuv2rgb_mmx.c:58:
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in function returning non-void
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in function returning non-void

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-11 14:18:48 +02:00
Oskar Arvidsson d4497f6dfb 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: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Michael Niedermayer c0e51ec9c6 Merge remote branch 'qatar/master'
* qatar/master:
  Fix parser: mark av_parser_parse() for removal on next major bump
  swscale: postpone sws_getContext removal until next major bump.
  fate: add AAC LATM test
  mmst: get rid of deprecated AVERRORs
  lxfdec: use AVERROR(ENOMEM) instead of deprecated AVERROR_NOMEM.
  Reemove remaining uses of deprecated AVERROR_NOTSUPP.
REIMPLEMENTED in 2 lines of code:  lavf: if id3v2 tag is present and all else fails, guess by file extension

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-07 03:32:26 +02:00
Anton Khirnov 0464ee9af2 swscale: postpone sws_getContext removal until next major bump.
The replacement isn't ready yet.
2011-04-06 22:55:28 +02:00
Darren Horrocks 30c6fefd01 fix runtime-cpu-detect bug in swscale
swscale doesnt ever actually do any runtime detection at all when
runtime cpu detection is enabled, it simply passes whatever is passed
to -sws_flags, which could be nothing at all making swscale default to
the C implementation.
2011-04-05 02:36:57 +02:00
Michael Niedermayer 116758a358 Fix yuvj420p scaling artefact, issue1108.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:11 +02:00
Michael Niedermayer ffd39f9d23 Fix typo from e3a84542.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 20:28:03 +02:00
Frank Barchard e3a8454205 SWSCALE: Increase maximim with from 5120 to 21504
Heres a benchmark

VOFW 5120  VOFW 21504    Note
10438.8    10344.2       timex ffmpeg -y -i tulip2.mp4 tulip2.yuv
25611.9    24256.9       timex ffmpeg -y -itulip2.mp4 -s 1272x724 tulip2.yuv
24485.7    26006.6
28573.1    24291.3
24069.1    26995.9
25684.95   25387.675     average

This is on a Nehalem i7.  Despite being a 500 frame, 720p video, the numbers
fluctuate, so I took an average of 4 runs.

Another reason I'd like this change is youtube accepts videos with higher
resolutions than 5120.
16384 is vp8's maximum resolution, so that should keep us amused for a
little longer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 16:33:25 +02:00
Michael Niedermayer 95c8bb03ed Fix compilation failure with runtime cpudetect (Ticket #22) 2011-03-28 16:46:45 +02:00
Peter Ross 3e2523db20 libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation 2011-03-26 13:24:32 +11: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
Michael Niedermayer e528cdac8a Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"
This reverts commit 29ba091136.
2011-03-17 17:26:45 +01:00
Michael Niedermayer 0cb88628fb Revert "use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*"
This reverts commit a03be6e1ba.
2011-03-17 17:26:45 +01:00
Janne Grunau a03be6e1ba use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_* 2011-03-16 21:54:39 +01:00
Janne Grunau 29ba091136 replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION
also update the multiple inclusion guards in config.h|mak
2011-03-16 21:54:39 +01:00
Reinhard Tartler 737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Mans Rullgard f344903ca5 Fix MMX rgb24 to yuv conversion with gcc 4.6
When built with gcc 4.6, the MMX rgb24 to yuv conversion gives
wrong output.  The compiler produces this warning:

libswscale/swscale_template.c:1885:5: warning: use of memory input without lvalue in asm operand 4 is deprecated

Changing the memory operand to a register makes it work.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-13 01:42:32 +00:00
Clément Bœsch 523d9407d5 Remove a few if (p) av_freep(&p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 10:00:49 +00:00
Mans Rullgard ef4a65149d Replace ASMALIGN() with .p2align
This macro has unconditionally used .p2align for a long time and
serves no useful purpose.
2011-01-18 20:48:24 +00:00
Janne Grunau 2c3589bfda consolidate .gitignore patters into a single file
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-18 21:32:05 +01:00
Janne Grunau 348b8218f7 convert svn:ignore properties to .gitignore files
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 15:50:14 +01:00
Ramiro Polla b494baf0b0 colorspace-test: fix build
rgb32tobgr32() has been removed in favour of shuffle_bytes_2103() in r32190

Originally committed as revision 32676 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-12-07 15:27:11 +00:00
Martin Storsjö 9c158e4947 Store src/dstFormat after calling handle_jpeg
handle_jpeg may update the src/dstFormat variables, this makes sure the
updated version is stored in the context.

This fixes roundup issue 2302.

Patch by Troot, all_crap_goes_here at hotmail

Originally committed as revision 32562 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-10-29 13:48:12 +00:00
Reimar Döffinger 12eef0d1ba 100l, fix sws_getCachedContext. It did not set the colorspace details,
but worse it did not set up destination dimensions, thus every user
of it would necessarily fail.

Originally committed as revision 32424 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-10-03 07:53:40 +00:00
Stefano Sabatini f34fcdc8b6 Set default values for the scale context in sws_alloc_context().
Originally committed as revision 32415 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 22:06:44 +00:00
Stefano Sabatini e60c906a82 Set the default value of param0 and param1 to SWS_PARAM_DEFAULT.
Originally committed as revision 32414 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 22:06:40 +00:00
Stefano Sabatini 6d21d67b38 Set valid default values for the srcw, srch, dstw, dsth options in the
scale context. Prevent pointless warnings when using
av_opt_set_defaults() for setting the default values, as in a pending
patch.

Originally committed as revision 32413 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 22:06:36 +00:00
Stefano Sabatini fc7c40c2bd Cosmetics: put "if (...)" and "av_log(...)" in the same line for
improving vertical alignment and readability.

Originally committed as revision 32405 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 16:15:42 +00:00
Stefano Sabatini d29e863e1d Put if (...) av_log() in the same line, more compact and increase
readibility.

Originally committed as revision 32404 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 13:02:31 +00:00
Stefano Sabatini 5abd626e20 Amend constraints for the src_format and dst_format options in the
SWScale context.

Originally committed as revision 32403 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 13:02:28 +00:00
Stefano Sabatini c24b404ba6 Cosmetics: fix braces placement.
Originally committed as revision 32402 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-29 08:44:09 +00:00
Stefano Sabatini 0810a5846b Deprecate sws_getContext(), use sws_alloc_context() and
sws_init_context() instead.

Originally committed as revision 32401 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-28 22:23:58 +00:00
Stefano Sabatini 499287e0a5 Add documentation for the returned value of sws_init_context().
Originally committed as revision 32400 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-28 22:23:53 +00:00
Stefano Sabatini c508ab6736 Bump minor version after the addition of sws_alloc_context() and
sws_init_context() of r32368.

Originally committed as revision 32396 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-28 15:29:23 +00:00
Baptiste Coudurier bd8154d0b3 100l fix if condition
Originally committed as revision 32395 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-27 23:47:54 +00:00
Baptiste Coudurier df0743e01e Y400A (gray alpha) input support in libswscale
Originally committed as revision 32394 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-27 22:24:03 +00:00
Janne Grunau 9f694f0b3d swscale: clear SWS_CPU_CAPS_SSE2 in update_flags_cpu() missed in r32068
Originally committed as revision 32393 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-27 20:10:53 +00:00
Janne Grunau 829e5dafc2 cosmetics: break long line update_flags_cpu
Originally committed as revision 32392 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-27 20:09:29 +00:00
Ramiro Polla 33ce384688 fix typos and grammar
Originally committed as revision 32370 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-26 20:31:04 +00:00
Michael Niedermayer 8c26d83edb Make the avoptions list of sws more complete.
Originally committed as revision 32369 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-26 19:48:49 +00:00
Michael Niedermayer 635d4aed60 Split alloc and init of context so that parameters can be set in the context
instead of requireing being passed through function parameters. This also
makes sws work with AVOptions.

Originally committed as revision 32368 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-26 19:33:57 +00:00
Ramiro Polla f4203ff3d9 swscale: use full chroma input for point scaler
Originally committed as revision 32360 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-26 17:06:32 +00:00
Ramiro Polla b9f5e3bd75 swscale-test: cosmetic alignment
Originally committed as revision 32265 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-16 13:30:02 +00:00
Ramiro Polla 5a90173751 swscale: remove useless temporary variable
Originally committed as revision 32258 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-16 01:09:59 +00:00
Ramiro Polla cf1cd520c6 swscale: factorize plane copying code out of 2 functions
Originally committed as revision 32257 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-16 01:07:55 +00:00
Ramiro Polla f1084cb0cd swscale-test: always use bilinear scaler to get output for SSD
Originally committed as revision 32256 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-16 00:41:08 +00:00
Ramiro Polla c12f7b2d2c rgb2rgb: don't misuse HAVE_* defines
Introduce and use COMPILE_TEMPLATE_* instead.

Originally committed as revision 32241 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-14 13:12:11 +00:00
Ramiro Polla 40b433b62b swscale: indentation and emtpy line cosmetics
Originally committed as revision 32222 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-13 14:33:08 +00:00
Ramiro Polla 6527e56131 swscale: avoid reading prior to the source buffer in planar2x() MMX2
Originally committed as revision 32221 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-13 14:25:18 +00:00
Ramiro Polla 9b4bf9c21d swscale-test: allow specifying src/dst pixel formats
Originally committed as revision 32215 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-12 18:17:29 +00:00
Ramiro Polla 9075bc7c51 indent
Originally committed as revision 32214 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-12 18:16:53 +00:00
Ramiro Polla 4bf4478598 swscale-test: take input from reference file
If the CRC from the src->dst conversion matches a reference, it is not
necessary to perform a dst->yuva420p conversion and check the SSD.

Originally committed as revision 32213 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-12 18:16:33 +00:00
Ramiro Polla 6bbae4c8b3 swscale-test: always use SWS_BILINEAR to convert from ref to src
Originally committed as revision 32212 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-12 18:15:34 +00:00
Ramiro Polla 3e1e78008b swscale-test: move conversion from ref to source back to doTest()
The source format parameters are kept in static variables and conversion from
ref to source is only made when any parameter changes.

Originally committed as revision 32211 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-12 18:14:42 +00:00
Ramiro Polla a51125b52f rgb2rgb: replace shuffle_bytes_2103() by optimized rgb32tobgr32()
Originally committed as revision 32190 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-12 13:03:41 +00:00
Ramiro Polla 0132ab80a8 indent
Originally committed as revision 32157 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-11 14:31:13 +00:00
Ramiro Polla 4d8617496f swscale: remove unused code
yvu9ToYv12Wrapper() used to support yv12 with the chroma planes either in the
uv order or the vu order. FFmpeg no longer has a pixel format in vu order.

Originally committed as revision 32156 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-11 14:30:54 +00:00
Ramiro Polla 4821b4456f rgb2rgb: remove unused yvu9toyv12 function
Originally committed as revision 32155 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-11 14:29:55 +00:00
Ramiro Polla 4389d606e6 av_fill_image_linesizes -> av_image_fill_linesizes
Originally committed as revision 32106 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-08 23:36:02 +00:00
Ramiro Polla 539ff40c2d rgb2rgb: build SSE2 codepath
Originally committed as revision 32068 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-08 13:16:15 +00:00
Ramiro Polla c17f5a4e15 swscale: also update flags on sws_getCachedContext()
Originally committed as revision 32052 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-06 14:42:25 +00:00
Ramiro Polla a1899e0adc swscale: fix internal rgb->yv12 chroma conversion used by the main scaler path
The shift must be applied before the masking.

Originally committed as revision 32051 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-06 02:02:53 +00:00
vle 87db37356c Fix mlib compilation: add mising include for SwsContext.
Patch by [vle gmx net].

Originally committed as revision 32050 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-05 09:41:24 +00:00
Ramiro Polla 0fc29f2708 swscale: simplify selection of optimizations to compile.
Originally committed as revision 32013 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-25 14:39:11 +00:00
Ramiro Polla 8f02861636 swscale: Always define COMPILE_xxx to either 0 or 1.
Originally committed as revision 32012 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-25 14:38:30 +00:00
Måns Rullgård 66842fe874 swscale: fix unaligned accesses in (RGB|BGR)32_1 to YUV conversion
Originally committed as revision 32011 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-23 21:22:24 +00:00
Måns Rullgård 83761d5b58 swscale: remove unused macro parameter in BGR2UV template
Originally committed as revision 32010 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-23 21:22:20 +00:00
Grant Carver 53bc0dc2bd fix anonymous memory mapping for NetBSD
mmap() with MAP_ANONYMOUS requires the file descriptor to be -1 in NetBSD.
Linux just ignores this parameter.

Patch by Grant Carver <grantc at cat dot co dot za>

Originally committed as revision 31984 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-19 23:48:19 +00:00
Ramiro Polla 8d88402013 swscale-test: add CRC output
Originally committed as revision 31982 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-19 14:36:16 +00:00
Ramiro Polla a42c29febc validate input data and linesizes
Originally committed as revision 31976 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-18 19:37:37 +00:00
Ramiro Polla a4fc3bd533 indent
Originally committed as revision 31949 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-08 18:18:13 +00:00
Ramiro Polla 06c93cb705 swscale-test: get strides using av_fill_image_linesizes() from libavcore
Originally committed as revision 31948 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-08 18:14:43 +00:00
Ramiro Polla e07b1939e5 swscale-test: merge declaration and initialization
Originally committed as revision 31879 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-31 22:02:55 +00:00
Stefano Sabatini ed80ba7461 Revert commit:
r31772 | stefano | 2010-07-23 01:01:31 +0200 (Fri, 23 Jul 2010) | 2 lines

  Prefer impersonal form over third person, for consistency with the
  rest of FFmpeg.

The change was not approved by the maintainer.

Originally committed as revision 31847 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-28 10:43:02 +00:00
Reimar Döffinger 6cce7cabdb Fix compilation, forgot to add const also to the
definition of ff_yuv2packedX_altivec

Originally committed as revision 31782 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 14:43:55 +00:00
Reimar Döffinger 5a55d5b592 More const-correctness fixes to avoid warnings.
Originally committed as revision 31781 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 11:37:58 +00:00
Reimar Döffinger a4eef68f53 Add some "const" to avoid incompatible pointer type warnings
Originally committed as revision 31780 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 11:33:28 +00:00
Stefano Sabatini 04f6ab1cef Add missing comma, fix rgb2yuv_table[SWS_CS_SMPTE240M] coefficients.
Originally committed as revision 31779 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 11:19:39 +00:00
Stefano Sabatini 24911613a5 Add some comments to the rgb2yuv_table, clarifying the standard where
are defined.

Originally committed as revision 31778 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 11:19:35 +00:00
Ramiro Polla 73016d29c9 swscale-test: scale from reference to source only once for each algorithm
Originally committed as revision 31777 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-23 20:27:54 +00:00
Ramiro Polla be1c5d35cc indent
Originally committed as revision 31776 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-23 20:26:54 +00:00
Ramiro Polla da78053af0 swscale-test: change order tests are run, maintaining the same algorithm for
sequential geometries instead of running all algorithms sequentially for each
geometry.

Originally committed as revision 31775 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-23 20:26:32 +00:00
Stefano Sabatini 5b9eb68749 Prefer impersonal form over third person, for consistency with the
rest of FFmpeg.

Originally committed as revision 31772 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-22 23:01:31 +00:00
Ramiro Polla 9bb9875eb7 swscale-test: use only 3 characters to print width/height since they're always
smaller than 1000

Originally committed as revision 31771 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-22 19:05:10 +00:00
Ramiro Polla b6f1e7ec44 swscale-test: print test name before running test, so that it's available in
the output even if the test crashes.

Originally committed as revision 31770 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-22 19:02:49 +00:00
Ramiro Polla 67e1d52783 swscale-test: allocate more memory to prevent scalers from writing out of bounds
Some converters (ie. unscaled rgb24 -> argb) may write some bytes out of
bounds. Ideally the converters should be fixed, but in the meantime we allocate
more memory to prevent heap corruption.

Originally committed as revision 31768 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-22 15:30:22 +00:00
Ramiro Polla 262b6dbad9 darwin: allow 64-bit darwin to allocate executable memory
darwin requires _DARWIN_C_SOURCE to be defined for MAP_ANON, which is used by
swscale to determine whether to use malloc() or mmap(). 64-bit darwin does not
have an executable heap, so mmap() must be used instead of malloc(), and
therefore _DARWIN_C_SOURCE must be defined.

Originally committed as revision 31760 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-21 13:29:55 +00:00
Ramiro Polla 92bfd7461c swscale-test: use av_pix_fmt_descriptors[].name directly
Originally committed as revision 31759 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-20 22:20:23 +00:00
Ramiro Polla 709c0181fd Restore vertical alignment in some defines
Originally committed as revision 31758 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-20 01:45:25 +00:00
Martin Storsjö e593826b93 Cosmetics: reindent and unify whitespace
Originally committed as revision 31757 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-19 07:06:14 +00:00
Martin Storsjö 72ae5049e1 Do planar copy with a single memcpy only if the stride is equal to the length
This avoids writing outside of the designated rectangle.

Originally committed as revision 31756 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-19 07:02:31 +00:00
Anton Mitrofanov c85007d559 Another try at fixing swscale on win64, as per r31153.
Don't change paramater passing, but instead use casts.
Shouldn't affect asm output on anything other than win64.
libswscale should work on win64 now.
The rest of ffmpeg still isn't win64 compatible due to the issue of xmm
clobbers, but swscale doesn't use any SSE.

Patch by Anton Mitrofanov <BugMaster AT narod DOT ru>.

Originally committed as revision 31751 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-18 21:39:57 +00:00
Martin Storsjö c4e2b8268f In planarCopyWrapper, Only copy length, not stride of the last line in the plane
If the destination planes are offset within the destination buffer,
writing the extra bytes at the end may write outside of the destination
buffer.

Originally committed as revision 31746 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-16 17:45:50 +00:00
Benoit Fouet 453d28af60 Change the type of Y table to pointer to void in fill_table().
This fixes warnings about wrong type being used, e.g.:
libswscale/yuv2rgb.c: In function ‘ff_yuv2rgb_c_init_tables’:
libswscale/yuv2rgb.c:778: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:598: note: expected ‘uint8_t *’ but argument is of type ‘uint16_t *’

Originally committed as revision 31722 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-12 08:35:20 +00:00
Måns Rullgård 6a01eab73c Add av_ prefix to bswap macros
Originally committed as revision 31679 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-10 22:12:38 +00:00
Eli Friedman 3483d87752 Fix 'assignment from incompatible pointer type' warning.
Patch by Eli Friedman, eli d friedman a gmail

Originally committed as revision 31628 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-03 09:58:13 +00:00
Reinhard Tartler 2b991422f8 deprecate palette8topacked32 in favor of public API functions sws_convertPalette8ToPacked32 and -24
additionallym deprecate palette8torgb16 and its bgr variant without
replacement. These functions are not meant to be used by applications.

Discussed at: http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/109340

Originally committed as revision 31301 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-06-01 19:35:16 +00:00
Stefano Sabatini 0093ac5b9f Move internal scale context fields initialization from
sws_setColorspaceDetails() to ff_yuv2rgb_c_init_tables().

Allow to factorize duplicated code.

Originally committed as revision 31300 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-06-01 11:30:07 +00:00
Reinhard Tartler 3d9408f4a7 remove palette8torgb15 and palette8tobgr15
They contain exactly the same code as their 16bit variants, so this is
effectively code de-duplication.

Originally committed as revision 31298 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-06-01 06:53:56 +00:00
Diego Biurrun 870a6f4044 Rename yuv2rgb_template2.c --> yuv2rgb_template.c now that the other is gone.
Originally committed as revision 31279 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-30 08:44:05 +00:00
Diego Biurrun 531f97b0c3 Remove GPL-licensed YUV to RGB MMX routines.
We now have an LGPL replacement that is at least equally fast.

Originally committed as revision 31278 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-30 08:31:23 +00:00
Stefano Sabatini d458b7d445 Add empty newline to separate function declarations, for better
readability.

Originally committed as revision 31192 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-23 10:02:30 +00:00
Stefano Sabatini b8dbff33bf Cosmetics: make more compact the code for handle_jpeg(), this also allows
vertical alignment. Improve readability.

Originally committed as revision 31186 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 22:56:41 +00:00
Stefano Sabatini 4e74187db2 Remove PI definition and use M_PI instead.
M_PI is defined by the included file libavutil/mathematics.h.

Originally committed as revision 31185 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 22:49:04 +00:00
Loren Merritt 8a26b2c665 13% faster yuv420 to rgb15 mmx.
It is now faster than the old gpl version on conroe.

Originally committed as revision 31181 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 13:31:11 +00:00
Loren Merritt bffc36e084 40% faster yuv420 to rgb24 mmx.
It is now faster than the old gpl version on conroe.

Originally committed as revision 31180 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 08:21:56 +00:00
Ramiro Polla c3ab0004ae Revert r31153. It failed to build on:
x86_64 / Mac OS X gcc 4.0.1
x86_64 / Linux icc (all)
x86_64 / Linux gcc 4.0.4
x86_64 / OpenBSD gcc 3.3.5
x86_64 / Linux suncc 5.10
and there are some reports of crashes.

Originally committed as revision 31170 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-12 20:47:32 +00:00
Ramiro Polla d9d14dc607 Use int instead of long to pass width parameters in non-public functions.
long was being incorrectly used as an x86-sized register, both for 32 and 64
bits, but this is not the case in win64.

Originally committed as revision 31153 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-11 00:36:34 +00:00
Ronaldo Moura 447a5b1996 blackfin: fix yuv422 to yuv420 conversion
The old code is correct only when stride = 2*width.

Patch by Ronaldo Moura <ronaldo d moura monity com br>

Originally committed as revision 31142 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-07 21:59:18 +00:00
Diego Biurrun f4ea7c8911 alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
written by Kostya Shishkov

Originally committed as revision 31135 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-04 09:11:01 +00:00
Diego Biurrun 353285d740 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 31050 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-04-20 14:47:31 +00:00
Reimar Döffinger 5b03661fa7 Replace some "m" constraints by MANGLE to avoid issues with some compilers not
being able to compile it and deduplicate the code at the same time.

Originally committed as revision 30978 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-31 17:00:33 +00:00
Diego Biurrun 819ee683d8 libswscale: Relicense almost all x86 assembler optimizations as LGPL.
This is of course done with permissions from the authors. The only GPL
component left are MMX optimizations for YUV to RGB conversion.

Originally committed as revision 30965 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-27 11:31:02 +00:00
Diego Biurrun f25b1c4b6b HAVE_MMX2 implies HAVE_MMX, so checking the latter is enough.
Originally committed as revision 30961 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-26 07:57:54 +00:00
Diego Biurrun f684f3c58a AltiVec implies a PPC CPU, so there is no need to check for both.
Originally committed as revision 30954 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-23 22:59:14 +00:00
Diego Biurrun 13bc1ac31a Do not compile AltiVec code when AltiVec is not available; not even in
runtime cpudetection mode.
Fixes compilation with '--enable-runtime-cpudetect --disable-altivec'.

Originally committed as revision 30952 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-23 20:12:52 +00:00
Diego Biurrun f5af8f1625 Replace wrong condition name in #endif comment by correct instance.
Originally committed as revision 30938 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-19 09:58:45 +00:00
Diego Biurrun 81bbd840fe Check whether COMPILE_ALTIVEC is defined, not if it is set to a 0/1 value.
COMPILE_ALTIVEC is never set to 1, it is just #defined.

Originally committed as revision 30937 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-19 09:57:36 +00:00
Janusz Krzysztofik 22e8222fd2 Extend the generic path of the yuv2rgb converter with support for rgb444
output format.

Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl

Originally committed as revision 30934 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-18 23:02:32 +00:00
Reinhard Tartler 07cea6d1cd Fix compilation on powerpc with --disable-altivec
in case altivec is disabled, even compilation of code using altivec
keywords or asm must be avoided.

Originally committed as revision 30869 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-09 08:07:34 +00:00
Reimar Döffinger 97cda76a69 Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.
Originally committed as revision 30864 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-08 19:41:57 +00:00
Reimar Döffinger 12423f170f Fix memleak due to incorrect VirtualFree arguments: size must be 0 for MEM_RELEASE.
Originally committed as revision 30863 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-08 19:37:10 +00:00
Stefano Sabatini 3de42635bd Avoid duplication of usePal() macro.
Originally committed as revision 30856 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-06 11:50:54 +00:00
Janusz Krzysztofik a4e441301d Add support to BGR444/RGB444 foreign endian output in libswscale.
Patch by Janusz Krzysztofik |jkrzyszt ^ tis icnet pl|.

Originally committed as revision 30855 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-06 11:27:31 +00:00
Michael Niedermayer e5a1c20707 try to avoid returning odd slices.
Originally committed as revision 30847 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-05 21:39:27 +00:00
Benoit Fouet 124cb45137 Cosmetics: fix vertical alignment.
Originally committed as revision 30842 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-05 08:41:35 +00:00
Janusz Krzysztofik 601949b898 libswscale: Extend the unaccelerated path of the unscaled yuv2rgb special
converter with support for rgb444 output format.
Patch by Janusz Krzysztofik jkrzyszt chez tis icnet pl

Originally committed as revision 30841 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-05 08:32:54 +00:00
Alexis Ballier 1379b58482 Support BGR555, BGR565, RGB555 and RGB565 foreign endian output in
libswscale.

Patch by Alexis Ballier, alexis D ballier A gmail

Originally committed as revision 30840 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 16:57:04 +00:00
Stefano Sabatini 91cfeac668 Revert r30825, it was not supposed to be committed.
127.32L to me, beware when using git svn dcommit for committing stuff
to svn...

Originally committed as revision 30827 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 01:02:24 +00:00
Stefano Sabatini 23bf3b2c97 Fill the r, g, b values used for computing the c->pal_yuv table in the
case where the source format is PIX_FMT_GRAY8.

This is required as PIX_FMT_GRAY8 has been declared as a paletted
format in FFmpeg r22191, fix GRAY8 -> RGB conversion.

Originally committed as revision 30826 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 00:31:13 +00:00
Stefano Sabatini 3fec44c640 Make swscale-test take in input the name of the input and the output
format.

Make swscale-test only perform the test from the input to the output
format rather than perform all.

Also implement swscale-test-all.sh, for performing all the tests.

Improve flexibility of the swscale-test tool, this way is simpler to
perform only a subset of tests.

Originally committed as revision 30825 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 00:31:10 +00:00
Carl Eugen Hoyos 627686e635 Make sws_dcVec static: It is only used inside libswscale/utils.c.
Originally committed as revision 30787 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-28 02:18:16 +00:00
Stefano Sabatini 479e1e6170 Remove pointless empty line.
Originally committed as revision 30730 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-25 21:21:29 +00:00
Stefano Sabatini 8ebed38e7a Apply consistency nit.
Originally committed as revision 30729 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-25 21:12:38 +00:00
Ramiro Polla f1d5a1f285 Reorder buffer debug. Also print out if slice was buffered.
Originally committed as revision 30722 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-23 16:46:43 +00:00
Stefano Sabatini b623d0cb03 Reindent and fix brace placement.
Originally committed as revision 30643 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-18 21:20:37 +00:00
Stefano Sabatini 22b6a24c34 Vertically align a list of comparisons in sws_getCachedContext().
Originally committed as revision 30642 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-18 21:17:07 +00:00
Stefano Sabatini 5a011d8b08 Merge two if conditions, allow to decrese the level of indentation of
the block.

Originally committed as revision 30641 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-18 21:12:05 +00:00
Stefano Sabatini 62bb4ca199 Simplify how usesVFilter and usesHFilter are set.
Originally committed as revision 30520 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 23:53:25 +00:00
Stefano Sabatini fbc0f6a973 Apply misc fixes to sws_getCoefficients() doxy.
Originally committed as revision 30519 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 22:56:59 +00:00
Stefano Sabatini 89ee5c6897 Satisfy consistency need:
int * sws_getCoefficients  -> int *sws_getCoefficients.

Originally committed as revision 30518 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 22:54:45 +00:00
David Conrad 3f3dc76cb1 Add function to translate SWS_CS_* to coefficient array
Originally committed as revision 30513 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 16:09:03 +00:00
Stefano Sabatini 82e5f86bd5 Implement shuffle_bytes_abcd() functions and use them for shuffling
bytes when converting between RGB32 variants.

In particular fix the argb -> rgba and abgr -> bgra conversions.

See the thread:
Subject: [FFmpeg-devel] [RFC] RGB32 / BGR32 ethernal bug
Date: Tue, 26 Jan 2010 01:06:18 +0100

Originally committed as revision 30501 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-03 23:46:00 +00:00
Stefano Sabatini af0e662169 Declare support for the pixel formats:
PIX_FMT_YUVJ420P
PIX_FMT_YUVJ422P
PIX_FMT_YUVJ440P
PIX_FMT_YUVJ444P

in the isSupported{In,Out} macros.

These pixel formats are not true pixel formats but hacks specific to
JPEG in libavcodec. They are deprecated and should be removed (that is
from libavcodec first and libswscale second)...  but they must be
tested by swscale-test.

See thread:
Subject: [FFmpeg-devel] [PATCH] Extend show_pix_fmts() to make it print the input/output support
Date: 2010-01-30 15:54:08 GMT

Originally committed as revision 30474 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-31 10:16:05 +00:00
Måns Rullgård e62bd367ea Blackfin: use SRAM only when CONFIG_SRAM is set
Originally committed as revision 30472 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-31 00:20:37 +00:00
Stefano Sabatini 909f659473 Reindent.
Originally committed as revision 30467 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-30 21:58:09 +00:00
Stefano Sabatini 3ece3e524f Use a consistent convention for the names of the internal wrapper
functions. Improve readability.
 -This line, and those below, will be ignored--

     swscale.c

Originally committed as revision 30466 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-30 21:56:33 +00:00
Stefano Sabatini 7dac0c4379 Fix randomness of the swscale-test output.
See the thread:
Subject: [FFmpeg-devel] [RFC] Make swscale-test perform only one convertion
Date: Fri, 29 Jan 2010 01:52:23 +0100

Originally committed as revision 30457 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-30 13:31:00 +00:00
Stefano Sabatini b51de6d8c7 Rename swscale-example to swscale-test, to better reflect the intended
use of the program.

Originally committed as revision 30439 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-27 00:25:23 +00:00
Michael Niedermayer 6022255774 Use isAnyRGB() where possible
Originally committed as revision 30435 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-26 08:03:28 +00:00
Michael Niedermayer 81858371d9 Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr.
Originally committed as revision 30434 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-26 08:01:50 +00:00
Michael Niedermayer 3b1ee70312 Rename isRGB() and isBGR() as their meaning is confusing.
Originally committed as revision 30433 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-26 07:40:14 +00:00
Stefano Sabatini 7b87519b32 Merge two "if (flags & SWS_PRINT_INFO) { ... }" blocks, slightly
simplify code.

Originally committed as revision 30432 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-25 22:46:09 +00:00
Stefano Sabatini aa2ead8215 Fix mis-computation of the needsDither variable erroneously introduced
in r30419, which was causing a swscale-example regression.

Also increase my liter count by 20.0 units.

Originally committed as revision 30431 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 21:28:17 +00:00
Stefano Sabatini f632c4549b Merge two "if (flags & SWS_PRINT_INFO) { ... }" blocks.
Originally committed as revision 30425 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 17:44:43 +00:00
Stefano Sabatini 30b6147521 Use av_get_bits_per_pixel() for computing the bits per pixel of the
source and destination format, cache those values in the newly added
SwsContext:srcFormatBpp and SwsContext:dstFormatBpp fields, and remove
the fmt_depth() function.

Originally committed as revision 30419 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 12:55:05 +00:00
Ramiro Polla 59398ea9c0 Indent.
Originally committed as revision 30413 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 03:02:40 +00:00
Ramiro Polla 2658e7a6e7 Don't redefine M_PI. It is already defined from libavutil/mathematics.h.
Originally committed as revision 30412 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 02:16:26 +00:00
Ramiro Polla a4388ebd37 Split swscale.c into scaler code (swscale.c) and utility code (utils.c).
Originally committed as revision 30411 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 02:08:22 +00:00
Måns Rullgård 4a88852623 Move array specifiers outside DECLARE_ALIGNED() invocations
Originally committed as revision 30385 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-22 03:26:30 +00:00
David Conrad 01cc47dcd3 More const-correctness for sws_scale
Originally committed as revision 30381 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-21 09:52:11 +00:00
Ramiro Polla 5d4d503fd0 Document some more of SwsContext.
Originally committed as revision 30380 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-20 03:26:12 +00:00
Stefano Sabatini 613f2dc4ae Avoid more pointless tests, the input and output formats need to be
supported both as input and as output, as the conversion performed is:
yuva420p -> src -> dst -> yuva420p.

Originally committed as revision 30379 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-20 00:22:31 +00:00
Stefano Sabatini 0e21dcdb13 Split overly long line.
Originally committed as revision 30378 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 22:36:46 +00:00
Stefano Sabatini 731c04ad65 Make selfTest() perform tests where both the input and output formats
are supported, avoid pointless loops.

Originally committed as revision 30377 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 21:52:00 +00:00
Alexis Ballier f28cc5771f Make const prototypes for input sources of sws_scale_* stricter.
Patch by Alexis Ballier gmailify($firstname, $familyname)

Originally committed as revision 30374 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 16:30:20 +00:00
Ramiro Polla 9e5f164dc1 swscale-example: Add comment about the use of av_{malloc,free}.
Originally committed as revision 30373 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 15:42:51 +00:00
Ramiro Polla 3aca8b59f6 Remove useless forward declaration.
Originally committed as revision 30371 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 11:35:04 +00:00
Zuxy Meng d5206d3dd6 User friendly warning message that gives out names of source and target formats
Originally committed as revision 30370 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 05:21:17 +00:00
Måns Rullgård 51d83986b1 swscale-example: use av_malloc()
Image buffers require 16-byte alignment, so av_malloc() should be used.
Fixes crash on PPC.

Originally committed as revision 30369 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 03:47:11 +00:00
Stefano Sabatini 2d8d885b06 Split long line.
Originally committed as revision 30368 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-18 23:34:07 +00:00
Stefano Sabatini 591e465acf Convert int -> enum PixelFormat in doTest().
Originally committed as revision 30367 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-18 23:33:17 +00:00
Zuxy Meng 3c52d4849f Define out currently unused static functions.
Originally committed as revision 30365 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-18 08:42:04 +00:00
Stefano Sabatini c36a4294dc Remove stray '\' at the end of macro definitions.
Originally committed as revision 30362 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:29:31 +00:00
Stefano Sabatini 90eb284a77 Remove duplicated or pointless newlines.
Originally committed as revision 30361 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:17:47 +00:00
Stefano Sabatini 398c193d0b Factorize error message logging, log it if the converter cannot be
set.

Originally committed as revision 30360 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:07:37 +00:00