| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
Conflicts:
DOCS/man/en/options.rst
|
| |
| |
| |
| |
| | |
ffmpeg ticket #1852 is fixed with 425c30dda. This didn't actually happen
in practice.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
This is already done by x11_common.c. Other X11 VOs don't touch the
vo_fs variable directly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Remove the explicit struct mp_csp_details parameters from all related
functions, and use mp_image.colorspace/levels instead.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Purely cosmetic.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
This was sometimes slower, sometimes slightly faster. Remove it.
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
libvo/vo_xv.c
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.)
|
| | |
| | |
| | |
| | |
| | | |
Removing text about things that have been removed from the code long
ago, other fixes.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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 video filter code.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
mp_get_chroma_shift() modifies its argument even if it fails, so we have
to restore that.
mp_image didn't set chroma shifts for yuy2.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes awkward framestepping when seeking with -vo null while paused
(caused because seeking by default draws an OSD bar, and mplayer trying
to redraw the OSD in that case; this logic is actually needed with
vo_xv).
It would have been simpler to just check vo->driver->draw_osd (and leave
that callback to NULL for VOs which don't support OSD), but for now try
to retain the capability to let VOs decide based on the image format
whether to support OSD or not.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Normally, we can redraw the OSD any time. But some drivers don't support
OSD redrawing (vo_null etc.), or only "sometimes" (vo_xv). For that,
some additional logic is needed. Simplify that logic. This might also
fix subtle bugs with the OSD not updating or endless frame stepping in
unforseen corner cases.
Do this by adding a new flag, which tells whether the OSD should be
redrawn.
Remove some minor code duplication.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix the "grammar" of such commands to be hopefully less confusing. Also,
add the "-" for such arguments, which skips optional arguments without
changing their default value.
Also change some mentions of "mplayer" to "mpv".
|
| | |
| | |
| | |
| | |
| | |
| | | |
The new EOSD code suffered from artifacts due to missing setup of a projection
matrix. This commit fixes the problem and uniforms the resize code to the one
driving vo_opengl_old.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"screenshot" now maps to "screenshot subtitles" by default, instead of
"screenshot video". Swap the argument order: the more useful argument
should come first. Remove the compatibility aliases for numeric choices
(e.g. "screenshot 1 0" won't work anymore).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds a new screenshot mode "subtitles", which basically takes the
video frame as decoded, and renders subtitles into it.
This may fail for some pixel formats, because libswscale sucks. If this
becomes ever a real problem, the code could be changed to convert the
image to RGBA first (or whatever the image writer wants), and then
render the subtitles into it. This would avoid the additional image
copy needed with vo_xv too. But for now, it seems better to go with the
current method in the common case: vo_opengl creates an image copy
anyway, and drawing bitmaps to yv12 is better, as no color space
conversion is involved in draw_bmp.c's up/downsampling conversion.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD,
VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT.
Remove draw_osd_with_eosd(), which rendered the OSD by calling
VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes
a callback as argument. (This basically works like the old OSD API,
except multiple OSD bitmap formats are supported and caching is
possible.)
Remove all mentions of "eosd". It's simply "osd" now.
Make OSD size per-OSD-object, as they can be different when using
vf_sub. Include display_par/video_par in resolution change detection.
Fix the issue with margin borders in vo_corevideo.
|
| | |
| | |
| | |
| | | |
If that happens, we silently fail.
|
| | |
| | |
| | |
| | | |
This caches scaled RGBA sub-bitmaps.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do this by replacing all the old vf_ass drawing code by draw_bmp.c.
Change sub.c to always use osd_draw() for the other OSD drawing
routines, and simplify the code a bit.
spudec.c subtitles (i.e. DVD subs) are now considered subtitles, and
are rendered by vf_ass, if that filter is inserted.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes that vo_xv didn't display text subtitles correctly when
using anamorphic video. It didn't pass the aspect information to the
subtitle renderer. Also, try to render OSD correctly with respect to
aspect ratio settings: on vo_xv, the OSD is rendered into the video,
and needs to be "stretched" too when playing anamorphic video. When
the -monitorpixelaspect option is used, even with VOs such as vo_opengl
the OSD has to be rendered with that aspect ratio.
As preparation for future commits, replace the weird vsfilter_scale
value with a somewhat more sensible video_par member.
Also, struct mp_eosd_res is a better place for the aspect ratio
parameters, as OSD needs this too.
Use osd_draw_on_image() directly in vo_lavc, which fixes aspect ratio
issues as well.
|
| | |
| | |
| | |
| | |
| | | |
When demux_demuxers was removed, and -subfile was moved to the frontend,
setting the non_interleaved for -subfile was forgotten.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is to get rid of swscale alignment warnings with the new OSD code.
Only image formats used by it are fixed.
Solving this generally would require some more effort. (Possibly by
using libav's allocation functions plus lots of testing.)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Just to get r |