summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 2 of 2)wm42012-11-12250-1187/+1171
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-12278-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* mpv_identify: stop using \n; fix property name handlingRudolf Polzer2012-11-121-2/+5
| | | | | Dashes are not valid in shell variable names. This changes them to underscores.
* vo_opengl: fix compatibility with OpenGL 2.1wm42012-11-122-0/+11
| | | | | | | | | | | | | | | | | The srgb_compand() function passes bvec to mix(), which is apparently not available on GL 2.1 / GLSL 1.20: 0:0(0): error: no matching function for call to `mix(vec3, vec3, bvec3)' 0:0(0): error: candidates are: float mix(float, float, float) 0:0(0): error: vec2 mix(vec2, vec2, vec2) 0:0(0): error: vec3 mix(vec3, vec3, vec3) 0:0(0): error: vec4 mix(vec4, vec4, vec4) 0:0(0): error: vec2 mix(vec2, vec2, float) 0:0(0): error: vec3 mix(vec3, vec3, float) 0:0(0): error: vec4 mix(vec4, vec4, float) Also add back disabling color management on older GL, as the srgb_compand() function is needed for that.
* vo_opengl: fix srgb for subtitlesnand2012-11-112-8/+21
| | | | | | | | | | | | | | Based on a patch by nand. This is needed, because sRGB mode changes the video over-all gamma. This has to be done for subtitles as well. The final srgb_compand() call in the OSD shader compensates for the fact that in ed8fad729d04 framebuffer use was replaced with doing sRGB conversion manually by srgb_compand(). This only affects subtitles rendered with libass. Nothing is changed for RGB subs. Also change the USE_ flags for OSD shaders to USE_OSD_ to make the difference between video and OSD rendering more apparent.
* vo_xv: don't call vo_xv_get_eq() on every framewm42012-11-111-7/+17
| | | | | | | This was done to query the colorspace for sub/OSD rendering. A single vo_xv_get_eq() call probably requires a dozens of round-trips (depending what xlib actually does). This likely wasn't a real problem, but it might be better to be paranoid about this.
* example.conf: remove some useless options, add some useful oneswm42012-11-111-45/+10
|
* vo_opengl: disable extended downscaling by defaultwm42012-11-112-2/+1
| | | | | | | | 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.
* Replace fast_memcpy() useswm42012-11-1114-38/+27
| | | | | | | 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.
* manpage: vo_opengl: document that srgb subopt changes gammawm42012-11-111-1/+2
|
* vo_opengl: add manual sRGB companding to not artifact when ditheringnand2012-11-112-14/+11
| | | | | | 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.)
* cocoa_common: honor the `--geometry` optionStefano Pigozzi2012-11-102-1/+11
|
* ao_coreaudio: signal per-application mixer supportStefano Pigozzi2012-11-081-0/+1
| | | | | | | | 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.
* demux_mkv: TTA supportKovensky2012-11-082-1/+15
| | | | | | | | | | | | | | | | | 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.
* demux_mkv: don't crash on tracks with unknown audio codecswm42012-11-083-5/+2
| | | | | Demuxers can't remove streams anymore after adding them, so the free_sh_audio() call caused a crash.
* Port several python scripts to PerlKovensky2012-11-0812-489/+1407
| | | | | | | | | | | | 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.
* vd_ffmpeg: disable codec direct rendering and slices by defaultwm42012-11-074-2/+4
| | | | | | | | | | | | | | | 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.
* osxbundle: run install_name_tool -id only on direct dependenciesStefano Pigozzi2012-11-061-15/+14
| | | | | | | 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).
* cocoa_common: save vo struct earlier in the startup processStefano Pigozzi2012-11-051-1/+1
| | | | This prevents a crash with -fs option.
* libav_compat: fix mmx2 define, provide fallback for avcodec_free_frameStefano Pigozzi2012-11-036-6/+12
|
* libav_compat: add missing includesStefano Pigozzi2012-11-031-0/+3
|
* make compile with recent libavStefano Pigozzi2012-11-034-14/+46
|
* uncrustify af.hStefano Pigozzi2012-11-021-76/+77
| | | | used `uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace libaf/af.h`
* audio: untypedef af_streamStefano Pigozzi2012-11-024-31/+30
|
* audio: untypedef af_cfgStefano Pigozzi2012-11-025-8/+8
|
* audio: untypedef af_instanceStefano Pigozzi2012-11-0228-155/+154
|
* audio: untypedef af_infoStefano Pigozzi2012-11-0225-53/+52
|
* audio: untypedef af_data and rename it to mp_audioStefano Pigozzi2012-11-0228-192/+191
| | | | this is to have something specular to mp_image
* configure: detect rst2man binary nameStefano Pigozzi2012-11-022-2/+8
|
* encode: bail out on missing A or V streamRudolf Polzer2012-11-012-3/+18
| | | | | | | | | 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.
* Merge branch 'osd_changes' into masterwm42012-11-0180-5084/+3339
|\ | | | | | | | | Conflicts: DOCS/man/en/options.rst
| * draw_bmp: remove swscale bug workaroundwm42012-11-011-3/+1
| | | | | | | | | | ffmpeg ticket #1852 is fixed with 425c30dda. This didn't actually happen in practice.
| * VO: remove code duplication for setting up mp_osd_reswm42012-11-016-188/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * vo_vdpau: remove unneeded assignment to vo_fswm42012-11-011-3/+0
| | | | | | | | | | This is already done by x11_common.c. Other X11 VOs don't touch the vo_fs variable directly.
| * vo_opengl, vo_opengl_old: remove -wid/viewport special casewm42012-11-012-13/+1
| | | | | | | | | | | | | | | | | | 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.
| * image_writer: add dump_png() function as debugging helperwm42012-11-012-0/+10
| |
| * screenshot: remove hack for passing anamorphic image sizewm42012-11-0110-41/+33
| | | | | | | | | | | | | | | | | | | | 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.
| * screenshot: let VOs pass colorspace information via mp_imagewm42012-11-0110-15/+19
| | | | | | | | | | | | | | | | | | 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.
| * screenshot, draw_bmp: use colorspace passed with mp_imagewm42012-11-0112-92/+137
| | | | | | | | | | Remove the explicit struct mp_csp_details parameters from all related functions, and use mp_image.colorspace/levels instead.
| * mp_image: add fields to pass colorspace down the filter chainwm42012-10-286-1/+51
| | | | | | | | | | | | Note that this also adds a RGB colorspace for general symmetry. The frontend (colormatrix property and options) and mp_get_yuv2rgb_coeffs() don't support this.
| * mp_image: use uint8_t instead of unsigned char for plane pointerswm42012-10-281-1/+2
| | | | | | | | Purely cosmetic.
| * csputils: better support for integer color valueswm42012-10-284-9/+27
| |
| * draw_bmp, csputils: use function instead of macrowm42012-10-284-37/+12
| |
| * draw_bmp: cosmetics, refactorwm42012-10-283-434/+332
| | | | | | | | | | | | | | | | | | | | | | Mostly pedantic bikeshedding issues. Move some code around, so that the sub_bitmap_to_mp_images() function can be split into two parts. This is better than having a big function with many input and outputs, of which only half are used in each code path. Also, try to make code simpler by using a mp_rect type.
| * mpcommon: add mp_rect typewm42012-10-271-0/+5
| |
| * draw_bmp: remove CONDITIONAL2 codewm42012-10-241-25/+0
| | | | | | | | This was sometimes slower, sometimes slightly faster. Remove it.
| * Merge branch 'master' into osd_changeswm42012-10-2441-435/+1389
| |\ | | | | | | | | | | | | Conflicts: libvo/vo_xv.c
| * | vo_lavc: never draw OSDwm42012-10-241-1/+1
| | | | | | | | | | | | | | | | | | This guarantees that only subtitles are drawn. (Before this change, we relied on the fact that OSD is only visible on user interaction, or if explicitly request with --osd-level.)
| * | manpage: cleanupwm42012-10-246-214/+96
| | | | | | | | | | | | | | | Removing text about things that have been removed from the code long ago, other fixes.
| * | options: remove --ffactor switchwm42012-10-247-21/+2
| | | | | | | | | | | | | | | | | | | | | This controlled the generation of the palette for DVD subs if no palette was found. The option name and description is confusing, and it was probably barely useful. Remove the option, and hardcode the behavior to the option's default value.
| * | options: remove --subfont-autoscale (changes default font scale)wm42012-10-246-44/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code for this option attempted to emulate the old as-documented behavior. It wasn't very good at it, and now that the old OSD code has been removed, it's entirely pointless. This removes the factor 1.7 with which --subfont-text-scale was multiplied.
| * | options: remove subtitle related options that did nothingwm42012-10-246-61/+5
| | | | | | | | | | | | | | | | | | | | | Most of these cased working when the OSD was switched to libass, or didn't do anything even before that. Also don't recursively include subreader.h in sub.h.
| * | draw_bmp: fix IMGFMT_BGR32 useRudolf Polzer2012-10-241-9/+15
| | |
| * | sub: add clarifying commentswm42012-10-241-1/+3
| | |
| * | core: disable vf_sub auto-insertionwm42012-10-243-48/+1
| | | | | | | | | | | | | | | | | | | | | Since most VOs support rendering subs directly, this doesn't change much. Changes include: vo_null is faster, vo_image doesn't add subtitles by default (while vo_lavc does), vo_caca doesn't render subs (but you couldn't read them anyway).
| * | VF: rename vf_ass to vf_subwm42012-10-247-30/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reflects the fact that this filter now renders all types of subtitles, not just ASS subtitles. Always compile this filter, not just on CONFIG_ASS. Note that --no-ass still disables auto-inserting this filter. It's the only way to disable auto-insertion, so keep it even though it's not really ASS specific anymore. --no-ass also disables using libass for rendering text subs directly.
| * | vo_corevideo: add screenshot capabilityStefano Pigozzi2012-10-245-40/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added screenshot capability to the corevideo VO by sending back the raw data from the CVPixelBuffer. Also added "screenshot window" functionality from the other OpenGL based VOs, which uses glReadPixels to read image data back. This was moved to gl_common to avoid duplication.
| * | screenshot: hack against w/width confusionwm42012-10-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct mp_image has two sets of size members: width/height and w/h. It's not even sure which one of these is the ACTUAL dimension, and which is the "stored" or "visible" dimension. vf_get_image() (a core function for video filters) does something confusing with the sizes, and often sets up cropped versions of other filter's image buffers. The screenshot code uses w/h to store the display size for anamorphic video, while width/height is the size of the pixel data. The draw_bmp.c code, as well as sws_utils.c, always use w/h for the size of the pixel data. It's an unholy mess, and the screenshot code potentially breaks it even more. Work that around with a hack, until we hopefully clean up mp_image and the vide