Revert "aspect: change --video-pan-x/y to be relative to the destination rect"
There are way too many preexisting scripts that rely on this behavior
for video panning, like for example scripts that allow you to use mpv as
an image viewer. If this behavior is desired then it may be better to
add a new option for panning relative to the destination instead.
The restriction of video-pan-x/y being clamped to {-3, 3} also results
in the video being impossible to pan if it was zoomed in beyond a
certain degree.
This reverts commit 7d6f9e3739.
This commit is contained in:
1 parent
022dbfc977
commit
f52056b76d
3 files changed
+4
-3
No files matched your search
@@ -41,7 +41,6 @@ Interface changes
|
||||
- add `playlist-path` and `playlist/N/playlist-path` properties
|
||||
- add `--x11-wid-title` option
|
||||
- add `--libplacebo-opts` option
|
||||
- change `--video-pan-x/y` to be relative to the destination rectangle
|
||||
- add `--audio-file-exts`, `--cover-art-auto-exts`, and `--sub-auto-exts`
|
||||
- change `slang` default back to NULL
|
||||
- remove special handling of the `auto` value from `--alang/slang/vlang` options
|
||||
|
||||
@@ -1546,7 +1546,9 @@ Video
|
||||
|
||||
``--video-pan-x=<value>``, ``--video-pan-y=<value>``
|
||||
Moves the displayed video rectangle by the given value in the X or Y
|
||||
direction. The unit is in fractions of the size of the destination rectangle.
|
||||
direction. The unit is in fractions of the size of the scaled video (the
|
||||
full size, even if parts of the video are not visible due to panscan or
|
||||
other options).
|
||||
|
||||
For example, displaying a video fullscreen on a 1920x1080 screen with
|
||||
``--video-pan-x=-0.1`` would move the video 192 pixels to the left and
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ static void src_dst_split_scaling(int src_size, int dst_size,
|
||||
scaled_src_size = MPMAX(scaled_src_size, 1);
|
||||
align = (align + 1) / 2;
|
||||
|
||||
*dst_start = (dst_size - scaled_src_size) * align + pan * dst_size;
|
||||
*dst_start = (dst_size - scaled_src_size) * align + pan * scaled_src_size;
|
||||
*dst_end = *dst_start + scaled_src_size;
|
||||
|
||||
// Distance of screen frame to video
|
||||
|
||||
Reference in new issue
Block a user