Commit Graph

41913 Commits

Author SHA1 Message Date
Niklas Haas 86a60a4dd2 vo_opengl: fix scale=oversample's threshold calculations
This resulted in wrong behavior for values of scale-param1 between 0.0
and 0.5 (not inclusive).
2015-07-23 21:53:03 +02:00
wm4 281c21b7f1 video: don't restrict --vd-lavc-threads to a maximum of 16
Only do it when the number of threads is autodetected, as more than 16
threads are still considered not recommended. (libavcodec prints a
warning.)
2015-07-23 17:17:26 +02:00
wm4 5b47836082 manpage: fix typo 2015-07-23 17:13:37 +02:00
wm4 b492720c7c Revert "vo_opengl: make the size of interpolation textures exact"
This reverts commit fb8d158366.

Reallocating the FBOs on every resize is very slow. It affects resizing
the window, as well as changing the video size itself with e.g.
panscan. Since the original change was done based on a single user
complaint, but the change itself caused a lot of complaints, we decided
to just revert it.
2015-07-22 23:57:09 +02:00
wm4 55879a8c0f cache: make backbuffer size configurable
Allow setting an arbitrary amount, instead of the fixed 50%.

This is nto striclty backwards compatible. The defaults don't change,
but the --cache/--cache-default options now set the readahead portion.
So in practice, users who configured this until now will see the
double amount of cache being used, _plus_ the 75MB default backbuffer
will be in use.
2015-07-22 23:55:10 +02:00
wm4 63d112746d cache: fix backbuffer logic
Currently, this is perfectly equivalent, because back_size is hardcoded
to buffer_size/2. But this fixes the logic for the case the back_size
can be configured freely.
2015-07-22 23:30:05 +02:00
ChrisK2 aeb99f2718 TOOLS: unbreak osxbundle.py
broekn by 739d345d6c
2015-07-21 23:04:06 +02:00
wm4 a357d39369 video: always re-probe auto deint filter on filter reconfig
If filters are disabled or reconfigured, attempt to remove and probe the
deinterlace filter again. This fixes behavior if e.g. a software deint
filter was automatically inserted, and then hardware decoding is enabled
during playback. Without this commit, initializing hw decoding would
fail because of the software filter; with this commit, it'll replace it
with the hw deinterlacer instead.
2015-07-21 21:54:15 +02:00
wm4 e5fac76b3b vf_scale: cleanup log messages
In particular, get rid of the EUSERBROKEN message.
2015-07-20 21:16:37 +02:00
wm4 4a1657da01 vo: minor simplification for queue size handling
Instead of calling it "future frames" and adding or subtracting 1 from
it, always call it "requested frames". This simplifies it a bit.

MPContext.next_frames had 2 added to it; this was mainly to ensure a
minimum size of 2. Drop it and assume VO_MAX_REQ_FRAMES is at least 2;
together with the other changes, this can be the exact size of the
array.
2015-07-20 21:12:46 +02:00
Niklas Haas 6f7d04be21 vo_opengl: add temporal-dither-period option
This was requested multiple times by users, and it's not hard to
implement and/or maintain.
2015-07-20 19:32:58 +02:00
wm4 b11fd7fd2d demux_mkv: remove unnecessary code
This did nothing. It's a leftover from ancient times.
2015-07-20 13:04:06 +02:00
wm4 3252d352c9 demux_mkv: parse FLAC channel layouts
Handle a relatively recently introduced hack, that allows FLAC audio to
have arbitrary channel layouts, instead of just the predefined fixed
ones. This is actually supported by FFmpeg, but since the demuxer
(instead of the decoder) handles this in FFmpeg, we need to add special-
code to our mkv demuxer.

(The way FFmpeg does this seems a bit backwards, since now every demuxer
for a format that can handle FLAC needs to contain this logic as well.)

The FLAC hack is relatively terrible: we need to parse the FLAC headers,
look for a VorbisComment, parse the VorbisComment, and then retrieve
the magic WAVEFORMATEXTENSIBLE_CHANNEL_MASK entry. But the hack is
officially endorsed, as the official FLAC tools use it. (Although I
couldn't find a trace of it in the format specification. Should I be
surprised?)
2015-07-20 12:56:35 +02:00
Niklas Haas b0d1ac93cf vo_opengl: make oversample the default for opengl-hq as well
This was supposed to have changed back when oversample was reintroduced
in 3007250. Fixes #2155.
2015-07-20 09:11:54 +02:00
wm4 253f6f1a95 af_lavrresample: always reinit resampler on filter reinit
This was a minor optimization to potentially avoid resampler
reconfiguration when the filter is reinitialized. But filter
reinitialization is a rare event, and the case when no reconfiguration
is needed is even rarer. As such, this is an unnecessary micro-
optimization and only adds potential for bugs.
2015-07-19 22:54:03 +02:00
wm4 8749900b5f af_lavrresample: don't unnecessarily print remix message
This message bloats verbose log output if e.g. audio speed is frequently
readjusted, such as when syncing audio to video. So don't print the
message if only speed is changed. (This case requires reconfiguration,
but can't change the input/output channel maps.)

Also do not print the message if no remixing is done at all.
2015-07-19 22:50:08 +02:00
Philip Sequeira 2cf019ed70 TOOLS/zsh.pl: die loudly if mpv fails to run 2015-07-19 22:04:45 +02:00
wm4 47a62059a9 vf_vapoursynth: relicense to LGPL 2.1+
This was requested by someone.

All code was written by myself; some minor changes by 2 contributors who
agreed to general LGPL relicensing. 1 line of code is by someone unknown
who possibly wasn't asked (setting the "display_fps" variable), and
which can be reasonably ignored as it makes up only 0.1% of the file.
2015-07-19 00:03:20 +02:00
Stefano Pigozzi 532508823c build: update waf to 1.8.12 2015-07-18 21:37:30 +02:00
deuiore 7984fde8de command: add track-list/N/audio-channels property
Signed-off-by: wm4 <wm4@nowhere>

(With some heavy modifications from the original patch.)
2015-07-18 19:05:25 +02:00
Niklas Haas fb8d158366 vo_opengl: make the size of interpolation textures exact
I still have no idea why this is needed, maybe some weird off-by-one
in some shitty driver? Either way, the difference for a working setup
shouldn't be too major, the most noticeable effect would be somewhat worse
performance when resizing the video during playback with interpolation
enabled using the mouse.

That's a specific enough side effect for me to not care as much about it.

Fixes #1814.
2015-07-18 18:41:12 +02:00
wm4 050c529e9a screenshot: don't write PNG colorspace tags by default
Generates too much discussion and confusion.

Fixes #2051.
2015-07-18 18:33:54 +02:00
wm4 57043d9269 sub: add option for stretching image subtitles to screen
Probably makes users happy who want bitmap subtitles to show up in the
screen margins, and stops them from doing idiotic crap with vf_expand.

Fixes #2098.
2015-07-18 14:36:17 +02:00
wm4 5594333337 av_log: remove dumb shit
It's the user's fault if he/she/it does something that is not
recommended.

Fixes #2110.
2015-07-18 14:21:31 +02:00
wm4 bad3996d85 vo_opengl: cleanup frame reupload logic
There are some situations when redrawing is requested, but the current
frame was deleted. This could happen when switching e.g. hw decoding
mid-stream.

Separate uploading/drawing and fix the condition.
2015-07-17 23:26:06 +02:00
Stefano Pigozzi 7ba403002f build: fix windows compilation after clean
broken since 4730e0aaba
2015-07-17 09:41:09 +02:00
Kevin Mitchell ebdbb4f24c TOOLS: make autodeint detect telecine in parallel
This avoids having to rewind the video for a second telecine detection pass.
2015-07-16 16:14:58 -07:00
wm4 968bd3df3b vo_opengl: refactor queue configuration
Just avoid some code duplication. Also, gl_video_set_options() having a
queue size output parameter is weird at best. While I don't appreciate
that this commit suddenly requires gl_video.c to deal with vo.c directly
in a special case, it's simply the best place to put this function.
2015-07-16 22:43:40 +02:00
wm4 bb9717a630 vo: fix number of future frames
That was 2 too many.

Also fix a documentation comment.
2015-07-16 22:10:08 +02:00
Stefano Pigozzi 4730e0aaba build: make mpv.rc depend on version.h 2015-07-15 15:24:31 +02:00
wm4 15954c36ca vo_opengl: reject future images in different formats
The VO will be provided with future frames even if the format changes
mid-stream. This caused a crash if these frames were actually used (i.e.
interpolation mode was enabled).

Fixes a crash when deinterlacing is toggled during playback, and the
deinterlacer changes the stream format (as it can happen e.g. if the
decoder outputs nv12, which in turn happens with hw decoding).

(On a side note, future frames are always non-NULL. Also, the current
frame is of course always in the correct format.)
2015-07-15 14:59:26 +02:00
wm4 7ef8f457a8 vaapi: destroy derived VAImage after each use
Appears to be required by some hardware. Whatever.
2015-07-15 13:30:32 +02:00
wm4 bc68794acc vo_vaapi: drop unused field 2015-07-15 13:27:38 +02:00
wm4 50bd2807ad vaapi: don't assume vaQueryImageFormats() returns sorted list
vaQueryImageFormats() returns a randomly ordered list - so we shouldn't
assume the first format on the list which works is the best. This
effectively switches to nv12 instead of yuv420p on some drivers.

We handle this by reusing va_to_imgfmt[], and ordering it by preference.
We hardcode that GPUs prefer nv12 pver yuv420p. In theory we could do
complicated probing (allocate dummy surface + use vaDeriveImage on it,
then retrieve the FourCC) - but all things which could break assumption
in the future are not supported yet (like 10 bit or 4:4:4), so this is
fine.
2015-07-15 13:27:25 +02:00
wm4 e3e20f1431 Revert "vaapi: remove vaDeriveImage() code path"
This reverts commit d660e67be9.

Fixes #2123.
2015-07-15 13:15:58 +02:00
wm4 d1c37c0e29 vaapi: allow allocating additional surfaces during decoding
Fixes problems with --vo=opengl:interpolation. The issue here is that
vo_opengl retains more surfaces than what was preallocated for the
decoder. Until now, we just explicitly failed to decode frames for which
no additional surfaces are available. Since modern drivers usually are
fine with not "registering" surfaces before the decoder is created, just
allow allocating additional surfaces if needed.

(We also could probably recreate the HW decoder, since the HW decoder
should be stateless. But let's try to avoid raising the overall
complexity of the code.)
2015-07-15 12:37:28 +02:00
wm4 423a1a0f6c vo_opengl: simplify
After recent changes, there is no reason why gl_video_set_image() should
exist anymore. So merge it back into gl_video_upload_image().
2015-07-15 12:22:49 +02:00
wm4 27708eee81 player: show larger cache sizes in MB on status line 2015-07-14 23:23:23 +02:00
wm4 739d345d6c build: don't make version.sh create version.h by default
You could actually run version.sh, and then the waf build system could
accidentally pick up the generated (and most likely stale) version.h.
2015-07-14 23:11:06 +02:00
Philip Langdale e1ab9b905f vf_vdpaupp: Don't crash when evaluating interlacing of NULL mpi
The interlaced frame test needs to be aware that the input mpi might be
NULL - this happens at the end of a stream when the input frames have
all been submitted but frames still need to be drained from the
decoder.
2015-07-14 11:10:04 +02:00
wm4 f3e8108c78 README: remove dead links to mailing lists
These were deleted due to inactivity.

Fixes #2135.
2015-07-14 00:12:14 +02:00
wm4 176470b906 player: add missing \n to a message 2015-07-13 23:55:26 +02:00
wm4 905d5efded manpage: fix typo
The (...) was closed, but never opened.
2015-07-13 23:52:48 +02:00
wm4 8771838408 sub: call ass_set_fonts() only once
ass_set_fonts() is called by mp_ass_configure_fonts(), which was called
every time a subtitle renderer was initialized. I'm not sure why this
was done - I can't find a good reason, and most likely there's none.

However, it did cause problems with an experimental libass branch. It
crashed some time after switching to a second subtitle track. The branch
will hopefully be merged soon, and it seems unlikely that libass wants
to fix its problems with its ridiculous API (rather it should normalize
its API so that the issue doesn't happen in the first place), so just
apply this change. It makes our code simpler too.
2015-07-13 23:11:54 +02:00
wm4 57efe9089c player: extend --hls-bitrate option
Fixes #2116.
2015-07-13 13:34:58 +02:00
wm4 0d35c78a6c player: put --term-playing-msg in a separate log category
Fixes #1983.
2015-07-13 13:06:09 +02:00
wm4 9b15c99aa1 demux: handle Matroska-style replaygain tags as well
Matroska doesn't follow the usual ReplayGain conventions, and doesn't
distinguish between track/album values.

Fixes #2128.
2015-07-12 19:33:34 +02:00
wm4 f052165dbf demux: refactor replaygain tag handling
For the following commit. Also print the replaygain values in verbose
mode.
2015-07-12 19:31:57 +02:00
Stefano Pigozzi ba525e68c4 bootstrap: change waf primary mirror
Requested by waf's developer. The ftp mirror is going to be closed down in
the short future.
2015-07-12 10:09:50 +02:00
Stefano Pigozzi 78e771554c build: fix version.h creation
Previous code did not retrigger a relink when version.h changed since it
didn't use a waf task.
2015-07-12 10:09:49 +02:00