1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00
Commit Graph

34203 Commits

Author SHA1 Message Date
wm4
e2eaedcb0a vo_opengl: disable extended downscaling by default
To simplify implementation, the same filter kernel was used for both
directions, even when the scaling factors were different. It turns
out that people actually did this, and that the resulting rendering
errors were rather visible. Disable this feature by default, as
fixing it would require structural changes, and it's a useless anyway.
2012-11-11 18:02:07 +01:00
wm4
eb6688724c Replace fast_memcpy() uses
fast_memcpy, defined in fastmemcpy.h, used to be mplayer's "optimized"
memcpy. It has been removed from this fork, and fast_memcpy has been
reduced to an alias for memcpy. Replace all remaining uses of the
fast_memcpy macro alias.
2012-11-11 17:56:42 +01:00
wm4
34649dbd1d manpage: vo_opengl: document that srgb subopt changes gamma 2012-11-11 17:56:42 +01:00
nand
ed8fad729d vo_opengl: add manual sRGB companding to not artifact when dithering
Patch by nand. Modified not to use macros in the GLSL, and also remove
the checks for framebuffer presence. (Disabling ICC if no sRGB
framebuffer is available was probably a bug.)
2012-11-11 17:56:42 +01:00
Stefano Pigozzi
c78243c03e cocoa_common: honor the --geometry option 2012-11-10 22:37:19 +01:00
Stefano Pigozzi
05650110f3 ao_coreaudio: signal per-application mixer support
The CoreAudio AO's AOCONTROL_GET_VOLUME/AOCONTROL_SET_VOLUME operate on the
AUHAL's volume, and every application has it's AUHAL with a separate volume.

Additionally CoreAudios's mixer seems to be better. As much as I tried to, I
couldn't get it to clip sounds.
2012-11-08 23:52:35 +01:00
Kovensky
d53d75e080 demux_mkv: TTA support
Code from libavformat's demuxer.

Merged by wm4. It looks like the byte stream writer API is private in
newer ffmpeg, so use the macros from <libavutil/intreadwrite.h>
instead.

It's not really known how to correctly set the field that is used by
the decoder to calculate the length of the last frame. The original
patch used:

    put_le32(&b, (demuxer->movi_end - demuxer->movi_start) * sh_a->samplerate);

This doesn't seem to be correct. Write 0 instead. This is also
incorrect, but better than writing an essentially random value.
2012-11-08 01:39:32 +01:00
wm4
ed2c54cea9 demux_mkv: don't crash on tracks with unknown audio codecs
Demuxers can't remove streams anymore after adding them, so the
free_sh_audio() call caused a crash.
2012-11-08 00:32:49 +01:00
Kovensky
fae7307931 Port several python scripts to Perl
file2string.pl and vdpau_functions.pl are direct ports.
matroska.py was reimplemented as the Parse::Matroska module in CPAN,
and matroska.pl was made a client of Parse::Matroska.
A copy of Parse::Matroska is included in TOOLS/lib, and matroska.pl
looks there first when trying to load the module.

osxbundle.py was not ported since I have no means to verify it.
Python is always available on OSX though, so there is no harm in
removing the check for it on configure.
2012-11-08 00:28:59 +01:00
wm4
58f821e096 vd_ffmpeg: disable codec direct rendering and slices by default
This caused failures when doing single threaded decoding in some cases.
It's unknown what exactly the reasons are for these failures, but
direct rendering is probably worthless anyway.

Disable slices by default as well, just to be sure not to invoke broken
code paths. Multithreading disables these too.

The old behavior can be restored by passing the -dr1 -slices command
line options. (-dr1 is left undocumented intentionally.)

Multithreaded decoding worked fine, because vd_ffmpeg.c automatically
disables direct rendering in this case.
2012-11-07 23:29:55 +01:00
Stefano Pigozzi
a20c9576be osxbundle: run install_name_tool -id only on direct dependencies
It looks like that only `install_name_tool -change` must be applied
recursively. This allows to bundle up all our stuff without thinkering with
the Mach-O headerpad size (which could even be impossible for libraries we
don't compile and link ourselves).
2012-11-06 00:06:16 +01:00
Stefano Pigozzi
3043690756 cocoa_common: save vo struct earlier in the startup process
This prevents a crash with -fs option.
2012-11-05 22:03:15 +01:00
Stefano Pigozzi
e6a6a60276 libav_compat: fix mmx2 define, provide fallback for avcodec_free_frame 2012-11-03 18:22:56 +01:00
Stefano Pigozzi
6e6fc03828 libav_compat: add missing includes 2012-11-03 15:50:15 +01:00
Stefano Pigozzi
f79b08bf57 make compile with recent libav 2012-11-03 12:17:13 +01:00
Stefano Pigozzi
11173115bb uncrustify af.h
used `uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace libaf/af.h`
2012-11-02 19:20:03 +01:00
Stefano Pigozzi
593e433cc8 audio: untypedef af_stream 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
30f3b537b2 audio: untypedef af_cfg 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
c9b5954851 audio: untypedef af_instance 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
596e12fcb2 audio: untypedef af_info 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
0374ddb79d audio: untypedef af_data and rename it to mp_audio
this is to have something specular to mp_image
2012-11-02 19:19:28 +01:00
Stefano Pigozzi
e0aef8cf12 configure: detect rst2man binary name 2012-11-02 14:37:02 +01:00
Rudolf Polzer
538baaef6e encode: bail out on missing A or V stream
In mplayer2, it was valid to try to start encoding before all streams
were initialized. mpv avoids this situation and thus allows us to
properly bail out on some kinds of failures.

Also, this commit fixes a missing check in ao uninit which could cause
heap corruption when ao initialization did not complete.
2012-11-01 12:29:55 +01:00
wm4
84829a4ea1 Merge branch 'osd_changes' into master
Conflicts:
	DOCS/man/en/options.rst
2012-11-01 02:12:47 +01:00
wm4
e45dd051c3 ao_alsa: make code less confusing
The call snd_pcm_hw_params_alloca(&alsa_hwparams) expands to a macro,
which actually uses alloca(), and stores its result to alsa_hwparams.
At the same time, alsa_hwparams was a global variable for no good
reason. Make it less confusing and move the variables into the init()
function, where they are needed.
2012-11-01 02:12:18 +01:00
wm4
741ab39510 stream: open_stream_plugin() should set error code on failure
clang analyzer complained about *ret (&r) containing garbage in
open_stream_full(). This should fix it.
2012-11-01 02:12:18 +01:00
wm4
e57802a39f gl_common: add dummy initialization
The uninitialized values are passed through some functions, but will be
eventually unused. Initialize them anyway to avoid potential undefined
behavior and for clarity.
2012-11-01 02:12:18 +01:00
wm4
fc656c6bcc ad_spdif: don't print uninitialized value in debug message 2012-11-01 02:12:18 +01:00
wm4
c6ce1d4b99 gl_common: make glFmt2bpp() abort on unknown formats
None of its callers actually checked the return value, and it's a given
that they call it only if it can't fail. Replace the non-sense return
value (0) by a call to abort().
2012-11-01 02:12:18 +01:00
wm4
c59a80b77c vf: fix NULL pointer issue
"mpi" was accessed right after the if block, that checked that mpi is
not NULL. Either the check is uneeded, or the access to "mpi" always
crashes. Just move the access inside the checked block.
2012-11-01 02:12:18 +01:00
wm4
1809cbcc90 input: minor simplification 2012-11-01 02:12:18 +01:00
wm4
cb77400006 vd: minor simplification 2012-11-01 02:12:18 +01:00
wm4
9643590889 m_option: minor simplification
Relict of mplayer's C89 compatibility?
2012-11-01 02:12:18 +01:00
wm4
bba1edfca5 vo_x11: remove dead assignment 2012-11-01 02:12:18 +01:00
wm4
29cc099297 mplayer: remove useless timer calls
GetTimer() has no side-effects. Probably left over from --benchmark
removal.
2012-11-01 02:12:18 +01:00
wm4
826c19f706 parser-mpcmd: minor simplification
Note that we don't care that mpv prints "fatal error" as exit reason
when help was requested and printed (e.g. "mpv -h").
2012-11-01 02:12:18 +01:00
wm4
2b35fc13ed http: fix potential NULL pointer issue
Found by clang analyzer. This called strlen(NULL), if the uri field
in the http_hdr wasn't set. It seems all callers of this function set
the field properly, so remove the bogus fallback to "/".
2012-11-01 02:12:17 +01:00
wm4
73f866e7eb tl_matroska: fix NULL pointer issue
Found by clang analyzer. Probably doesn't matter in practice, because
the number of entries was 0 when entries was NULL.
2012-11-01 02:12:17 +01:00
wm4
0212d7e804 http: fix potential NULL pointer issue
Found by clang analyzer. Untested.
2012-11-01 02:12:17 +01:00
Uoti Urpala
02daf37328 demux_mkv: fix a hang with invalid files
ebml_read_length() could return a negative value (as uint64_t though)
at EOF, and this would then make ebml_read_skip() seek backwards. This
could lead to an infinite loop at EOF with corrupt files. Add an extra
check to make ebml_read_length() return EBML_UINT_INVALID instead if
EOF is hit in the middle of parsing.
2012-11-01 02:12:17 +01:00
wm4
c5eeac6654 manpage: --codecpath was removed 2012-11-01 02:12:16 +01:00
wm4
f4069259cf draw_bmp: remove swscale bug workaround
ffmpeg ticket #1852 is fixed with 425c30dda. This didn't actually happen
in practice.
2012-11-01 02:07:46 +01:00
wm4
6f408d0d9d VO: remove code duplication for setting up mp_osd_res
vo_opengl, vo_vdpau, vo_direct3d had the code for setting up mp_osd_res
duplicated. Make things simpler by making calc_src_dst_rects() setup
the full mp_osd_res structure, instead of just "borders".

Also, rename that function to vo_get_src_dst_rects(), and make it use
mp_rect. Remove vo_rect, which was annoying because it contains
redundant members (width/height additional to right/bottom).

Add code to print the video rect etc. in verbose mode.

There should be no actual change how the video rects are calculated. The
only exception are the bottom/right subtitle margins, which are now
computed slightly differently, but that shouldn't matter.
2012-11-01 02:07:46 +01:00
wm4
3466057feb vo_vdpau: remove unneeded assignment to vo_fs
This is already done by x11_common.c. Other X11 VOs don't touch the
vo_fs variable directly.
2012-11-01 02:07:46 +01:00
wm4
8afa8c1ce5 vo_opengl, vo_opengl_old: remove -wid/viewport special case
For reasons unknown to me, vo_gl had a special case for when the -wid
option (slave mode embedding) and -geometry was used. This adjusted the
viewport in a way different from normal operation. It's unknown what
this was needed for (if it's sane at all), but since no other VOs use
this special case, and since we broke slave mode compatibility anyway,
remove it.
2012-11-01 02:07:46 +01:00
wm4
caa64363c5 image_writer: add dump_png() function as debugging helper 2012-11-01 02:07:45 +01:00
wm4
c62efc52c6 screenshot: remove hack for passing anamorphic image size
With anamorphic video (display with non-1:1 PAR, e.g. DVD), the display
size was passed using the mp_image fields w/h, which was blatantly
incorrect. w/h are the normal image dimensions, while width/height are
the "uncropped" storage size (used internally by vf.c).

Add a display_w/h, and use that for the display size. Make all VOs that
can do screenshots use it.
2012-11-01 02:07:45 +01:00
wm4
738aeb1c60 screenshot: let VOs pass colorspace information via mp_image
This removes the hack that screenshot_save() got the colorspace
information from the decoder. Instead, require the VOs to set the
colorspace information on the mp_images used to pass around the
screenshot data. This is more correct, as the image may have been
converted/modified in the video filter chain, although there's
nothing yet in the video filter chain which does this correctly.
2012-11-01 02:07:45 +01:00
wm4
9ba52ea6ef screenshot, draw_bmp: use colorspace passed with mp_image
Remove the explicit struct mp_csp_details parameters from all related
functions, and use mp_image.colorspace/levels instead.
2012-11-01 02:07:45 +01:00
reimar
83f8d34a07 demux_ts: remove some incorrect usages of realloc_struct
Remove some incorrect usages of realloc_struct.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35318 b3059339-0415-0410-9bf9-f77b7e298cf2
2012-10-31 22:46:40 +01:00