ffmpeg.git
8 years agoRemove lowres support from pnm decoder
ami_stuff [Thu, 28 Apr 2011 22:41:28 +0000 (00:41 +0200)]
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>
8 years agoRemove lowres support from png decoder
ami_stuff [Thu, 28 Apr 2011 21:45:24 +0000 (23:45 +0200)]
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>
8 years agoTry to fix big endian fate
Michael Niedermayer [Thu, 28 Apr 2011 20:25:39 +0000 (22:25 +0200)]
Try to fix big endian fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMJPEG encoder to write aspect ratio information
Niobos [Thu, 28 Apr 2011 18:23:19 +0000 (20:23 +0200)]
MJPEG encoder to write aspect ratio information

8 years agoFix buffering in qpeg in a way that allows direct rendering.
Michael Niedermayer [Thu, 28 Apr 2011 12:06:36 +0000 (14:06 +0200)]
Fix buffering in qpeg in a way that allows direct rendering.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoFix url_fopen() flag values.
Michael Niedermayer [Thu, 28 Apr 2011 11:11:37 +0000 (13:11 +0200)]
Fix url_fopen() flag values.
Reported by: Luca Abeni
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoRevert "qpeg: use reget_buffer() in decode_frame()"
Michael Niedermayer [Thu, 28 Apr 2011 02:31:02 +0000 (04:31 +0200)]
Revert "qpeg: use reget_buffer() in decode_frame()"

This reverts commit f4e043ff63935a71b98a36bc98b501c36ceadb92.

8 years agoChange silly variable name "class" to "partition_class".
Carl Eugen Hoyos [Thu, 28 Apr 2011 09:20:08 +0000 (11:20 +0200)]
Change silly variable name "class" to "partition_class".

8 years agoRead channel layout atom in mov files.
Carl Eugen Hoyos [Thu, 28 Apr 2011 08:47:40 +0000 (10:47 +0200)]
Read channel layout atom in mov files.

8 years agoClarify warning messages.
Carl Eugen Hoyos [Thu, 28 Apr 2011 08:47:00 +0000 (10:47 +0200)]
Clarify warning messages.

8 years agoMove channel chunk reading function to isom.c.
Carl Eugen Hoyos [Thu, 28 Apr 2011 08:45:32 +0000 (10:45 +0200)]
Move channel chunk reading function to isom.c.

Move ff_read_chan_chunk() to isom.c and rename it as ff_mov_read_chan().

8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Thu, 28 Apr 2011 02:23:36 +0000 (04:23 +0200)]
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>
8 years agompeg12: terminate mpeg2_video_profiles arrays
Stefano Sabatini [Wed, 27 Apr 2011 23:42:56 +0000 (01:42 +0200)]
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.

8 years agoFix caf channel layouts ITU_2_2 and DVD_6.
Carl Eugen Hoyos [Wed, 27 Apr 2011 22:10:55 +0000 (00:10 +0200)]
Fix caf channel layouts ITU_2_2 and DVD_6.

8 years agoReturn if memory allocation fails.
Carl Eugen Hoyos [Wed, 27 Apr 2011 22:09:46 +0000 (00:09 +0200)]
Return if memory allocation fails.

8 years ago100l, change #ifdef to #if
Baptiste Coudurier [Wed, 27 Apr 2011 21:24:19 +0000 (14:24 -0700)]
100l, change #ifdef to #if

8 years agoIn png decoder, only call png_init_mmx if HAVE_MMX is defined.
Baptiste Coudurier [Wed, 27 Apr 2011 20:57:39 +0000 (13:57 -0700)]
In png decoder, only call png_init_mmx if HAVE_MMX is defined.

8 years agoCorrectly support pal8 with alpha in libswscale, fix png pal8 with alpha.
Baptiste Coudurier [Wed, 27 Apr 2011 19:52:09 +0000 (21:52 +0200)]
Correctly support pal8 with alpha in libswscale, fix png pal8 with alpha.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoSet alpha of palettes to 0xff.
Baptiste Coudurier [Wed, 27 Apr 2011 19:49:45 +0000 (21:49 +0200)]
Set alpha of palettes to 0xff.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoRename y400a to gray8a.
Baptiste Coudurier [Wed, 27 Apr 2011 19:36:30 +0000 (21:36 +0200)]
Rename y400a to gray8a.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoFix add_paeth_prediction_mmx for rgb48
Michael Niedermayer [Wed, 27 Apr 2011 17:54:32 +0000 (19:54 +0200)]
Fix add_paeth_prediction_mmx for rgb48
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomerge read and and in add_paeth_prediction
Michael Niedermayer [Wed, 27 Apr 2011 17:01:33 +0000 (19:01 +0200)]
merge read and and in add_paeth_prediction
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMove png mmx functions into x86/png_mmx.c, remove them from DSPContext.
Baptiste Coudurier [Wed, 27 Apr 2011 16:34:10 +0000 (18:34 +0200)]
Move png mmx functions into x86/png_mmx.c, remove them from DSPContext.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovorbisdec: Rename silly "class_" variable to plain "class".
Diego Biurrun [Wed, 27 Apr 2011 14:38:35 +0000 (16:38 +0200)]
vorbisdec: Rename silly "class_" variable to plain "class".

8 years agosimple_idct_alpha: Drop some useless casts.
Diego Biurrun [Wed, 27 Apr 2011 13:36:21 +0000 (15:36 +0200)]
simple_idct_alpha: Drop some useless casts.

8 years agoSimplify av_log_missing_feature().
Diego Biurrun [Wed, 27 Apr 2011 13:11:41 +0000 (15:11 +0200)]
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.

8 years agoFix decoding of DXSA subtitles.
Alexandre Colucci [Wed, 27 Apr 2011 16:39:57 +0000 (18:39 +0200)]
Fix decoding of DXSA subtitles.

These have a DXSA tag and contain alpha in addition to
color values for palette.

8 years agoac3enc: remove check for mismatching channels and channel_layout
Justin Ruggles [Tue, 19 Apr 2011 23:06:52 +0000 (19:06 -0400)]
ac3enc: remove check for mismatching channels and channel_layout

8 years agoIf AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
Justin Ruggles [Tue, 19 Apr 2011 23:03:47 +0000 (19:03 -0400)]
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.

8 years agoIf AVCodecContext.channel_layout and AVCodecContext.channels are both
Justin Ruggles [Tue, 19 Apr 2011 23:02:32 +0000 (19:02 -0400)]
If AVCodecContext.channel_layout and AVCodecContext.channels are both
non-zero, check to make sure they do not contradict eachother.

8 years agocosmetics: indentation
Justin Ruggles [Wed, 20 Apr 2011 20:59:39 +0000 (16:59 -0400)]
cosmetics: indentation

8 years agoCheck AVCodec.supported_samplerates and AVCodec.channel_layouts in
Justin Ruggles [Tue, 19 Apr 2011 22:50:20 +0000 (18:50 -0400)]
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.

8 years agoaacdec: remove sf_scale and sf_offset.
Alex Converse [Tue, 26 Apr 2011 21:05:07 +0000 (17:05 -0400)]
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.

8 years agoaacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
Justin Ruggles [Tue, 26 Apr 2011 19:30:19 +0000 (15:30 -0400)]
aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.

8 years agoDefine POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
Alex Converse [Tue, 26 Apr 2011 18:45:48 +0000 (14:45 -0400)]
Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.

8 years agoLarge intensity stereo and PNS indices are legal. Clip them instead of
Alex Converse [Tue, 26 Apr 2011 18:29:03 +0000 (14:29 -0400)]
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.

8 years agoWMADEC: fix ticket125
Michael Niedermayer [Wed, 27 Apr 2011 15:12:14 +0000 (17:12 +0200)]
WMADEC: fix ticket125
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqpeg: use reget_buffer() in decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:51:50 +0000 (11:51 +0200)]
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>
8 years agoultimotion: use reget_buffer() in ulti_decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:45:40 +0000 (11:45 +0200)]
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>
8 years agosmacker: remove unnecessary call to avctx->release_buffer in decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:37:36 +0000 (11:37 +0200)]
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>
8 years agoRevert buggy hunk that leaked in from a libav merge.
Michael Niedermayer [Wed, 27 Apr 2011 12:03:37 +0000 (14:03 +0200)]
Revert buggy hunk that leaked in from a libav merge.
This unbreaks compilation with --disable-avfilter.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo2: remove unnecessary release_buffer() call
Stefano Sabatini [Tue, 26 Apr 2011 11:50:08 +0000 (13:50 +0200)]
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.

8 years ago4xm: use reget_buffer() in decode_frame()
Stefano Sabatini [Tue, 26 Apr 2011 09:59:22 +0000 (11:59 +0200)]
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.

8 years agoffplay: move output_picture() code to queue_picture()
Stefano Sabatini [Fri, 22 Apr 2011 09:54:31 +0000 (11:54 +0200)]
ffplay: move output_picture() code to queue_picture()

Move output_picture() code to queue_picture(), and remove it.
Simplify code path.

8 years agoffplay: rename video_refresh_timer() to video_refresh()
Stefano Sabatini [Fri, 22 Apr 2011 09:25:54 +0000 (11:25 +0200)]
ffplay: rename video_refresh_timer() to video_refresh()

The new name is shorter and less confusing.

8 years agoffplay: rename decode_thread to read_thread, parse_tid to read_tid
Stefano Sabatini [Fri, 22 Apr 2011 00:12:53 +0000 (02:12 +0200)]
ffplay: rename decode_thread to read_thread, parse_tid to read_tid

The new names are less misleading and more reciprocally consistent.

8 years agolavfi: add showinfo filter
Stefano Sabatini [Sat, 23 Apr 2011 18:55:34 +0000 (20:55 +0200)]
lavfi: add showinfo filter

8 years agolavfi: print key-frame and picture type information in ff_dlog_ref()
Stefano Sabatini [Sat, 23 Apr 2011 17:55:59 +0000 (19:55 +0200)]
lavfi: print key-frame and picture type information in ff_dlog_ref()

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoavparser: don't av_malloc(0).
Ronald S. Bultje [Wed, 27 Apr 2011 01:46:08 +0000 (18:46 -0700)]
avparser: don't av_malloc(0).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoavparser: don't av_malloc(0).
Ronald S. Bultje [Wed, 27 Apr 2011 01:46:08 +0000 (18:46 -0700)]
avparser: don't av_malloc(0).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoRevert "Eliminate pointless '#if 1' statements without matching '#else'."
Michael Niedermayer [Wed, 27 Apr 2011 02:09:35 +0000 (04:09 +0200)]
Revert "Eliminate pointless '#if 1' statements without matching '#else'."

no comment

This reverts commit e6ff064845d02c43526c8a56dab121c219f16659.

Conflicts:

libavcodec/dsputil.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Wed, 27 Apr 2011 01:51:04 +0000 (03:51 +0200)]
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>
8 years agoFix runtime CPU detection in libswscale.
tateu [Tue, 26 Apr 2011 23:50:50 +0000 (01:50 +0200)]
Fix runtime CPU detection in libswscale.

8 years agovsrc_buffer: 10l mixed up input & output sizes. (funnily this worked 99% of the time...
Michael Niedermayer [Tue, 26 Apr 2011 21:52:22 +0000 (23:52 +0200)]
vsrc_buffer: 10l mixed up input & output sizes. (funnily this worked 99% of the time) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

8 years agoac3enc: correct the flipped sign in the ac3_fixed encoder
Justin Ruggles [Tue, 5 Apr 2011 16:55:42 +0000 (12:55 -0400)]
ac3enc: correct the flipped sign in the ac3_fixed encoder

8 years agoAdd MxPEG decoder
anatoly [Mon, 28 Mar 2011 16:02:19 +0000 (20:02 +0400)]
Add MxPEG decoder

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoAdd support for picture_ptr field in MJpegDecodeContext
anatoly [Sun, 27 Mar 2011 20:16:25 +0000 (22:16 +0200)]
Add support for picture_ptr field in MJpegDecodeContext

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMove MJPEG's input buffer preprocessing in separate public function
anatoly [Sun, 27 Mar 2011 20:16:24 +0000 (22:16 +0200)]
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>
8 years agoSupport reference picture defined by bitmask in MJPEG's SOS decoder
anatoly [Sun, 27 Mar 2011 20:16:23 +0000 (22:16 +0200)]
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>
8 years agoDCA/DTA encoder
Alexander E. Patrakov [Tue, 26 Apr 2011 19:07:55 +0000 (21:07 +0200)]
DCA/DTA encoder

8 years agoEliminate pointless '#if 1' statements without matching '#else'.
Diego Biurrun [Tue, 26 Apr 2011 11:52:12 +0000 (13:52 +0200)]
Eliminate pointless '#if 1' statements without matching '#else'.

8 years agoAdd AVX FFT implementation.
Vitor Sessak [Mon, 25 Apr 2011 09:39:01 +0000 (11:39 +0200)]
Add AVX FFT implementation.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agoIncrease alignment of av_malloc() as needed by AVX ASM.
Vitor Sessak [Sat, 23 Apr 2011 17:24:31 +0000 (19:24 +0200)]
Increase alignment of av_malloc() as needed by AVX ASM.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agoUpdate x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
Vitor Sessak [Sat, 23 Apr 2011 17:24:06 +0000 (19:24 +0200)]
Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
8 years agovsrc_buffer: Reinit scale filter when an existing filter is used.
Michael Niedermayer [Tue, 26 Apr 2011 16:18:02 +0000 (18:18 +0200)]
vsrc_buffer: Reinit scale filter when an existing filter is used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovsrc_buffer: set output timebase when output equalization is done
Michael Niedermayer [Tue, 26 Apr 2011 16:17:20 +0000 (18:17 +0200)]
vsrc_buffer: set output timebase when output equalization is done
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovsrc_buffer: Set output size
Michael Niedermayer [Tue, 26 Apr 2011 16:16:48 +0000 (18:16 +0200)]
vsrc_buffer: Set output size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovsrc_buffer: fix NULL dereference
Michael Niedermayer [Tue, 26 Apr 2011 16:15:52 +0000 (18:15 +0200)]
vsrc_buffer: fix NULL dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agobfi: store palette data in the context
Stefano Sabatini [Mon, 25 Apr 2011 18:26:15 +0000 (20:26 +0200)]
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>
8 years agomjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Michael Niedermayer [Thu, 21 Apr 2011 20:03:24 +0000 (22:03 +0200)]
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>
8 years agodocumentation: extend documentation for ffmpeg -aspect option
Stefano Sabatini [Sat, 9 Apr 2011 11:49:49 +0000 (13:49 +0200)]
documentation: extend documentation for ffmpeg -aspect option

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoAPIChanges: update commit hashes for recent additions.
Anton Khirnov [Tue, 26 Apr 2011 06:51:54 +0000 (08:51 +0200)]
APIChanges: update commit hashes for recent additions.

8 years agolavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
Stefano Sabatini [Sat, 23 Apr 2011 11:38:50 +0000 (13:38 +0200)]
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>
8 years agoaac: add headers needed for log2f()
Michael Niedermayer [Sat, 23 Apr 2011 08:44:21 +0000 (10:44 +0200)]
aac: add headers needed for log2f()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavc: remove FF_API_MB_Q cruft
Anton Khirnov [Tue, 12 Apr 2011 18:54:16 +0000 (20:54 +0200)]
lavc: remove FF_API_MB_Q cruft

8 years agolavc: remove FF_API_RATE_EMU cruft
Anton Khirnov [Tue, 12 Apr 2011 18:53:21 +0000 (20:53 +0200)]
lavc: remove FF_API_RATE_EMU cruft

8 years agolavc: remove FF_API_HURRY_UP cruft
Anton Khirnov [Tue, 12 Apr 2011 18:51:40 +0000 (20:51 +0200)]
lavc: remove FF_API_HURRY_UP cruft

8 years agopad: make the filter parametric
Stefano Sabatini [Sun, 17 Apr 2011 15:19:05 +0000 (17:19 +0200)]
pad: make the filter parametric

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovsrc_movie: add key_frame and pict_type.
royger [Mon, 18 Apr 2011 15:50:16 +0000 (17:50 +0200)]
vsrc_movie: add key_frame and pict_type.

Signed-off-by: Roger Pau Monné <roger.pau@entel.upc.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovsrc_movie: fix leak in request_frame()
Stefano Sabatini [Mon, 18 Apr 2011 17:21:25 +0000 (19:21 +0200)]
vsrc_movie: fix leak in request_frame()

Also set movie->picref to NULL, in order to avoid a crash in uninit()
when movie->picref is unreffed again and it was already freed.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
Roger Pau Monné [Sat, 16 Apr 2011 08:09:15 +0000 (10:09 +0200)]
lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agovsrc_buffer: add sample_aspect_ratio fields to arguments.
Michael Niedermayer [Mon, 31 Jan 2011 19:48:35 +0000 (20:48 +0100)]
vsrc_buffer: add sample_aspect_ratio fields to arguments.

This fixes aspect handling in ffmpeg.

This is based on a patch by Baptiste.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavfi: add fieldorder filter
Mark Himsley [Sun, 10 Apr 2011 17:18:03 +0000 (19:18 +0200)]
lavfi: add fieldorder filter

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoscale: make the filter parametric
Stefano Sabatini [Sun, 27 Mar 2011 20:58:08 +0000 (22:58 +0200)]
scale: make the filter parametric

Make the filter accept parametric expressions for the output video
size.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: support 16-bit
James Darnley [Wed, 24 Nov 2010 20:25:09 +0000 (21:25 +0100)]
yadif: support 16-bit

Fixes by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: support more than yuv420p.
James Darnley [Tue, 5 Apr 2011 00:45:10 +0000 (02:45 +0200)]
yadif: support more than yuv420p.

and correctly support grey8

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoyadif: Fix assert() failure
Michael Niedermayer [Sat, 2 Apr 2011 18:26:39 +0000 (20:26 +0200)]
yadif: Fix assert() failure

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Tue, 26 Apr 2011 02:12:43 +0000 (04:12 +0200)]
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>
8 years agoFix issue1503, this fix may be incomplete we need more samples to know for sure.
Michael Niedermayer [Mon, 25 Apr 2011 23:45:17 +0000 (01:45 +0200)]
Fix issue1503, this fix may be incomplete we need more samples to know for sure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmadec: prevent null pointer call.
Michael Niedermayer [Mon, 25 Apr 2011 14:16:44 +0000 (16:16 +0200)]
wmadec: prevent null pointer call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agofraps: do not set avctx->pix_fmt to none in decode_init()
Stefano Sabatini [Mon, 25 Apr 2011 20:08:15 +0000 (22:08 +0200)]
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>
8 years agographparser: add a NULL check on the argument passed to strstr
Stefano Sabatini [Wed, 30 Mar 2011 19:30:31 +0000 (21:30 +0200)]
graphparser: add a NULL check on the argument passed to strstr

Fix crash in create_filter() which occurrs if a scale filter with no
args is provided.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agosetdar: prefer "sar" over "par" in log info message
Stefano Sabatini [Sat, 26 Mar 2011 14:49:07 +0000 (15:49 +0100)]
setdar: prefer "sar" over "par" in log info message

This is more consistent with the terminology adopted by the aspect
filter names.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agofade: fix draw_slice() check on fade->factor value
Mark Himsley [Fri, 18 Mar 2011 15:25:26 +0000 (15:25 +0000)]
fade: fix draw_slice() check on fade->factor value

draw_slice() checks that the fade factor is < 65536 and only
calculates the fade if so. But the fade factor is clipped in
end_frame() by av_clip_uint16() to 65535, so the fade is calculated
for every frame.  This patch alters the check so that it compares with
< 65535 (UINT16_MAX).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agofade: make draw_slice() chroma check against planes 1 and 2
Mark Himsley [Fri, 18 Mar 2011 14:42:29 +0000 (14:42 +0000)]
fade: make draw_slice() chroma check against planes 1 and 2

draw_slice() checks that planes 0 and 1 of AVFilterBufferRef's data
are not NULL before manipulating planes 1 and 2. This patch makes the
check against planes 1 and 2. More senseful and possibly more robust.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolsws: prevent overflow in sws_init_context()
Stefano Sabatini [Sun, 24 Apr 2011 23:17:08 +0000 (01:17 +0200)]
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>
8 years agoffplay: fix logic for selecting the show mode in case of missing video
Stefano Sabatini [Sun, 24 Apr 2011 22:49:18 +0000 (00:49 +0200)]
ffplay: fix logic for selecting the show mode in case of missing video

Also automatically select the show mode only if not specified by the
user.

Fix trac issue #109.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoffplay: name ShowMode enum
Stefano Sabatini [Sun, 24 Apr 2011 22:31:59 +0000 (00:31 +0200)]
ffplay: name ShowMode enum

Help debugging with GDB, maybe cleaner/safer.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agowin32: include the correct header in cmdutils.c
Luca Barbato [Mon, 25 Apr 2011 13:30:42 +0000 (15:30 +0200)]
win32: include the correct header in cmdutils.c

CommandLineToArgvW requires windows.h, include it directly

8 years agoac3: fix memleak in fixed-point encoder
Janne Grunau [Mon, 25 Apr 2011 16:56:40 +0000 (18:56 +0200)]
ac3: fix memleak in fixed-point encoder

caused by typo in mdct_end