ffmpeg.git
8 years agoRename the s16 and s32 alsa reorder functions as int16 and int32.
Carl Eugen Hoyos [Wed, 13 Apr 2011 23:07:01 +0000 (01:07 +0200)]
Rename the s16 and s32 alsa reorder functions as int16 and int32.

The functions will also be used for unsigned formats.

8 years agoSupport unsigned variants of already supported signed formats in alsa.
Carl Eugen Hoyos [Wed, 13 Apr 2011 23:04:18 +0000 (01:04 +0200)]
Support unsigned variants of already supported signed formats in alsa.

8 years agoSupport a-law and mu-law output in alsa.
Carl Eugen Hoyos [Wed, 13 Apr 2011 23:00:26 +0000 (01:00 +0200)]
Support a-law and mu-law output in alsa.

8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Thu, 14 Apr 2011 01:21:38 +0000 (03:21 +0200)]
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>
8 years agolibopencore-amr, libvo-amrwbenc: Allow enabling DTX via private AVOptions
Martin Storsjö [Wed, 13 Apr 2011 18:47:12 +0000 (21:47 +0300)]
libopencore-amr, libvo-amrwbenc: Allow enabling DTX via private AVOptions

DTX, discontinuous transmission, allows emitting frames with
comfort noise when no voice is detected in the input audio.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr, libvo-amrwbenc: Only check the bitrate when changed
Martin Storsjö [Wed, 13 Apr 2011 08:03:19 +0000 (11:03 +0300)]
libopencore-amr, libvo-amrwbenc: Only check the bitrate when changed

Also rename the incorrectly named enc_bitrate to enc_mode, use the
enc_bitrate variable for storing the last chosen bitrate.

This avoids continuous warning log messages if not using an
exactly matching bitrate, while still allowing changing bitrate
at any point.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr, libvo-amrwbenc: Find the closest matching bitrate
Martin Storsjö [Wed, 13 Apr 2011 07:59:08 +0000 (10:59 +0300)]
libopencore-amr, libvo-amrwbenc: Find the closest matching bitrate

Dynamically print the supported bitrates from the local table,
instead of using a hardcoded log message.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibvo-*: Fix up the long codec names
Martin Storsjö [Wed, 13 Apr 2011 19:31:20 +0000 (22:31 +0300)]
libvo-*: Fix up the long codec names

Include VisualOn to clarify the codec name, but remove the
actual library name from the user-friendly description.
Also mention Android, to clarify which VisualOn implementation
this refers to, since they do sell other variants of the same
code, too.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibavcodec: Mark AVCodec->priv_class const
Martin Storsjö [Wed, 13 Apr 2011 18:48:00 +0000 (21:48 +0300)]
libavcodec: Mark AVCodec->priv_class const

This avoids warnings of this kind, everywhere priv_class
is initialized:

warning: initialization discards qualifiers from pointer target type

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoswscale: Factorize FAST_BGR2YV12 definition.
Luca Barbato [Mon, 11 Apr 2011 17:48:13 +0000 (19:48 +0200)]
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.

8 years agoMention VisualOn in the new codecs' long names to explain "libvo".
Carl Eugen Hoyos [Tue, 12 Apr 2011 06:51:58 +0000 (08:51 +0200)]
Mention VisualOn in the new codecs' long names to explain "libvo".

8 years agolibvo-aacenc: Only produce extradata if the global header flag is set
Martin Storsjö [Tue, 12 Apr 2011 07:35:23 +0000 (10:35 +0300)]
libvo-aacenc: Only produce extradata if the global header flag is set

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolavf: postpone removal of public metadata conversion API
Anton Khirnov [Wed, 23 Feb 2011 06:38:52 +0000 (07:38 +0100)]
lavf: postpone removal of public metadata conversion API

It's been deprecated only a few months ago, long after 0.6.

8 years agolavc: postpone removal of request_channels
Anton Khirnov [Wed, 6 Apr 2011 05:47:26 +0000 (07:47 +0200)]
lavc: postpone removal of request_channels

No decoder uses the supposed replacement, request_channel_layout, yet.

8 years agolavc: postpone removal of audioconvert and sample_fmt wrappers
Anton Khirnov [Wed, 6 Apr 2011 05:31:32 +0000 (07:31 +0200)]
lavc: postpone removal of audioconvert and sample_fmt wrappers

Those were moved to libavutil only recently.

8 years agolavf: postpone removal of deprecated avio functions
Anton Khirnov [Wed, 23 Feb 2011 06:39:59 +0000 (07:39 +0100)]
lavf: postpone removal of deprecated avio functions

They've been deprecated very recently.

8 years agolibopencore-amr: Cosmetics: Rewrap and align
Martin Storsjö [Tue, 12 Apr 2011 21:25:43 +0000 (00:25 +0300)]
libopencore-amr: Cosmetics: Rewrap and align

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr, libvo-amrbwenc: Rename variables and functions
Martin Storsjö [Tue, 12 Apr 2011 21:20:26 +0000 (00:20 +0300)]
libopencore-amr, libvo-amrbwenc: Rename variables and functions

Avoid camelCase names for functions and variables.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Convert commented out debug logging into av_dlog
Martin Storsjö [Wed, 13 Apr 2011 07:12:56 +0000 (10:12 +0300)]
libopencore-amr: Convert commented out debug logging into av_dlog

Also add the avctx as logging context.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Remove an unused state variable
Martin Storsjö [Tue, 12 Apr 2011 20:58:45 +0000 (23:58 +0300)]
libopencore-amr: Remove an unused state variable

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibvo-amrwbenc: Don't explicitly store bitrate modes in the bitrate table
Martin Storsjö [Tue, 12 Apr 2011 21:42:24 +0000 (00:42 +0300)]
libvo-amrwbenc: Don't explicitly store bitrate modes in the bitrate table

The bitrate modes are equal to the array indices.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Remove a useless local variable
Martin Storsjö [Tue, 12 Apr 2011 21:17:48 +0000 (00:17 +0300)]
libopencore-amr: Remove a useless local variable

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr, libvo-amrwbenc: Make the bitrate/mode mapping array static const
Martin Storsjö [Tue, 12 Apr 2011 21:15:01 +0000 (00:15 +0300)]
libopencore-amr, libvo-amrwbenc: Make the bitrate/mode mapping array static const

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr, libvo-amrwbenc: Return proper error codes in most places
Martin Storsjö [Tue, 12 Apr 2011 21:10:56 +0000 (00:10 +0300)]
libopencore-amr, libvo-amrwbenc: Return proper error codes in most places

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Don't print carriage returns in log messages
Martin Storsjö [Tue, 12 Apr 2011 21:08:14 +0000 (00:08 +0300)]
libopencore-amr: Don't print carriage returns in log messages

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Remove an old workaround for libamr header weirdness
Martin Storsjö [Tue, 12 Apr 2011 21:06:29 +0000 (00:06 +0300)]
libopencore-amr: Remove an old workaround for libamr header weirdness

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Make the opaque encoder pointer a void*
Martin Storsjö [Tue, 12 Apr 2011 20:56:41 +0000 (23:56 +0300)]
libopencore-amr: Make the opaque encoder pointer a void*

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibopencore-amr: Remove unused code fragments
Martin Storsjö [Tue, 12 Apr 2011 20:50:51 +0000 (23:50 +0300)]
libopencore-amr: Remove unused code fragments

This parts are heritage from the encoder part from the old
libamr code removed in SVN rev 19365.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoapplehttp: Only check the discard flags if v->ctx actually is initialized
Martin Storsjö [Mon, 11 Apr 2011 21:19:56 +0000 (00:19 +0300)]
applehttp: Only check the discard flags if v->ctx actually is initialized

This code could be executed if the demuxer reads more than one
segment before returning from av_open_input_stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoffplay: implement -showmode option
Stefano Sabatini [Tue, 12 Apr 2011 11:10:33 +0000 (13:10 +0200)]
ffplay: implement -showmode option

The new option allows to select the starting show mode.

8 years agoffplay: use symbolic constant values for show_audio
Stefano Sabatini [Tue, 12 Apr 2011 10:33:29 +0000 (12:33 +0200)]
ffplay: use symbolic constant values for show_audio

Also rename VideoState->show_audio to show_mode.
Improve readability.

8 years agoffplay: remove audio_write_get_buf_size() forward declaration
Stefano Sabatini [Tue, 12 Apr 2011 10:06:49 +0000 (12:06 +0200)]
ffplay: remove audio_write_get_buf_size() forward declaration

Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.

8 years agoffplay: avoid unnecessary intermediary struct in queue_picture()
Stefano Sabatini [Sun, 2 May 2010 21:36:45 +0000 (23:36 +0200)]
ffplay: avoid unnecessary intermediary struct in queue_picture()

When CONFIG_AVFILTER, use a AVFrame -> AVPicture cast rather than
explicitely copy the image information from AVFrame to a new
AVPicture.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoffplay: remove unused field VideoState.dtg_active_format
Stefano Sabatini [Tue, 12 Apr 2011 15:07:53 +0000 (17:07 +0200)]
ffplay: remove unused field VideoState.dtg_active_format

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agodoc: update developer guide
Luca Barbato [Sat, 9 Apr 2011 21:54:31 +0000 (23:54 +0200)]
doc: update developer guide

Refer to the current submission policy and refer to FATE in the
Regression Test section.

8 years agoFix compilation with --disable-avfilter.
Carl Eugen Hoyos [Wed, 13 Apr 2011 07:55:47 +0000 (09:55 +0200)]
Fix compilation with --disable-avfilter.

8 years agolavf: bump minor and add an APIChanges entry for the last avio changes
Anton Khirnov [Tue, 12 Apr 2011 08:01:30 +0000 (10:01 +0200)]
lavf: bump minor and add an APIChanges entry for the last avio changes

8 years agoavio: deprecate url_exist in favor of avio_check.
Anton Khirnov [Tue, 12 Apr 2011 07:46:45 +0000 (09:46 +0200)]
avio: deprecate url_exist in favor of avio_check.

8 years agofile: implement url_check() callback in the file and pipe protocols
Stefano Sabatini [Thu, 30 Sep 2010 11:21:42 +0000 (13:21 +0200)]
file: implement url_check() callback in the file and pipe protocols

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavio: add avio_check()
Stefano Sabatini [Fri, 8 Apr 2011 16:32:25 +0000 (18:32 +0200)]
avio: add avio_check()

The new function is more flexible than url_exist(), as it allows to
specify which access flags to check, and does not require an explicit
open of the checked resource.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavio: left-shift AVIO_ flags on next bump
Anton Khirnov [Wed, 13 Apr 2011 05:35:35 +0000 (07:35 +0200)]
avio: left-shift AVIO_ flags on next bump

Now AVIO_RDONLY is defined as 0, so it's not usable as a flag.

8 years agoflv demuxer: dont error out due to index problems, but inform the user about it.
Michael Niedermayer [Wed, 13 Apr 2011 00:52:16 +0000 (02:52 +0200)]
flv demuxer: dont error out due to index problems, but inform the user about it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Wed, 13 Apr 2011 00:49:22 +0000 (02:49 +0200)]
Merge remote branch 'qatar/master'

* qatar/master:
Partially merged:flvdec: Allow parsing keyframes metadata without seeking in most cases
  Error out if vaapi is not found
  avio: undeprecate av_url_read_fseek/fpause under nicer names
  libvo-*: Don't use deprecated sample format names and enum names
DUPLICATE  flvdec: Fix support for flvtool2 "keyframes based" generated index
DUPLICATE  libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization
  Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.
  Convert some undefined 1<<31 shifts into 1U<<31.

Conflicts:
configure
libavcodec/libvo-aacenc.c
libavcodec/libvo-amrwbenc.c
libavformat/flvdec.c

Marged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoCheck for successful h263 init in msmpeg4 init
Alberto Delmas [Mon, 12 Apr 2010 21:16:12 +0000 (23:16 +0200)]
Check for successful h263 init in msmpeg4 init

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agolavf/utils.c: Order packets with identical PTS by stream index.
Vitor Sessak [Mon, 11 Apr 2011 20:20:36 +0000 (16:20 -0400)]
lavf/utils.c: Order packets with identical PTS by stream index.

This allows for more reproducible results when using multi-threading.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
8 years agoASS decoder also requires ass_split.o to be compiled.
Reimar Döffinger [Tue, 12 Apr 2011 22:56:18 +0000 (00:56 +0200)]
ASS decoder also requires ass_split.o to be compiled.

8 years agoflvdec: Allow parsing keyframes metadata without seeking in most cases
Martin Storsjö [Tue, 12 Apr 2011 13:37:54 +0000 (16:37 +0300)]
flvdec: Allow parsing keyframes metadata without seeking in most cases

Stop the avio input at a point where amf_parse_object can
continue parsing the end of the object seamlessly, when all
data is available.

If unsupported data is encountered within the keyframes object,
try seeking to the start of the keyframes object - if the seek
back was successful, the caller can continue parsing the rest
of the AMF data.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoError out if vaapi is not found
Luca Barbato [Mon, 4 Apr 2011 13:24:19 +0000 (15:24 +0200)]
Error out if vaapi is not found

Make the behaviour consistent with the other external deps.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavio: undeprecate av_url_read_fseek/fpause under nicer names
Anton Khirnov [Tue, 12 Apr 2011 07:37:10 +0000 (09:37 +0200)]
avio: undeprecate av_url_read_fseek/fpause under nicer names

It seems their replacements won't be ready anytime soon.

8 years agoFix compilation with --disable-yasm.
Carl Eugen Hoyos [Tue, 12 Apr 2011 15:40:18 +0000 (17:40 +0200)]
Fix compilation with --disable-yasm.

8 years agoAdd forgotten const to enum AVSampleFormat
Michael Niedermayer [Tue, 12 Apr 2011 12:25:37 +0000 (14:25 +0200)]
Add forgotten const to enum AVSampleFormat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolibvo-*: Don't use deprecated sample format names and enum names
Martin Storsjö [Tue, 12 Apr 2011 07:33:35 +0000 (10:33 +0300)]
libvo-*: Don't use deprecated sample format names and enum names

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoflvdec: Fix support for flvtool2 "keyframes based" generated index
Kharkov Alexander [Fri, 8 Apr 2011 09:20:45 +0000 (16:20 +0700)]
flvdec: Fix support for flvtool2 "keyframes based" generated index

Current keyframes data parser unconditionally rewind metadata to
the end at the end of function. As result ALL metadata located
after keyframes index not parsed, and as metadata object can have
ANY placement inside metadata it can lead to unpredictable result
(bitrate can not be found, etc.). As result FLV movie will not
play at all in such situation.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agolibavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization
Martin Storsjö [Tue, 12 Apr 2011 07:32:43 +0000 (10:32 +0300)]
libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoCosmetics: Rename variable param as the more appropriate dpyname.
Sven C. Dack [Tue, 12 Apr 2011 07:33:19 +0000 (09:33 +0200)]
Cosmetics: Rename variable param as the more appropriate dpyname.

8 years agoCosmetics: Fix white-space in av_log() message.
Sven C. Dack [Tue, 12 Apr 2011 07:27:23 +0000 (09:27 +0200)]
Cosmetics: Fix white-space in av_log() message.

8 years agoFix output of AV_CH_LAYOUT_5POINT0 via alsa by reordering channels.
Carl Eugen Hoyos [Tue, 12 Apr 2011 07:17:26 +0000 (09:17 +0200)]
Fix output of AV_CH_LAYOUT_5POINT0 via alsa by reordering channels.

8 years agoSupport CODEC_ID_PCM_F64* output via alsa (stereo only).
Carl Eugen Hoyos [Tue, 12 Apr 2011 07:11:56 +0000 (09:11 +0200)]
Support CODEC_ID_PCM_F64* output via alsa (stereo only).

8 years agoSupport CODEC_ID_PCM_S24* output via alsa (stereo only).
Carl Eugen Hoyos [Tue, 12 Apr 2011 06:56:29 +0000 (08:56 +0200)]
Support CODEC_ID_PCM_S24* output via alsa (stereo only).

8 years agoUse const where appropriate.
Carl Eugen Hoyos [Tue, 12 Apr 2011 06:55:20 +0000 (08:55 +0200)]
Use const where appropriate.

Spotted by Reimar.

8 years agoMention VisualOn in the new codecs' long names to explain "libvo".
Carl Eugen Hoyos [Tue, 12 Apr 2011 06:51:58 +0000 (08:51 +0200)]
Mention VisualOn in the new codecs' long names to explain "libvo".

8 years agoFix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.
Alex Converse [Mon, 11 Apr 2011 06:42:29 +0000 (23:42 -0700)]
Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.

(1<<31) is undefined and seems to be evaluated by gcc to -2^31 when
these formulae require 2^31.

These conversions still need fate tests.

8 years agoConvert some undefined 1<<31 shifts into 1U<<31.
Alex Converse [Sun, 10 Apr 2011 00:22:04 +0000 (17:22 -0700)]
Convert some undefined 1<<31 shifts into 1U<<31.

According to ISO 9899:1999 S 6.5.7/4:

The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
are filled with zeros. If E1 has an unsigned type, the value of the
result is E1× 2^E2, reduced modulo one more than the maximum value
representable in the result type. If E1 has a signed type and
nonnegative value, and E1× 2^E2 is representable in the result type, then
that is the resulting value; otherwise, the behavior is undefined.

8 years agovpxenc: add CQ_LEVEL mapping
James Zern [Tue, 12 Apr 2011 00:00:35 +0000 (17:00 -0700)]
vpxenc: add CQ_LEVEL mapping

via the equivalent AVCodecContext::crf modifying the range allowed by
options.c (0-51 -> 0-63)
update configure check to require libvpx 0.9.6 (Bali)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovpxenc: add VP8E_SET_STATIC_THRESHOLD mapping
James Zern [Tue, 12 Apr 2011 00:00:29 +0000 (17:00 -0700)]
vpxenc: add VP8E_SET_STATIC_THRESHOLD mapping

via the equivalent AVCodecContext::mb_threshold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Tue, 12 Apr 2011 01:43:43 +0000 (03:43 +0200)]
Merge remote branch 'qatar/master'

* qatar/master:
Not pulled due to wrong author, according to carl:  Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().
  Fix compilation of timefilter test program.
  Add support for AMR-WB encoding via libvo-amrwbenc
  Add an AAC encoder by using the libvo-aacenc library
  g722: Return 8 bits per sample for g722 in av_get_bits_per_sample

Conflicts:
Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agocosmetics: alignment
Aurelien Jacobs [Tue, 12 Apr 2011 00:02:35 +0000 (02:02 +0200)]
cosmetics: alignment

8 years agoffplay: fix weird brace placement in video_image_display()
Stefano Sabatini [Mon, 11 Apr 2011 09:12:35 +0000 (11:12 +0200)]
ffplay: fix weird brace placement in video_image_display()

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoffplay: rename output_picture2() to output_picture()
Stefano Sabatini [Sun, 2 May 2010 22:03:49 +0000 (00:03 +0200)]
ffplay: rename output_picture2() to output_picture()

The "2" suffix is confusing.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoffplay: remove useless intermediary variable dst_pix_fmt in queue_picture()
Stefano Sabatini [Mon, 11 Apr 2011 23:32:38 +0000 (01:32 +0200)]
ffplay: remove useless intermediary variable dst_pix_fmt in queue_picture()

Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoffplay: avoid forward declaration for packet_queue_put()
Stefano Sabatini [Mon, 11 Apr 2011 23:31:42 +0000 (01:31 +0200)]
ffplay: avoid forward declaration for packet_queue_put()

Define the function before it is used. Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoffplay: compact expression in compute_mod()
Stefano Sabatini [Sun, 2 May 2010 20:23:48 +0000 (22:23 +0200)]
ffplay: compact expression in compute_mod()

Prefer "return X ? Y : Z" over "if (x) return Y; else return Z",
reduce line count.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agocompute rects duration in ASS decoder
Aurelien Jacobs [Thu, 16 Dec 2010 08:16:33 +0000 (09:16 +0100)]
compute rects duration in ASS decoder

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
8 years agoadd avcodec_get_subtitle_defaults() to initialize AVSubtitle struct
Aurelien Jacobs [Tue, 5 Apr 2011 07:04:48 +0000 (09:04 +0200)]
add avcodec_get_subtitle_defaults() to initialize AVSubtitle struct

Call this new function before decode() to replace the custom and
inconsistant initialization in various decoders.
This function is equivalent to avcodec_get_frame_defaults() for AVFrame.

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
8 years agoAdd unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().
Diego Biurrun [Sun, 10 Apr 2011 19:12:08 +0000 (21:12 +0200)]
Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

When HAVE_7REGS was not defined these functions had an empty body
causing the following warnings during compilation.
In file included from libswscale/x86/yuv2rgb_mmx.c:58:
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in function returning non-void
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in function returning non-void

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agoFix compilation of timefilter test program.
Diego Biurrun [Sun, 10 Apr 2011 19:22:45 +0000 (21:22 +0200)]
Fix compilation of timefilter test program.

The printf function is forbidden in library code, but not in test programs,
so #undefine the printf macro that disables the system printf function.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agoAdd support for AMR-WB encoding via libvo-amrwbenc
Martin Storsjö [Tue, 29 Dec 2009 14:48:09 +0000 (16:48 +0200)]
Add support for AMR-WB encoding via libvo-amrwbenc

The wrapper code is based on the libamr wrapper removed in SVN rev 19365.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoAdd an AAC encoder by using the libvo-aacenc library
Martin Storsjö [Sun, 19 Dec 2010 19:40:23 +0000 (21:40 +0200)]
Add an AAC encoder by using the libvo-aacenc library

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agooggdec: use av_freep() instead of av_free()
Michael Niedermayer [Mon, 11 Apr 2011 09:49:07 +0000 (11:49 +0200)]
oggdec: use av_freep() instead of av_free()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovsrc_buffer.h: add file doxy
Stefano Sabatini [Mon, 11 Apr 2011 09:29:35 +0000 (11:29 +0200)]
vsrc_buffer.h: add file doxy

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agovsrc_buffer.h: add multiple inclusion guards
Stefano Sabatini [Sun, 3 Apr 2011 15:46:43 +0000 (17:46 +0200)]
vsrc_buffer.h: add multiple inclusion guards

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agovsrc_buffer: tweak error message in init()
Stefano Sabatini [Sun, 3 Apr 2011 14:48:33 +0000 (16:48 +0200)]
vsrc_buffer: tweak error message in init()

Change:
Expected 7 arguments, but only %d found in '%s'\n
to:
Expected 7 arguments, but %d found in '%s'\n

as the user may provide more than 7 arguments, in that case the error
is not misleading.

8 years agog722: Return 8 bits per sample for g722 in av_get_bits_per_sample
Martin Storsjö [Sun, 10 Apr 2011 17:06:50 +0000 (20:06 +0300)]
g722: Return 8 bits per sample for g722 in av_get_bits_per_sample

This fixes a failing assert in ff_raw_read_header (in
fate-g722dec-1), where bits_per_coded_sample is set using this
function and is required to have a positive value.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoMerge remote branch 'qatar/master'
Michael Niedermayer [Mon, 11 Apr 2011 02:02:45 +0000 (04:02 +0200)]
Merge remote branch 'qatar/master'

* qatar/master:
  avio: add more documentation for AVIOContext.
  Parse sprite data for WMVP and WVP2, and decode sprites for the latter
  Replace outdated info on the FAQ
  Redefine sameq
  pad: fix example explanation
  gradfun: add notice from the MPlayer manual
  eval: add support for trunc, ceil, and floor functions
  documentation: add setdar and setsar description to filters.texi
  avio: document some members of AVIOContext.
  avio: document avio_close().
  avio: cosmetics, vertically align comments.
  avio: cosmetics, group the reading functions.
  avio: cosmetics, merge all the FF_API_OLD_AVIO blocks.
  avio: cosmetics, move AVIOContext to start of the file.
  avio: update file header.
  os: fix OpenBSD/PowerPC compilation
  pixfmt: add PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
  oggdec: fix demuxing chained audio streams
  fix typo

Conflicts:
doc/filters.texi
libavformat/avio.h
libavutil/pixfmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoRevert "fbdev: simplify logic in fbdev_read_packet()"
Michael Niedermayer [Sun, 10 Apr 2011 22:37:00 +0000 (00:37 +0200)]
Revert "fbdev: simplify logic in fbdev_read_packet()"

This change is buggy.

This reverts commit d46c9f83cf495c901e6128ce1042190f620b89c4.

8 years agoffmpeg: rename configure_filters() to configure_video_filters()
Stefano Sabatini [Sun, 3 Apr 2011 19:54:57 +0000 (21:54 +0200)]
ffmpeg: rename configure_filters() to configure_video_filters()

Mostly useful for the audio-filters branch, to make more apparent the
distinction between configure_audio_filters() and
configure_video_filters().

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
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>
8 years agofbdev: simplify logic in fbdev_read_packet()
Stefano Sabatini [Sat, 12 Mar 2011 14:24:54 +0000 (15:24 +0100)]
fbdev: simplify logic in fbdev_read_packet()

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
8 years agoH264: Allow templating hl_decode_mb based on pixel_size.
Michael Niedermayer [Sun, 10 Apr 2011 18:44:14 +0000 (20:44 +0200)]
H264: Allow templating hl_decode_mb based on pixel_size.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoH264: factor if() out of coef decoding loop of decode_cabac_residual_internal()
Michael Niedermayer [Sun, 10 Apr 2011 17:53:43 +0000 (19:53 +0200)]
H264: factor if() out of coef decoding loop of decode_cabac_residual_internal()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoH264: Split out hl_motion and template it, this seems a bit faster
Michael Niedermayer [Sun, 10 Apr 2011 15:04:13 +0000 (17:04 +0200)]
H264: Split out hl_motion and template it, this seems a bit faster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoH264: replace pixel_size by pixel_shift
Michael Niedermayer [Sun, 10 Apr 2011 14:12:56 +0000 (16:12 +0200)]
H264: replace pixel_size by pixel_shift
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoh264: Print bpp Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer [Sat, 9 Apr 2011 22:28:57 +0000 (00:28 +0200)]
h264: Print bpp Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

8 years agoEnable decoding of high bit depth h264.
Oskar Arvidsson [Tue, 29 Mar 2011 15:49:00 +0000 (17:49 +0200)]
Enable decoding of high bit depth h264.

This patch completes the high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoAdds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
Oskar Arvidsson [Tue, 29 Mar 2011 15:48:59 +0000 (17:48 +0200)]
Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.

This patch lets e.g. dsputil_init chose dsp functions with respect to
the bit depth to decode. The naming scheme of bit depth dependent
functions is <base name>_<bit depth>[_<prefix>] (i.e. the old
clear_blocks_c is now named clear_blocks_8_c).

Note: Some of the functions for high bit depth is not dependent on the
bit depth, but only on the pixel size. This leaves some room for
optimizing binary size.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoAdd support for higher QP values in h264.
Oskar Arvidsson [Tue, 29 Mar 2011 15:48:58 +0000 (17:48 +0200)]
Add support for higher QP values in h264.

In high bit depth, the QP values may now be up to (51 + 6*(bit_depth-8)).

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoH264: fix prefetch
Michael Niedermayer [Sun, 10 Apr 2011 14:12:18 +0000 (16:12 +0200)]
H264: fix prefetch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoAdd the notion of pixel size in h264 related functions.
Oskar Arvidsson [Tue, 29 Mar 2011 15:48:57 +0000 (17:48 +0200)]
Add the notion of pixel size in h264 related functions.

In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMake the h264 loop filter bit depth aware.
Oskar Arvidsson [Tue, 29 Mar 2011 15:48:56 +0000 (17:48 +0200)]
Make the h264 loop filter bit depth aware.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoTemplate dsputil_internal.h with respect to pixel size, etc.
Oskar Arvidsson [Tue, 29 Mar 2011 15:48:55 +0000 (17:48 +0200)]
Template dsputil_internal.h with respect to pixel size, etc.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>