Commit Graph

13715 Commits

Author SHA1 Message Date
Oskar Arvidsson
8dbe585641 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>
2011-04-10 22:33:42 +02:00
Oskar Arvidsson
d268bed209 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>
2011-04-10 22:33:42 +02:00
Michael Niedermayer
436c4523ed H264: fix prefetch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
dc172ecc6e 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>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
86b0d9cd58 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>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
63cc0e776e 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>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
9abd87bbc6 Template h264idct_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>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
2b092f7a14 Template h264pred_internal.h with respect to bit depth, etc.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
21a7c9366f Template h264dsp_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>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
8dffcca579 Move some functions in dsputil.c into a new file dsputil_internal.h.
The functions moved are used when decoding h264.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
7bc8032b07 Move the functions in h264idct into a new file h264idct_internal.h.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
c2f38da901 Move the functions in h264pred.c into a new file h264pred_internal.h.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
2431689bb3 Move the functions in h264dsp.c into a new file h264dsp_internal.h
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
d4497f6dfb Add pixel formats for 9- and 10-bit yuv420p.
Also add support for these formats in libswscale.

Needed for high bit depth h264 decoding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Oskar Arvidsson
af0b2d6736 Choose h264 chroma dc dequant function dynamically.
Needed for high bit depth h264 decoding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Michael Niedermayer
488efb33a7 H264: Fix slice threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:28:34 +02:00
Reimar Döffinger
701d0eb185 Fix input buffer size check in adpcm_ea decoder.
Unfortunately the output buffer size check assumes that the
input buffer is never over-consumed, thus this actually
also allowed to write outside the output buffer if "lucky".
2011-04-10 11:40:47 +02:00
Alberto Delmás
768c525114 Parse sprite data for WMVP and WVP2, and decode sprites for the latter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-10 10:07:49 +02:00
pin xue
05c062e9da replace movw instruction in ac3dsp_armv6.S
AS      libavcodec/arm/ac3dsp_armv6.o
ffmpeg-src/libavcodec/arm/ac3dsp_armv6.S: Assembler messages:
ffmpeg-src/libavcodec/arm/ac3dsp_armv6.S:40: Error: selected processor
does not support `movw r8,#0x1fe0'
make[1]: *** [libavcodec/arm/ac3dsp_armv6.o] Error 1

MOVW is ARMv7 way to load constant:
   * movw, or move wide, will move a 16-bit constant into a register,
implicitly zeroing the top 16 bits of the target register.
   * movt, or move top, will move a 16-bit constant into the top half
of a given register without altering the bottom 16 bits
To load 32 bit constant, movw  lower16; movt upper16; is better than
ldr if available, because:
While this approach takes two instructions, it does not require any
extra space to store the constant so both the movw/movt method and the
ldr method will end up using the same amount of memory. Memory
bandwidth is precious in and the movw/movt approach avoids an extra
read on the data side, not to mention the read could have missed the
cache.

But here it is armv6 optimization, so that we have to use ldr.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 03:49:24 +02:00
Alexander Strange
cf39b461d3 pthread: validate_thread_parameters() ignored slice-threading being intentionally off
The thread_type API allows you to request only FF_THREAD_FRAME (instead of
FRAME | SLICE), but it was being ignored.
We don't implement both of them at the same time, so there isn't an effect
on current codecs, except that you can request no kinds of threading now
(a bit useless).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-09 08:23:22 -04:00
Reimar Döffinger
f82163cf1c Use consistent condition for whether to run slice-threading execute function.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-09 08:23:22 -04:00
Gwenole Beauchesne
da21440d46 vaapi: cope with VA-API 0.32, i.e. fix VC-1 decoding on Sandy Bridge.
(cherry picked from commit a18e7b4fb7)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-09 12:02:04 +02:00
Gwenole Beauchesne
09ce846206 vaapi: filter out DELAYED_PIC_REF flag to determine field.
This fixes ticket #23.

(cherry picked from commit 621f4c98df)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-09 12:00:57 +02:00
Philip Langdale
ae7a4a1594 CrystalHD: Improve detection of h.264 content.
As previously discussed, the CrystalHD hardware returns exceptionally
useless information about interlaced h.264 content - to the extent
that it's not possible to distinguish most MBAFF and PAFF content until
it's too late.

In an attempt to compensate for this, I'm introducing two mechanisms:

1) Peeking at the picture number of the next picture

The hardware provides a capability to peek the next picture number. If
it is the same as the current picture number, then we are clearly dealing
with two fields and not a frame or fieldpair.

If this always worked, it would be all we need, but it's not guaranteed
to work. Sometimes, the next picture may not be decoded sufficiently
for the number to be known; alternately, a corruption in the stream may
cause the hardware to refuse to return the number even if the next
intact frame is decoded. In either case, the query will return 0.

If we are unable to peek the next picture number, we assume that the
picture is a frame/fieldpair and return it accordingly. If that turns
out to be incorrect, we discard the second field, and the user has
to live with the glitch. In testing, false detection can occur for
the first couple of seconds, and then the pipeline stabalizes and
we get correct detection.

2) Use the h264_parser to detect when individual input fields have
been combined into an output fieldpair.

I have multiple PAFF samples where this behaviour is detected. The
peeking mechanism described above will correctly detect that the
output is a fieldpair, but we need to know what the input type was
to ensure pipeline stability (only return one output frame per input
frame).

If we find ourselves with an output fieldpair, yet the input picture
type was a field, as reported by the parser, then we are dealing with
this case, and can make sure not to return anything on the next
decode() call.

Taken together, these allow us to remove the hard-coded hacks for
different h.264 types, and we can clearly describe the conditions
under which we can trust the hardware's claim that content is
interlaced.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-08 20:17:53 -07:00
Philip Langdale
bfde0f1b3d CrystalHD: Carry picture type from input to output picture.
Now that we know the type of the input picture, we have to bring
that information to the output picture to help identify its type.
We do this by adding a field to the opaque_list node.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-08 20:17:50 -07:00
Philip Langdale
f6421e0b5c CrystalHD: Bring in h.264 parser to establish picture type.
As the hardware is unreliable, we will have to use the h.264 parser
to identify whether an input picture is a field or a frame. This
change loads the parser and extracts the picture type.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-08 20:17:47 -07:00
Philip Langdale
e99fd6ee19 CrystalHD: Change opaque_list_pop to return the node.
In preparation for adding additional fields to the node, return
the node instead of the pts value. This requires the caller to
free the node.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-08 20:17:42 -07:00
Philip Langdale
ca0eed7e37 CrystalHD: Fix whitespace after previous change.
'git diff -w' confirmed to return nothing.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-08 20:17:39 -07:00
Philip Langdale
9ce1d5f03b CrystalHD: Handle different h.264 MBAFF packing.
I found another MBAFF sample where the input:output pattern is
the same as mpeg2 and vc1 (fieldpair input, individual field output).
While I'm not sure how you can output individual fields from MBAFF,
if I apply the mpeg2/vc1 handling to this file, it plays correctly.

So, this changes the detection algorithm to handle the known cases.

Whitespace will be fixed in a separate change.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-08 20:17:35 -07:00
Michael Niedermayer
a61bc91d42 Fix ticket21, temporary audio array was too small.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-09 01:00:44 +02:00
Michael Niedermayer
9d4cb45dbe Cleanup 'Fix spurious warning when stream has SPS and PPS units.'
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 12:29:30 +02:00
Alexander Strange
d0df2934ca Merge remote-tracking branch 'ffmpeg-mt/master'
* ffmpeg-mt/master:
DUPLICATE mingw32 compilation after 'unbreak avcodec_thread_init'
      pthread: validate_thread_parameters() ignored slice-threading being intentionally off
DUPLICATE Remove unnecessary parameter from ff_thread_init() and fix behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 03:03:03 +02:00
Michael Niedermayer
c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Michael Niedermayer
ffb61814a0 Fix deblocking with thread_slices
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 00:20:18 +02:00
Anton Khirnov
9f5ddd1e46 lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
And hide request_channels AVOption under it.
2011-04-07 18:11:24 +02:00
Michael Niedermayer
c0e51ec9c6 Merge remote branch 'qatar/master'
* qatar/master:
  Fix parser: mark av_parser_parse() for removal on next major bump
  swscale: postpone sws_getContext removal until next major bump.
  fate: add AAC LATM test
  mmst: get rid of deprecated AVERRORs
  lxfdec: use AVERROR(ENOMEM) instead of deprecated AVERROR_NOMEM.
  Reemove remaining uses of deprecated AVERROR_NOTSUPP.
REIMPLEMENTED in 2 lines of code:  lavf: if id3v2 tag is present and all else fails, guess by file extension

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-07 03:32:26 +02:00
Brad
1f6265e011 Fix parser: mark av_parser_parse() for removal on next major bump
Fix the breakage introduced with 9073ca6c6e
2011-04-06 23:45:34 +02:00
Michael Niedermayer
326dff7d05 Fix ticket34
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:21:44 +02:00
Michael Niedermayer
11d78415ca Merge remote branch 'qatar/master'
* qatar/master:
  psymodel: extend API to include PE and bit allocation.
  avio: always compile dyn_buf functions
  Remove unnecessary parameter from ff_thread_init() and fix behavior
  Revert "aac_latm_dec: use aac context and aac m4ac"
  configure: tell user if libva is enabled like the rest of external libs.
  Add silence support for AV_SAMPLE_FMT_U8.
  avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
  avio: deprecate av_url_read_seek
  avio: deprecate av_url_read_pause
  ac3enc: NEON optimised extract_exponents

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 02:59:49 +02:00
Michael Niedermayer
ee6db0de37 Fix ffmpeg-mt fixme in h264.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 01:09:04 +02:00
Michael Niedermayer
98fe404a94 Fix REBASE_PICTURE with h.264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 01:09:04 +02:00
Michael Niedermayer
b1eeddf1cc Fix Ticket37
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 01:09:04 +02:00
Nathan Caldwell
5371803dd5 psymodel: extend API to include PE and bit allocation.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-05 22:21:04 +02:00
Reimar Döffinger
da53f05fd0 Do not offer unsupported HWAccel PIX_FMT.
Only fixes MPEG-1/MPEG-2 as a first step.
2011-04-05 18:23:15 +02:00
Reimar Döffinger
735c4f0b84 Use CONFIG_VDPAU as condition for using ff_vdpau_mpeg_picture_complete.
CONFIG_VDPAU is the condition on which ff_vdpau_mpeg_picture_complete
is compiled in, so it is more appropriate, particularly since the
separate VDPAU decoder should be removed in the longer term.
2011-04-05 18:23:10 +02:00
Reimar Döffinger
6e075dcaf8 ac3dec: avoid pointless alloc and indirection for input_buffer
Since we now always allocate it, it can simply be made part of the context
instead.
2011-04-05 18:21:51 +02:00
Alexander Strange
ba9ef8d04e Remove unnecessary parameter from ff_thread_init() and fix behavior
thread_count passed to ff_thread_init() is only used to set AVCodecContext.
thread_count, and can be removed. Instead move it to the legacy implementation
of avcodec_thread_init().

This also fixes the problem that calling avcodec_thread_init() with pthreads
enabled did not set it since ff1efc524c.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-05 16:53:26 +02:00
Janne Grunau
d6f66edd65 Revert "aac_latm_dec: use aac context and aac m4ac"
This reverts commit 36864ac354 since it
breaks LATM decoding in ffplay.
2011-04-05 12:21:50 +02:00
Philip Langdale
9c09dead87 h264_parser: Fix whitespace after previous change.
'git diff -w' confirmed to return nothing.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-04 20:32:33 -07:00
Philip Langdale
01f5b9c51e h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set.
Currently, the parser is buggy and only processes the stream extradata
when the flag is set. This fixes it to actually inspect the frames.

Whitespce will be fixed in a separate change.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-04 20:32:33 -07:00
Michael Niedermayer
434f248723 Merge remote branch 'qatar/master'
* qatar/master: (22 commits)
  ac3enc: move extract_exponents inner loop to ac3dsp
  avio: deprecate url_get_filename().
  avio: deprecate url_max_packet_size().
  avio: make url_get_file_handle() internal.
  avio: make url_filesize() internal.
  avio: make url_close() internal.
  avio: make url_seek() internal.
  avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
  avio: make url_write() internal.
  avio: make url_read_complete() internal.
  avio: make url_read() internal.
  avio: make url_open() internal.
  avio: make url_connect internal.
  avio: make url_alloc internal.
  applehttp: Merge two for loops
  applehttp: Restructure the demuxer to use a custom AVIOContext
  applehttp: Move finished and target_duration to the variant struct
  aacenc: reduce the number of loop index variables
  avio: deprecate url_open_protocol
  avio: deprecate url_poll and URLPollEntry
  ...

Conflicts:
	libavformat/applehttp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-05 02:31:56 +02:00
Mans Rullgard
5f2e6c0fd1 ac3enc: NEON optimised extract_exponents
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-05 01:11:16 +01:00
Mans Rullgard
2310ee4b1c ac3enc: move extract_exponents inner loop to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-04 18:27:22 +01:00
Alexandre Colucci
37ffba2a44 Communicate pulldown flags to clients to fix VC-1 playback with pulldown content
The pulldown flags should be communicated to the client of the libavcodec library. Not doing so causes jerky playback with pulldown content. Note that this change requires the patch previously provided here: http://ffmpeg.org/pipermail/ffmpeg-devel/2011-April/110314.html

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 15:35:03 +02:00
Alexandre Colucci
2506ad9f17 Fix VC-1 playback with pulldown content
The attached patch fixes the jerky playback of VC-1 content with pulldown. The pulldown flags were incorrectly set. They must be correct in order to display the frames with the correct timing as mentioned in the specifications: "SMPTE 421M: VC-1 Compressed Video Bitstream Format and Decoding Process". More precisely the following tables:

Table 20: Progressive P picture layer bitstream for Advanced Profile
Table 22: Progressive B picture layer bitstream for Advanced Profile
Table 23: Progressive Skipped picture layer bitstream for Advanced Profile
Table 82: Interlaced Frame I and BI picture layer bitstream for Advanced Profile
Table 83: Interlaced Frame P picture layer bitstream for Advanced Profile
Table 84: Interlaced Frame B picture layer bitstream for Advanced Profile
Table 85: Picture Layer bitstream for Field 1 of Interlace Field Picture for Advanced Profile

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 15:35:03 +02:00
Young Han Lee
57cc1ad35f aacenc: reduce the number of loop index variables
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-04 09:12:37 +02:00
Justin Ruggles
e05a3ac713 ac3enc: select bandwidth based on bit rate, sample rate, and number of
full-bandwidth channels.

This reduces high-frequency artifacts and improves the quality of the lower
frequency audio at low bit rates.
2011-04-03 20:59:14 -04:00
Michael Niedermayer
2cae9809e2 Merge remote branch 'qatar/master'
* qatar/master:
  fate: fix partial run when no samples path is specified
  ARM: NEON fixed-point forward MDCT
  ARM: NEON fixed-point FFT
  lavf: bump minor version and add an APIChanges entry for avio changes
  avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
  avio: make url_fdopen internal.
  avio: make url_open_dyn_packet_buf internal.
  avio: avio_ prefix for url_close_dyn_buf
  avio: avio_ prefix for url_open_dyn_buf
  avio: introduce an AVIOContext.seekable field
  ac3enc: use generic fixed-point mdct
  lavfi: add fade filter
  Change yadif to not use out of picture lines.
  lavc: deprecate AVCodecContext.antialias_algo
  lavc: mark mb_qmin/mb_qmax for removal on next major bump.

Conflicts:
	doc/filters.texi
	libavcodec/ac3enc_fixed.h
	libavcodec/ac3enc_float.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/vf_fade.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 02:15:12 +02:00
Aurelien Jacobs
3c9bfb3368 add MicroDVD muxer and demuxer
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
2011-04-04 01:29:40 +02:00
Mans Rullgard
f7653904c8 ARM: NEON fixed-point forward MDCT
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 22:39:52 +01:00
Mans Rullgard
dba9852935 ARM: NEON fixed-point FFT
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 22:39:52 +01:00
clsid2
0e09997fa4 Libavcodec AC3/E-AC3/DTS decoders now output floating point data.
git-svn-id: https://ffdshow-tryout.svn.sourceforge.net/svnroot/ffdshow-tryout@3769 3b938f2f-1a1a-0410-8054-a526ea5ff92c
2011-04-03 22:52:58 +02:00
clsid2
361fa0ed40 Float output for libavcodec AAC decoder
git-svn-id: https://ffdshow-tryout.svn.sourceforge.net/svnroot/ffdshow-tryout@3770 3b938f2f-1a1a-0410-8054-a526ea5ff92c
2011-04-03 22:52:58 +02:00
clsid2
ba7a28045f Float output for libavcodec Vorbis decoder
git-svn-id: https://ffdshow-tryout.svn.sourceforge.net/svnroot/ffdshow-tryout@3771 3b938f2f-1a1a-0410-8054-a526ea5ff92c
2011-04-03 22:52:58 +02:00
Mans Rullgard
79997def65 ac3enc: use generic fixed-point mdct
This makes the AC3 encoder use the shared fixed-point MDCT rather
than its own implementation.  The checksum changes are due to
different rounding in the MDCT.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-03 19:01:53 +01:00
Michael Niedermayer
7f125c3e87 Move frame_pred_frame_dct check elsewhere.
Fixes issue2405
2011-04-03 16:40:13 +02:00
Michael Niedermayer
24009f3601 Make find_pix_fmt() non static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:12 +02:00
Michael Niedermayer
6e77feb201 Dont be so picky on decoding pps in extradata.
Fixes issue2517

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:11 +02:00
Michael Niedermayer
1511936034 Correctly implement:
commit c0ec9918b0
	Author: Måns Rullgård <mans@mansr.com>
	Date:   Tue Aug 24 17:47:05 2010 +0000
	Remove global mm_flags variable

	Originally committed as revision 24909 to svn://svn.ffmpeg.org/ffmpeg/trunk

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:10 +02:00
Anton Khirnov
4e3945fd28 lavc: deprecate AVCodecContext.antialias_algo
It's been unused since mp3float decoder was added.
2011-04-03 08:43:11 +02:00
Anton Khirnov
4a49d2d59c lavc: mark mb_qmin/mb_qmax for removal on next major bump.
They've been unused and deprecated for about five years.
2011-04-03 08:43:09 +02:00
Wim Lewis
f38fa75d97 Add or elaborate on some documentation comments in avcodec.h.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 03:18:20 +02:00
Michael Niedermayer
f35439699f Merge remote branch 'qatar/master'
* qatar/master:
  Fixed-point MDCT with 32-bit unscaled output
  lavc: deprecate rate_emu
  lavc: mark hurry_up for removal on next major bump
  parser: mark av_parser_parse() for removal on next major bump
  lavc: add missing audioconvert includes
  jvdec: don't use deprecated CODEC_TYPE_*/PKT_FLAG_KEY

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 02:28:01 +02:00
Mans Rullgard
bc154882e1 Fixed-point MDCT with 32-bit unscaled output
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-02 21:06:07 +01:00
Michael Niedermayer
c4804feca2 dpx:fix typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 19:26:58 +02:00
Peter Ross
ba24c5a3d3 cosmetics: indentation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 18:30:33 +02:00
Peter Ross
4ec720059c dpx encoder: support 10-bit packing method
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 18:30:08 +02:00
Peter Ross
1b5282a221 dpx decoder: read sample aspect ratio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 18:19:01 +02:00
Michael Niedermayer
4ce776d636 H264: fix slice end error detection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 17:59:10 +02:00
Michael Niedermayer
0d5e6843b4 h264: change a few comments into error messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 17:57:53 +02:00
Anton Khirnov
ed5fcd60b2 lavc: deprecate rate_emu
It's not used anywhere and apparrently hasn't been for a very long time.
2011-04-02 16:18:37 +02:00
Anton Khirnov
8ed2ae09a2 lavc: mark hurry_up for removal on next major bump
It has been deprecated for about five years, skip_idct/skip_frame should
be used instead.
2011-04-02 16:17:24 +02:00
Anton Khirnov
9073ca6c6e parser: mark av_parser_parse() for removal on next major bump
Fixes build with the bump, since the prototype is already marked for
removal.
2011-04-02 16:17:15 +02:00
Anton Khirnov
6f3d3eacf6 lavc: add missing audioconvert includes 2011-04-02 16:17:01 +02:00
Anton Khirnov
b4b167ecbf jvdec: don't use deprecated CODEC_TYPE_*/PKT_FLAG_KEY 2011-04-02 16:16:44 +02:00
Michael Niedermayer
4defa68fe2 Merge remote branch 'qatar/master'
* qatar/master:
  ac3enc: ARM optimised ac3_compute_matissa_size
  ac3: armv6 optimised bit_alloc_calc_bap
  fate: simplify fft test rules
  avio: document avio_alloc_context.
  lavf: make compute_chapters_end less picky.
  sierravmd: fix Indeo3 videos
  FFT: simplify fft8()
  fate: add fixed-point fft/mdct tests
  Fixed-point support in fft-test
  ape: check that number of seektable entries is equal to number of frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-02 01:54:27 +02:00
Carl Eugen Hoyos
ecf94986c8 Fix compilation with --disable-vdpau 2011-04-02 00:50:39 +02:00
Carl Eugen Hoyos
2a0bd2bfc9 Make a plausibility check when setting channel layout for TrueHD.
TrueHD supports more channels than FFmpeg, so a valid sample
could set the channel layout to a value that represents less
channels than the sample actually consists of.
2011-04-02 00:48:43 +02:00
Mans Rullgard
aa05f2126e ac3enc: ARM optimised ac3_compute_matissa_size
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 22:46:21 +01:00
Mans Rullgard
182826c884 ac3: armv6 optimised bit_alloc_calc_bap
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 22:46:05 +01:00
Reimar Döffinger
7b9750ed9b Fix doxy-style for comment ("///>" should be "///<" instead). 2011-04-01 19:42:31 +02:00
Reimar Döffinger
9b7a0c5d88 Allow selecting VDPAU, XvMC via get_format for MPEG-2
To avoid further special-casing, dummy AVHWAccels are added
for VDPAU.
It should be possible to move VDPAU completely to AVHWAccel later.
2011-04-01 19:13:24 +02:00
Mans Rullgard
41327cca61 FFT: simplify fft8()
Part of the fft8() function corresponds to the BUTTERFLIES macro,
so use it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 17:50:59 +01:00
Mans Rullgard
6efe6028ed Fixed-point support in fft-test
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-04-01 15:16:06 +01:00
Peter Ross
f339f908a4 DPX image encoder 2011-04-01 23:10:26 +11:00
Michael Niedermayer
676d380f2a Fix undefined behavior in ffv1 with insane widths.
The new tables is large enough to prevent this together with our image size checks.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 12:49:52 +02:00
Michael Niedermayer
7ac167493e Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mpegts: propagate avio EOF in read_packet()
  configure: Initial support for --target-os=symbian
  Fixed-point FFT and MDCT
  Include dependencies for test programs
  ac3enc: simplify sym_quant()
  flvdec: read index stored in the 'keyframes' tag.
  mov: Add support for zero-sized stsc runs.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-01 02:58:15 +02:00
Mans Rullgard
7087ce08c8 Fixed-point FFT and MDCT 2011-03-31 12:01:27 +01:00
Mans Rullgard
7f6e05cdfd ac3enc: simplify sym_quant()
These expressions are equivalent since levels is always odd, and
overflow is impossible due to the constraints set by the assert().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-31 12:01:27 +01:00
Michael Niedermayer
1caa4123bd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers
  mlp_parse.c: set AVCodecContext channel_layout
  APIChanges: mark the place where 0.6 was branched.
  avio: make get_checksum() internal.
  avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h
  avio: make init_checksum() internal.
NOT MERGED  Add MxPEG decoder
NOT MERGED  Add support for picture_ptr field in MJpegDecodeContext
NOT MERGED  Move MJPEG's input buffer preprocessing in separate public function
NOT MERGED  Support reference picture defined by bitmask in MJPEG's SOS decoder
  sndio bug fix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 12:48:41 +02:00
Baptiste Coudurier
d9699ea825 Fix dnxhd custom options, add AVClass in private context 2011-03-30 08:48:08 -07:00
John Stebbins
4b6f097b21 mlp_parse.c: set AVCodecContext channel_layout
The channel layout isn't getting set for mlp and truehd audio.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 17:41:48 +02:00
Gwenole Beauchesne
da3716021b vaapi: allow build against older VA-API 0.31. 2011-03-30 16:15:29 +02:00
Peter Ross
007b1f04d7 h264: permit h264 decoder to be compiled when svq3 decoder is disabled
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 16:33:25 +02:00
Maksym Veremeyenko
dd9134c22e Fix compilation with win32 threads.after 'unbreak avcodec_thread_init' 2011-03-30 12:36:52 +02:00
Reimar Döffinger
65daa942eb Fix buffer overflow checks to avoid integer overflows. 2011-03-30 09:15:52 +02:00
anatoly
ce02f9becf Add MxPEG decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
e0e3b8b297 Add support for picture_ptr field in MJpegDecodeContext
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
f16055eedf Move MJPEG's input buffer preprocessing in separate public function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
anatoly
8f0bd2c07d Support reference picture defined by bitmask in MJPEG's SOS decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 07:18:34 +02:00
Michael Niedermayer
445fdc0140 Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: move compute_mantissa_size() to ac3dsp
  ac3enc: move mant*_cnt and qmant*_ptr out of AC3EncodeContext
  Remove support for stripping executables
  ac3enc: NEON optimised float_to_fixed24
  ac3: move ff_ac3_bit_alloc_calc_bap to ac3dsp
  dfa: protect pointer range checks against overflows.
Duplicate:  mimic: implement multithreading.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 03:09:08 +02:00
Michael Niedermayer
55ce3c67bb Merge remote-tracking branch 'ffmpeg-mt/master'
* ffmpeg-mt/master:
  Update todo. More items appeared...
  Fix mdec
Duplicate:  id3v1: change filesize to int64_t.
Duplicate:  id3v1: Seek back to old position after reading.

Conflicts:
    libavcodec/mpegvideo.c
    libavcodec/snow.c
    libavformat/id3v1.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-30 02:58:38 +02:00
Mans Rullgard
52fd16a264 ac3enc: move compute_mantissa_size() to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-30 01:21:56 +01:00
Mans Rullgard
6f718471ea ac3enc: move mant*_cnt and qmant*_ptr out of AC3EncodeContext
These fields are only used in quantize_mantissas() and reset
on each call, no need to store them in the main context.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-30 00:38:45 +01:00
Mans Rullgard
d782bca415 ac3enc: NEON optimised float_to_fixed24
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-29 19:40:13 +01:00
Mans Rullgard
6d9f52b2cd ac3: move ff_ac3_bit_alloc_calc_bap to ac3dsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-29 19:31:45 +01:00
Ronald S. Bultje
d38345878c dfa: protect pointer range checks against overflows. 2011-03-29 07:14:44 -07:00
Gwenole Beauchesne
621f4c98df vaapi: filter out DELAYED_PIC_REF flag to determine field.
This fixes ticket #23.
2011-03-29 09:55:07 +02:00
Gwenole Beauchesne
a18e7b4fb7 vaapi: cope with VA-API 0.32, i.e. fix VC-1 decoding on Sandy Bridge. 2011-03-29 09:39:30 +02:00
Alexander Strange
a75529e81e mimic: implement multithreading. 2011-03-28 21:50:46 -07:00
Michael Niedermayer
59bf303d68 Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: avoid memcpy() of exponents and baps in EXP_REUSE case by using exponent reference blocks.
  Chronomaster DFA decoder
DUPLICATE:  framebuffer device demuxer
NOT MERGED: cosmetics: fix dashed line length after 070c5d0
  http: header field names are case insensitive

Conflicts:
	LICENSE
	README
	doc/indevs.texi
	libavdevice/fbdev.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-29 02:46:11 +02:00
Michael Niedermayer
34c27ada10 Revert some silly renamings that leaked in from a pull. 2011-03-29 02:27:13 +02:00
Reimar Döffinger
e9ccdae09b Use consistent condition for whether to run slice-threading execute function. 2011-03-28 23:08:07 +02:00
Reimar Döffinger
46027c7286 Unbreak avcodec_thread_init
avcodec_thread_init currently doesn't do anything at all with pthreads enabled.
2011-03-28 23:07:52 +02:00
Justin Ruggles
c4549bd66a ac3enc: avoid memcpy() of exponents and baps in EXP_REUSE case by using
exponent reference blocks.
2011-03-28 14:46:17 -04:00
Kostya Shishkov
42315dabce Chronomaster DFA decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-28 16:55:03 +02:00
Michael Niedermayer
25d8099beb Merge remote-tracking branch 'newdev/master'
* newdev/master:
  ac3enc: Add codec-specific options for writing AC-3 metadata.
NOT MERGED:  Remove arrozcru URL from documentation
  sndio support for playback and record

Conflicts:
	doc/faq.texi
	doc/general.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-28 01:50:36 +02:00
Aurelien Jacobs
8e43b6fed9 add SubRip encoder
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
2011-03-28 00:16:44 +02:00
Justin Ruggles
991f3de1bb ac3enc: Add codec-specific options for writing AC-3 metadata. 2011-03-27 11:30:09 -04:00
Michael Niedermayer
3c8493074b Merge remote-tracking branch 'newdev/master'
* newdev/master:
  dsputil: allow to skip drawing of top/bottom edges.
  Split fate-psx-str-v3 into a video-only and audio-only test.

Conflicts:
	libavcodec/dsputil.c
	libavcodec/mpegvideo.c
	libavcodec/snow.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-27 01:40:18 +01:00
Michael Niedermayer
b0efaee6c1 make xvid less picky about unkown aspect
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-27 01:28:06 +01:00
Philip Langdale
3583eb9341 CrystalHD: Remove redundant interlaced check.
Signed-off-by: Philip Langdale <philipl@overt.org>
2011-03-26 16:09:48 -07:00
Philip Langdale
a1749eb3c3 CrystalHD: Add 2011 to Copyright
Signed-off-by: Philip Langdale <philipl@overt.org>
2011-03-26 16:09:48 -07:00
Philip Langdale
b45aceb64a Revert "CrystalHD: Improve interlaced h.264 support."
This reverts commit e44073ca5e.
2011-03-26 16:04:48 -07:00
Philip Langdale
85b010987f Revert "CrystalHD: Add heuristics to try and distinguish h.264 PAFF variants."
This reverts commit 4ab57cffba.
2011-03-26 16:04:43 -07:00
Philip Langdale
3188d33a11 Revert "CrystalHD: Refine heuristic logic."
This reverts commit f968ef922d.
2011-03-26 16:04:36 -07:00
Philip Langdale
f968ef922d CrystalHD: Refine heuristic logic. 2011-03-26 15:55:47 -07:00
Philip Langdale
4ab57cffba CrystalHD: Add heuristics to try and distinguish h.264 PAFF variants.
As previously discussed, the CrystalHD hardware treats some PAFF
clips different from others; even when input fields are always in
separate packets, the hardware might return a single fieldpair for
one clip and individual fields for another.

Given the bogus flags set by the hardware, it is impossible to
distinguish these two cases without knowing about the current
picture and the next one. The hardware can usually provide the
picture number of the next picture and when that is available,
we can detect the two cases.

When it is not available, we have to guess - and find out later
if we were right or wrong.

With this change, clips will play correctly unless they are PAFF
where individual fields are returned *and* no next picture number
is available. Generally speaking, the incorrect cases arise in
the first couple of seconds of a clip as the delay calibration takes
place. Once that's set, things work fine.
2011-03-26 15:55:47 -07:00
Philip Langdale
e44073ca5e CrystalHD: Improve interlaced h.264 support.
As previously discussed, the CrystalHD hardware returns exceptionally
useless information about interlaced h.264 content - to the extent
that it's not possible to distinguish MBAFF and PAFF content until
it's too late.

This change introduces use of the h264_parser to help bridge the
gap; it can indicate if the input data is PAFF fields or not.

With this clarity, some of heuristics can be removed from the code,
making this less convoluted.

Finally, I found an MBAFF clip that acts like non h.264 content so
I had to make allowances for that.

Note that I still cannot distinguish between two forms of PAFF,
where the hardware either returns individual fields or a field-pair.
It's not clear that there's even a spec relevant difference between
the two forms, as opposed to hardware ideosyncracies.
2011-03-26 15:55:47 -07:00
Alexander Strange
1500be13f2 dsputil: allow to skip drawing of top/bottom edges. 2011-03-26 17:45:38 -04:00
Reimar Döffinger
8361315469 DPX decode: add buffer size checks. 2011-03-26 13:46:20 +01:00
Peter Ross
7181627686 rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE 2011-03-26 13:24:43 +11:00
Michael Niedermayer
27ef7b1bcd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
  Use audio_service_type to set stream disposition.
  Add APIchanges entry for audio_service_type.
  Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
  configure: in check_ld, place new -l flags before existing ones
  support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
  doc: update build system documentation
  aacenc: indentation
  aacenc: fix the side calculation in search_for_ms
  vp8.c: rename EDGE_* to VP8_EDGE_*.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-26 03:06:30 +01:00
Justin Ruggles
be18738801 Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser
and decoder, and vice-versa for the AC-3 encoder.
2011-03-25 16:59:00 -04:00
Justin Ruggles
34b47d7cbc Add audio_service_type field to AVCodecContext for encoding and reporting
of the service type in the audio bitstream.
2011-03-25 16:51:53 -04:00
Michael Niedermayer
ab8b73ff4e lavc: Bump micro for dvd subtitle cb/cr fix Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 2011-03-25 19:00:55 +01:00
Alexandre Colucci
5fd7bc25f1 Fix incorrect colors when decoding Blu-ray subtitles
On Blu-ray colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see System Description Blu-ray Disc Read-Only Format, 9.14.4.2.2.1 Palette Definition Segment

When decoding a Blu-ray subtitle, the colors were incorrectly set.
2011-03-25 19:00:55 +01:00
Alexandre Colucci
9743e909f1 Fix incorrect colors when decoding DVD subtitles
On DVD and HD-DVD colors are stored in the order YCrCb (and not YCbCr) as mentioned in the specifications:
see DVD Specifications for Read-Only Disc / Part 3, 4.3 Program Chain Information (7) PGC_SP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (11) PGC_SDSP_PLT
see DVD Specifications for High Definition Disc, 5.2 Navigation for Standard Content (12) PGC_HDSP_PLT
see DVD Specifications for High Definition Disc, 5.5 Presentation Data (4) SET_COLOR2

When decoding a DVD or HD-DVD subtitle, the colors were incorrectly set.
2011-03-25 19:00:54 +01:00
Young Han Lee
00f0b4b92e aacenc: indentation 2011-03-24 21:13:29 -07:00
Young Han Lee
92efa2bdd9 aacenc: fix the side calculation in search_for_ms 2011-03-24 21:12:23 -07:00