Commit Graph

208 Commits

Author SHA1 Message Date
Martin Storsjö d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö 124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer 15a0fb58a3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  utvideodec: Fix single symbol mode decoding
  truespeech: drop useless casts
  libavcodec: drop bogus dependencies from mpc[78] and qdm2
  mpegaudio: move ff_mpa_enwindow to a separate file
  AVOptions: store defaults for INT64 options in int64 union member.

Conflicts:
	libavcodec/Makefile
	libavfilter/af_asyncts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-24 15:00:39 +02:00
Stefano Sabatini 42d621d131 lavfi: add priv class to filter definitions and flags to filter internal options
This allows the iteration callbacks to discover the internal class and
options, and show them when required.
2012-08-18 10:19:05 +02:00
Nicolas George d5765d4725 vf_drawtext: fix permissions. 2012-08-17 18:26:41 +02:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Martin Storsjö 33e112847d Add more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 10:49:54 +03:00
Clément Bœsch cc650cf029 Remove "Error parsing options string [...]" messages.
This reduces from 3 to 2 messages for the same syntax error in ffprobe,
and from 4 to 3 in filters.
2012-08-09 08:11:00 +02:00
Michael Niedermayer 88beb2df98 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  FATE: fix the asyncts test
  build: Drop gcc-specific warning flag from header compilation rule
  FATE: add a test for the asyncts audio filter.
  matroskadec: return more correct error code on read error.
  buffersrc: check ff_get_audio_buffer() for errors.
  lavfi: check all ff_get_video_buffer() calls for errors.
  lavfi: check all avfilter_ref_buffer() calls for errors.
  vf_select: avoid an unnecessary avfilter_ref_buffer().
  buffersrc: avoid creating unnecessary buffer reference
  lavfi: use avfilter_unref_bufferp() where appropriate.
  vf_fps: add more error checks.
  vf_fps: fix a memleak on malloc failure.
  lavfi: check all ff_start_frame/draw_slice/end_frame calls for errors
  lavfi: add error handling to end_frame().
  lavfi: add error handling to draw_slice().
  lavfi: add error handling to start_frame().

Conflicts:
	Makefile
	ffplay.c
	libavfilter/buffersrc.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_hflip.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/video.c
	libavfilter/vsrc_color.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-22 23:56:21 +02:00
Michael Niedermayer 9023de342f Merge commit '1470ce21cec5ee26e106e2a884c26bbf84e5aaea'
* commit '1470ce21cec5ee26e106e2a884c26bbf84e5aaea':
  Bump libavcodec and libavformat minor versions for G.723.1 decoder and demuxer
  G.723.1 demuxer and decoder
  Add a shift parameter to celp_lp_synthesis_filter()
  libopenjpeg: K&R formatting cosmetics
  yadif: use emms_c() instead of inline assembly for emms invocations.
  ac3: don't use different names for option tables in the template file.
  lavfi: use const for AVFilterPad declarations in all filters.
  adpcm: don't duplicate identical AVSampleFmt array for each encoder.
  configure: cosmetics: Group test dependencies together
  configure: add more passthrough flags in tms470 filter
  configure: move flag filtering functions out of if/else blocks

Conflicts:
	Changelog
	configure
	doc/general.texi
	libavcodec/Makefile
	libavcodec/ac3enc_fixed.c
	libavcodec/allcodecs.c
	libavcodec/eac3enc.c
	libavcodec/g723_1.c
	libavcodec/g723_1_data.h
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/v210dec.h
	libavcodec/version.h
	libavfilter/af_anull.c
	libavfilter/asrc_anullsrc.c
	libavfilter/f_settb.c
	libavfilter/fifo.c
	libavfilter/split.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_copy.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fieldorder.c
	libavfilter/vf_format.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hflip.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_null.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_pixdesctest.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_setpts.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_slicify.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_vflip.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/g723_1.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-22 22:18:18 +02:00
Anton Khirnov d4f89906e3 lavfi: add error handling to end_frame(). 2012-07-22 09:14:05 +02:00
Anton Khirnov e9b992d035 lavfi: add error handling to draw_slice(). 2012-07-22 09:14:05 +02:00
Anton Khirnov ebc8d97481 lavfi: add error handling to start_frame(). 2012-07-22 09:14:04 +02:00
Ronald S. Bultje 3db407038e lavfi: use const for AVFilterPad declarations in all filters. 2012-07-21 16:31:15 -07:00
Anton Khirnov 07bad27810 lavfi: unref AVFilterLink.cur_buf in ff_end_frame().
This reduces code duplication and prevents stale pointers from remaining
on the link.
2012-07-20 21:10:42 +02:00
Anton Khirnov 7155763b78 vf_drawtext: don't give up its own reference to the input buffer.
Directly forwarding the input buffer to the next filter means that
drawtext no longer owns any references to it and thus shouldn't refer to
it in any way.
2012-07-20 21:07:32 +02:00
Michael Niedermayer 052f4f859c Merge commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a'
* commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a':
  lavfi: remove 'opaque' parameter from AVFilter.init()
  mov: do not try to read total disc/track number if data atom is too short.
  avconv: fix -force_key_frames
  dxva2_h264: fix signaling of mbaff frames
  x86: fft: elf64: fix PIC build

Conflicts:
	ffmpeg.c
	libavcodec/v210dec.h
	libavfilter/asrc_anullsrc.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_overlay.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-26 23:57:07 +02:00
Anton Khirnov a5e8c41c28 lavfi: remove 'opaque' parameter from AVFilter.init()
It is not used in any filters currently and is inherently evil. If
passing binary data to filters is required in the future, it should be
done with some AVOptions-based system.
2012-06-26 13:13:48 +02:00
Stefano Sabatini 9b41ec4b9e lavfi/drawtext: use av_opt_free() to free private context
Simplify code.
2012-06-25 22:49:16 +02:00
Stefano Sabatini c17808cebd lavfi: define macro AVFILTER_DEFINE_CLASS
The macro can be used to define consistently the internal class of a
filter, save some typing and factorize.
2012-06-22 23:11:43 +02:00
Stefano Sabatini 012aa12a6b lavfi/drawtext: remove unnecessary parentheses in init() 2012-06-22 23:11:43 +02:00
Paul B Mahol 54101214d8 lavfi: use designated initializers for AVClass
While here:
    - add missing .version and .category,
    - make .class_name consistent across filters,
    - align declarations.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-06-17 11:10:10 +00:00
Michael Niedermayer c7b9eab2be Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
  rtmp: Set the client buffer time to 3s instead of 0.26s
  rtmp: Handle server bandwidth packets
  rtmp: Display a verbose message when an unknown packet type is received
  lavfi/audio: use av_samples_copy() instead of custom code.
  configure: add all filters hardcoded into avconv to avconv_deps
  avfiltergraph: remove a redundant call to avfilter_get_by_name().
  lavfi: allow building without swscale.
  build: Do not delete tests/vsynth2 directory, which is no longer created.
  lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
  lavfi: make AVFilterPad opaque after two major bumps.
  lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
  lavfi: make avfilter_get_video_buffer() private on next bump.
  jack: update to new latency range API as the old one has been deprecated
  rtmp: Tokenize the AMF connection parameters manually instead of using strtok_r
  ppc: Rename H.264 optimization template file for consistency.
  lavfi: add channelsplit audio filter.
  golomb: check remaining bits during unary decoding in get_ur_golomb_jpegls()
  sws: fix planar RGB input conversions for 9/10/16 bpp.

Conflicts:
	Changelog
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/golomb.h
	libavcodec/v210dec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_frei0r.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/video.h
	libavfilter/vsrc_color.c
	libavformat/rtmpproto.c
	libswscale/input.c
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-13 22:43:57 +02:00
Anton Khirnov 9d0bfc5052 lavfi: make AVFilterPad opaque after two major bumps.
It will allow adding new fields to it without ABI breaks.
2012-06-13 11:11:33 +02:00
Michael Niedermayer ad60b3b181 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbis: Validate that the floor 1 X values contain no duplicates.
  avprobe: Identify codec probe failures rather than calling them unsupported codecs.
  avformat: Probe codecs at score 0 on buffer exhaustion conditions.
  avformat: Factorize codec probing.
  Indeo Audio decoder
  imc: make IMDCT support stereo output
  imc: move channel-specific data into separate context
  lavfi: remove request/poll and drawing functions from public API on next bump
  lavfi: make avfilter_insert_pad and pals private on next bump.
  lavfi: make formats API private on next bump.
  avplay: use buffersrc instead of custom input filter.
  avtools: move buffer management code from avconv to cmdutils.
  avconv: don't use InputStream in the buffer management code.
  avconv: fix exiting when max frames is reached.
  mpc8: fix maximum bands handling
  aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.

Conflicts:
	Changelog
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/mpc8.c
	libavcodec/v210dec.h
	libavcodec/version.h
	libavcodec/vorbisdec.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fifo.c
	libavfilter/vf_format.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hflip.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 01:08:33 +02:00
Anton Khirnov 803391f719 lavfi: remove request/poll and drawing functions from public API on next bump
They are only useful inside filters and we don't allow user filters for
now.
2012-06-05 09:38:16 +02:00
Anton Khirnov b74a1da49d lavfi: make formats API private on next bump.
It is only useful inside filters and we don't allow user filters for
now.
2012-06-05 09:37:30 +02:00
Stefano Sabatini 0f0f3bd1e0 lavfi: use av_default_item_name() as filter private context logger
avfilter_default_filter_name() is supposed to access an AVFilterContext
struct, if used with a private struct it will cause a crash since it will
access fields which are non defined in the private struct.
2012-06-04 02:40:01 +02:00
Stefano Sabatini 4d6a8a2bdb lavfi: add avfilter_default_filter_name()
The function is modelled after av_default_item_name(), and will print the
name of the instance filter if defined, otherwise the name of the filter.

This allows to show the instance name in the log, which is useful when
debugging complex filter graphs.
2012-06-04 00:54:57 +02:00
Michael Niedermayer d0ad91c258 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  os_support: Define SHUT_RD, SHUT_WR and SHUT_RDWR on OS/2
  http: Add support for reading http POST reply headers
  http: Add http_shutdown() for ending writing of posts
  tcp: Allow signalling end of reading/writing
  avio: Add a function for signalling end of reading/writing
  lavfi: fix comment, audio is supported now.
  lavfi: fix incorrect comment.
  lavfi: remove avfilter_null_* from public API on next bump.
  lavfi: remove avfilter_default_* from public API on next bump.
  lavfi: deprecate default config_props() callback and refactor avfilter_config_links()
  avfiltergraph: smarter sample format selection.
  avconv: rename transcode_audio/video to decode_audio/video.
  asyncts: reset delta to 0 when it's not used.
  x86: lavc: use %if HAVE_AVX guards around AVX functions in yasm code.
  dwt: return errors from ff_slice_buffer_init()

Conflicts:
	ffmpeg.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_blackframe.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_showinfo.c
	libavfilter/video.c
	libavfilter/video.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 21:48:31 +02:00
Anton Khirnov c04c533f62 lavfi: remove avfilter_null_* from public API on next bump.
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.
2012-05-22 21:36:23 +02:00
Stefano Sabatini 126ba1626e lavfi/drawtext: give a new alias "timecode_rate" to the the r/rate option
The option is related to the timecode, the new name clearly specifies the
context. Also it allows to list the option close to the other timecode
options.
2012-05-03 10:29:08 +02:00
Stefano Sabatini eb07f4ccb5 lavfi/drawtext: rename and document variables d_expr and d_pexpr
Use the more expressive names draw_expr and draw_pexpr, also more
consistent.
2012-05-03 10:26:41 +02:00
Stefano Sabatini 65d2b2fbe4 lavfi/drawtext: alphabetically sort the expression parameters 2012-05-03 10:17:57 +02:00
Nicolas George 40b7a27bad vf_drawtext: fontconfig support. 2012-04-10 15:16:47 +02:00
Nicolas George be9b0d2c5a vf_drawtext: fix memory leak of draw expression. 2012-04-10 15:16:12 +02:00
Nicolas George 423047ea31 vf_drawtext: fix memory leak of glyph data. 2012-04-10 15:16:12 +02:00
Nicolas George a63712d37c vf_drawtext: use drawutils. 2012-04-04 16:16:10 +02:00
Lou Logan 2d38081b4f cosmetics: fix some typos
Patch attached.
From 2d4094fc0dcb4ccd0735eb7e1719e228ebb56bb9 Mon Sep 17 00:00:00 2001
From: Lou Logan <lou@lrcd.com>
Date: Mon, 12 Mar 2012 14:13:44 -0800
Subject: [PATCH] cosmetics: fix some typos

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-13 01:14:04 +01:00
Clément Bœsch 4fe5448790 lavfi/drawtext: add 24 hours wrapping option for timecode.
Fixes ticket #1044.
2012-03-12 18:17:02 +01:00
Michael Niedermayer 184fc600e1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo_enc: only allocate output packet when we know there will be output
  Add names for more channel layouts to the channel layout map.
  sunrast: Add a sample request for RMP_RAW colormap.
  avcodec: do not override pts or duration from the audio encoder
  Add prores regression test.
  Enable already existing rso regression test.
  Add regression test for "sox" format muxer/demuxer.
  Add dpx encoding regression test.
  swscale: K&R formatting cosmetics for PowerPC code (part I/II)
  img2: Use ff_guess_image2_codec(filename) shorthand where appropriate.
  Clarify licensing information about files borrowed from libjpeg.
  Mark mutable static data const where appropriate.
  avplay: fix -threads option
  dvbsubdec: avoid undefined signed left shift in RGBA macro
  mlpdec: use av_log_ask_for_sample()
  gif: K&R formatting cosmetics
  png: make .long_name more descriptive
  movdec: Adjust keyframe flagging in fragmented files
  rv34: change most "int stride" into "ptrdiff_t stride".

Conflicts:
	avprobe.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pngenc.c
	libavcodec/x86/v210-init.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_setpts.c
	libavfilter/vf_settb.c
	libavformat/img2.c
	libavutil/audioconvert.c
	tests/codec-regression.sh
	tests/lavf-regression.sh
	tests/ref/lavf/dpx
	tests/ref/vsynth1/prores
	tests/ref/vsynth2/prores

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-22 02:24:18 +01:00
Alex Converse b0f29db5c2 Mark mutable static data const where appropriate. 2012-02-21 09:47:07 -08:00
Michael Niedermayer b479e01612 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Revert "v210enc: use FFALIGN()"
  doxygen: Do not include license boilerplates in Doxygen comment blocks.
  avplay: reset decoder flush state when seeking
  ape: skip packets with invalid size
  ape: calculate final packet size instead of guessing
  ape: stop reading after the last frame has been read
  ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished
  ape: return error if seeking to the current packet fails in ape_read_packet()
  avcodec: Clarify AVFrame member documentation.
  v210dec: check for coded_frame allocation failure
  v210enc: use stride as it is already calculated
  v210enc: use FFALIGN()
  v210enc: return proper AVERROR codes instead of -1
  v210enc: do not set coded_frame->key_frame
  v210enc: check for coded_frame allocation failure
  drawtext: add 'fix_bounds' option on coords fixing
  drawtext: fix text_{w, h} expression vars
  drawtext: add missing braces around an if() block.

Conflicts:
	libavcodec/arm/vp8.h
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/v210dec.c
	libavfilter/vf_drawtext.c
	libavformat/ape.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-07 01:40:29 +01:00
Andrey Utkin e496c45d9b drawtext: add 'fix_bounds' option on coords fixing
Before, drawtext filter deliberately altered given text coordinates if
text didn't fully fit on the picture. This breaks the use case of
scrolling large text, e.g. movie closing credits.
Add 'fix_bounds', to make it usable in such cases (by setting its value to 0).
Default behavior is not changed, and non-fitting text coords are fixed.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 07:57:40 +01:00
Andrey Utkin 2b43dfce36 drawtext: fix text_{w, h} expression vars
Before, {text_,}{w,h} vars hadn't got initialized

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-06 07:52:05 +01:00
Andrey Utkin e7f0bc8c0f drawtext: add missing braces around an if() block.
Prevents uninitialized read.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-05 08:07:55 +01:00
Clément Bœsch f65600d519 drawtext: use new public timecode API. 2012-02-02 14:31:17 +01:00
Clément Bœsch 98aafc5bbf timecode: set a fixed buffer size of 16B for tc string. 2012-01-11 18:14:03 +01:00
Clément Bœsch 940d3cc0b0 drawtext: fix hard dependency to lavc (timecode). 2012-01-02 15:33:56 +01:00
Michael Niedermayer 1a6a088f7c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: whitespace cosmetics
  fate: split off video codec FATE tests into their own file
  fate: split off audio codec FATE tests into their own file
  fate: split off Electronic Arts codec FATE tests into their own file
  fate: split off QuickTime codec FATE tests into their own file
  fate: split off voice codec FATE tests into their own file
  fate: split off demuxer FATE tests into their own file
  cosmetics: Drop unnecessary parentheses around return values.
  fate: drop pointless _audio and _video suffixes from xan tests
  qt-faststart: K&R reformatting; fix comment typos
  FATE: Add test for H.264 MP4->annex.B bitstream filter.

Conflicts:
	ffplay.c
	tests/fate.mak
	tests/fate/h264.mak
	tests/fate/image.mak
	tests/fate/lossless-audio.mak
	tests/fate/lossless-video.mak
	tests/fate/qtrle.mak
	tests/fate/real.mak
	tests/fate/screen.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 01:16:45 +01:00
Diego Biurrun d4b63054d9 cosmetics: Drop unnecessary parentheses around return values. 2011-12-30 22:18:07 +01:00
Stefano Sabatini 1858a5c25e vf_drawtext: select YUV color for drawbox() in case YUV colorspace is used
Fix box alpha rendering when a YUV colorspace is selected, in particular
fix trac ticket #763.
2011-12-24 16:21:40 +01:00
Clément Bœsch 80914cde6f timecode: rename internal ff_* symbols to avpriv_*.
Those functions are shared between libs.

Also fix a typo in function names: smtpe → smpte.
2011-12-12 17:49:34 +01:00
Clément Bœsch fa4e30af7e drawtext: allow burning the timecode. 2011-12-12 17:49:34 +01:00
Michael Niedermayer 8e2bab5d4b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  drawtext: remove typo
  pcm-mpeg: implement new audio decoding api
  w32thread: port fixes to pthread_cond_broadcast() from x264.
  doc: add editor configuration section with Vim and Emacs settings
  dxva2.h: include d3d9.h to define LPDIRECT3DSURFACE9
  avformat/utils: Drop unused goto label.
  doxygen: Replace '\' by '@' in Doxygen markup tags.
  cosmetics: drop some completely pointless parentheses
  cljr: simplify CLJRContext
  drawtext: introduce rand(min, max)
  drawtext: introduce explicit draw/hide variable
  rtmp: Use nb_invokes for all invoke commands

Conflicts:
	libavcodec/mpegvideo.c
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-08 00:23:37 +01:00
Luca Barbato 78212cefe1 drawtext: remove typo
It slipped through the last two iterations.
2011-12-07 20:40:18 +01:00
Luca Barbato f5edfc9e92 drawtext: introduce rand(min, max)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-07 12:11:14 +01:00
Luca Barbato 73585620b8 drawtext: introduce explicit draw/hide variable
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-07 12:11:14 +01:00
Michael Niedermayer dda3d716d6 vf_drawtext: support W/H parameters to reduce UI differences to qatar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-04 15:29:26 +01:00
Michael Niedermayer f88d5df383 vf_drawtext: cosmetics to reduce diff to qatar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-04 02:27:45 +01:00
Michael Niedermayer 297422b338 vf_drawtext: Add main_w/h to improve compatibility with the modified UI
from the fork.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-04 02:08:56 +01:00
Luca Barbato 2cf74eca70 drawtext: make x and y parametric
Introduce variables "E", "PHI", "PI", "main_w"/"W", "main_h"/"H",
"text_w"/"w", "text_h"/"h", "x", "y", "n" and "t" in line with
vf_overlay and refactor the code accordingly.
2011-12-03 01:35:29 +01:00
Luca Barbato ec11ff8407 drawtext: manage memory allocation better
Call dtext_prepare_text as early as possible
Do not draw if the memory allocation failed
2011-12-03 01:35:28 +01:00
Luca Barbato a2fb4bcb01 drawtext: refactor draw_text
Split the memory allocation from the actual drawing.
2011-12-03 01:35:28 +01:00
Clément Bœsch 2f0f9a87d0 Fix various if parenthesis misplacements. 2011-11-21 19:35:33 +01:00
Reimar Döffinger 5af7daabc4 Mark AVFilterPad[] compound literals as const.
GCC 4.6.2 at least still seems to fail to put them in .rodata though,
see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-06 00:05:14 +01:00
Reimar Döffinger d78473334e Add const to static arrays where it was forgotten.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-05 15:37:01 +01:00
Michael Niedermayer 988f585fcb Merge remote-tracking branch 'qatar/master'
* qatar/master: (44 commits)
  replacement Indeo 3 decoder
  gsm demuxer: do not allocate packet twice.
  flvenc: use first packet delay as global delay.
  ac3enc: doxygen update.
  imc: return error codes instead of 0 for error conditions.
  imc: return meaningful error codes instead of -1
  imc: do not set channel layout for stereo
  imc: validate channel count
  imc: check for ff_fft_init() failure
  imc: check output buffer size before decoding
  imc: use DSPContext.bswap16_buf() to byte-swap packet data
  rtsp: add allowed_media_types option
  libgsm: add flush function to reset the decoder state when seeking
  libgsm: simplify decoding by using a loop
  gsm: log error message when packet is too small
  libgsmdec: do not needlessly set *data_size to 0
  gsmdec: do not needlessly set *data_size to 0
  gsmdec: add flush function to reset the decoder state when seeking
  libgsmdec: check output buffer size before decoding
  gsmdec: log error message when output buffer is too small.
  ...

Conflicts:
	Changelog
	ffplay.c
	libavcodec/indeo3.c
	libavcodec/mjpeg_parser.c
	libavcodec/vp3.c
	libavformat/cutils.c
	libavformat/id3v2.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:16:26 +01:00
Diego Biurrun 124e28847b Remove some stray unnecessary ffmpeg references. 2011-11-02 10:42:54 +01:00
Nicolas George a2af901295 vf_drawtext: remove mathematical constants now redundant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 18:08:50 +02:00
Michael Niedermayer f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffplay.c
	ffprobe.c
	libavcodec/ac3dec.c
	libavcodec/h264.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavfilter/vf_drawtext.c
	libavformat/flvdec.c
	libavformat/mpegtsenc.c
	libavformat/options.c
	libavutil/avutil.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Anton Khirnov 145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Stefano Sabatini 9921613e82 vf_drawtext: apply misc style fixes 2011-09-25 22:47:51 +02:00
Stefano Sabatini 80daa247d8 vf_drawtext: do not reset "n" variable to 0 in case the filter is reinited 2011-09-25 22:47:51 +02:00
Stefano Sabatini 87f5e79732 vf_drawtext: use ctx for expressing outlink and dtext in end_frame
(Very) slighly improve readability.
2011-09-24 12:37:12 +02:00
Stefano Sabatini 3de684206e vf_drawtext: perform misc cosmetics changes to uninit
In particular:
* lexically sort strings freeing commands
* logically group freeing instructions
* prefer NULL over 0 when setting dtext->glyphs
2011-09-24 12:37:03 +02:00
Stefano Sabatini 275516f87c vf_drawtext: set string defaults in the options array
Simplify.
2011-09-24 12:36:55 +02:00
Stefano Sabatini 482ce0ce4e vf_drawtext: make x and y options parametric
Address trac issue #378.
2011-09-24 12:36:48 +02:00
Stefano Sabatini 163854bca0 vf_drawtext: drop text wrapping feature
Or in other word, do not go to the next line when the text cannot be
rendered within the frame.

The rationale is that wrapping is hard to manage, as it depends on the
position of the text, thus making hard/impossible to compute the size
occupied by the rendered text, and makes the filter behavior
unpredictible with moving text (implemented in a pending patch).

Also the current wrapping code is very limited (for example it splits
words in the middle), and correctly handling wrapping requires much
more complexity (alignment, gravity, word parsing etc.), while
drawtext is meant to be only a thin wrapper around libfreetype, so
such advanced features don't belong here.
2011-09-24 12:36:39 +02:00
Stefano Sabatini b87d4c2b9f vf_drawtext: do not set limitations on fontsize
It may be needed to use values greater than 72, and in general greater
than an arbitrary big value. Let the user choose what's too big for
her.
2011-09-23 01:35:38 +02:00
Stefano Sabatini 3a87dce6bf vf_drawtext: remove useless and misnamed intermediary "baseline" variable in draw_text() 2011-09-22 00:45:59 +02:00
Stefano Sabatini 500b3210da vf_drawtext: fix background box coloring with RGB formats != RGBA
drawbox() expects a color specified in RGBA format, while the code was
providing a color with the components specified in the same order of
the input pixel format.

In particular, fix box coloring with AXXX RGB formats.
2011-09-22 00:45:59 +02:00
Stefano Sabatini db56a7507e vf_drawtext: prefer int over unsigned int
This avoids overflow errors when the considered x and y values are
negative, as required by the incoming patches.
2011-09-22 00:45:59 +02:00
Michael Niedermayer f1b5693027 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add LATM muxer
  v210enc: clip values according to specifications
  v210enc: switch to PIX_FMT_422P10
  v210dec: switch to PIX_FMT_422P10
  AVOptions: remove AVOption.offset <= 0 checks
  AVOptions: deprecate av_opt_set_defaults2
  AVOptions: move doxy for av_opt_set_defaults() from opt.c to opt.h
  libx264: fix setting some more parameters
  libx264: fix setting the H.264 level
  libx264: add 'direct-pred' private option
  libx264: add 'partitions' private option

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/libx264.c
	libavcodec/v210enc.c
	libavfilter/src_movie.c
	libavformat/version.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 22:58:39 +02:00
Anton Khirnov 79eff91325 AVOptions: deprecate av_opt_set_defaults2
It's a hack which was created to allow for multiple options with
different defaults to refer to same field (e.g. 'b' vs 'ab'). There is
no need for it anymore.
2011-09-07 11:19:43 +02:00
Michael Niedermayer 845383c358 vf_drawtext: always use expanded_text as we always support strftime() now and dont depend on localtime_r() anymore
Found-by: Rolf Siegrist
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 23:13:59 +02:00
Michael Niedermayer 038a465efc vf_drawtext: make strftime work without localtime_r()
modern OS should have localtime_r() or return thread locals on localtime() hopefully

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 05:16:44 +02:00
Michael Niedermayer b881a2e254 vf_drawtext: Fix reinit to allow color changes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-04 20:58:13 +02:00
Michael Niedermayer 595cfdef97 vf_drawtext: add basetime argument to allow specifying the wall clock time of PTS=0
the basetime argument also enables useage of pts instead of time()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-30 23:37:49 +02:00
Michael Niedermayer 3016c7f543 vf_drawtext: fix segfault on reinit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-30 20:25:58 +02:00
Michael Niedermayer f782ce3b4d drawtext: Support changing parameters through reinit command at runtime.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-29 20:16:08 +02:00
Michael Niedermayer 5d1b39f7e7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: clean up library installation rules
  vf_drawtext: Remove some write-only variables.
  libgsm: Drop const qualifier to silence compiler warning.
  docs: Remove needless configure options
  docs: Don't recommend adding --enable-memalign-hack
  libvo-amrwbenc: Add braces to shut up gcc warning.
  adts: Fix PCE copying.

Conflicts:
	configure
	doc/general.texi
	subdir.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-08 01:05:28 +02:00
Diego Biurrun 965fdda015 vf_drawtext: Remove some write-only variables.
libavfilter/vf_drawtext.c:427:22: warning: variable 'dst_pixel' set but not used
libavfilter/vf_drawtext.c:463:22: warning: variable 'dst_pixel' set but not used
2011-07-07 17:32:50 +02:00
Stefano Sabatini 702a62a1c6 drawtext: add braces around initialisers for option defaults
Fix warnings of the type:
vf_drawtext.c:NNN: warning: missing braces around initializer
vf_drawtext.c:NNN: warning: (near initialization for ‘drawtext_options[X].default_val’)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-20 20:54:40 +02:00
Stefano Sabatini 53a715f576 drawtext: reindent after the previous commit
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-20 20:54:40 +02:00
Stefano Sabatini 3fd53defaa drawtext: fix strftime() text expansion
The feature was dropped after the filter was partially rewritten and
recommitted.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-20 20:54:40 +02:00
Mina Nagy Zaki fd2c0a5db2 lavfi: add layout negotiation fields and helper functions. 2011-06-19 22:58:32 +02:00
Diego Biurrun 5ac4952a58 vf_drawtext: Replace FFmpeg by Libav in license boilerplate. 2011-05-31 21:15:49 +02:00
Stefano Sabatini d8c7a21602 drawtext: specify union type for setting default options
Fix warnings of the type:
vf_drawtext.c:NNN: warning: missing braces around initializer
vf_drawtext.c:NNN: warning: (near initialization for ‘drawtext_options[X].default_val’)
2011-05-16 23:50:43 +02:00
Stefano Sabatini e8ea9c2179 drawtext: reindent after the previous commit 2011-05-16 23:50:36 +02:00
Stefano Sabatini ce207e050e drawtext: fix strftime() text expansion
The feature was dropped after the filter was partially rewritten and
recommitted.

Fix issue #207.
2011-05-16 23:50:29 +02:00
Michael Niedermayer c5420f100f drawtext: add shadow support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-07 10:21:56 +02:00
Michael Niedermayer e73127a443 drawtext: factor draw_glyphs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-07 10:21:56 +02:00
Michael Niedermayer a5b81c317e drawtext: fix and optimize yuv blend.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-07 10:21:53 +02:00
Michael Niedermayer 3953a88014 drawtext: get rid of divisions in the inner loop.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-07 10:18:16 +02:00
Michael Niedermayer e74bf3f368 drawtext: simplify chroma blend and fix chroma alpha.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-07 10:18:16 +02:00
Stefano Sabatini a5b64584f3 lavfi: Port drawtext filter by Hemanth from the libavfilter soc repo
With the following additions:
* support to anti-aliased glyph rendering
* support to UTF-8 text and Unicode chars rendering
* support for RGB packed formats
* fix minor errors and typos in the filter description
* extend/clarify examples in the filter description

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-07 10:17:40 +02:00
Anton Khirnov 59ee9f78b0 lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00