Commit Graph

954 Commits

Author SHA1 Message Date
Michael Niedermayer
9034001b17 h264 fill_filter_caches: Dont init chroma nnz_cache.
Found-by: Dark Shikari
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 03:46:13 +02:00
Alexander Strange
6a9c859444 H264/MPEG frame-level multi-threading.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-06-02 10:16:20 -07:00
Michael Niedermayer
26ed595bd0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Add -U__STRICT_ANSI__ to CPPFLAGS on Cygwin and DOS.
  aacdec: fix typo in scalefactor clipping check
  fate: fix fate-h264-conformance-frext-pph10i4-panasonic-a crcs.
  fate: update 9/10bit refs.
  h264: Properly set coded_{width, height} when parsing H.264.
  x86 asm: Add SECTION_TEXT to dct32_sse.asm.
  Fix 9/10 bit in swscale.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-24 04:35:08 +02:00
Felipe Contreras
b47904d158 h264: Properly set coded_{width, height} when parsing H.264.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-23 13:15:55 +02:00
Michael Niedermayer
0424e052f8 Merge remote-tracking branch 'ffmpeg-mt/master'
* ffmpeg-mt/master:
      Update todo.
      h264: add an assert that copied pictures are valid picture pointers
      valgrind-check: run with 1 and 3 threads
      h264: When decoding a packet with multiple PPS/SPS, don't start the next thread until all of them have been read
      Allow some pictures to be released earlier after 51ead6d2c40c5defdd211f435aec49b19f5f6a18
      h264: fix slice threading MC reading uninitialized frame edges.

    Please see ffmpeg-mt for a list of authors of these changes.

    Conflicts:
        libavcodec/h264.c
        mt-work/valgrind-check.sh

    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-21 03:11:50 +02:00
Michael Niedermayer
80d156d7fd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  qdm2: Use floating point synthesis filter.
  h264: correct border check.
  h264: fix loopfilter with threading at slice boundaries.
  Fix ff_mpa_synth_filter_fixed() prototype
  Rename costablegen.c ---> cos_tablegen.c.
  Collapse tableprint.c into tableprint.h.
  Simplify trig table rules
  Remove potentially unstable filenames from comments in generated files.
  Ignore generated tables and generated table generator programs.
  Simplify CLEANFILES make variable by using wildcards.
  Remove silly insults from avformat_version() Doxygen documentation.
  mpegaudiodsp: fix x86 and ppc makefiles
  configure: Adjust AVX assembler check.
  mpegaudio: remove unused version of SAME_HEADER_MASK
  mpegaudio: remove useless #undef at end of file
  asfdec: add missing #include for av_bswap32()
  mpegaudio: merge two #if CONFIG_FLOAT blocks
  mpegaudio: move some struct definitions from mpegaudio.h
  Move some mpegaudio functions to new mpegaudiodsp subsystem

Conflicts:
	libavcodec/h264.c
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-20 05:48:22 +02:00
Ronald S. Bultje
4e987f8282 h264: correct border check.
When backing up the top-left border, check that the top-left
(rather than left) MB indeed does belong to our slice. If it
doesn't, backing up has no positive effect but may accidentally
interfere with other threads writing in the same space.

Fixes occasional one-off effects when enabling slice-MT.
2011-05-19 20:32:18 -04:00
Ronald S. Bultje
0ffc841505 h264: fix loopfilter with threading at slice boundaries. 2011-05-19 20:32:17 -04:00
Michael Niedermayer
75a37b57a5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in date and commit for request_sample_fmt
  Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.
  Add support for request_sample_format in ffmpeg and ffplay.
  Add APIchanges entry for request_sample_fmt.
  Add request_sample_fmt field to AVCodecContext.
  Add float_interleave() to FmtConvertContext with x86-optimized versions.
  Remove unused make variable SEEK_REFFILE
  fate: remove redundant aref and vref references
  fate: remove do_ffmpeg_nocheck function
  fate: do not collect -benchmark output
  mpegaudiodec: remove decode_end() function
  fate: run aref and vref as regular tests
  mpegaudio: sanitise compute_antialias_* names
  mpeg12: add slice-threading checks to slice-threading initializers.
  h264: copy pixel_shift between slice threading contexts.
  mdec: enable frame-level multithreading.
  mdec.c: fix overread.

Conflicts:
	libavcodec/aacdec.c
	libavcodec/ac3dec.c
	libavcodec/avcodec.h
	libavcodec/dca.c
	libavcodec/h264.c
	libavcodec/mdec.c
	libavcodec/mpeg12.c
	libavcodec/options.c
	libavcodec/version.h
	libavcodec/vorbisdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-19 06:00:31 +02:00
Ronald S. Bultje
8d44cd2cd8 h264: copy pixel_shift between slice threading contexts.
Fixes "make THREADS=2 THREAD_TYPE=2
fate-h264-conformance-frext-pph10i3_panasonic_a".
2011-05-18 06:54:15 -04:00
Michael Niedermayer
59eb12faff Merge remote branch 'qatar/master'
* qatar/master: (30 commits)
  AVOptions: make default_val a union, as proposed in AVOption2.
  arm/h264pred: add missing argument type.
  h264dsp_mmx: place bracket outside #if/#endif block.
  lavf/utils: fix ff_interleave_compare_dts corner case.
  fate: add 10-bit H264 tests.
  h264: do not print "too many references" warning for intra-only.
  Enable decoding of high bit depth h264.
  Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
  Add support for higher QP values in h264.
  Add the notion of pixel size in h264 related functions.
  Make the h264 loop filter bit depth aware.
  Template dsputil_template.c with respect to pixel size, etc.
  Template h264idct_template.c with respect to pixel size, etc.
  Preparatory patch for high bit depth h264 decoding support.
  Move some functions in dsputil.c into a new file dsputil_template.c.
  Move the functions in h264idct into a new file h264idct_template.c.
  Move the functions in h264pred.c into a new file h264pred_template.c.
  Preparatory patch for high bit depth h264 decoding support.
  Add pixel formats for 9- and 10-bit yuv420p.
  Choose h264 chroma dc dequant function dynamically.
  ...

Conflicts:
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/alpha/dsputil_alpha.c
	libavcodec/arm/dsputil_init_arm.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/arm/dsputil_init_neon.c
	libavcodec/arm/dsputil_iwmmxt.c
	libavcodec/arm/h264pred_init_arm.c
	libavcodec/bfin/dsputil_bfin.c
	libavcodec/dsputil.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_ps.c
	libavcodec/h264_refs.c
	libavcodec/h264dsp.c
	libavcodec/h264idct.c
	libavcodec/h264pred.c
	libavcodec/mlib/dsputil_mlib.c
	libavcodec/options.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/ppc/h264_altivec.c
	libavcodec/ps2/dsputil_mmi.c
	libavcodec/sh4/dsputil_align.c
	libavcodec/sh4/dsputil_sh4.c
	libavcodec/sparc/dsputil_vis.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/options.c
	libavformat/utils.c
	libavutil/pixfmt.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/swscale_template.c
	tests/ref/seek/lavf_avi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 05:47:02 +02:00
Oskar Arvidsson
d545cf804c Enable decoding of high bit depth h264.
This patch completes the high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:38 -04:00
Oskar Arvidsson
19a0729b4c 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: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:36 -04:00
Oskar Arvidsson
fcc0224e4f 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: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:35 -04:00
Oskar Arvidsson
6e3ef511d7 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: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:33 -04:00
Oskar Arvidsson
e39e3abad4 Choose h264 chroma dc dequant function dynamically.
Needed for high bit depth h264 decoding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:17 -04:00
Stefano Sabatini
ce5e49b0c2 replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_* 2011-05-02 16:41:41 +02:00
Stefano Sabatini
301183d9be replace deprecated av_get_pict_type_char() with av_get_picture_type_char() 2011-05-02 16:41:35 +02:00
Stefano Sabatini
975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Stefano Sabatini
6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Michael Niedermayer
0e5758d101 H264: print nal_ref_idc too for debug
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 02:38:29 +02:00
Mike Scheutzow
e12926393b Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
One of the causes of this bug is that the h264 parser defaults low_delay
to 1, but the h264 codec defaults low_delay to 0. Really Ugly.

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

My patch relies on the encoder to set an optional field in the SPS. This
works for libx264 streams, but I'm not sure that all h264 encoders will
set it.
2011-05-01 01:47:35 +02:00
Michael Niedermayer
be315a3232 Merge remote branch 'qatar/master'
* qatar/master:
Duplicate  AMV: disable DR1 and don't override EMU_EDGE
Duplicate  lavf: inspect more frames for fps when container time base is coarse
Wrong and we have correct fix: Fix races in default av_log handler
  vorbis: Replace sized int_fast integer types with plain int/unsigned.
  Remove disabled non-optimized code variants.
NO  bswap.h: Remove disabled code.
  Remove some disabled printf debug cruft.
  Replace more disabled printf() calls by av_dlog().
NO  tests: Remove disabled code.
NO  Replace some commented-out debug printf() / av_log() messages with av_dlog().
  vorbisdec: Replace some sizeof(type) by sizeof(*variable).
NO  vf_fieldorder: Replace FFmpeg by Libav in license boilerplate.

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

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

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 03:51:04 +02:00
Anton Khirnov
e7021c0ed5 lavc: remove FF_API_HURRY_UP cruft 2011-04-26 08:16:05 +02:00
Michael Niedermayer
8772156be0 Merge remote branch 'qatar/master'
* qatar/master:
  APIChanges: document git revision for CODEC_CAP_SLICE_THREADS addition.
  Introduce slice threads flag.
  FATE: allow forcing thread-type when doing threaded fate runs.
  Use av_log_ask_for_sample() where appropriate.
  error: sort, pack, and align error code and string definitions
  The stabilization period after version bumps should be one month, not one week.
  applehttp: Expose the stream bitrate via metadata
  doc: Add some initial docs on the applehttp demuxer
  Provide a fallback version of the libm function trunc
  libavdevice: Define _XOPEN_SOURCE for usleep
  lavc: provide deprecated avcodec_thread_init until next major version
  lavc: provide the opt.h header until the next bump
  error: change AVERROR_EOF value
  error: remove AVERROR_NUMEXPECTED
  error: add error code AVERROR_OPTION_NOT_FOUND, and use it in opt.c

Conflicts:
	libavcodec/h264.c
	libavutil/error.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-22 03:54:30 +02:00
Ronald S. Bultje
94f7451a3a Introduce slice threads flag.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-21 19:42:19 -04:00
Alexander Strange
7e2eb4bacd Merge remote-tracking branch 'ffmpeg-mt/master'
* ffmpeg-mt/master:
      Release unused pictures even when not calling ff_h264_frame_start()
      h264: Fix decoding race condition with PAFF
      h264: cosmetic whitespace change
    Duplicate  Fix REBASE_PICTURE with h.264
    Not pulled  Update test scripts to use ffmpeg instead of ffmpeg_g
    Duplicate  Fix ffmpeg-mt fixme in h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-18 00:47:35 +02:00
Michael Niedermayer
df2d5b16ef H264: Allow templating hl_decode_mb based on pixel_size.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:42 +02:00
Michael Niedermayer
a50f0bea25 H264: Split out hl_motion and template it, this seems a bit faster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:42 +02:00
Michael Niedermayer
e7077f5e7b H264: replace pixel_size by pixel_shift
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:42 +02:00
Oskar Arvidsson
5e85298cb5 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>
2011-04-10 22:33:42 +02:00
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
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
Michael Niedermayer
ffb61814a0 Fix deblocking with thread_slices
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 00:20:18 +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
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
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
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
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
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
Michael Niedermayer
d375c10400 Fake-Merge remote-tracking branch 'ffmpeg-mt/master' 2011-03-22 22:36:57 +01:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Reinhard Tartler
7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Janne Grunau
154f7bb062 h264: define FF_PROFILE_H264_HIGH_444 to the correct value
It was removed in fe9a3fb since it had the wrong value. Add profile name
for it.
(cherry picked from commit 440b61691d)
2011-02-09 03:33:54 +01:00
Janne Grunau
440b61691d h264: define FF_PROFILE_H264_HIGH_444 to the correct value
It was removed in fe9a3fb since it had the wrong value. Add profile name
for it.
2011-02-08 13:20:56 +01:00
Anssi Hannula
45eaec3029 h264: add profile names for the existing defines
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 71e0bee9ea)
2011-02-02 03:40:50 +01:00
Janne Grunau
94e3e83f13 h264: Add Intra and Constrained Baseline profiles to avctx.profile
(cherry picked from commit fe9a3fbe42)
2011-02-02 03:40:50 +01:00
Anssi Hannula
71e0bee9ea h264: add profile names for the existing defines
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-01 20:37:02 +01:00
Janne Grunau
fe9a3fbe42 h264: Add Intra and Constrained Baseline profiles to avctx.profile 2011-02-01 20:37:02 +01:00
Ronald S. Bultje
d23e3e5fea Move ff_emulated_edge_mc() into DSPContext.
(cherry picked from commit 2e27959879)
2011-01-30 03:41:01 +01:00
Ronald S. Bultje
2e27959879 Move ff_emulated_edge_mc() into DSPContext. 2011-01-28 22:13:26 -05:00
Diego Elio Pettenò
e7e2df27f8 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
d36beb3f69 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Diego Elio Pettenò
877937b382 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 13eb6b9097)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
123241214c Make ff_h264_decode_rbsp_trailing static to h264.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 8529731961)
2011-01-26 03:43:31 +01:00
Diego Elio Pettenò
13eb6b9097 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:07:29 +01:00
Diego Elio Pettenò
8529731961 Make ff_h264_decode_rbsp_trailing static to h264.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Ronald S. Bultje
fb397b1a19 Reindent.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit fcb7e535dd)
2011-01-23 19:32:08 +01:00
Ronald S. Bultje
2ed0f76655 Fix crash on resolution change (issue 2393).
Don't free RBSP tables (containing decoded NAL units) on resolution
change, because we actually need this data to decode the frame after
reiniting (with new resolution). Fixed issue 2393.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 9107892624)
2011-01-23 19:32:08 +01:00
Alex Converse
d5ec00ba57 Remove H.264 encoder fragments
It's incomplete, no one is working on it, and when someone asks about
working on it we advise them not to.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ff3d43104f)
2011-01-23 19:32:08 +01:00
Ronald S. Bultje
fcb7e535dd Reindent.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 18:22:03 +01:00
Ronald S. Bultje
9107892624 Fix crash on resolution change (issue 2393).
Don't free RBSP tables (containing decoded NAL units) on resolution
change, because we actually need this data to decode the frame after
reiniting (with new resolution). Fixed issue 2393.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 18:21:59 +01:00
Alex Converse
ff3d43104f Remove H.264 encoder fragments
It's incomplete, no one is working on it, and when someone asks about
working on it we advise them not to.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 16:15:53 +00:00
Ronald S. Bultje
772225c041 Revert 2a1f431d38, it broke H264 lossless.
(cherry picked from commit 66c6b5e2a5)
2011-01-21 20:36:01 +01:00
Ronald S. Bultje
66c6b5e2a5 Revert 2a1f431d38, it broke H264 lossless. 2011-01-20 17:24:44 -05:00
Jason Garrett-Glaser
2a1f431d38 H.264/SVQ3: make chroma DC work the same way as luma DC
No speed improvement, but necessary for some future stuff.
Also opens up the possibility of asm chroma dc idct/dequant.

Originally committed as revision 26349 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:10:46 +00:00
Jason Garrett-Glaser
290fabc684 Port SVQ3 to use the new mb_luma_dc method of storing luma DC coefficients.
Doesn't help speed as there isn't an asm implementation yet, but consistency
is a good thing.

Originally committed as revision 26348 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 00:41:18 +00:00
Jason Garrett-Glaser
65344775b8 H.264: Remove useless arg to chroma_dc_dequant_idct_c
Originally committed as revision 26345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 23:46:55 +00:00
Jason Garrett-Glaser
2e18660115 Fix SVQ3
Regression in r26336-7.

Originally committed as revision 26341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 22:23:42 +00:00
Jason Garrett-Glaser
0d1d01cf70 Reindent after r26337.
Originally committed as revision 26338 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:36:45 +00:00
Jason Garrett-Glaser
5657d14094 H.264: switch to x264-style tracking of luma/chroma DC NNZ
Useful so that we don't have to run the hierarchical DC iDCT if there aren't
any coefficients.  Opens up some future opportunities for optimization as well.

Originally committed as revision 26337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:36:16 +00:00
Jason Garrett-Glaser
19fb234e4a H.264: split luma dc idct out and implement MMX/SSE2 versions
About 2.5x the speed.

NOTE: the way that the asm code handles large qmuls is a bit suboptimal.
If x264-style dequant was used (separate shift and qmul values), it might
be possible to get some extra speed.

Originally committed as revision 26336 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:34:25 +00:00
Jason Garrett-Glaser
ca32f7f208 H.264: eliminate non-transposed scantable support.
It was an ugly hack to begin with and didn't give any performance.

NOTE: this patch opens up some future simplifications to be made (such as
removing some of the scantables from H264Context) but doesn't take advantage
of them yet.

Originally committed as revision 26329 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:04:59 +00:00
Jason Garrett-Glaser
09fffe9bd4 H.264: fix grayscale decoding with explicit wpred
Originally committed as revision 26306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 23:42:45 +00:00
Alexander Strange
0f01602362 SVQ3: Allow decoding if thread_count is > 1
svq3 still doesn't support multithreading, but it's simpler for clients if
they can enable threading for all codecs by default.

Originally committed as revision 26015 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 00:22:47 +00:00
Baptiste Coudurier
9d252137e5 In h264 decoder, fix decoding when nal end sequence is present
Originally committed as revision 25809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 01:16:37 +00:00
Reimar Döffinger
00d1e96bf4 H.264 decode: support cropping up to 28 pixels in interlaced mode.
Contrary to progressive, just being able to crop up to 14/15 pixels
is not enough to encode all supported resolutions, and the new
behaviour is also consistent with e.g. MPEG-2 etc.

Originally committed as revision 25669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:52:28 +00:00
Carl Eugen Hoyos
5dd7f994c6 Do not assume PIX_FMT_YUV420P will remain the only supported output format for H264.
Originally committed as revision 25352 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 17:24:18 +00:00
Michael Niedermayer
cfa5a81ea6 Move aspect ratio 0/0 avoidance code so the values in the sps struct are not missed.
This preempts issues with av_cmp_q(0/0, X)

Originally committed as revision 25337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 01:43:25 +00:00
Jason Garrett-Glaser
4dece8c7f8 Try to fix crashes introduced by r25218
r25218 made assumptions about the existence of past reference frames that
weren't necessarily true.

Originally committed as revision 25243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-28 09:06:22 +00:00
Jason Garrett-Glaser
e2983d6eac Improve error concealment of lost frames
If a frame is lost, replace it with data from the previous valid frame.

Originally committed as revision 25218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 04:43:41 +00:00
Ronald S. Bultje
1d16a1cf99 Rename h264_idct_sse2.asm to h264_idct.asm; move inline IDCT asm from
h264dsp_mmx.c to h264_idct.asm (as yasm code). Because the loops are now
coded in asm instead of C, this is (depending on the function) up to 50%
faster for cases where gcc didn't do a great job at looping.

Since h264_idct_add8() is now faster than the manual loop setup in h264.c,
in-asm idct calling can now be enabled for chroma as well (see r16207). For
MMX, this is 5% faster. For SSE2 (which isn't done for chroma if h264.c does
the looping), this makes it up to 50% faster. Speed gain overall is ~0.5-1.0%.

Originally committed as revision 25119 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-14 13:36:26 +00:00
Michael Niedermayer
3d5421201b Perform sliding window operation during frame gap handling.
This avoids some warnings about too many reference frames.

Originally committed as revision 24057 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-05 14:36:03 +00:00
Baptiste Coudurier
bb943bb8fc Give context to av_log
Originally committed as revision 24018 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-03 04:40:12 +00:00
Diego Biurrun
6da88bd389 Fix typo in Doxygen function parameter name.
Originally committed as revision 23983 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-02 11:54:34 +00:00
Måns Rullgård
49bd8e4b84 Fix grammar errors in documentation
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 15:38:06 +00:00
Baptiste Coudurier
9ad7dfc110 Pass codec pixel format list to get_format, if present, fix vdpau decoding
Originally committed as revision 23396 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-31 22:01:31 +00:00
Baptiste Coudurier
0435fb16d7 In h264 decoder, use jpeg yuv pixel format when full range is set in vui
Originally committed as revision 23369 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 23:15:30 +00:00
Howard Chu
05e953193d Factorize ff_h264_decode_extradata().
Patch by Howard Chu, hyc highlandsun com

Originally committed as revision 23340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-26 19:00:59 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Gwenole Beauchesne
6752a3cc6c H.264: cosmetics (vertical align).
Originally committed as revision 22885 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-15 13:16:37 +00:00
Gwenole Beauchesne
fa37cf0db3 H.264: move avctx->{profile,level} init before AVCodecContext.get_format().
Originally committed as revision 22884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-15 08:30:48 +00:00