| Branch: | Revision:

ffmpeg / libswscale @ db46be01

# Date Author Comment
db46be01 04/11/2011 12:18 PM Diego Biurrun

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’:...

0464ee9a 04/06/2011 08:55 PM Anton Khirnov

swscale: postpone sws_getContext removal until next major bump.

The replacement isn't ready yet.

2912e87a 03/19/2011 01:33 PM Mans Rullgard

Replace FFmpeg with Libav in licence headers

Signed-off-by: Mans Rullgard <>

a03be6e1 03/16/2011 08:54 PM Janne Grunau


29ba0911 03/16/2011 08:54 PM Janne Grunau


also update the multiple inclusion guards in config.h|mak

737eb597 02/15/2011 03:18 PM Reinhard Tartler

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...

f344903c 02/13/2011 01:42 AM Mans Rullgard

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...

523d9407 02/04/2011 10:00 AM Clément Bœsch

Remove a few if (p) av_freep(&p) forms

Signed-off-by: Mans Rullgard <>

ef4a6514 01/18/2011 08:48 PM Mans Rullgard

Replace ASMALIGN with .p2align

This macro has unconditionally used .p2align for a long time and
serves no useful purpose.

2c3589bf 01/18/2011 08:32 PM Janne Grunau

consolidate .gitignore patters into a single file

Signed-off-by: Janne Grunau <>

348b8218 01/17/2011 02:50 PM Janne Grunau

convert svn:ignore properties to .gitignore files

Signed-off-by: Janne Grunau <>

b494baf0 12/07/2010 03:27 PM Ramiro Polla

colorspace-test: fix build

rgb32tobgr32() has been removed in favour of shuffle_bytes_2103() in r32190

Originally committed as revision 32676 to svn://

9c158e49 10/29/2010 01:48 PM Martin Storsjö

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://

12eef0d1 10/03/2010 07:53 AM Reimar Döffinger

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://

f34fcdc8 09/29/2010 10:06 PM Stefano Sabatini

Set default values for the scale context in sws_alloc_context().

Originally committed as revision 32415 to svn://

e60c906a 09/29/2010 10:06 PM Stefano Sabatini

Set the default value of param0 and param1 to SWS_PARAM_DEFAULT.

Originally committed as revision 32414 to svn://

6d21d67b 09/29/2010 10:06 PM Stefano Sabatini

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

Originally committed as revision 32413 to svn://

fc7c40c2 09/29/2010 04:15 PM Stefano Sabatini

Cosmetics: put "if (...)" and "av_log(...)" in the same line for
improving vertical alignment and readability.

Originally committed as revision 32405 to svn://

d29e863e 09/29/2010 01:02 PM Stefano Sabatini

Put if (...) av_log() in the same line, more compact and increase

Originally committed as revision 32404 to svn://

5abd626e 09/29/2010 01:02 PM Stefano Sabatini

Amend constraints for the src_format and dst_format options in the
SWScale context.

Originally committed as revision 32403 to svn://

c24b404b 09/29/2010 08:44 AM Stefano Sabatini

Cosmetics: fix braces placement.

Originally committed as revision 32402 to svn://

0810a584 09/28/2010 10:23 PM Stefano Sabatini

Deprecate sws_getContext(), use sws_alloc_context() and
sws_init_context() instead.

Originally committed as revision 32401 to svn://

499287e0 09/28/2010 10:23 PM Stefano Sabatini

Add documentation for the returned value of sws_init_context().

Originally committed as revision 32400 to svn://

c508ab67 09/28/2010 03:29 PM Stefano Sabatini

Bump minor version after the addition of sws_alloc_context() and
sws_init_context() of r32368.

Originally committed as revision 32396 to svn://

bd8154d0 09/27/2010 11:47 PM Baptiste Coudurier

100l fix if condition

Originally committed as revision 32395 to svn://

df0743e0 09/27/2010 10:24 PM Baptiste Coudurier

Y400A (gray alpha) input support in libswscale

Originally committed as revision 32394 to svn://

9f694f0b 09/27/2010 08:10 PM Janne Grunau

swscale: clear SWS_CPU_CAPS_SSE2 in update_flags_cpu() missed in r32068

Originally committed as revision 32393 to svn://

829e5daf 09/27/2010 08:09 PM Janne Grunau

cosmetics: break long line update_flags_cpu

Originally committed as revision 32392 to svn://

33ce3846 09/26/2010 08:31 PM Ramiro Polla

fix typos and grammar

Originally committed as revision 32370 to svn://

8c26d83e 09/26/2010 07:48 PM Michael Niedermayer

Make the avoptions list of sws more complete.

Originally committed as revision 32369 to svn://

635d4aed 09/26/2010 07:33 PM Michael Niedermayer

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://

f4203ff3 09/26/2010 05:06 PM Ramiro Polla

swscale: use full chroma input for point scaler

Originally committed as revision 32360 to svn://

b9f5e3bd 09/16/2010 01:30 PM Ramiro Polla

swscale-test: cosmetic alignment

Originally committed as revision 32265 to svn://

5a901737 09/16/2010 01:09 AM Ramiro Polla

swscale: remove useless temporary variable

Originally committed as revision 32258 to svn://

cf1cd520 09/16/2010 01:07 AM Ramiro Polla

swscale: factorize plane copying code out of 2 functions

Originally committed as revision 32257 to svn://

f1084cb0 09/16/2010 12:41 AM Ramiro Polla

swscale-test: always use bilinear scaler to get output for SSD

Originally committed as revision 32256 to svn://

c12f7b2d 09/14/2010 01:12 PM Ramiro Polla

rgb2rgb: don't misuse HAVE_* defines

Introduce and use COMPILE_TEMPLATE_* instead.

Originally committed as revision 32241 to svn://

40b433b6 09/13/2010 02:33 PM Ramiro Polla

swscale: indentation and emtpy line cosmetics

Originally committed as revision 32222 to svn://

6527e561 09/13/2010 02:25 PM Ramiro Polla

swscale: avoid reading prior to the source buffer in planar2x() MMX2

Originally committed as revision 32221 to svn://

9b4bf9c2 09/12/2010 06:17 PM Ramiro Polla

swscale-test: allow specifying src/dst pixel formats

Originally committed as revision 32215 to svn://

9075bc7c 09/12/2010 06:16 PM Ramiro Polla


Originally committed as revision 32214 to svn://

4bf44785 09/12/2010 06:16 PM Ramiro Polla

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://

6bbae4c8 09/12/2010 06:15 PM Ramiro Polla

swscale-test: always use SWS_BILINEAR to convert from ref to src

Originally committed as revision 32212 to svn://

3e1e7800 09/12/2010 06:14 PM Ramiro Polla

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://

a51125b5 09/12/2010 01:03 PM Ramiro Polla

rgb2rgb: replace shuffle_bytes_2103() by optimized rgb32tobgr32()

Originally committed as revision 32190 to svn://

0132ab80 09/11/2010 02:31 PM Ramiro Polla


Originally committed as revision 32157 to svn://

4d861749 09/11/2010 02:30 PM Ramiro Polla

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://

4821b445 09/11/2010 02:29 PM Ramiro Polla

rgb2rgb: remove unused yvu9toyv12 function

Originally committed as revision 32155 to svn://

4389d606 09/08/2010 11:36 PM Ramiro Polla

av_fill_image_linesizes -> av_image_fill_linesizes

Originally committed as revision 32106 to svn://

539ff40c 09/08/2010 01:16 PM Ramiro Polla

rgb2rgb: build SSE2 codepath

Originally committed as revision 32068 to svn://

c17f5a4e 09/06/2010 02:42 PM Ramiro Polla

swscale: also update flags on sws_getCachedContext()

Originally committed as revision 32052 to svn://

a1899e0a 09/06/2010 02:02 AM Ramiro Polla

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://

87db3735 09/05/2010 09:41 AM vle

Fix mlib compilation: add mising include for SwsContext.
Patch by [vle gmx net].

Originally committed as revision 32050 to svn://

0fc29f27 08/25/2010 02:39 PM Ramiro Polla

swscale: simplify selection of optimizations to compile.

Originally committed as revision 32013 to svn://

8f028616 08/25/2010 02:38 PM Ramiro Polla

swscale: Always define COMPILE_xxx to either 0 or 1.

Originally committed as revision 32012 to svn://

66842fe8 08/23/2010 09:22 PM Måns Rullgård

swscale: fix unaligned accesses in (RGB|BGR)32_1 to YUV conversion

Originally committed as revision 32011 to svn://

83761d5b 08/23/2010 09:22 PM Måns Rullgård

swscale: remove unused macro parameter in BGR2UV template

Originally committed as revision 32010 to svn://

53bc0dc2 08/19/2010 11:48 PM Grant Carver

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://

8d884020 08/19/2010 02:36 PM Ramiro Polla

swscale-test: add CRC output

Originally committed as revision 31982 to svn://

a42c29fe 08/18/2010 07:37 PM Ramiro Polla

validate input data and linesizes

Originally committed as revision 31976 to svn://

a4fc3bd5 08/08/2010 06:18 PM Ramiro Polla


Originally committed as revision 31949 to svn://

06c93cb7 08/08/2010 06:14 PM Ramiro Polla

swscale-test: get strides using av_fill_image_linesizes() from libavcore

Originally committed as revision 31948 to svn://

e07b1939 07/31/2010 10:02 PM Ramiro Polla

swscale-test: merge declaration and initialization

Originally committed as revision 31879 to svn://

ed80ba74 07/28/2010 10:43 AM Stefano Sabatini

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://

6cce7cab 07/24/2010 02:43 PM Reimar Döffinger

Fix compilation, forgot to add const also to the
definition of ff_yuv2packedX_altivec

Originally committed as revision 31782 to svn://

5a55d5b5 07/24/2010 11:37 AM Reimar Döffinger

More const-correctness fixes to avoid warnings.

Originally committed as revision 31781 to svn://

a4eef68f 07/24/2010 11:33 AM Reimar Döffinger

Add some "const" to avoid incompatible pointer type warnings

Originally committed as revision 31780 to svn://

04f6ab1c 07/24/2010 11:19 AM Stefano Sabatini

Add missing comma, fix rgb2yuv_table[SWS_CS_SMPTE240M] coefficients.

Originally committed as revision 31779 to svn://

24911613 07/24/2010 11:19 AM Stefano Sabatini

Add some comments to the rgb2yuv_table, clarifying the standard where
are defined.

Originally committed as revision 31778 to svn://

73016d29 07/23/2010 08:27 PM Ramiro Polla

swscale-test: scale from reference to source only once for each algorithm

Originally committed as revision 31777 to svn://

be1c5d35 07/23/2010 08:26 PM Ramiro Polla


Originally committed as revision 31776 to svn://

da78053a 07/23/2010 08:26 PM Ramiro Polla

swscale-test: change order tests are run, maintaining the same algorithm for
sequential geometries instead of running all algorithms sequentially for each

Originally committed as revision 31775 to svn://

5b9eb687 07/22/2010 11:01 PM Stefano Sabatini

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

Originally committed as revision 31772 to svn://

9bb9875e 07/22/2010 07:05 PM Ramiro Polla

swscale-test: use only 3 characters to print width/height since they're always
smaller than 1000

Originally committed as revision 31771 to svn://

b6f1e7ec 07/22/2010 07:02 PM Ramiro Polla

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://

67e1d527 07/22/2010 03:30 PM Ramiro Polla

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....

262b6dba 07/21/2010 01:29 PM Ramiro Polla

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...

92bfd746 07/20/2010 10:20 PM Ramiro Polla

swscale-test: use av_pix_fmt_descriptors[].name directly

Originally committed as revision 31759 to svn://

709c0181 07/20/2010 01:45 AM Ramiro Polla

Restore vertical alignment in some defines

Originally committed as revision 31758 to svn://

e593826b 07/19/2010 07:06 AM Martin Storsjö

Cosmetics: reindent and unify whitespace

Originally committed as revision 31757 to svn://

72ae5049 07/19/2010 07:02 AM Martin Storsjö

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://

c85007d5 07/18/2010 09:39 PM Anton Mitrofanov

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...

c4e2b826 07/16/2010 05:45 PM Martin Storsjö

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

Originally committed as revision 31746 to svn://

453d28af 07/12/2010 08:35 AM Benoit Fouet

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...

6a01eab7 07/10/2010 10:12 PM Måns Rullgård

Add av_ prefix to bswap macros

Originally committed as revision 31679 to svn://

3483d877 07/03/2010 09:58 AM Eli Friedman

Fix 'assignment from incompatible pointer type' warning.

Patch by Eli Friedman, eli d friedman a gmail

Originally committed as revision 31628 to svn://

2b991422 06/01/2010 07:35 PM Reinhard Tartler

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:

0093ac5b 06/01/2010 11:30 AM Stefano Sabatini

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://

3d9408f4 06/01/2010 06:53 AM Reinhard Tartler

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://

870a6f40 05/30/2010 08:44 AM Diego Biurrun

Rename yuv2rgb_template2.c --> yuv2rgb_template.c now that the other is gone.

Originally committed as revision 31279 to svn://

531f97b0 05/30/2010 08:31 AM Diego Biurrun

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://

d458b7d4 05/23/2010 10:02 AM Stefano Sabatini

Add empty newline to separate function declarations, for better

Originally committed as revision 31192 to svn://

b8dbff33 05/19/2010 10:56 PM Stefano Sabatini

Cosmetics: make more compact the code for handle_jpeg(), this also allows
vertical alignment. Improve readability.

Originally committed as revision 31186 to svn://

4e74187d 05/19/2010 10:49 PM Stefano Sabatini

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://

8a26b2c6 05/19/2010 01:31 PM Loren Merritt

13% faster yuv420 to rgb15 mmx.
It is now faster than the old gpl version on conroe.

Originally committed as revision 31181 to svn://

bffc36e0 05/19/2010 08:21 AM Loren Merritt

40% faster yuv420 to rgb24 mmx.
It is now faster than the old gpl version on conroe.

Originally committed as revision 31180 to svn://

c3ab0004 05/12/2010 08:47 PM Ramiro Polla

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://

d9d14dc6 05/11/2010 12:36 AM Ramiro Polla

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://

447a5b19 05/07/2010 09:59 PM Ronaldo Moura

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://

f4ea7c89 05/04/2010 09:11 AM Diego Biurrun

alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
written by Kostya Shishkov

Originally committed as revision 31135 to svn://