Commit Graph

14005 Commits

Author SHA1 Message Date
Baptiste Coudurier
8811679c8e SVQ3: Move svq3 specific fields to their own context.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 15:43:46 +02:00
Michael Niedermayer
b000b86e1d Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  doc: Check standalone compilation before submitting new components.
  Fix standalone compilation of pipe protocol.
  Fix standalone compilation of ac3_fixed encoder.
  Fix standalone compilation of binkaudio_dct / binkaudio_rdft decoders.
  Fix standalone compilation of IMC decoder.
  Fix standalone compilation of WTV demuxer.
  Fix standalone compilation of MXPEG decoder.
  flashsv: K&R cosmetics
  matroskaenc: fix memory leak
  vc1: make overlap filter for I-frames bit-exact.
  vc1dec: use s->start/end_mb_y instead of passing them as function args.
  Revert "VC1: merge idct8x8, coeff adjustments and put_pixels."
  Replace strncpy() with av_strlcpy().
  indeo3: Eliminate use of long.
  get_bits: make cache unsigned to eliminate undefined signed overflow.
  asfdec: fix assert failure on invalid files
  avfilter: check malloc return values.
Not pulled as reason for reindent is not pulled:  mpegvideo: reindent.
  nutenc: check malloc return values.
Not pulled due to much simpler solution in ffmpeg  *: don't av_malloc(0).
  ...

Conflicts:
	doc/developer.texi
	libavcodec/Makefile
	libavcodec/get_bits.h
	libavcodec/mpegvideo.c
	libavformat/Makefile
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 03:30:24 +02:00
Michael Niedermayer
334187ade7 Fix "libavcodec/dfa.c:189: warning: unused variable ‘frame_end’"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 23:33:59 +02:00
JULIAN GARDNER
e822c237b3 dvbsubdec: Split delete_state() 2011-05-04 23:33:59 +02:00
Michael Niedermayer
9522a752bf xsubenc: only 1 rectangle is supported so dont allow 0 as it would crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 23:33:59 +02:00
Justin Ruggles
d7c91c4cea sonic: fix sonic decoder to match encoder for sample rates other than 44100. 2011-05-04 23:33:59 +02:00
Michael Niedermayer
105a3c7a6b bitstream_reader: Try to fix "get_bits.h:305:45: warning: variable ‘re_cache’ set but not used [-Wunused-but-set-variable]"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 21:31:07 +02:00
Diego Biurrun
61165a1bba Fix standalone compilation of WTV demuxer. 2011-05-04 21:12:40 +02:00
Diego Biurrun
091018e0dd Fix standalone compilation of MXPEG decoder. 2011-05-04 21:12:40 +02:00
Diego Biurrun
35e376b0d2 flashsv: K&R cosmetics 2011-05-04 21:12:39 +02:00
Michael Niedermayer
3acc44b739 bitstream reader: remove unneeded variable initilization.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-04 20:26:33 +02:00
Ronald S. Bultje
7d2e03afc8 vc1: make overlap filter for I-frames bit-exact. 2011-05-04 07:40:53 -04:00
Ronald S. Bultje
5c9f147e05 vc1dec: use s->start/end_mb_y instead of passing them as function args. 2011-05-04 07:40:02 -04:00
Ronald S. Bultje
18b6a69ce9 Revert "VC1: merge idct8x8, coeff adjustments and put_pixels."
This reverts commit f8bed30d8b. The reason
for this is that the overlap filter, which runs after IDCT, should run
on unclamped values, and thus IDCT and put_pixels() cannot be merged if
we want to attempt to be bitexact.
2011-05-04 07:40:01 -04:00
Alex Converse
1a5e4fd8c5 Replace strncpy() with av_strlcpy(). 2011-05-03 21:20:13 -07:00
Alex Converse
aab6374bbe indeo3: Eliminate use of long. 2011-05-03 21:20:05 -07:00
Alex Converse
47bc52f821 get_bits: make cache unsigned to eliminate undefined signed overflow. 2011-05-03 21:14:39 -07:00
Ronald S. Bultje
d969e93a72 mpegvideo: reindent. 2011-05-03 22:35:19 -04:00
Ronald S. Bultje
fb22c23715 mpegvideo: don't av_malloc(0). 2011-05-03 22:29:00 -04:00
Kostya Shishkov
e4be3485af MS Video 1 encoder 2011-05-04 02:22:12 +02:00
ami_stuff
c402ce418a Remove lowres support from wmv2 decoder
lowres option crashes with wmv2 files which I have for test,
so I think it's better to remove the support to the time when
lowres will be really supported by this codec

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-03 04:38:22 +02:00
Michael Niedermayer
2525821f1a Merge remote branch 'qatar/master'
* qatar/master:
  vp8: frame-multithreading.
Duplicate  Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Duplicate  Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Bug spoted&removed in last merge:  dpx: Do not use DPX encoder for decoding.

Conflicts:
	ffmpeg.c
	ffplay.c
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-03 04:08:23 +02:00
Carl Eugen Hoyos
7d70d1937a Support decoding of 24 bit True Audio samples-
Many samples will fail because "Output buffer size is too small."
2011-05-03 01:09:30 +02:00
Carl Eugen Hoyos
4cf2e30f05 Support decoding of 8 bit True Audio samples-
Many samples will fail because "Output buffer size is too small."
2011-05-03 01:06:18 +02:00
Carl Eugen Hoyos
fba418e670 Do not assume AV_SAMPLE_FMT_S16 as tta sample format. 2011-05-03 01:02:07 +02:00
Alexandre Colucci
3b4621acbb Fix init_get_bits length argument for init_get_bits.
Do not use rlelen for buffer size in init_get_bits, it is
only the size of the data for the first field.
Since it is not reliable, just use the size of the whole buffer.
Additional comments add removal of unused rlelen variable by
Reimar Döffinger.
2011-05-02 18:57:51 +02:00
Reimar Döffinger
cf16104ad1 Change guess_palette so its output matches the most common palette.
This means it uses full brightness range and brightness
increasing instead of decreasing with index of non-opaque
color.

Based on patch by Alexandre Colucci [alexandre elgato com]
2011-05-02 18:39:03 +02:00
Ronald S. Bultje
4773d90421 vp8: frame-multithreading.
Tested on a Mac Pro, 2 CPUs, 2 cores each, OSX 10.6.6:

time ./ffmpeg -v 0 -vsync 0 -threads [1234] -i \
  ~/Downloads/sintel_trailer_1080p_vp8_vorbis.webm \
  -f null -vcodec rawvideo -an -
1: 0m14.630s (89.9 fps)
2: 0m8.056s (163.2 fps)
3: 0m5.882s (223.6 fps)
4: 0m4.952s (265.6 fps)

time ./ffmpeg -v 0 -vsync 0 -threads [1234] -i \
  ~/Downloads/Elephants_Dream-720p-Stereo.webm \
  -f null -vcodec rawvideo -an -
1: 1m12.962s (215.1 fps)
2: 0m44.682s (351.2 fps)
3: 0m31.183s (503.2 fps)
4: 0m25.284s (620.6 fps)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-02 17:03:31 +02:00
Stefano Sabatini
ce5e49b0c2 replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_* 2011-05-02 16:41:41 +02:00
Stefano Sabatini
301183d9be replace deprecated av_get_pict_type_char() with av_get_picture_type_char() 2011-05-02 16:41:35 +02:00
Stefano Sabatini
975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Stefano Sabatini
6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Kostya Shishkov
b178cd76b2 dpx: Do not use DPX encoder for decoding.
10l to the one who hasn't checked this.
2011-05-02 11:04:20 +02:00
Michael Niedermayer
c3f5b81125 Merge remote branch 'qatar/master'
* qatar/master:
  ALPHA: Replace sized int_fast integer types with plain int/unsigned.
Duplicate  DPX image encoder
Duplicate  DPX decoder: read sample aspect ratio
Duplciate  DPX decoder: add buffer size checks.
  ac3enc: clip large coefficient values and negative exponents rather than using av_assert2().
  ac3enc: do not store a bandwidth code for each channel.
  ac3enc: remove bandwidth reduction as fallback for bit allocation failure.
  ac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy()
  ac3enc: return error if frame+exponent bits are too large instead of using av_assert2().
  ac3enc: differentiate between current block and reference block in bit_alloc()
  ac3enc: simplify exponent_init() by calculating exponent_group_tab[] based on exponent group sizes.
  ac3enc: simplify stereo rematrixing decision options
Include both URLs:  Update URL to fate samples

Conflicts:
	Changelog
	doc/fate.txt
	libavcodec/ac3enc.c
	libavcodec/dpxenc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-02 03:45:58 +02:00
Michael Niedermayer
007d352c1c dct-test: Support testing bits>8
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-02 02:58:09 +02:00
Diego Biurrun
ad1862d64a ALPHA: Replace sized int_fast integer types with plain int/unsigned.
int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.
2011-05-01 20:50:12 +02:00
Peter Ross
e27ce0eea3 DPX image encoder 2011-05-01 19:35:55 +02:00
Peter Ross
406629150c DPX decoder: read sample aspect ratio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 19:35:55 +02:00
Reimar Döffinger
3777ea13fb DPX decoder: add buffer size checks. 2011-05-01 19:35:55 +02:00
Justin Ruggles
63b1866ae1 ac3enc: clip large coefficient values and negative exponents rather than using
av_assert2().
2011-05-01 13:32:04 -04:00
Justin Ruggles
177fed4e9b ac3enc: do not store a bandwidth code for each channel.
Although AC-3 allows it, it's not very useful. The encoder uses the same code
for all full-bandwidth channels.
2011-05-01 13:32:04 -04:00
Justin Ruggles
a1d0f511fc ac3enc: remove bandwidth reduction as fallback for bit allocation failure.
It was only needed at low bitrates, which now already use a low bandwidth, so
the bandwidth reduction is no longer needed.
2011-05-01 13:32:04 -04:00
Justin Ruggles
ba6bce5140 ac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy() 2011-05-01 13:32:04 -04:00
Justin Ruggles
4142487d1c ac3enc: return error if frame+exponent bits are too large instead of using
av_assert2().

This can occur in some very rare cases with low bitrates.
2011-05-01 13:32:03 -04:00
Justin Ruggles
987fe2dc55 ac3enc: differentiate between current block and reference block in bit_alloc() 2011-05-01 13:32:03 -04:00
Justin Ruggles
6b2636bba6 ac3enc: simplify exponent_init() by calculating exponent_group_tab[] based
on exponent group sizes.
2011-05-01 13:32:03 -04:00
Justin Ruggles
e0b33d479c ac3enc: simplify stereo rematrixing decision options 2011-05-01 13:32:03 -04:00
Reimar Döffinger
636ee66f1c Fix data_size handling for AC3 and dca decoders.
They use now code identical to the AAC decoder.
The AC3 decoder previously did not check the data_size and
the dca decoder checked against and set wrong values for float.
2011-05-01 19:13:01 +02:00
Stefano Sabatini
77e9dee8ae lavc: add a sample_aspect_ratio field to AVFrame
The sample aspect ratio is a per-frame property, so it makes sense to
define it in AVFrame rather than in the codec/stream context.
Simplify application-level sample aspect ratio information extraction,
and allow further simplifications.
2011-05-01 13:10:06 +02:00
Stefano Sabatini
1ba5727242 lavc: add a pkt_pos field to AVFrame
This is similar to what was done with pkt_pts. This simplifies the
operation of extracting the pos information from the AVPacket, and
allows further simplifications.
2011-05-01 13:09:58 +02:00
Carl Eugen Hoyos
aba0278e9f Fix compilation in some cases if the flac decoder was disabled.
flac.o implies vorbis_data.o because of flac channel layout.
2011-05-01 06:39:08 +02:00
Michael Niedermayer
c059d7aa57 H264: Fix intra only decoding.
This possibly fixes issue2679
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 02:38:30 +02:00
Michael Niedermayer
0ae4aba649 H264:Print short+long+max values when they dont match up.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 02:38:30 +02:00
Michael Niedermayer
7ac85f4be8 H264:use av_assert0() for frame num check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 02:38:29 +02:00
Michael Niedermayer
0e5758d101 H264: print nal_ref_idc too for debug
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 02:38:29 +02:00
Mike Scheutzow
e12926393b Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
One of the causes of this bug is that the h264 parser defaults low_delay
to 1, but the h264 codec defaults low_delay to 0. Really Ugly.

After many hours of looking at this, I'm still not sure how has_b_frames
is *intended* to behave, but to me the implementation appears way more
complicated than it ought to be.

My patch relies on the encoder to set an optional field in the SPS. This
works for libx264 streams, but I'm not sure that all h264 encoders will
set it.
2011-05-01 01:47:35 +02:00
ami_stuff
8556406d38 lavc: lowercase the FRWU codec name
This is more consistent with all the other codec names.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-05-01 00:42:21 +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
Philip Langdale
8de45adb37 CrystalHD: Add auto-detection of packed b-frame bug.
I still don't fully understand the cause but the difference between
the samples that trigger the bug and the samples that don't is
that the former uses delay frames and the later uses drop frames
as placeholders for the packed frame. So, if we see the one type
of frame, we can assume the bug will or won't be present.

Right now, I'm detecting the frame types by size, which may not be
safe in general, but given the specific codec and file type, I
expect any scenario where we encounter these frames where they
aren't being used for b-frame packing won't care one way or
another whether the work around is in effect or not.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-30 09:47:28 -07:00
Stefano Sabatini
d5551265f3 lavc: remove disabled avcodec_decode_video() code
Fix warning:
libavcodec/utils.c: At top level:
libavcodec/utils.c:714:5: warning: "FF_API_VIDEO_OLD" is not defined

Also fix trac issue #139.
2011-04-30 11:57:13 +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
Baptiste Coudurier
97dc86b793 In libx264 wrapper, change wpredp to a codec specific option. 2011-04-29 18:44:59 -07:00
Michael Niedermayer
be315a3232 Merge remote branch 'qatar/master'
* qatar/master:
Duplicate  AMV: disable DR1 and don't override EMU_EDGE
Duplicate  lavf: inspect more frames for fps when container time base is coarse
Wrong and we have correct fix: Fix races in default av_log handler
  vorbis: Replace sized int_fast integer types with plain int/unsigned.
  Remove disabled non-optimized code variants.
NO  bswap.h: Remove disabled code.
  Remove some disabled printf debug cruft.
  Replace more disabled printf() calls by av_dlog().
NO  tests: Remove disabled code.
NO  Replace some commented-out debug printf() / av_log() messages with av_dlog().
  vorbisdec: Replace some sizeof(type) by sizeof(*variable).
NO  vf_fieldorder: Replace FFmpeg by Libav in license boilerplate.

Conflicts:
	libavcodec/h264.c
	libavcodec/vorbisdec.c
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 01:58:26 +02:00
Michael Niedermayer
7089265756 AMV: disable DR1 and don't override EMU_EDGE
This works around a possibly exploitable crash.
Appearently, vlc can be exploited with a malicous file. This should get
reverted as soon as a proper fix is found.

Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 89f903b3d5)
(cherry picked from commit 9b919571e5)
2011-04-29 22:46:13 +02:00
Diego Biurrun
cf3ac54339 vorbis: Replace sized int_fast integer types with plain int/unsigned.
int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.
2011-04-29 20:28:40 +02:00
Diego Biurrun
a734fa575f Remove disabled non-optimized code variants. 2011-04-29 20:01:13 +02:00
Diego Biurrun
2e15305b70 Remove some disabled printf debug cruft. 2011-04-29 20:00:53 +02:00
Diego Biurrun
09cbf60f8e Replace more disabled printf() calls by av_dlog(). 2011-04-29 20:00:41 +02:00
Michael Niedermayer
4517ba092e flashsv2enc:fix segfault
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 18:31:17 +02:00
Diego Biurrun
045dd4b928 Replace some commented-out debug printf() / av_log() messages with av_dlog(). 2011-04-29 17:27:01 +02:00
Diego Biurrun
d1be646e90 vorbisdec: Replace some sizeof(type) by sizeof(*variable). 2011-04-29 15:37:06 +02:00
Carl Eugen Hoyos
d804784db5 Set channel layout for True Audio files.
This is not documented (and possibly not originally intended),
but it's what the current reference decoder does.
2011-04-29 10:46:45 +02:00
Carl Eugen Hoyos
d2ee3c913d Fix channel layout for some stereo flac files. 2011-04-29 10:42:43 +02:00
Michael Niedermayer
f0f3425311 flashsv2enc: mark encoder experimental
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 03:06:06 +02:00
Michael Niedermayer
c83a528193 flashsv2enc: remove useless casts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 02:43:12 +02:00
Michael Niedermayer
ba9c4db59a flashsv2enc: use av_freep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 02:41:13 +02:00
Michael Niedermayer
f6a5edb64c flashsv2enc: remove useless if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 02:40:22 +02:00
Joshua Warner
3f6dc4a130 encoder for adobe's flash ScreenVideo2 codec 2011-04-29 02:35:59 +02:00
Michael Niedermayer
85ff339489 Revert "avparser: don't av_malloc(0)."
This hack is no longer needed.

This reverts commit 191e08d113.
2011-04-29 02:17:38 +02:00
ami_stuff
0fea3b7b80 Remove lowres support from cdgraphics decoder
The lowres support doesn't work correctly (crops the video), so let's remove it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 01:29:19 +02:00
ami_stuff
f27c72b368 Reduce max lowres from 5 to 3 in sp5x decoder
lowres higher than 3 crashes ffmpeg/ffplay here

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 01:29:19 +02:00
ami_stuff
e4f42f1f89 Remove lowres support from pnm decoder
The lowres support doesn't work correctly (crops the video), so let's remove it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 01:29:19 +02:00
ami_stuff
658296e344 Remove lowres support from png decoder
The lowres support doesn't work correctly (crops the video), so let's remove it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 01:29:19 +02:00
Niobos
f3ce748d34 MJPEG encoder to write aspect ratio information 2011-04-28 20:39:49 +02:00
Michael Niedermayer
a0db7424e4 Fix buffering in qpeg in a way that allows direct rendering.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-28 14:28:27 +02:00
Michael Niedermayer
90bcbc791f Revert "qpeg: use reget_buffer() in decode_frame()"
This reverts commit f4e043ff63.
2011-04-28 13:20:03 +02:00
Carl Eugen Hoyos
b35a846923 Change silly variable name "class" to "partition_class". 2011-04-28 11:23:22 +02:00
Stefano Sabatini
62d33dbc17 mpeg12: terminate mpeg2_video_profiles arrays
Make av_get_profile_name() return NULL if no profile is detected.

Fix trac issue #130, fix crash reading file tek3.m2v.
(cherry picked from commit e5d80c7b2d)

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-28 11:07:31 +02:00
Peter Ross
87e45ae13d rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-28 07:25:28 +02:00
Michael Niedermayer
0665199e43 Merge remote branch 'qatar/master'
* qatar/master:
  vorbisdec: Rename silly "class_" variable to plain "class".
  simple_idct_alpha: Drop some useless casts.
  Simplify av_log_missing_feature().
  ac3enc: remove check for mismatching channels and channel_layout
  If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is non-zero, set channels based on channel_layout.
  If AVCodecContext.channel_layout and AVCodecContext.channels are both non-zero, check to make sure they do not contradict eachother.
  cosmetics: indentation
  Check AVCodec.supported_samplerates and AVCodec.channel_layouts in avcodec_open().
  aacdec: remove sf_scale and sf_offset.
  aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient table values from the spec.
  Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead of hardcoding 200 everywhere.
  Large intensity stereo and PNS indices are legal. Clip them instead of erroring out. A magnitude of 100 corresponds to 2^25 so the will most likely result in clipped output anyway.
  qpeg: use reget_buffer() in decode_frame()
  ultimotion: use reget_buffer() in ulti_decode_frame()
  smacker: remove unnecessary call to avctx->release_buffer in decode_frame()
  avparser: don't av_malloc(0).

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-28 04:26:01 +02:00
Stefano Sabatini
e5d80c7b2d mpeg12: terminate mpeg2_video_profiles arrays
Make av_get_profile_name() return NULL if no profile is detected.

Fix trac issue #130, fix crash reading file tek3.m2v.
2011-04-28 01:45:19 +02:00
Carl Eugen Hoyos
5a810f4e27 Return if memory allocation fails. 2011-04-28 00:09:46 +02:00
Baptiste Coudurier
045cc36fe7 100l, change #ifdef to #if 2011-04-27 14:24:36 -07:00
Baptiste Coudurier
46394d39e3 In png decoder, only call png_init_mmx if HAVE_MMX is defined. 2011-04-27 13:59:30 -07: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
Michael Niedermayer
52a81cd0e4 Fix add_paeth_prediction_mmx for rgb48
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 20:08:37 +02:00
Michael Niedermayer
afd2371d5c merge read and and in add_paeth_prediction
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 20:08:37 +02:00
Baptiste Coudurier
6d4c49a2af Move png mmx functions into x86/png_mmx.c, remove them from DSPContext.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 20:08:09 +02:00
Diego Biurrun
b239526873 vorbisdec: Rename silly "class_" variable to plain "class". 2011-04-27 19:54:55 +02:00
Diego Biurrun
81afa5a274 simple_idct_alpha: Drop some useless casts. 2011-04-27 19:52:48 +02:00
Diego Biurrun
3fd3632ffe Simplify av_log_missing_feature().
Do not print the results of the conditional call to av_log_ask_for_sample()
into the same line as the main output, separate the already long text.
2011-04-27 19:48:58 +02:00
Alexandre Colucci
d6f910ea47 Fix decoding of DXSA subtitles.
These have a DXSA tag and contain alpha in addition to
color values for palette.
2011-04-27 19:45:57 +02:00
Justin Ruggles
8745e9c458 ac3enc: remove check for mismatching channels and channel_layout 2011-04-27 12:57:43 -04:00
Justin Ruggles
688b09fa59 If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
non-zero, set channels based on channel_layout.

This allows the user to set only channel_layout and not channels.
2011-04-27 12:57:43 -04:00
Justin Ruggles
168f9e8c40 If AVCodecContext.channel_layout and AVCodecContext.channels are both
non-zero, check to make sure they do not contradict eachother.
2011-04-27 12:57:43 -04:00
Justin Ruggles
3dfc3e70c0 cosmetics: indentation 2011-04-27 12:57:43 -04:00
Justin Ruggles
8b00ab0113 Check AVCodec.supported_samplerates and AVCodec.channel_layouts in
avcodec_open().

If the encoder has a channel_layouts list and AVCodecContext.channel_layout
is 0, then only print a warning and let the encoder decide how to handle it.
2011-04-27 12:57:42 -04:00
Alex Converse
767848d761 aacdec: remove sf_scale and sf_offset.
Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.
2011-04-27 12:39:37 -04:00
Justin Ruggles
6271794041 aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.
2011-04-27 12:39:37 -04:00
Alex Converse
d70fa4c423 Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.
2011-04-27 12:39:37 -04:00
Alex Converse
e4744b59aa Large intensity stereo and PNS indices are legal. Clip them instead of
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.

None of the conformance streams fall in the range that need to be clipped.
2011-04-27 12:39:37 -04:00
Michael Niedermayer
f08d171caa WMADEC: fix ticket125
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 17:12:14 +02:00
Stefano Sabatini
f4e043ff63 qpeg: use reget_buffer() in decode_frame()
Decoder relies on previous frame data, so use reget_buffer().

This also set frame->reference to 3, as the frame will be requested
unmodified later so it shouldn't be modified by the application.

Fix playback of file Clock.avi.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:44:40 -07:00
Stefano Sabatini
4f0b80599a ultimotion: use reget_buffer() in ulti_decode_frame()
Decoder relies on previous frame data, so use reget_buffer().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:42:42 -07:00
Stefano Sabatini
4f2954e232 smacker: remove unnecessary call to avctx->release_buffer in decode_frame()
The release_buffer was cleaning the provided frame, thus causing the
successive call to avctx->reget_buffer() to allocate a new frame.  In
case the returned frame was not the same one previously returned but a
new one with different data, it resulted in artifacts.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:41:59 -07:00
Stefano Sabatini
fd37eac495 indeo2: remove unnecessary release_buffer() call
This was preventing reget_buffer() to return a buffer with the same
data, which was resulting in playback artifacts.

Fix trac issue #116.
2011-04-27 11:50:45 +02:00
Stefano Sabatini
10aa5a6c42 4xm: use reget_buffer() in decode_frame()
Also remove unnecessary call to avctx->release_buffer(). reget_buffer
is required since apparently the codec needs to be feeded with the
previous frame data.

Releasing the frame and using get_buffer was working only in the case
get_buffer() was returning the old frame data, and resulting in
playback artifacts otherwise.

Fix trac issue #85.
2011-04-27 11:50:38 +02:00
Ronald S. Bultje
5eef4afb9a avparser: don't av_malloc(0).
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-26 22:07:17 -07:00
Ronald S. Bultje
191e08d113 avparser: don't av_malloc(0).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 04:20:55 +02:00
Michael Niedermayer
7b9e98173c Revert "Eliminate pointless '#if 1' statements without matching '#else'."
no comment

This reverts commit e6ff064845.

Conflicts:

	libavcodec/dsputil.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 04:13:28 +02:00
Michael Niedermayer
d7e5aebae7 Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  ac3enc: correct the flipped sign in the ac3_fixed encoder
  Eliminate pointless '#if 1' statements without matching '#else'.
  Add AVX FFT implementation.
  Increase alignment of av_malloc() as needed by AVX ASM.
  Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
  mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
  documentation: extend documentation for ffmpeg -aspect option
  APIChanges: update commit hashes for recent additions.
  lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
  aac: add headers needed for log2f()
  lavc: remove FF_API_MB_Q cruft
  lavc: remove FF_API_RATE_EMU cruft
  lavc: remove FF_API_HURRY_UP cruft
  pad: make the filter parametric
  vsrc_movie: add key_frame and pict_type.
  vsrc_movie: fix leak in request_frame()
  lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
  vsrc_buffer: add sample_aspect_ratio fields to arguments.
  lavfi: add fieldorder filter
  scale: make the filter parametric
  ...

Conflicts:
	Changelog
	doc/filters.texi
	ffmpeg.c
	libavcodec/ac3dec.h
	libavcodec/dsputil.c
	libavfilter/avfilter.h
	libavfilter/vf_scale.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 03:51:04 +02:00
Justin Ruggles
79ee8977c2 ac3enc: correct the flipped sign in the ac3_fixed encoder 2011-04-26 17:19:37 -04:00
anatoly
75cf2602c7 Add MxPEG decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 22:06:13 +02:00
anatoly
dd1e5bfd5e Add support for picture_ptr field in MJpegDecodeContext
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 22:06:13 +02:00
anatoly
7e6a9e6444 Move MJPEG's input buffer preprocessing in separate public function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 22:06:13 +02:00
anatoly
34686566f3 Support reference picture defined by bitmask in MJPEG's SOS decoder
With cleanup & simplification by me

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 22:06:13 +02:00
Alexander E. Patrakov
d439ba15fd DCA/DTA encoder 2011-04-26 22:06:13 +02:00
Diego Biurrun
e6ff064845 Eliminate pointless '#if 1' statements without matching '#else'. 2011-04-26 20:18:27 +02:00
Vitor Sessak
9d35fa520e Add AVX FFT implementation.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:25:24 +02:00
Vitor Sessak
33cbfa6fa3 Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:18:22 +02:00
Stefano Sabatini
ff558d7b01 bfi: store palette data in the context
Store palette data in the codec context, do not assume that the frame
allocated the first time by avctx->get_buffer will be returned again.

This requires to store the palette which comes with the first frame in
the context, and copy it to the following frames.

Fix trac issue #84.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-26 10:41:33 +02:00
Michael Niedermayer
76cd98b445 mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
2011-04-26 09:29:08 +02:00
Stefano Sabatini
bebe72f4a0 lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
Also deprecate av_get_pict_type_char() in favor of
av_get_picture_type_char().

The new enum and av_get_picture_type_char() are defined in libavutil.
This allows the use in libavfilter without the need to link against
libavcodec.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:38:57 +02:00
Michael Niedermayer
30fe971934 aac: add headers needed for log2f()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:33:21 +02:00
Anton Khirnov
6deae83e55 lavc: remove FF_API_MB_Q cruft 2011-04-26 08:16:06 +02:00
Anton Khirnov
694c142434 lavc: remove FF_API_RATE_EMU cruft 2011-04-26 08:16:05 +02:00
Anton Khirnov
e7021c0ed5 lavc: remove FF_API_HURRY_UP cruft 2011-04-26 08:16:05 +02:00
Michael Niedermayer
3788a3c0c0 Merge remote branch 'qatar/master'
* qatar/master:
  graphparser: add a NULL check on the argument passed to strstr
  setdar: prefer "sar" over "par" in log info message
  fade: fix draw_slice() check on fade->factor value
  fade: make draw_slice() chroma check against planes 1 and 2
  win32: include the correct header in cmdutils.c
  ac3: fix memleak in fixed-point encoder
  flashsv: Return more meaningful error values.
  flashsv: Employ explicit AVCodec struct initializers.
  read AVI palette from the end of extradata
  cosmetics: K&R coding style and more whitespace for Flash Screen Video

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 04:21:15 +02:00
Michael Niedermayer
05815b3545 Fix issue1503, this fix may be incomplete we need more samples to know for sure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 02:44:33 +02:00
Michael Niedermayer
7157334c37 wmadec: prevent null pointer call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 02:44:33 +02:00
Stefano Sabatini
1da254b849 fraps: do not set avctx->pix_fmt to none in decode_init()
This is required for setting up the filterchain, as it requires the
pixel format to be set, which is usually done when probing the file
with av_find_stream_info().

Fix trac issue #83.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 23:17:59 +02:00
Janne Grunau
6ad2bafcfd ac3: fix memleak in fixed-point encoder
caused by typo in mdct_end
2011-04-25 20:27:05 +02:00
Reimar Döffinger
bde9671795 dca: allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Reimar Döffinger
5aff31b136 vorbisdec: allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Reimar Döffinger
26d5a4b6b4 aacdec: Allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Reimar Döffinger
4c7ad768e1 ac3dec: allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Diego Biurrun
a14c08247d flashsv: Return more meaningful error values. 2011-04-25 16:01:58 +02:00
Diego Biurrun
46cb2da1f0 flashsv: Employ explicit AVCodec struct initializers. 2011-04-25 15:41:10 +02:00
Carl Eugen Hoyos
6c93641683 Warn if the source has unsupported (or no) channel layout. 2011-04-25 11:23:06 +02:00