Commit Graph

426 Commits

Author SHA1 Message Date
Michael Niedermayer
bb9d5171a7 Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  swscale: Add Doxygen for hyscale_fast/hScale.
  fate: enable lavfi-pixmt tests on big endian systems
  PPC: swscale: disable altivec functions for unsupported formats
  fate: merge identical pixdesc_be/le tests
  swscale: Add Doxygen for yuv2planar*/yuv2packed* functions.
  build: call texi2pod.pl with full path instead of symlink
  build: include sub-makefiles using full path instead of symlinks
  swscale: update big endian reference values after dff5a835.
  wavpack: skip blocks with no samples
  cosmetics: remove outdated comment that is no longer true
  build: replace some addprefix/addsuffix with substitution refs
  avutil: Remove unused arbitrary precision integer code.
  configure: Drop check for availability of ten assembler operands.
  aacenc: Save channel configuration for later use.
  aacenc: Fix codebook trellising for zeroed bands.
  swscale: change prototypes of scaled YUV output functions.
  swscale: re-add support for non-native endianness.
  swscale: disentangle yuv2rgbX_c_full() into small functions.
  swscale: split yuv2packed[12X]_c() remainders into small functions.
  swscale: split yuv2packedX_altivec in smaller functions.
  ...

Conflicts:
	Makefile
	configure
	libavcodec/x86/dsputil_mmx.c
	libavfilter/Makefile
	libavformat/Makefile
	libavutil/integer.c
	libavutil/integer.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/x86/swscale_template.c
	tests/ref/lavfi/pixdesc_le
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-29 05:23:12 +02:00
Ronald S. Bultje
13a099799e swscale: change prototypes of scaled YUV output functions.
Remove unused variables "flags" and "dstFormat" in yuv2packed1,
merge source rows per plane for yuv2packed[12], and make every
source argument int16_t (some where invalidly set to uint16_t).
This prevents stack pollution and is part of the Great Evil Plan
to simplify swscale.
2011-06-27 21:24:44 -07:00
Ronald S. Bultje
dff5a83532 swscale: re-add support for non-native endianness.
This works through some non-obvious hacks in utils.c.
2011-06-27 18:10:41 -07:00
Ronald S. Bultje
3d3c814937 swscale: disentangle yuv2rgbX_c_full() into small functions.
This is part of the Great Evil Plan to simplify swscale.
2011-06-27 18:10:24 -07:00
Ronald Bultje
6fba14eecb swscale: split yuv2packed[12X]_c() remainders into small functions.
This is part of the Great Evil Plan to simplify swscale.
2011-06-27 18:10:03 -07:00
Michael Niedermayer
f211d9d839 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: improve rules for test programs
  build: factor out the .c and .S compile commands as a macro
  swscale: remove unused xInc/srcW arguments from hScale().
  H.264: disable 2tap qpel with CODEC_FLAG2_FAST and >8-bit
  H.264: make filter_mb_fast support 4:4:4
  mpeg4videoenc: Remove disabled variant of mpeg4_encode_block().
  configure: allow post-fixed cpu strings for athlon64, k8, and opteron when setting the -march flag.
  Move some variable declarations below the proper #ifdefs.

Conflicts:
	Makefile
	ffplay.c
	libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-27 03:32:45 +02:00
Ronald S. Bultje
97535ffb97 swscale: remove unused xInc/srcW arguments from hScale(). 2011-06-26 14:41:44 -07:00
Michael Niedermayer
15b4f6449d swscale: fix mono input for width%8
Fixes ticket193

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-19 03:54:16 +02:00
Michael Niedermayer
c137fdd778 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: remove misplaced comment.
  ffmpeg: fix streaming to ffserver.
  swscale: split out RGB48 output functions from yuv2packed[12X]_c().
  build: move vpath directives to main Makefile
  swscale: fix JPEG-range YUV scaling artifacts.
  build: move ALLFFLIBS to a more logical place
  ARM: factor some repetitive code into macros
  Fix SVQ3 after adding 4:4:4 H.264 support
  H.264: fix CODEC_FLAG_GRAY
  4:4:4 H.264 decoding support
  ac3enc: fix allocation of floating point samples.

Conflicts:
	ffmpeg.c
	libavcodec/dsputil_template.c
	libavcodec/h264.c
	libavcodec/mpegvideo.c
	libavcodec/snow.c
	libswscale/swscale.c
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-15 02:15:25 +02:00
Ronald S. Bultje
4e05830205 swscale: remove misplaced comment.
The comment should have been placed only in
yuv2rgb48_X_c_template, not yuv2rgb48_1_c_template.
2011-06-14 16:55:24 -04:00
Ronald S. Bultje
9f63211175 swscale: split out RGB48 output functions from yuv2packed[12X]_c().
This is part of the Great Evil Plan to simplify swscale. Note that
you'll see some code duplication between the output functions for
different RGB variants, and even between packed-YUV and RGB
variants. This is intentional because it improves readability.
2011-06-14 15:59:14 -04:00
Michael Niedermayer
0af8a71d66 swscale: fix JPEG-range YUV scaling artifacts.
YUV planes were marked as uint16_t, but they contained signed data.
Fixes issue 1108 and 675.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-14 09:46:49 -04:00
Michael Niedermayer
45fb647495 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  bitstream: Properly promote av_reverse values before shifting.
  libavutil/swscale: YUV444P10/YUV444P9 support.
  H.264: Fix high bit depth explicit biweight
  h264: Fix 10-bit H.264 x86 chroma v loopfilter asm.
  Replace DEBUG_SEEK/DEBUG_SI + av_log combinations by av_dlog.
  Update copyright year for ac3enc_opts_template.c.
  adts: Adjust frame size mask to follow the specification.
  movenc: Add RTP muxer/hinter options
  movenc: Pass the RTP AVFormatContext to the SDP generation
  rtspenc: Add RTP muxer options
  rtspenc: Add an AVClass for setting muxer specific options
  rtpenc_chain: Pass the rtpflags options through to the chained muxer
  rtpenc: Declare the rtp flags private AVOptions in rtpenc.h
  sdp: Reindent after the previous commit
  rtpenc: MP4A-LATM payload support
  avoptions: Add an av_opt_flag_is_set function for inspecting flag fields
  sdp: Allow passing an AVFormatContext to the SDP generation
  mov: Fix wrong timestamp generation for fragmented movies that have time offset caused by the first edit list entry.
  mpeg12: more advanced ffmpeg mpeg2 aspect guessing code.
  swscale: split YUYV output out of yuv2packed[12X]_c().

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/h264dsp_template.c
	libavcodec/mpeg12.c
	libavformat/aacdec.c
	libavformat/avidec.c
	libavformat/internal.h
	libavformat/movenc.c
	libavformat/rtpenc.c
	libavformat/rtpenc_latm.c
	libavformat/sdp.c
	libavformat/version.h
	libavutil/avutil.h
	libavutil/pixfmt.h
	libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-11 03:51:36 +02:00
Ronald S. Bultje
103278f7b0 libavutil/swscale: YUV444P10/YUV444P9 support.
Also add missing glue code for recently added YUV422P10 formats
to swscale.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-10 15:12:24 -04:00
Michael Niedermayer
2ec77aae67 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: make compute_pkt_fields2() return meaningful error values
  matroskadec: set timestamps for RealAudio packets.
  intelh263dec: aspect ratio processing fix.
  intelh263dec: fix "Strict H.263 compliance"  file playback
  oss,sndio: simplify by using FFMIN.
  swscale: extract monowhite/black output from yuv2packed[12X]_c().
  swscale: de-macro'ify RGB15/16/32 input functions.
  swscale: rearrange code.
  movdec: Add support for the 'wfex' atom.
  ffmpeg.c: Add a necessary const qualifier
  riff: Fix potential memleak.
  swscale: change 48bit RGB input macros to inline functions.
  swscale: change 9/10bit YUV input macros to inline functions.
  swscale: extract gray16 output functions from yuv2packed[12X]().
  swscale: use standard clipping functions.
  swscale: merge macros that are used only once.
  swscale: fix function declarations in swscale.c.
  swscale: fix function declaration keywords in x86/swscale_template.c.

Conflicts:
	ffmpeg.c
	libavcodec/intelh263dec.c
	libswscale/swscale.c
	libswscale/x86/swscale_template.c

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

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-09 04:47:19 +02:00
Ronald S. Bultje
9d84dfce93 swscale: remove unused function.
Use of this wrapper was removed in a previous patch, but I
forgot to actually remove the function itself.
2011-06-08 11:08:20 -04:00
Michael Niedermayer
d552f616a2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  Remove some non-compiling debug messages.
  ffplay: Fix non-compiling debug printf and replace it by av_dlog.
  H264: x86 predict init cosmetics.
  ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder.
  Move E-AC-3 encoder functions to a separate eac3enc.c file.
  ac3enc: remove convenience macro, #define DEBUG
  ac3enc: remove unused #define
  vc1: re-initialize tables after width/height change.
  APIchanges: fill-in git commit hash for av_get_bytes_per_sample() addition
  samplefmt: add av_get_bytes_per_sample()
  iirfilter: fix biquad filter coefficients.
  swscale: remove duplicate conversion routine in swScale().
  swscale: add yuv2planar/packed function typedefs.
  swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers.
  swscale: reindent x86 init code.
  swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
  swscale: cosmetics.
  swscale: remove alp/chr/lumSrcOffset.
  swscale: un-special-case yuv2yuvX16_c().
  shorten: Remove stray DEBUG #define and corresponding av_dlog statement.
  ...

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

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-04 06:35:17 +02:00
Ronald S. Bultje
6af2801088 swscale: split swscale.c in unscaled and generic conversion routines.
This duplicates the function fillPlane().
2011-06-03 09:52:09 -07:00
Ronald S. Bultje
2762ee3034 swscale: cosmetics.
Remove duplicate "inC" and "_c" functions that do the same thing;
give each function that handles data and acts as a function pointer
a "_c" suffix; remove "_c" suffix from functions that are inherently
not optimizable. Remove inline keyword from functions that are only
used through function pointers.
2011-06-03 09:52:09 -07:00
Ronald S. Bultje
1674bd2abe swscale: integrate (literally) swscale_template.c in swscale.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje
983260b0a4 swscale: split out x86/swscale_template.c from swscale.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje
67d80a5421 swscale: split out ppc _template.c files from main swscale.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje
a3e9bb5dee swscale: remove indirections in ppc/swscale_template.c. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje
0e5d31b16b swscale: split out unscaled altivec YUV converters in their own file. 2011-06-03 09:52:09 -07:00
Ronald S. Bultje
0d793db1b0 swscale: remove unused COMPILE_TEMPLATE_ALTIVEC. 2011-06-02 21:29:59 -07:00
Michael Niedermayer
6713989c23 swscale: dither for planar yuv outputs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-02 21:03:55 +02:00
Michael Niedermayer
201549d1a9 swscale: More accurate rounding in YSCALE_YUV_2_PACKEDX_FULL_C()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-01 05:01:22 +02:00
Reimar Döffinger
3d0424f2ff Add "const" to avoid "initialization discards qualifiers" warning. 2011-05-30 20:07:39 +02:00
Stefano Sabatini
e1197b9e17 swscale: remove sws_format_name()
Use av_get_pix_fmt_name() instead.
2011-05-30 09:07:43 +02:00
Michael Niedermayer
b8a43bc1b5 Merge remote-tracking branch 'qatar/master' into master
* qatar/master: (27 commits)
  ac3enc: fix LOCAL_ALIGNED usage in count_mantissa_bits()
  ac3dsp: do not use the ff_* prefix when referencing ff_ac3_bap_bits.
  ac3dsp: fix loop condition in ac3_update_bap_counts_c()
  ARM: unbreak build
  ac3enc: modify mantissa bit counting to keep bap counts for all values of bap instead of just 0 to 4.
  ac3enc: split mantissa bit counting into a separate function.
  ac3enc: store per-block/channel bap pointers by reference block in a 2D array rather than in the AC3Block struct.
  get_bits: add av_unused tag to cache variable
  sws: replace all long with int.
  ARM: aacdec: fix constraints on inline asm
  ARM: remove unnecessary volatile from inline asm
  ARM: add "cc" clobbers to inline asm where needed
  ARM: improve FASTDIV asm
  ac3enc: use LOCAL_ALIGNED macro
  APIchanges: fill in git hash for av_get_pix_fmt_name (0420bd7).
  lavu: add av_get_pix_fmt_name() convenience function
  cmdutils: remove OPT_FUNC2
  swscale: fix crash in bilinear scaling.
  vpxenc: add VP8E_SET_STATIC_THRESHOLD mapping
  webm: support stereo videos in matroska/webm muxer
  ...

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-29 03:34:35 +02:00