Commit Graph

120 Commits

Author SHA1 Message Date
Michael Niedermayer e8c63981e5 ratecontrol: Use ticks_per_frame to calculate fps.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 12:54:54 +02:00
Michael Niedermayer 9e34adfc02 RC: Fix initial buffer occupancy.
Fixes Ticket880
Regression since bf174a70cd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-22 06:46:24 +01:00
Michael Niedermayer 9aeaf62903 Fix all GNU %Ld
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 20:01:49 +01:00
Michael Niedermayer 8bc7fe4daf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: misc consistency, spelling and wording fixes
  vcr1: drop unnecessary emms_c() calls without MMX code
  Replace all uses of av_close_input_file() with avformat_close_input().
  lavf: add avformat_close_input().
  lavf: deprecate av_close_input_stream().
  lavf doxy: add some basic demuxing documentation.
  lavf doxy: add some general lavf information.
  lavf doxy: add misc utility functions to a group.
  lavf doxy: add av_guess_codec/format to the encoding group.
  lavf doxy: add core functions to a doxy group.
  Add basic libavdevice documentation.
  lavc: convert error_recognition to err_recognition.
  avconv: update -map option help text
  x86: Require 7 registers for the cabac asm
  x86: bswap: remove test for bswap instruction
  bswap: make generic implementation more compiler-friendly
  h264: remove useless cast
  proresdec: fix decode_slice() prototype

Conflicts:
	configure
	doc/APIchanges
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/celp_math.h
	libavcodec/h264.c
	libavfilter/src_movie.c
	libavformat/anm.c
	libavformat/avformat.h
	libavformat/version.h
	libavutil/avstring.h
	libavutil/bswap.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 00:39:48 +01:00
Diego Biurrun 58c42af722 doxygen: misc consistency, spelling and wording fixes 2011-12-12 23:06:23 +01:00
Mans Rullgard 9c48a7cc52 ratecontrol: replace VLAs with malloc/free
(cherry picked from commit 2c6bd7d1f992989d1cc108534e0896771b86824f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-22 19:45:31 +02:00
Michael Niedermayer a7758884db Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtp: factorize  dynamic payload type fallback
  flvdec: Ignore the index if it's from a creator known to be different
  cmdutils: move grow_array out of #if CONFIG_AVFILTER
  avconv: actually set InputFile.rate_emu
  ratecontrol: update last_qscale_for sooner
  Fix unnecessary shift with 9/10bit vertical scaling
  prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()
  prores: return more meaningful error values
  prores: improve error message wording
  prores: cosmetics: prettyprinting, drop useless parentheses
  prores: lowercase AVCodec name entry

Conflicts:
	cmdutils.c
	libavcodec/proresdec_lgpl.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 01:03:07 +02:00
Luca Barbato d554b33efe ratecontrol: update last_qscale_for sooner
In order to make ratecontrol converge properly update the
last_qscale_for values when populating the qscale array.

It fixes the issue reported on
http://lists.libav.org/pipermail/libav-tools/2011-September/000050.html
2011-09-22 17:25:48 -07:00
Michael Niedermayer 73e0ec2ff4 rc: finetune convergence failure fix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-09 18:50:00 +02:00
Michael Niedermayer ed14517c23 rc: fix convergence failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-09 18:06:51 +02:00
Michael Niedermayer e10979ff56 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  changelog: misc typo and wording fixes
  H.264: add filter_mb_fast support for >8-bit decoding
  doc: Remove outdated comments about gcc 2.95 and gcc 3.3 support.
  lls: use av_lfg instead of rand() in test program
  build: remove unnecessary dependency on libs from 'all' target
  H.264: avoid redundant alpha/beta calculations in loopfilter
  H.264: optimize intra/inter loopfilter decision
  mpegts: fix Continuity Counter error detection
  build: remove unnecessary FFLDFLAGS variable
  vp8/mt: flush worker thread, not application thread context, on seek.
  mt: proper locking around release_buffer calls.
  DxVA2: unbreak build after [657ccb5ac7]
  hwaccel: unbreak build
  Eliminate FF_COMMON_FRAME macro.

Conflicts:
	Changelog
	Makefile
	doc/developer.texi
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-12 01:42:32 +02:00
Diego Biurrun 657ccb5ac7 Eliminate FF_COMMON_FRAME macro.
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture.  Replace by an embedded AVFrame structure in struct Picture.
2011-07-11 00:19:00 +02:00
Stefano Sabatini ce5e49b0c2 replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_* 2011-05-02 16:41:41 +02:00
Stefano Sabatini 301183d9be replace deprecated av_get_pict_type_char() with av_get_picture_type_char() 2011-05-02 16:41:35 +02:00
Stefano Sabatini 975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Stefano Sabatini 6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
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
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
Stefano Sabatini d2af7205a1 Use hierarchic names convention (prefix them with av_expr) for the
eval API.

More grep-friendly and more consistent with the rest of the FFmpeg
API.

Originally committed as revision 25708 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 14:06:49 +00:00
Stefano Sabatini 0b99215c0e Move eval.c and eval.h from libavcodec to libavutil, and make the eval
API public.

Originally committed as revision 23485 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-05 12:01:28 +00:00
Stefano Sabatini 9ace13b416 Make ff_parse_expr() and ff_parse_and_eval_expr() return an int
containing an error code.

Allow these functions to convey the reason of the failure to the
calling function, failure which is not always due to a parsing error
but it may depend for example on a memory problem.

Also fix several potential memleaks.

Originally committed as revision 23402 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-01 08:07:07 +00:00
Michael Niedermayer 2b65bb45b5 Change eval API to take parent log context and log level offset.
this is based on stefanos work, especially all bugs are his fault ;)

Originally committed as revision 23201 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-19 22:55:29 +00:00
Stefano Sabatini edd259f92f Change the order of parameters for ff_eval_expr() and
ff_parse_and_eval_expr(), place the names for constants/functions
before the corresponding values.

This looks more readable, as the user is expected to know the names
before the values.

Originally committed as revision 23149 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-16 23:00:22 +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
Stefano Sabatini 1235429c27 Rename ff_parse() to ff_parse_expr().
The new name is more expressive and fits better in the overall naming
scheme for the revisited eval API.

Originally committed as revision 22858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-12 19:21:15 +00:00
Stefano Sabatini 4565caf120 Rename ff_parse_eval() to ff_eval_expr().
The new name expresses better what the function does.

Originally committed as revision 22844 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 22:32:01 +00:00
Stefano Sabatini f8fea468b2 Rename ff_eval_free() to ff_free_expr().
Originally committed as revision 22834 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 11:47:33 +00:00
Måns Rullgård 94ca624fbc Move ff_sqrt() to libavutil/intmath.h
Originally committed as revision 22345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:19:56 +00:00
Michael Niedermayer 25ef00720b Remove 2 useless assignments from ff_rate_control_init() found by CSA.
Originally committed as revision 18573 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 17:52:58 +00:00
Michael Niedermayer 956177fb1d Remove unused variable in modify_qscale() found by CSA.
Originally committed as revision 18563 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 15:08:00 +00:00
Diego Biurrun bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Aurelien Jacobs b250f9c66d Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-13 23:44:16 +00:00
Baptiste Coudurier 3bff4d8b7a Implement the fields rc_max_available_vbv_use and
rc_min_vbv_overflow_use in AVCodecContext, and use their values in the
ratecontrol code rather than hardcoded ones.

See the thread: "[RFC] ratecontrol buffer size magic".
Patch by Baptiste Coudurier.

Originally committed as revision 15955 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-11-29 14:08:48 +00:00
Reimar Döffinger 9b5ede5b64 Add (additional) const to many global tables.
Originally committed as revision 15515 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-02 15:52:04 +00:00
Michael Niedermayer 3cffbe090a Fix rc_eq mem leak.
Originally committed as revision 14788 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-16 14:46:31 +00:00
Stefan Gehrer cf2baeb338 mark read-only data as const
Originally committed as revision 13947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-06-24 20:01:31 +00:00
Diego Biurrun 842eabc5f9 cosmetics: XviD is now called Xvid.
Originally committed as revision 13465 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-27 12:32:59 +00:00
Diego Biurrun 170c0b455c Fix typo in variable name: blured --> blurred.
Originally committed as revision 12556 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-22 17:34:29 +00:00
Diego Biurrun 04932b0d97 cosmetics: typo fixes
Originally committed as revision 12554 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-22 16:46:36 +00:00
Aurelien Jacobs 9701840bb5 add FF_ prefix to all (frame)_TYPE usage
Originally committed as revision 12399 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-09 23:31:02 +00:00
Reimar Döffinger e3cb2c4a08 Missing const
Originally committed as revision 12147 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-19 21:37:53 +00:00
Michael Niedermayer 90901860c2 stupid code (casting of void*) found by checktree.sh
Originally committed as revision 11117 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-01 00:19:44 +00:00
Michael Niedermayer f612801465 fix timestamps used for ratecontrol
these were wrong (in pts vs dts sense) when b frames were in use
they were also wrong if the average framerate was smaller than 1/timebase
resulting in totally wrong final bitrate

Originally committed as revision 10477 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-09-11 22:46:41 +00:00
Michael Niedermayer 2711cb28f4 prevent assert failure with negative quant_offset
Originally committed as revision 9830 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-29 21:34:31 +00:00
Diego Biurrun df3a80b50a cosmetics: misc typo fixes
Originally committed as revision 9815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-28 12:46:26 +00:00
Diego Biurrun 82634feeb5 CONFIG_XVID --> CONFIG_LIBXVID
Originally committed as revision 9466 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-03 09:12:55 +00:00
Diego Biurrun 755bfeabcc misc spelling fixes
Originally committed as revision 9289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-12 09:29:25 +00:00
Michael Niedermayer 0fa9a5ddc7 check qblur > 1 (prevent assert failure / segfault)
fixes sf bug #797610

Originally committed as revision 9166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-05-31 21:40:22 +00:00
Diego Biurrun e42dba481f typos/grammar
Originally committed as revision 8641 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-04-07 14:09:20 +00:00