Commit Graph

123 Commits

Author SHA1 Message Date
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 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
Ronald S. Bultje e66149e714 swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. 2011-05-24 10:03:26 -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
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
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
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
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 e91946ed23 Rename y400a to gray8a.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 21:36:30 +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
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 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
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
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
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
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
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
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
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
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 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 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
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 73cadb4f13 Prefer enum PixelFormat to int as the parameter type of
fmt_depth(fmt).

Originally committed as revision 30333 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:32:58 +00:00
Ramiro Polla 9556124c97 Document some of SwsContext.
Originally committed as revision 30328 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:04:55 +00:00
Ramiro Polla 0cc854e377 Reuse h{lum,chr}Filter{,Pos} variables for MMX2 fast_bilinear horizontal scaler.
Originally committed as revision 30327 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 18:39:06 +00:00
Zuxy Meng a959e24780 Const correctness for src pointer. Remove all constness related warnings in
libswscale.

Originally committed as revision 30306 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-15 08:51:51 +00:00
Ramiro Polla a1f4b4bb6e Move fast bilinear scaler code to the existing h[yc]scale_fast() functions.
Originally committed as revision 30098 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:54:59 +00:00
Ramiro Polla bb53e1d188 Rename function pointers used to convert from the input pixel format to the
intermediate YV12 to a more descriptive name.

Originally committed as revision 30097 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:41:29 +00:00
Ramiro Polla e7a47515ab Check if chroma horizontal scaler is needed in sws_init_swScale().
Originally committed as revision 30096 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:34:45 +00:00
Ramiro Polla 6f9771d7a6 Remove unused fields from SwsContext.
Originally committed as revision 30095 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:30:55 +00:00
Ramiro Polla d3243d1431 Indentation.
Originally committed as revision 30087 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 17:42:35 +00:00
Ramiro Polla bae76dc3eb Set horizontal scaler's range conversion in context in sws_init_swScale().
Originally committed as revision 30082 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 16:32:58 +00:00
Ramiro Polla 84011f10d5 Set horizontal scaler's src offsets in context in sws_init_swScale().
Originally committed as revision 30081 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 16:21:25 +00:00
Lars Täuber 991e579cae Make 16bit YUV formats compatible with NE avcodec_get_pix_fmt().
Patch by Lars Täuber <lars <dot> taeuber <at> gmx <dot> net>.

Originally committed as revision 29650 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-05 23:33:11 +00:00
Ramiro Polla c255994b29 More indentation changes leftover from r29522:
- Align asm code to the column 4 spaces after the call to __asm__();
- Align cases in switch statements to the same column as "switch".

Originally committed as revision 29524 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-16 21:37:07 +00:00
Ramiro Polla dd68318cee Cosmetics:
- Place curly brackets in the same line as while/for/if/switch/else/do;
- Place curly brackets at column 0 in the next line starting a function.

Originally committed as revision 29523 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-16 21:11:28 +00:00
Ramiro Polla 48f4c61252 MMX2 horizontal scaler: Determine code size at runtime.
Originally committed as revision 29510 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-13 18:31:07 +00:00
Ramiro Polla bcdedf675f Rename "funny" code to "mmx2 filter" code.
Originally committed as revision 29507 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-13 18:28:17 +00:00