Commit Graph

2699 Commits

Author SHA1 Message Date
Uoti Urpala 7131fceb0b vd_ffmpeg: fix thread count setting with latest ffmpeg-mt
Recent ffmpeg-mt versions changed the API for setting the number of
decoding threads to use (I'm not sure whether dropping backwards
compatibility was intentional or not). As a result only one thread was
used. Make the thread setting compatible with the new API to restore
proper multithreaded decoding.
2011-03-29 18:54:33 +03:00
faust3 676d5401f3 ad_qtaudio: fix use with the libavformat mov demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32863 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-02-15 19:23:52 +02:00
cboesch d037ba7331 vd_mpng: libpng API update, use color type getter
Use color type getter instead of direct access to private member.

Using the getter is mandatory since recent libpng 1.5 release.

Patch by Gianluigi Tiesi (mplayer - netfarm it)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32840 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-02-15 19:14:34 +02:00
michael a353f11132 libmpcodecs/vf_*.c: Replace memalign() by av_malloc()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32834 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix postprocessing and perspective filters on x86-64
(missing libavutil/mem.h include).

Original patch by Reinhard Tartler

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32835 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-02-15 19:12:50 +02:00
Uoti Urpala e1a8392cae fix compilation with old FFmpeg versions
af_lavcac3enc: use old SampleFormat names without AV_ prefix, the
latter were only added in 2010-11

vd_ffmpeg: add ifdef around CODEC_ID_LAGARITH use

demux_real: use ffmpeg_files/intreadwrite.h

stream/http.c, stream/realrtsp/real.c: define AV_BASE64_SIZE macro for
old libavutil versions lacking it
2011-02-08 19:07:10 +02:00
Uoti Urpala 0cb63ea722 ad_ffmpeg: add missing extradata padding
One of two alternative code parts passing codec extradata to
libavcodec didn't add the buffer padding that libavcodec requires,
resulting in invalid reads beoynd allocated memory area. Fix.
2011-02-02 09:13:14 +02:00
Uoti Urpala 7cd7416c73 libmpeg2: drop libmpeg2 support
libavcodec mpeg2 decoder has been the default for a while and seems to
work fine.
2011-02-01 20:10:27 +02:00
Uoti Urpala 626d5ed628 vo_zr2: drop Zoran support
There were multiple files specific to Zoran support, and they also
depended on internal FFmpeg headers (so it would probably have been
hard to get them to compile now even if you tried). It's obsolete now,
so just drop the whole mess.
2011-01-31 16:03:11 +02:00
cehoyos 9a021242a9 codecs.conf, vd_ffmpeg: Enable fflagarith video decoder
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32773 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-01-31 16:03:10 +02:00
diego 42ed53f221 libfaad2:/ Remove forked internal libfaad2 copy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32741 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove AAC/FAAD2 installation instructions.

There is nothing special about building and installing FAAD2, so there is
no longer a need to keep maintaining instructions for it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32742 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-01-31 16:00:58 +02:00
Uoti Urpala f50f34245e Merge branch 'sub'
* sub:
  sub/OSD: move some related files to sub/
  subtitles: options: enable -ass by default
  subtitles: change default libass rendering style
  demux_mkv, chapters: change millisecond arithmetic to ns
  cleanup: rename ass_* functions to mp_ass_*
  subs: use correct font aspect ratio for libass + converted subs
  cleanup: some random minor code simplification and cleanup
  vf_vo: fix EOSD change detection bug
  sd_ass: remove subreader use, support plaintext markup
  subtitles: style support for common SubRip tags and MicroDVD
  core: ordered chapters: fix bad subtitle parameter
  subs/demux: don't try to enable sub track when creating it
  subtitles/demux: store duration instead of endpts in demux packets
  subtitles: add framework for subtitle decoders
  options: add special -leak-report option
  subtitles: remove code trying to handle text subs with libavcodec
  cleanup: move MP_NOPTS_VALUE definition to mpcommon.h
  subtitles: move global ass_track to struct osd_state
  core: move most mpcommon.c contents to mplayer.c
  core: move global "subdata" and "vo_sub_last" to mpctx
  subtitles: remove sub_last_pts hack
  options: move -noconfig to option struct, simplify
2011-01-26 20:42:15 +02:00
Uoti Urpala c9026cb321 sub/OSD: move some related files to sub/ 2011-01-26 20:39:05 +02:00
Uoti Urpala a248c2c7a1 cleanup: rename ass_* functions to mp_ass_*
The various ass_* functions were created when libass was part of the
MPlayer tree and the distinction between MPlayer-specific and other
functions was less clear. Now that libass is a clearly separate
library, using the same ass_* namespace for player functions is ugly.
Rename the functions to use mp_ass_ prefix instead.
2011-01-26 20:39:04 +02:00
Uoti Urpala 966340b31a subs: use correct font aspect ratio for libass + converted subs
Rendering of ASS subtitles tries to be bug compatible with VSFilter
and stretches fonts when the video is anamorphic (some scripts try to
compensate for this VSFilter behavior, so trying to render them
"correctly" would give the wrong result). However this behavior is not
appropriate for subtitles we converted to ASS format ourselves for
libass rendering, as they certainly don't have VSFilter bug
workarounds. Change the code to use different behavior for "native"
ASS tracks and converted ones. It's questionable whether the
VSFilter-compatible behavior is appropriate for external .ass files
either, as there could be anamorphic and non-anamorphic versions of
the same video and the bug-compatible behavior can only be correct for
one alternative at most. However it's probably better to keep it as a
default at least, so that extracting a muxed subtitle track and using
that does not give behavior different from the original muxed one.

The aspect ratio setting is per ASS_Renderer, and changing it resets
libass caches. For that reason this commit adds separate renderer
instances to use for the "correct" and "VSFilter bug compatible"
cases.
2011-01-26 20:38:53 +02:00
Uoti Urpala 8612c771fc cleanup: some random minor code simplification and cleanup 2011-01-26 13:04:17 +02:00
Clément Bœsch 69fdb30400 mp_msg: Remove uses of MSGT_MENCODER
Some of the code that could run outside MEcoder used MSGT_MENCODER.
Replace those with appropriate MSGT_ types.
2011-01-25 03:15:18 +02:00
Clément Bœsch 83f37b54de cleanup: remove unused MEncoder-related code
Remove some code and variables that were no longer used after MEncoder
removal. Also remove some MEncoder references in comments.
2011-01-25 02:29:31 +02:00
Uoti Urpala 6d65f6889a vf_vo: fix EOSD change detection bug
vf_vo had code setting its prev_visibility variable correctly, then a
line that overrode the value just set with an incorrect one. Remove
the wrong extra line. As a result of the bug the "contents changed"
indicator wasn't forced to true when switching from a subtitle track
to "no track" and then back. A visible effect was at least that a
currently visible static subtitle disappeared when doing that switch
back and forth.
2011-01-18 16:54:52 +02:00
Uoti Urpala e9022ec470 cleanup: move MP_NOPTS_VALUE definition to mpcommon.h 2011-01-15 18:45:43 +02:00
Uoti Urpala adedee4285 subtitles: move global ass_track to struct osd_state 2011-01-15 18:45:43 +02:00
Uoti Urpala 4a26b4c024 cosmetics: remove unused code, small formatting tweaks 2010-12-20 06:42:04 +02:00
Uoti Urpala 2bc2399797 vd_ffmpeg: set thread count to number of cores on machine by default
Make "-lavdopts threads=0" mean an autodetected number of threads, and
make that the default value of the option. Also increase the upper
limit of the option from 8 to 16. Add new file osdep/numcores.c which
tries to determine the number of cores available on the machine.

numcores.c is based (heavily modified) on public domain numcpus.c by
Philip Willoughby <pgw99@doc.ic.ac.uk>, downloaded from
http://csgsoft.doc.ic.ac.uk/numcpus/
2010-12-20 05:53:28 +02:00
reimar 05fa96c6dc ad_faad: fix crash when used on an empty audio stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32706 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar c11757c5af ad_speex: improve timestamp handling
Improve speex codec pts handling, make audio timestamps work reasonably
even with the native demuxer as long as seeking is not done.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32704 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar 8a0f074043 vd_ffmpeg: fix MP_IMGTYPE selection for non-ref non-B frames
Change direct rendering buffer allocation code to treat non-ref frames
like B-frames even if has_b_frames is not set and they are indeed not
B-frames (no reordering). Treating it as an I/P frame would violate
the assumptions of MPlayer's buffering system, which thinks only the
latest previous I/P frame is needed (in addition to one possibly being
decoded). In this case the previous I/P frame will still be needed in
the future, not the non-ref frame being decoded now.

This happens with flv files, as in bug #1079, and this change fixes that
corruption.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32700 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar ad14401720 vd_ffmpeg: Reset ctx->vo_initialized to 0 on a resolution change
Otherwise we might think the filter chain/vo is ready when it
actually is not, leading to a crash.
Fixes crash part of bug 1156.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32690 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:18 +02:00
reimar d34257b5a3 ad_speex: Fix possible memory leaks on error
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32689 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:18 +02:00
reimar e987cba69d vd_qtvideo: Do not dump image description by default
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32656 b3059339-0415-0410-9bf9-f77b7e298cf2

Reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32657 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 04:57:18 +02:00
reimar 970d02c791 vf_stereo3d: Properly support src/dst stride
Patch by Endre Kollár [taxy443 gmail com]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32626 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove unused struct element.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32627 b3059339-0415-0410-9bf9-f77b7e298cf2

Indicate that stereo3d can now handle strides properly.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32628 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 03:35:19 +02:00
reimar 0569269887 vf_stereo3d: Adjust d_height instead of bad ad-hoc scaling
Patch by Endre Kollár [taxy443 gmail com]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32625 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 03:32:27 +02:00
Uoti Urpala 90d8bbb225 ad_liba52: fix -a52drc handling
Custom values other than 0 were ignored. Fix.
2010-11-23 00:44:37 +02:00
Uoti Urpala 37dbe7f5d0 demux_mkv, ad_ffmpeg: use Matroska OutputSamplingFrequency if available
Use the value of the OutputSamplingFrequency element instead of the
SamplingFrequency element as the "container samplerate". In most cases
this only removes a warning, as those typically differ for SBR AAC
files and there was already a special case detecting this in
ad_ffmpeg.

The implementation adds a new "container_out_samplerate" field to the
sh_audio struct. Reusing the existing "samplerate" field and the
equivalent inside the 'wf' struct and just setting those to the new
value instead would probably work (at least I'm not aware of any codec
that would need the original SamplingFrequency for initialization).
However using a separate field also avoids some ugliness: the 'wf'
struct may not exist (though most demuxers create it), and the
'samplerate' field is overwritten to reflect the final value decided
by codec when decoding is first initialized.
2010-11-21 14:52:08 +02:00
cboesch fe3c4810e1 cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 13:11:20 +02:00
Uoti Urpala a4ce95de81 core: do initial A-V sync by modifying audio stream
Add code to enforce matching pts with video when (re)starting the
audio stream, by either cutting away the first samples or inserting
silence at the beginning. New option -noinitial-audio-sync can be used
to disable this and return to old behavior.
2010-11-13 19:46:02 +02:00
reimar f1e637b827 vd_ffmpeg: compare IMGFMT instead of PIX_FMT
Use IMGFMT to compare instead of PIX_FMT to avoid issues with the
"JPEG" formats like PIX_FMT_YUVJ422P.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32594 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:11 +02:00
reimar 1d99051c59 ad_faad: Make work with -demuxer lavf
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32586 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:11 +02:00
reimar 5c3a8c76df ad_ffmpeg: Handle EAGAIN, needed for LATM to work properly with demux_ts
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32583 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:45 +02:00
reimar fd3d5aa9c6 vf_scale: accept all non-hw-accel formats we know a PIX_FMT for
Make scale filter accept all non-hardware-acceleration input formats
we know a PIX_FMT_* for.
It is possible we will not have a conversion for some of these formats,
but since it will just fail differently this approach is better since
it avoids having to expand the explicit list continuously.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32576 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:35 +02:00
reimar 98a6088a20 video: simplify some tests with a new IMGFMT_IS_HWACCEL macro
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32575 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:35 +02:00
Uoti Urpala d707da9e65 build: enable vf_geq if libavutil version installs eval.h
New enough libavutil versions allow building vf_geq.c without
requiring internal FFmpeg headers.
2010-11-06 23:29:07 +02:00
reimar c69e262a62 vf_stereo3d: Add stereo3d filter
Further review very welcome, but it is time (and good enough) to add this.

Patch by Gordon Schmidt [gordon.schmidt s2000.tu-chemnitz de] with
changes by Endre Kollár [taxy443 gmail com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32527 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 07:48:40 +02:00
reimar 64ab2402e2 vd_ffmpeg: improve aspect ratio handling
Respect container aspect first if available, but change to ratio based
on video codec level information if there's a resolution or pixel
aspect change from the original codec values in the middle of the
video.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32525 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 07:48:40 +02:00
reimar b9ab864eec vd_qtvideo: fix crash on OS X with QuickTime
Do not call Setup_FS_Segment if the QuickTime framework is used on OSX
for decoding, even if the loader code is compiled in.
There is no point in it and since Setup_LDT_Keeper is not called before
it will actually crash on OSX due to the auto-alloc functionality not
being initialized and thus it will try to set fs to 0xffffffff.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32486 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:37 +02:00
reimar db90a65d11 Remove remaining %lf printf conversions
Most cases are just code in comments.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32438 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
cehoyos ee77268087 vf_yadif: modify asm to make compile with clang
Explicit wordlength for compare. Fixes compile with clang.

Patch by İsmail Dönmez, ismail namtrac org

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32437 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
Uoti Urpala 6335de8621 libaf: add opts pointer to struct af_stream 2010-11-02 04:18:07 +02:00
Uoti Urpala 4c92247437 ad_libdca: fix assert failure on -channels >6
The decoder had an assert from back when max channels was 6, causing a
crash if the user specified -channels 7 or -channels 8. Change the
decoder to behave as if -channels 6 had been specified in that case
instead.
2010-11-02 04:18:07 +02:00
Uoti Urpala 4de0369e8d options: move audio_output_channels, audio_output_format to struct 2010-11-02 04:18:07 +02:00
Uoti Urpala c5e462b33d build: enable/disable all FFmpeg libraries together
Enable all of libavcodec, libavformat, libswscale, and libpostproc
together (libavutil is always required).

based on svn commit by diego:

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:55 +02:00
Uoti Urpala 389c32b5c7 Remove MEncoder
Disable MEncoder compilation and remove files used by MEncoder
only. There's no attempt to remove all references to MEncoder from the
build system, documentation etc at this point.

Removed files: (muxers, audio/video encoders, misc)

mencoder.c
cfg-mencoder.h
parser-mecmd.[ch]
xvid_vbr.[ch]
libmpdemux/muxer*
libmpcodecs/ae*
libmpcodecs/ve*
libmpcodecs/native/rtjpegn.[ch]
libmpcodecs/native/mmx.h   // was used by rtjpegn only

Rationale:

MEncoder is still useful for some people, but there's not much
potential for further development; in the long run almost all use
cases can be handled better by solutions based on something else (for
example using FFmpeg or encoding MPlayer output). FFmpeg is already
getting video filtering support which should work for some common
MEncoder uses.

Keeping MEncoder working takes extra work that is away from player
development. While that amount of work is not huge (mostly MEncoder
can be just ignored), it's not completely insignificant either.

MEncoder is still maintained to some degree in the svn tree, so if
necessary it's possible to use it from there for now. This tree has
never had major improvements for the MEncoder side, so using svn
MEncoder instead should be no major loss.
2010-11-02 04:16:55 +02:00