New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage pixels on bottom of video when using interpolation. #1814

Closed
sora-chan opened this Issue Apr 14, 2015 · 36 comments

Comments

Projects
None yet
5 participants
@sora-chan

sora-chan commented Apr 14, 2015

1428967685875

Hardware decoding is disabled, only happens when using interpolation, only noticed it now because of non-native aspect ratio.
No warning or error messages are printed to terminal.

vo=opengl:scale=ewa_lanczossharp:scale-antiring=0.9:cscale=ewa_lanczossharp:cscale-antiring=0.9:dscale=mitchell:fbo-format=rgb32f:target-trc=bt.1886:target-prim=bt.709:sigmoid-upscaling:interpolation:tscale=mitchell:tscale-antiring=0.9:dither-depth=auto:swapinterval=1:linear-scaling:blend-subtitles:pbo:temporal-dither

@haasn

This comment has been minimized.

Member

haasn commented Apr 14, 2015

Can you post a log with -v, please?

This would most likely be fixed by making the interpolation FBO non-fuzzy, but I'd like to figure out why that is the case - since making it non-fuzzy has other disadvantages.

@haasn

This comment has been minimized.

Member

haasn commented Apr 23, 2015

Ping? @akemi-san

@sora-chan

This comment has been minimized.

sora-chan commented Apr 26, 2015

Sorry, forgot.
Here's log:

[cplayer] Command line options: '/hd1/Grisaia no Kajitsu/[Chihiro]_Grisaia_no_Kajitsu_-_03_[720p_Hi10P_AAC][8A955E90].mkv' '-v'
[cplayer] mpv git-f0bc16a (C) 2000-2015 mpv/MPlayer/mplayer2 projects
[cplayer]  built on 2015-04-24T07:03:20
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       54.20.100
[cplayer]    libavcodec      56.26.100
[cplayer]    libavformat     56.25.101
[cplayer]    libswscale      3.1.101
[cplayer]    libavfilter     5.11.102
[cplayer]    libswresample   1.1.100
[cplayer] 
[cplayer] Configuration: ./waf configure --enable-zsh-comp --enable-drm
[cplayer] List of enabled features: alsa asm atomics audio-input avcodec-chroma-pos-api avframe-metadata avframe-skip-samples build-date caca cdda cplayer debug-build dlopen drm dvbin dvdnav dvdread enca encoding fchmod gl gl-wayland gl-x11 glibc-thread-name glob iconv jack jpeg ladspa lcms2 libass libass-osd libav libavdevice libavfilter libbluray libbs2b libdl libguess libm librt libsmbclient libswresample libv4l2 linux-fstatfs lua nanosleep optimize oss-audio oss-audio-native posix posix-or-mingw posix-spawn pthreads pulse pvr rand48 resampler rsound shm stdatomic subprocess termios tv tv-v4l2 vaapi vaapi-glx vaapi-hwaccel vaapi-vpp vapoursynth vapoursynth-core vapoursynth-lazy vdpau vdpau-gl-x11 vdpau-hwaccel videodev vt.h wayland x11 xext xinerama xrandr xss xv zlib zsh-comp
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'mpv.conf|config'
[global]     -> '/home/REDACTED/.mpv/mpv.conf'
[cplayer] Reading config file /home/REDACTED/.mpv/mpv.conf
[cplayer] Setting option 'hwdec' = 'no' (flags = 4)
[cplayer] Setting option 'vo' = 'opengl:scale=ewa_lanczossharp:scale-antiring=0.9:cscale=ewa_lanczossharp:cscale-antiring=0.9:dscale=mitchell:fbo-format=rgb16f:target-trc=bt.1886:target-prim=bt.709:sigmoid-upscaling:interpolation:tscale=mitchell:tscale-antiring=0.9:dither-depth=auto:swapinterval=1:linear-scaling:blend-subtitles:source-shader=~/.mpv/deband.glsl:pbo:temporal-dither:scaler-resizes-only' (flags = 4)
[cplayer] Setting option 'framedrop' = 'vo' (flags = 4)
[cplayer] Setting option 'vf' = 'hqdn3d' (flags = 4)
[cplayer] Setting option 'audio-channels' = 'downmix' (flags = 4)
[cplayer] Setting option 'contrast' = '10' (flags = 4)
[cplayer] Setting option 'brightness' = '-5' (flags = 4)
[cplayer] Setting option 'gamma' = '5' (flags = 4)
[cplayer] Setting option 'saturation' = '50' (flags = 4)
[cplayer] Setting option 'demuxer-mkv-subtitle-preroll' = '' (flags = 4)
[cplayer] Setting option 'ass-force-style' = 'Kerning=yes' (flags = 4)
[cplayer] Setting option 'ytdl' = 'yes' (flags = 4)
[cplayer] Setting option 'ytdl-format' = 'bestvideo+bestaudio/best' (flags = 4)
[cplayer] Setting option 'ao' = 'alsa:resample=no:mixer-device=disabled' (flags = 4)
[cplayer] Setting option 'volume' = '10' (flags = 4)
[cplayer] Setting option 'softvol-max' = '1000' (flags = 4)
[cplayer] Setting option 'sub-auto' = 'exact' (flags = 4)
[cplayer] Setting option 'screenshot-format' = 'png' (flags = 4)
[cplayer] Setting option 'script-opts' = 'osc-layout=bottombar' (flags = 4)
[cplayer] Setting option 'stop-screensaver' = '' (flags = 4)
[cplayer] Setting option 'v' = '' (flags = 8)
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'input.conf'
[input] Falling back on default (hardcoded) input config
[osc] Loading script @osc.lua...
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'scripts'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'lua'
[osc] loading mp.defaults
[osc] loading @osc.lua
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'lua-settings/osc.conf' -> '(NULL)'
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading @osc.lua.
[ytdl_hook] Loading script @ytdl_hook.lua...
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'scripts'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'lua'
[ytdl_hook] loading mp.defaults
[ytdl_hook] loading @ytdl_hook.lua
[cplayer] Run command: hook_add, flags=0, args=[on_load, 1, 10]
[cplayer] Done loading @ytdl_hook.lua.
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'scripts'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config file: 'lua'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'watch_later/26F82550BA7170B3C09A6586C0EEC24D' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'watch_later' -> '/home/REDACTED/.mpv/watch_later'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'watch_later/26F82550BA7170B3C09A6586C0EEC24D' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'watch_later' -> '/home/REDACTED/.mpv/watch_later'
[cplayer] Playing: /hd1/Grisaia no Kajitsu/[Chihiro]_Grisaia_no_Kajitsu_-_03_[720p_Hi10P_AAC][8A955E90].mkv
[cplayer] Running hook: ytdl_hook/on_load
[cplayer] Run command: hook_ack, flags=0, args=[on_load]
[file] Opened: /hd1/Grisaia no Kajitsu/[Chihiro]_Grisaia_no_Kajitsu_-_03_[720p_Hi10P_AAC][8A955E90].mkv
[cache] Cache size set to 150000 KiB
[demux] Trying demuxer: disc (force-level: normal)
[demux] Trying demuxer: edl (force-level: normal)
[demux] Trying demuxer: cue (force-level: normal)
[demux] Trying demuxer: rawaudio (force-level: normal)
[demux] Trying demuxer: rawvideo (force-level: normal)
[demux] Trying demuxer: tv (force-level: normal)
[demux] Trying demuxer: libass (force-level: normal)
[demux] Trying demuxer: mkv (force-level: normal)
[mkv] Found the head...
[mkv] + a segment...
[mkv] /---- [ parsing seek head ] ---------
[mkv] \---- [ parsing seek head ] ---------
[mkv] |+ segment information...
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 1419.960s
[mkv] | + segment uid 99 cd 29 f9 be f5 ac 6a b8 85 ff 5e ce e7 53 f7
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Name: Grisaia no Kajitsu 03
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Display width: 1280
[mkv] |   + Display height: 544
[mkv] |   + Pixel width: 1280
[mkv] |   + Pixel height: 544
[mkv] |  + Codec ID: V_MPEG4/ISO/AVC
[mkv] |  + CodecPrivate, length 46
[mkv] |  + Language: jpn
[mkv] |  + Default duration: 41.708ms ( = 23.976 fps)
[mkv] | + a track...
[mkv] |  + Track number: 2
[mkv] |  + Name: AAC LC 2.0
[mkv] |  + Track type: Audio
[mkv] |  + Audio track
[mkv] |   + Sampling frequency: 48000.000000
[mkv] |   + Channels: 2
[mkv] |  + Codec ID: A_AAC
[mkv] |  + CodecPrivate, length 2
[mkv] |  + Language: jpn
[mkv] |  + Default duration: 21.333ms ( = 46.875 fps)
[mkv] | + a track...
[mkv] |  + Track number: 3
[mkv] |  + Track type: Subtitle
[mkv] |  + Codec ID: S_TEXT/ASS
[mkv] |  + CodecPrivate, length 3999
[mkv] /---- [ parsing attachments ] ---------
[mkv] Attachment: Calibri.ttf, application/x-truetype-font, 811052 bytes
[mkv] Attachment: Casper Bold Italic.ttf, application/x-truetype-font, 145000 bytes
[mkv] Attachment: Casper Bold.ttf, application/x-truetype-font, 143764 bytes
[mkv] Attachment: DFGHSMincho-W9.ttf, application/x-truetype-font, 3026324 bytes
[mkv] Attachment: Franco Normal.ttf, application/x-truetype-font, 44304 bytes
[mkv] Attachment: HattoriHanzo-LightItalic.OTF, application/vnd.ms-opentype, 36616 bytes
[mkv] Attachment: Set Fire to the Rain.TTF, application/x-truetype-font, 36452 bytes
[mkv] Attachment: Timeless-Normal.TTF, application/x-truetype-font, 61212 bytes
[mkv] \---- [ parsing attachments ] ---------
[mkv] /---- [ parsing chapters ] ---------
[mkv] New edition 0
[mkv] Default edition flag: 0
[mkv] Chapter 0 from 00:00:00.000 to 00:00:00.000, Prologue
[mkv] Chapter 1 from 00:03:11.942000000 to 00:00:00.000, Opening
[mkv] Chapter 2 from 00:04:41.990000000 to 00:00:00.000, Part A
[mkv] Chapter 3 from 00:10:18.993000000 to 00:00:00.000, Part B
[mkv] Chapter 4 from 00:22:04.949000000 to 00:00:00.000, Ending
[mkv] Chapter 5 from 00:23:34.997000000 to 00:00:00.000, Preview
[mkv] \---- [ parsing chapters ] ---------
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[mkv] Aspect: 2.352941
[demux] Detected file format: Matroska
[cache] blocking for STREAM_CTRL 8
[cache] blocking for STREAM_CTRL 8
[find_files] Loading external files in /hd1/Grisaia no Kajitsu/
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'sub/' -> '(NULL)'
[cplayer]  (+) Video --vid=1 'Grisaia no Kajitsu 03' (h264)
[cplayer]  (+) Audio --aid=1 --alang=jpn (*) 'AAC LC 2.0' (aac)
[cplayer]  (+) Subs  --sid=1 --slang=eng (*) (ass)
[cplayer] File tags:
[cplayer]  Title: Grisaia no Kajitsu 03
[cplayer] [V] fourcc:0x31637661  size:1280x544  fps:23.976
[vo/opengl] Setting option 'scale' = 'ewa_lanczossharp' (flags = 0)
[vo/opengl] Setting option 'scale-antiring' = '0.9' (flags = 0)
[vo/opengl] Setting option 'cscale' = 'ewa_lanczossharp' (flags = 0)
[vo/opengl] Setting option 'cscale-antiring' = '0.9' (flags = 0)
[vo/opengl] Setting option 'dscale' = 'mitchell' (flags = 0)
[vo/opengl] Setting option 'fbo-format' = 'rgb16f' (flags = 0)
[vo/opengl] Setting option 'target-trc' = 'bt.1886' (flags = 0)
[vo/opengl] Setting option 'target-prim' = 'bt.709' (flags = 0)
[vo/opengl] Setting option 'sigmoid-upscaling' = '' (flags = 0)
[vo/opengl] Setting option 'interpolation' = '' (flags = 0)
[vo/opengl] Setting option 'tscale' = 'mitchell' (flags = 0)
[vo/opengl] Setting option 'tscale-antiring' = '0.9' (flags = 0)
[vo/opengl] Setting option 'dither-depth' = 'auto' (flags = 0)
[vo/opengl] Setting option 'swapinterval' = '1' (flags = 0)
[vo/opengl] Setting option 'linear-scaling' = '' (flags = 0)
[vo/opengl] Setting option 'blend-subtitles' = '' (flags = 0)
[vo/opengl] Setting option 'source-shader' = '~/.mpv/deband.glsl' (flags = 0)
[vo/opengl] Setting option 'pbo' = '' (flags = 0)
[vo/opengl] Setting option 'temporal-dither' = '' (flags = 0)
[vo/opengl] Setting option 'scaler-resizes-only' = '' (flags = 0)
[vo/opengl/wayland] failed to connect to a wayland server: check if a wayland compositor is running
[vo/opengl/x11] X11 opening display: :0
[vo/opengl/x11] X11 running at 3520x1080 (":0" => local display)
[vo/opengl/x11] Detected wm supports NetWM.
[vo/opengl/x11] Detected wm supports FULLSCREEN state.
[vo/opengl/x11] Detected wm supports ABOVE state.
[vo/opengl/x11] Detected wm supports BELOW state.
[vo/opengl/x11] Display 0 (DVI-0): [0, 0, 1920, 1080] @ 60.000000 FPS
[vo/opengl/x11] Display 1 (DVI-1): [1920, 0, 3520, 900] @ 60.000000 FPS
[vo/opengl/x11] Current display FPS: 60.000000
[vo/opengl] GLX chose FB config with ID 0x88403d90
[vo/opengl] GLX chose visual with ID 0x219
[vo/opengl] GL_VERSION='3.0 Mesa 10.6.0-devel (git-125574d)'
[vo/opengl] Detected desktop OpenGL 3.0.
[vo/opengl] GL_VENDOR='X.Org'
[vo/opengl] GL_RENDERER='Gallium 0.4 on AMD BARTS'
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='1.30'
[vo/opengl] OpenGL legacy compat. found.
[vo/opengl] Detected OpenGL features:
[vo/opengl]   - Framebuffers
[vo/opengl]   - VAOs
[vo/opengl]   - Float textures
[vo/opengl]   - RG textures
[vo/opengl]   - 1D textures
[vo/opengl]   - 3D textures
[vo/opengl]   - debugging extensions
[vo/opengl] 16 bit texture depth: 16.
[vo/opengl] Display depth: R=8, G=8, B=8
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Assuming 60.000000 FPS for framedrop.
[vd] Container reported FPS: 23.976025
[vf] Opening video filter: [hqdn3d]
[hqdn3d] Using libavfilter for 'hqdn3d'
[vd] Codec list:
[vd]     lavc:h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     lavc:h264_vdpau (h264) - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)
[vd] Opening video decoder lavc:h264
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]
[vo/opengl/x11] Disabling screensaver.
[ad] Codec list:
[ad]     lavc:aac - AAC (Advanced Audio Coding)
[ad] Opening audio decoder lavc:aac
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac]
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[sub] Subtitle filter chain: ass (ass)
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts.conf' -> '(NULL)'
[libass] Setting up fonts...
[libass] Done.
[cplayer] Starting playback...
[af] Adding filter lavrresample 
[af] Audio filter chain:
[af]   [in] 48000Hz stereo 2ch floatp
[af]   [lavrresample] 48000Hz downmix 2ch floatp
[af]   [out] 48000Hz downmix 2ch floatp
[af]   [ao] 48000Hz downmix 2ch floatp
[ao] Trying preferred audio driver 'alsa'
[ao/alsa] Setting option 'resample' = 'no' (flags = 0)
[ao/alsa] Setting option 'mixer-device' = 'disabled' (flags = 0)
[ao/alsa] requested format: 48000 Hz, downmix channels, floatp
[ao/alsa] using ALSA version: 1.0.29
[ao/alsa] opening device 'default'
[ao/alsa] Got supported channel map: stereo (type FIXED)
[ao/alsa] Got supported channel map: quad (type FIXED)
[ao/alsa] Got supported channel map: 5.1(alsa) (type FIXED)
[ao/alsa] Got supported channel map: 7.1(alsa) (type FIXED)
[ao/alsa] trying to set ALSA channel map: FL FR
[ao/alsa] channel map reported by ALSA: FL FR
[ao/alsa] which we understand as: stereo
[ao/alsa] which is what we requested.
[ao/alsa] got buffersize=12288 samples
[ao/alsa] got period size 1024
[ao/alsa] device buffer: 12288 samples.
[ao/alsa] using soft-buffer of 12288 samples.
[cplayer] AO: [alsa] 48000Hz stereo 2ch float
[cplayer] AO: Description: ALSA audio output
[af] Removing filter lavrresample 
[af] Adding filter lavrresample 
[af] Audio filter chain:
[af]   [in] 48000Hz stereo 2ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float
[hqdn3d] lavfi: create graph: 'hqdn3d=0.000000:0.000000:0.000000:0.000000'
[ffmpeg] src: w:1280 h:544 pixfmt:yuv420p10le tb:1/1000000 fr:0/1 sar:1/1 sws_param:
[ffmpeg] Parsed_hqdn3d_0: ls:4.000000 cs:3.000000 lt:6.000000 ct:4.500000
[vf] Video filter chain:
[vf]   [vd] 1280x544 yuv420p10 bt.709/limited CL=mpeg2/4/h264
[vf]   [in] 1280x544 yuv420p10 bt.709/limited CL=mpeg2/4/h264
[vf]   [hqdn3d] 1280x544 yuv420p10 bt.709/limited CL=mpeg2/4/h264
[vf]   [out] 1280x544 yuv420p10 bt.709/limited CL=mpeg2/4/h264
[cplayer] VO: [opengl] 1280x544 yuv420p10
[cplayer] VO: Description: Extended OpenGL Renderer
[vo/opengl/x11] not waiting for MapNotify
[vo/opengl] Resize: 1280x543
[vo/opengl] Window size: 1280x543
[vo/opengl] Video source: 1280x544 (1280x544)
[vo/opengl] Video display: (0, 0) 1280x544 -> (1, 0) 1277x543
[vo/opengl] Video scale: 0.997656/0.998162
[vo/opengl] OSD borders: l=1 t=0 r=2 b=0
[vo/opengl] Video borders: l=1 t=0 r=2 b=0
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Testing user-set FBO format (0x881b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] Texture for plane 0: 1280x544
[vo/opengl] Texture for plane 1: 640x272
[vo/opengl] Texture for plane 2: 640x272
[vo/opengl] Reinit rendering.
[vd] set video colors gamma=5 
[vd] set video colors brightness=-5 
[vd] set video colors contrast=10 
[vd] set video colors saturation=50 
[global] user path: '~/.mpv/deband.glsl' -> '/home/REDACTED/.mpv/deband.glsl'
[file] Opened: /home/REDACTED/.mpv/deband.glsl
[vo/opengl] Create FBO: 640x272
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] // chroma merging
[vo/opengl] [  2] vec4 color = vec4(texture(texture1, texcoord1).r, texture(texture2, texcoord2).r, 0.0, 1.0);
[vo/opengl] [  3] color.rg *= 64.061584;
[vo/opengl] Create FBO: 640x272
[vo/opengl] recompiling a shader program:
[vo/opengl] header:
[vo/opengl] [  1] // vim: set ft=glsl:
[vo/opengl] [  2] 
[vo/opengl] [  3] // roughly corresponds to f3kdb parameters, which this algorithm is
[vo/opengl] [  4] // loosely inspired by
[vo/opengl] [  5] #define threshold 48
[vo/opengl] [  6] #define range     16
[vo/opengl] [  7] #define grain     24
[vo/opengl] [  8] 
[vo/opengl] [  9] float rand(vec2 co){
[vo/opengl] [ 10]     return fract(sin(dot(co.yx, vec2(12.9898,78.233))) * 43758.5453);
[vo/opengl] [ 11] }
[vo/opengl] [ 12] 
[vo/opengl] [ 13] vec4 sample(sampler2D tex, vec2 pos, vec2 tex_size)
[vo/opengl] [ 14] {
[vo/opengl] [ 15]     // Compute a random angle and distance
[vo/opengl] [ 16]     float dist = rand(pos + vec2(random)) * range;
[vo/opengl] [ 17]     vec2 pt = dist / image_size;
[vo/opengl] [ 18]     float dir = rand(pos.yx - vec2(random)) * 6.2831853;
[vo/opengl] [ 19]     vec2 o = vec2(cos(dir), sin(dir));
[vo/opengl] [ 20] 
[vo/opengl] [ 21]     // Sample at quarter-turn intervals around the source pixel
[vo/opengl] [ 22]     vec4 ref[4];
[vo/opengl] [ 23]     ref[0] = texture(tex, pos + pt * vec2( o.x,  o.y));
[vo/opengl] [ 24]     ref[1] = texture(tex, pos + pt * vec2(-o.y,  o.x));
[vo/opengl] [ 25]     ref[2] = texture(tex, pos + pt * vec2(-o.x, -o.y));
[vo/opengl] [ 26]     ref[3] = texture(tex, pos + pt * vec2( o.y, -o.x));
[vo/opengl] [ 27] 
[vo/opengl] [ 28]     // Average and compare with the actual sample
[vo/opengl] [ 29]     vec4 avg = cmul*(ref[0] + ref[1] + ref[2] + ref[3])/4.0;
[vo/opengl] [ 30]     vec4 col = cmul*texture(tex, pos);
[vo/opengl] [ 31]     vec4 diff = abs(col - avg);
[vo/opengl] [ 32] 
[vo/opengl] [ 33]     // Use the average if below the threshold
[vo/opengl] [ 34]     col = mix(avg, col, greaterThan(diff, vec4(threshold/16384.0)));
[vo/opengl] [ 35] 
[vo/opengl] [ 36]     // Add some random noise to the output
[vo/opengl] [ 37]     vec3 noise = vec3(rand(2*pos + vec2(random)),
[vo/opengl] [ 38]                       rand(3*pos + vec2(random)),
[vo/opengl] [ 39]                       rand(4*pos + vec2(random)));
[vo/opengl] [ 40]     col.rgb += (grain/8192.0) * (noise - vec3(0.5));
[vo/opengl] [ 41]     return col;
[vo/opengl] [ 42] }
[vo/opengl] body:
[vo/opengl] [  1] // custom source-shader (chroma)
[vo/opengl] [  2] vec4 color = sample(texture1, texcoord1, texture_size1);
[vo/opengl] [  3] color.ba = vec2(0.0, 1.0);
[vo/opengl] Create FBO: 1280x544
[vo/opengl] recompiling a shader program:
[vo/opengl] header:
[vo/opengl] [  1] // vim: set ft=glsl:
[vo/opengl] [  2] 
[vo/opengl] [  3] // roughly corresponds to f3kdb parameters, which this algorithm is
[vo/opengl] [  4] // loosely inspired by
[vo/opengl] [  5] #define threshold 48
[vo/opengl] [  6] #define range     16
[vo/opengl] [  7] #define grain     24
[vo/opengl] [  8] 
[vo/opengl] [  9] float rand(vec2 co){
[vo/opengl] [ 10]     return fract(sin(dot(co.yx, vec2(12.9898,78.233))) * 43758.5453);
[vo/opengl] [ 11] }
[vo/opengl] [ 12] 
[vo/opengl] [ 13] vec4 sample(sampler2D tex, vec2 pos, vec2 tex_size)
[vo/opengl] [ 14] {
[vo/opengl] [ 15]     // Compute a random angle and distance
[vo/opengl] [ 16]     float dist = rand(pos + vec2(random)) * range;
[vo/opengl] [ 17]     vec2 pt = dist / image_size;
[vo/opengl] [ 18]     float dir = rand(pos.yx - vec2(random)) * 6.2831853;
[vo/opengl] [ 19]     vec2 o = vec2(cos(dir), sin(dir));
[vo/opengl] [ 20] 
[vo/opengl] [ 21]     // Sample at quarter-turn intervals around the source pixel
[vo/opengl] [ 22]     vec4 ref[4];
[vo/opengl] [ 23]     ref[0] = texture(tex, pos + pt * vec2( o.x,  o.y));
[vo/opengl] [ 24]     ref[1] = texture(tex, pos + pt * vec2(-o.y,  o.x));
[vo/opengl] [ 25]     ref[2] = texture(tex, pos + pt * vec2(-o.x, -o.y));
[vo/opengl] [ 26]     ref[3] = texture(tex, pos + pt * vec2( o.y, -o.x));
[vo/opengl] [ 27] 
[vo/opengl] [ 28]     // Average and compare with the actual sample
[vo/opengl] [ 29]     vec4 avg = cmul*(ref[0] + ref[1] + ref[2] + ref[3])/4.0;
[vo/opengl] [ 30]     vec4 col = cmul*texture(tex, pos);
[vo/opengl] [ 31]     vec4 diff = abs(col - avg);
[vo/opengl] [ 32] 
[vo/opengl] [ 33]     // Use the average if below the threshold
[vo/opengl] [ 34]     col = mix(avg, col, greaterThan(diff, vec4(threshold/16384.0)));
[vo/opengl] [ 35] 
[vo/opengl] [ 36]     // Add some random noise to the output
[vo/opengl] [ 37]     vec3 noise = vec3(rand(2*pos + vec2(random)),
[vo/opengl] [ 38]                       rand(3*pos + vec2(random)),
[vo/opengl] [ 39]                       rand(4*pos + vec2(random)));
[vo/opengl] [ 40]     col.rgb += (grain/8192.0) * (noise - vec3(0.5));
[vo/opengl] [ 41]     return col;
[vo/opengl] [ 42] }
[vo/opengl] body:
[vo/opengl] [  1] // chroma scaling
[vo/opengl] [  2] #define tex texture1
[vo/opengl] [  3] vec2 pos = texcoord1;
[vo/opengl] [  4] vec2 size = texture_size1;
[vo/opengl] [  5] vec2 pt = vec2(1.0) / size;
[vo/opengl] [  6] vec4 color = vec4(0.0);
[vo/opengl] [  7] {
[vo/opengl] [  8] vec2 fcoord = fract(pos * size - vec2(0.5));
[vo/opengl] [  9] vec2 base = pos - fcoord * pt;
[vo/opengl] [ 10] vec4 c;
[vo/opengl] [ 11] float w, d, wsum = 0.0;
[vo/opengl] [ 12] vec4 lo = vec4(1.0);
[vo/opengl] [ 13] vec4 hi = vec4(0.0);
[vo/opengl] [ 14] // scaler samples
[vo/opengl] [ 15] d = length(vec2(-1, -3) - fcoord)/3.238315;
[vo/opengl] [ 16] if (d < 1.0) {
[vo/opengl] [ 17] w = texture1D(lut, d).r;
[vo/opengl] [ 18] wsum += w;
[vo/opengl] [ 19] c = texture(tex, base + pt * vec2(-1, -3));
[vo/opengl] [ 20] color += vec4(w) * c;
[vo/opengl] [ 21] }
[vo/opengl] [ 22] d = length(vec2(0, -3) - fcoord)/3.238315;
[vo/opengl] [ 23] if (d < 1.0) {
[vo/opengl] [ 24] w = texture1D(lut, d).r;
[vo/opengl] [ 25] wsum += w;
[vo/opengl] [ 26] c = texture(tex, base + pt * vec2(0, -3));
[vo/opengl] [ 27] color += vec4(w) * c;
[vo/opengl] [ 28] }
[vo/opengl] [ 29] d = length(vec2(1, -3) - fcoord)/3.238315;
[vo/opengl] [ 30] if (d < 1.0) {
[vo/opengl] [ 31] w = texture1D(lut, d).r;
[vo/opengl] [ 32] wsum += w;
[vo/opengl] [ 33] c = texture(tex, base + pt * vec2(1, -3));
[vo/opengl] [ 34] color += vec4(w) * c;
[vo/opengl] [ 35] }
[vo/opengl] [ 36] d = length(vec2(2, -3) - fcoord)/3.238315;
[vo/opengl] [ 37] if (d < 1.0) {
[vo/opengl] [ 38] w = texture1D(lut, d).r;
[vo/opengl] [ 39] wsum += w;
[vo/opengl] [ 40] c = texture(tex, base + pt * vec2(2, -3));
[vo/opengl] [ 41] color += vec4(w) * c;
[vo/opengl] [ 42] }
[vo/opengl] [ 43] d = length(vec2(-2, -2) - fcoord)/3.238315;
[vo/opengl] [ 44] if (d < 1.0) {
[vo/opengl] [ 45] w = texture1D(lut, d).r;
[vo/opengl] [ 46] wsum += w;
[vo/opengl] [ 47] c = texture(tex, base + pt * vec2(-2, -2));
[vo/opengl] [ 48] color += vec4(w) * c;
[vo/opengl] [ 49] }
[vo/opengl] [ 50] d = length(vec2(-1, -2) - fcoord)/3.238315;
[vo/opengl] [ 51] w = texture1D(lut, d).r;
[vo/opengl] [ 52] wsum += w;
[vo/opengl] [ 53] c = texture(tex, base + pt * vec2(-1, -2));
[vo/opengl] [ 54] color += vec4(w) * c;
[vo/opengl] [ 55] d = length(vec2(0, -2) - fcoord)/3.238315;
[vo/opengl] [ 56] w = texture1D(lut, d).r;
[vo/opengl] [ 57] wsum += w;
[vo/opengl] [ 58] c = texture(tex, base + pt * vec2(0, -2));
[vo/opengl] [ 59] color += vec4(w) * c;
[vo/opengl] [ 60] d = length(vec2(1, -2) - fcoord)/3.238315;
[vo/opengl] [ 61] w = texture1D(lut, d).r;
[vo/opengl] [ 62] wsum += w;
[vo/opengl] [ 63] c = texture(tex, base + pt * vec2(1, -2));
[vo/opengl] [ 64] color += vec4(w) * c;
[vo/opengl] [ 65] d = length(vec2(2, -2) - fcoord)/3.238315;
[vo/opengl] [ 66] w = texture1D(lut, d).r;
[vo/opengl] [ 67] wsum += w;
[vo/opengl] [ 68] c = texture(tex, base + pt * vec2(2, -2));
[vo/opengl] [ 69] color += vec4(w) * c;
[vo/opengl] [ 70] d = length(vec2(3, -2) - fcoord)/3.238315;
[vo/opengl] [ 71] if (d < 1.0) {
[vo/opengl] [ 72] w = texture1D(lut, d).r;
[vo/opengl] [ 73] wsum += w;
[vo/opengl] [ 74] c = texture(tex, base + pt * vec2(3, -2));
[vo/opengl] [ 75] color += vec4(w) * c;
[vo/opengl] [ 76] }
[vo/opengl] [ 77] d = length(vec2(-3, -1) - fcoord)/3.238315;
[vo/opengl] [ 78] if (d < 1.0) {
[vo/opengl] [ 79] w = texture1D(lut, d).r;
[vo/opengl] [ 80] wsum += w;
[vo/opengl] [ 81] c = texture(tex, base + pt * vec2(-3, -1));
[vo/opengl] [ 82] color += vec4(w) * c;
[vo/opengl] [ 83] }
[vo/opengl] [ 84] d = length(vec2(-2, -1) - fcoord)/3.238315;
[vo/opengl] [ 85] w = texture1D(lut, d).r;
[vo/opengl] [ 86] wsum += w;
[vo/opengl] [ 87] c = texture(tex, base + pt * vec2(-2, -1));
[vo/opengl] [ 88] color += vec4(w) * c;
[vo/opengl] [ 89] d = length(vec2(-1, -1) - fcoord)/3.238315;
[vo/opengl] [ 90] w = texture1D(lut, d).r;
[vo/opengl] [ 91] wsum += w;
[vo/opengl] [ 92] c = texture(tex, base + pt * vec2(-1, -1));
[vo/opengl] [ 93] color += vec4(w) * c;
[vo/opengl] [ 94] d = length(vec2(0, -1) - fcoord)/3.238315;
[vo/opengl] [ 95] w = texture1D(lut, d).r;
[vo/opengl] [ 96] wsum += w;
[vo/opengl] [ 97] c = texture(tex, base + pt * vec2(0, -1));
[vo/opengl] [ 98] color += vec4(w) * c;
[vo/opengl] [ 99] d = length(vec2(1, -1) - fcoord)/3.238315;
[vo/opengl] [100] w = texture1D(lut, d).r;
[vo/opengl] [101] wsum += w;
[vo/opengl] [102] c = texture(tex, base + pt * vec2(1, -1));
[vo/opengl] [103] color += vec4(w) * c;
[vo/opengl] [104] d = length(vec2(2, -1) - fcoord)/3.238315;
[vo/opengl] [105] w = texture1D(lut, d).r;
[vo/opengl] [106] wsum += w;
[vo/opengl] [107] c = texture(tex, base + pt * vec2(2, -1));
[vo/opengl] [108] color += vec4(w) * c;
[vo/opengl] [109] d = length(vec2(3, -1) - fcoord)/3.238315;
[vo/opengl] [110] w = texture1D(lut, d).r;
[vo/opengl] [111] wsum += w;
[vo/opengl] [112] c = texture(tex, base + pt * vec2(3, -1));
[vo/opengl] [113] color += vec4(w) * c;
[vo/opengl] [114] d = length(vec2(4, -1) - fcoord)/3.238315;
[vo/opengl] [115] if (d < 1.0) {
[vo/opengl] [116] w = texture1D(lut, d).r;
[vo/opengl] [117] wsum += w;
[vo/opengl] [118] c = texture(tex, base + pt * vec2(4, -1));
[vo/opengl] [119] color += vec4(w) * c;
[vo/opengl] [120] }
[vo/opengl] [121] d = length(vec2(-3, 0) - fcoord)/3.238315;
[vo/opengl] [122] if (d < 1.0) {
[vo/opengl] [123] w = texture1D(lut, d).r;
[vo/opengl] [124] wsum += w;
[vo/opengl] [125] c = texture(tex, base + pt * vec2(-3, 0));
[vo/opengl] [126] color += vec4(w) * c;
[vo/opengl] [127] }
[vo/opengl] [128] d = length(vec2(-2, 0) - fcoord)/3.238315;
[vo/opengl] [129] w = texture1D(lut, d).r;
[vo/opengl] [130] wsum += w;
[vo/opengl] [131] c = texture(tex, base + pt * vec2(-2, 0));
[vo/opengl] [132] color += vec4(w) * c;
[vo/opengl] [133] d = length(vec2(-1, 0) - fcoord)/3.238315;
[vo/opengl] [134] w = texture1D(lut, d).r;
[vo/opengl] [135] wsum += w;
[vo/opengl] [136] c = texture(tex, base + pt * vec2(-1, 0));
[vo/opengl] [137] color += vec4(w) * c;
[vo/opengl] [138] d = length(vec2(0, 0) - fcoord)/3.238315;
[vo/opengl] [139] w = texture1D(lut, d).r;
[vo/opengl] [140] wsum += w;
[vo/opengl] [141] c = texture(tex, base + pt * vec2(0, 0));
[vo/opengl] [142] color += vec4(w) * c;
[vo/opengl] [143] lo = min(lo, c);
[vo/opengl] [144] hi = max(hi, c);
[vo/opengl] [145] d = length(vec2(1, 0) - fcoord)/3.238315;
[vo/opengl] [146] w = texture1D(lut, d).r;
[vo/opengl] [147] wsum += w;
[vo/opengl] [148] c = texture(tex, base + pt * vec2(1, 0));
[vo/opengl] [149] color += vec4(w) * c;
[vo/opengl] [150] lo = min(lo, c);
[vo/opengl] [151] hi = max(hi, c);
[vo/opengl] [152] d = length(vec2(2, 0) - fcoord)/3.238315;
[vo/opengl] [153] w = texture1D(lut, d).r;
[vo/opengl] [154] wsum += w;
[vo/opengl] [155] c = texture(tex, base + pt * vec2(2, 0));
[vo/opengl] [156] color += vec4(w) * c;
[vo/opengl] [157] d = length(vec2(3, 0) - fcoord)/3.238315;
[vo/opengl] [158] w = texture1D(lut, d).r;
[vo/opengl] [159] wsum += w;
[vo/opengl] [160] c = texture(tex, base + pt * vec2(3, 0));
[vo/opengl] [161] color += vec4(w) * c;
[vo/opengl] [162] d = length(vec2(4, 0) - fcoord)/3.238315;
[vo/opengl] [163] if (d < 1.0) {
[vo/opengl] [164] w = texture1D(lut, d).r;
[vo/opengl] [165] wsum += w;
[vo/opengl] [166] c = texture(tex, base + pt * vec2(4, 0));
[vo/opengl] [167] color += vec4(w) * c;
[vo/opengl] [168] }
[vo/opengl] [169] d = length(vec2(-3, 1) - fcoord)/3.238315;
[vo/opengl] [170] if (d < 1.0) {
[vo/opengl] [171] w = texture1D(lut, d).r;
[vo/opengl] [172] wsum += w;
[vo/opengl] [173] c = texture(tex, base + pt * vec2(-3, 1));
[vo/opengl] [174] color += vec4(w) * c;
[vo/opengl] [175] }
[vo/opengl] [176] d = length(vec2(-2, 1) - fcoord)/3.238315;
[vo/opengl] [177] w = texture1D(lut, d).r;
[vo/opengl] [178] wsum += w;
[vo/opengl] [179] c = texture(tex, base + pt * vec2(-2, 1));
[vo/opengl] [180] color += vec4(w) * c;
[vo/opengl] [181] d = length(vec2(-1, 1) - fcoord)/3.238315;
[vo/opengl] [182] w = texture1D(lut, d).r;
[vo/opengl] [183] wsum += w;
[vo/opengl] [184] c = texture(tex, base + pt * vec2(-1, 1));
[vo/opengl] [185] color += vec4(w) * c;
[vo/opengl] [186] d = length(vec2(0, 1) - fcoord)/3.238315;
[vo/opengl] [187] w = texture1D(lut, d).r;
[vo/opengl] [188] wsum += w;
[vo/opengl] [189] c = texture(tex, base + pt * vec2(0, 1));
[vo/opengl] [190] color += vec4(w) * c;
[vo/opengl] [191] lo = min(lo, c);
[vo/opengl] [192] hi = max(hi, c);
[vo/opengl] [193] d = length(vec2(1, 1) - fcoord)/3.238315;
[vo/opengl] [194] w = texture1D(lut, d).r;
[vo/opengl] [195] wsum += w;
[vo/opengl] [196] c = texture(tex, base + pt * vec2(1, 1));
[vo/opengl] [197] color += vec4(w) * c;
[vo/opengl] [198] lo = min(lo, c);
[vo/opengl] [199] hi = max(hi, c);
[vo/opengl] [200] d = length(vec2(2, 1) - fcoord)/3.238315;
[vo/opengl] [201] w = texture1D(lut, d).r;
[vo/opengl] [202] wsum += w;
[vo/opengl] [203] c = texture(tex, base + pt * vec2(2, 1));
[vo/opengl] [204] color += vec4(w) * c;
[vo/opengl] [205] d = length(vec2(3, 1) - fcoord)/3.238315;
[vo/opengl] [206] w = texture1D(lut, d).r;
[vo/opengl] [207] wsum += w;
[vo/opengl] [208] c = texture(tex, base + pt * vec2(3, 1));
[vo/opengl] [209] color += vec4(w) * c;
[vo/opengl] [210] d = length(vec2(4, 1) - fcoord)/3.238315;
[vo/opengl] [211] if (d < 1.0) {
[vo/opengl] [212] w = texture1D(lut, d).r;
[vo/opengl] [213] wsum += w;
[vo/opengl] [214] c = texture(tex, base + pt * vec2(4, 1));
[vo/opengl] [215] color += vec4(w) * c;
[vo/opengl] [216] }
[vo/opengl] [217] d = length(vec2(-3, 2) - fcoord)/3.238315;
[vo/opengl] [218] if (d < 1.0) {
[vo/opengl] [219] w = texture1D(lut, d).r;
[vo/opengl] [220] wsum += w;
[vo/opengl] [221] c = texture(tex, base + pt * vec2(-3, 2));
[vo/opengl] [222] color += vec4(w) * c;
[vo/opengl] [223] }
[vo/opengl] [224] d = length(vec2(-2, 2) - fcoord)/3.238315;
[vo/opengl] [225] w = texture1D(lut, d).r;
[vo/opengl] [226] wsum += w;
[vo/opengl] [227] c = texture(tex, base + pt * vec2(-2, 2));
[vo/opengl] [228] color += vec4(w) * c;
[vo/opengl] [229] d = length(vec2(-1, 2) - fcoord)/3.238315;
[vo/opengl] [230] w = texture1D(lut, d).r;
[vo/opengl] [231] wsum += w;
[vo/opengl] [232] c = texture(tex, base + pt * vec2(-1, 2));
[vo/opengl] [233] color += vec4(w) * c;
[vo/opengl] [234] d = length(vec2(0, 2) - fcoord)/3.238315;
[vo/opengl] [235] w = texture1D(lut, d).r;
[vo/opengl] [236] wsum += w;
[vo/opengl] [237] c = texture(tex, base + pt * vec2(0, 2));
[vo/opengl] [238] color += vec4(w) * c;
[vo/opengl] [239] d = length(vec2(1, 2) - fcoord)/3.238315;
[vo/opengl] [240] w = texture1D(lut, d).r;
[vo/opengl] [241] wsum += w;
[vo/opengl] [242] c = texture(tex, base + pt * vec2(1, 2));
[vo/opengl] [243] color += vec4(w) * c;
[vo/opengl] [244] d = length(vec2(2, 2) - fcoord)/3.238315;
[vo/opengl] [245] w = texture1D(lut, d).r;
[vo/opengl] [246] wsum += w;
[vo/opengl] [247] c = texture(tex, base + pt * vec2(2, 2));
[vo/opengl] [248] color += vec4(w) * c;
[vo/opengl] [249] d = length(vec2(3, 2) - fcoord)/3.238315;
[vo/opengl] [250] w = texture1D(lut, d).r;
[vo/opengl] [251] wsum += w;
[vo/opengl] [252] c = texture(tex, base + pt * vec2(3, 2));
[vo/opengl] [253] color += vec4(w) * c;
[vo/opengl] [254] d = length(vec2(4, 2) - fcoord)/3.238315;
[vo/opengl] [255] if (d < 1.0) {
[vo/opengl] [256] w = texture1D(lut, d).r;
[vo/opengl] [257] wsum += w;
[vo/opengl] [258] c = texture(tex, base + pt * vec2(4, 2));
[vo/opengl] [259] color += vec4(w) * c;
[vo/opengl] [260] }
[vo/opengl] [261] d = length(vec2(-2, 3) - fcoord)/3.238315;
[vo/opengl] [262] if (d < 1.0) {
[vo/opengl] [263] w = texture1D(lut, d).r;
[vo/opengl] [264] wsum += w;
[vo/opengl] [265] c = texture(tex, base + pt * vec2(-2, 3));
[vo/opengl] [266] color += vec4(w) * c;
[vo/opengl] [267] }
[vo/opengl] [268] d = length(vec2(-1, 3) - fcoord)/3.238315;
[vo/opengl] [269] w = texture1D(lut, d).r;
[vo/opengl] [270] wsum += w;
[vo/opengl] [271] c = texture(tex, base + pt * vec2(-1, 3));
[vo/opengl] [272] color += vec4(w) * c;
[vo/opengl] [273] d = length(vec2(0, 3) - fcoord)/3.238315;
[vo/opengl] [274] w = texture1D(lut, d).r;
[vo/opengl] [275] wsum += w;
[vo/opengl] [276] c = texture(tex, base + pt * vec2(0, 3));
[vo/opengl] [277] color += vec4(w) * c;
[vo/opengl] [278] d = length(vec2(1, 3) - fcoord)/3.238315;
[vo/opengl] [279] w = texture1D(lut, d).r;
[vo/opengl] [280] wsum += w;
[vo/opengl] [281] c = texture(tex, base + pt * vec2(1, 3));
[vo/opengl] [282] color += vec4(w) * c;
[vo/opengl] [283] d = length(vec2(2, 3) - fcoord)/3.238315;
[vo/opengl] [284] w = texture1D(lut, d).r;
[vo/opengl] [285] wsum += w;
[vo/opengl] [286] c = texture(tex, base + pt * vec2(2, 3));
[vo/opengl] [287] color += vec4(w) * c;
[vo/opengl] [288] d = length(vec2(3, 3) - fcoord)/3.238315;
[vo/opengl] [289] if (d < 1.0) {
[vo/opengl] [290] w = texture1D(lut, d).r;
[vo/opengl] [291] wsum += w;
[vo/opengl] [292] c = texture(tex, base + pt * vec2(3, 3));
[vo/opengl] [293] color += vec4(w) * c;
[vo/opengl] [294] }
[vo/opengl] [295] d = length(vec2(-1, 4) - fcoord)/3.238315;
[vo/opengl] [296] if (d < 1.0) {
[vo/opengl] [297] w = texture1D(lut, d).r;
[vo/opengl] [298] wsum += w;
[vo/opengl] [299] c = texture(tex, base + pt * vec2(-1, 4));
[vo/opengl] [300] color += vec4(w) * c;
[vo/opengl] [301] }
[vo/opengl] [302] d = length(vec2(0, 4) - fcoord)/3.238315;
[vo/opengl] [303] if (d < 1.0) {
[vo/opengl] [304] w = texture1D(lut, d).r;
[vo/opengl] [305] wsum += w;
[vo/opengl] [306] c = texture(tex, base + pt * vec2(0, 4));
[vo/opengl] [307] color += vec4(w) * c;
[vo/opengl] [308] }
[vo/opengl] [309] d = length(vec2(1, 4) - fcoord)/3.238315;
[vo/opengl] [310] if (d < 1.0) {
[vo/opengl] [311] w = texture1D(lut, d).r;
[vo/opengl] [312] wsum += w;
[vo/opengl] [313] c = texture(tex, base + pt * vec2(1, 4));
[vo/opengl] [314] color += vec4(w) * c;
[vo/opengl] [315] }
[vo/opengl] [316] d = length(vec2(2, 4) - fcoord)/3.238315;
[vo/opengl] [317] if (d < 1.0) {
[vo/opengl] [318] w = texture1D(lut, d).r;
[vo/opengl] [319] wsum += w;
[vo/opengl] [320] c = texture(tex, base + pt * vec2(2, 4));
[vo/opengl] [321] color += vec4(w) * c;
[vo/opengl] [322] }
[vo/opengl] [323] color = color / vec4(wsum);
[vo/opengl] [324] color = mix(color, clamp(color, lo, hi), 0.900000);
[vo/opengl] [325] }
[vo/opengl] [326] color.a = 1.0;
[vo/opengl] [327] vec2 chroma = color.rg;
[vo/opengl] [328] // custom source-shader (luma)
[vo/opengl] [329] float luma = sample(texture0, texcoord0, texture_size0).r;
[vo/opengl] [330] color = vec4(luma, chroma, 1.0);
[vo/opengl] [331] // color conversion
[vo/opengl] [332] color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;
[vo/opengl] [333] color.a = 1.0;
[vo/opengl] [334] // scaler pre-conversion
[vo/opengl] [335] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [336] color.rgb = pow(color.rgb, vec3(1.961));
[vo/opengl] [337] // main scaling
[vo/opengl] Create FBO: 1280x768
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] #define tex texture0
[vo/opengl] [  2] vec2 pos = texcoord0;
[vo/opengl] [  3] vec2 size = texture_size0;
[vo/opengl] [  4] vec2 pt = vec2(1.0) / size;
[vo/opengl] [  5] // pass 1
[vo/opengl] [  6] vec4 color = vec4(0.0);
[vo/opengl] [  7] {
[vo/opengl] [  8] vec2 dir = vec2(0, 1);
[vo/opengl] [  9] pt *= dir;
[vo/opengl] [ 10] float fcoord = dot(fract(pos * size - vec2(0.5)), dir);
[vo/opengl] [ 11] vec2 base = pos - fcoord * pt - pt * vec2(1);
[vo/opengl] [ 12] vec4 c;
[vo/opengl] [ 13] float weights[4];
[vo/opengl] [ 14] c = texture(lut, vec2(1.0 / 2 + 0 / float(1), fcoord));
[vo/opengl] [ 15] weights[0] = c.r;
[vo/opengl] [ 16] weights[1] = c.g;
[vo/opengl] [ 17] weights[2] = c.b;
[vo/opengl] [ 18] weights[3] = c.a;
[vo/opengl] [ 19] // scaler samples
[vo/opengl] [ 20] c = texture(tex, base + pt * vec2(0));
[vo/opengl] [ 21] color += vec4(weights[0]) * c;
[vo/opengl] [ 22] c = texture(tex, base + pt * vec2(1));
[vo/opengl] [ 23] color += vec4(weights[1]) * c;
[vo/opengl] [ 24] c = texture(tex, base + pt * vec2(2));
[vo/opengl] [ 25] color += vec4(weights[2]) * c;
[vo/opengl] [ 26] c = texture(tex, base + pt * vec2(3));
[vo/opengl] [ 27] color += vec4(weights[3]) * c;
[vo/opengl] [ 28] }
[vo/opengl] Create FBO: 1280x768
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] #define tex texture0
[vo/opengl] [  2] vec2 pos = texcoord0;
[vo/opengl] [  3] vec2 size = texture_size0;
[vo/opengl] [  4] vec2 pt = vec2(1.0) / size;
[vo/opengl] [  5] // pass 2
[vo/opengl] [  6] vec4 color = vec4(0.0);
[vo/opengl] [  7] {
[vo/opengl] [  8] vec2 dir = vec2(1, 0);
[vo/opengl] [  9] pt *= dir;
[vo/opengl] [ 10] float fcoord = dot(fract(pos * size - vec2(0.5)), dir);
[vo/opengl] [ 11] vec2 base = pos - fcoord * pt - pt * vec2(1);
[vo/opengl] [ 12] vec4 c;
[vo/opengl] [ 13] float weights[4];
[vo/opengl] [ 14] c = texture(lut, vec2(1.0 / 2 + 0 / float(1), fcoord));
[vo/opengl] [ 15] weights[0] = c.r;
[vo/opengl] [ 16] weights[1] = c.g;
[vo/opengl] [ 17] weights[2] = c.b;
[vo/opengl] [ 18] weights[3] = c.a;
[vo/opengl] [ 19] // scaler samples
[vo/opengl] [ 20] c = texture(tex, base + pt * vec2(0));
[vo/opengl] [ 21] color += vec4(weights[0]) * c;
[vo/opengl] [ 22] c = texture(tex, base + pt * vec2(1));
[vo/opengl] [ 23] color += vec4(weights[1]) * c;
[vo/opengl] [ 24] c = texture(tex, base + pt * vec2(2));
[vo/opengl] [ 25] color += vec4(weights[2]) * c;
[vo/opengl] [ 26] c = texture(tex, base + pt * vec2(3));
[vo/opengl] [ 27] color += vec4(weights[3]) * c;
[vo/opengl] [ 28] }
[vo/opengl] [ 29] color.a = 1.0;
[vo/opengl] [ 30] // scaler post-conversion
[vo/opengl] [ 31] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [ 32] color.rgb = pow(color.rgb, vec3(1.0/1.961));
[vo/opengl] Create FBO: 1280x768
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] vec4 color = texture(texture0, texcoord0);
[vo/opengl] [  2] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [  3] color.rgb = pow(color.rgb, vec3(1.961));
[vo/opengl] Dither to 8.
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] vec4 color = texture(texture0, texcoord0);
[vo/opengl] [  2] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [  3] color.rgb = pow(color.rgb, vec3(user_gamma));
[vo/opengl] [  4] // color management
[vo/opengl] [  5] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [  6] color.rgb = pow(color.rgb, vec3(1.0/1.961));
[vo/opengl] [  7] // dithering
[vo/opengl] [  8] vec2 dither_pos = gl_FragCoord.xy / 64;
[vo/opengl] [  9] dither_pos = dither_trafo * dither_pos;
[vo/opengl] [ 10] float dither_value = texture(dither, dither_pos).r;
[vo/opengl] [ 11] color = floor(color * 255 + dither_value + 0.5 / (64 * 64)) / 255;
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts.conf' -> '(NULL)'
[osd/libass] Setting up fonts...
[osd/libass] Done.
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts.conf' -> '(NULL)'
[osd/libass] Setting up fonts...
[osd/libass] Done.
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /home/REDACTED/.mpv /usr/local/etc/mpv
[global] config path: 'fonts.conf' -> '(NULL)'
[osd/libass] Setting up fonts...
[osd/libass] Done.
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] vec4 color = vec4(0.0);
[vo/opengl] [  2] {
[vo/opengl] [  3] vec4 c;
[vo/opengl] [  4] vec4 hi = vec4(0.0);
[vo/opengl] [  5] vec4 lo = vec4(1.0);
[vo/opengl] [  6] float weights[4];
[vo/opengl] [  7] c = texture(lut, vec2(1.0 / 2 + 0 / float(1), fcoord));
[vo/opengl] [  8] weights[0] = c.r;
[vo/opengl] [  9] weights[1] = c.g;
[vo/opengl] [ 10] weights[2] = c.b;
[vo/opengl] [ 11] weights[3] = c.a;
[vo/opengl] [ 12] // scaler samples
[vo/opengl] [ 13] c = texture(texture0, texcoord0);
[vo/opengl] [ 14] color += vec4(weights[0]) * c;
[vo/opengl] [ 15] c = texture(texture1, texcoord1);
[vo/opengl] [ 16] color += vec4(weights[1]) * c;
[vo/opengl] [ 17] lo = min(lo, c);
[vo/opengl] [ 18] hi = max(hi, c);
[vo/opengl] [ 19] c = texture(texture2, texcoord2);
[vo/opengl] [ 20] color += vec4(weights[2]) * c;
[vo/opengl] [ 21] lo = min(lo, c);
[vo/opengl] [ 22] hi = max(hi, c);
[vo/opengl] [ 23] c = texture(texture3, texcoord3);
[vo/opengl] [ 24] color += vec4(weights[3]) * c;
[vo/opengl] [ 25] color = mix(color, clamp(color, lo, hi), 0.900000);
[vo/opengl] [ 26] }
[vo/opengl] [ 27] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [ 28] color.rgb = pow(color.rgb, vec3(user_gamma));
[vo/opengl] [ 29] // color management
[vo/opengl] [ 30] color.rgb = clamp(color.rgb, 0.0, 1.0);
[vo/opengl] [ 31] color.rgb = pow(color.rgb, vec3(1.0/1.961));
[vo/opengl] [ 32] // dithering
[vo/opengl] [ 33] vec2 dither_pos = gl_FragCoord.xy / 64;
[vo/opengl] [ 34] dither_pos = dither_trafo * dither_pos;
[vo/opengl] [ 35] float dither_value = texture(dither, dither_pos).r;
[vo/opengl] [ 36] color = floor(color * 255 + dither_value + 0.5 / (64 * 64)) / 255;
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[vo/opengl] Create FBO: 1280x768
[cplayer] Run command: quit, flags=9, args=[0]
[cplayer] EOF code: 6  
[cplayer] 
[ad] Uninit audio filters...
[af] Removing filter lavrresample 
[ad] Uninit audio decoder.
[hqdn3d] lavfi: create graph: 'hqdn3d=0.000000:0.000000:0.000000:0.000000'
[ffmpeg] src: w:1280 h:544 pixfmt:yuv420p10le tb:1/1000000 fr:0/1 sar:1/1 sws_param:
[ffmpeg] Parsed_hqdn3d_0: ls:4.000000 cs:3.000000 lt:6.000000 ct:4.500000
[vd] Uninit video.
[cache] Terminating cache...
[cache] Cache exiting...
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[osc] Exiting...
[ao/alsa] draining...
[vo/opengl/x11] Enabling screensaver.
[vo/opengl/x11] uninit ...
@haasn

This comment has been minimized.

Member

haasn commented Apr 26, 2015

Does disabling blend-subtitles help?

@sora-chan

This comment has been minimized.

sora-chan commented Apr 26, 2015

No.

@haasn

This comment has been minimized.

Member

haasn commented Apr 26, 2015

Does this diff help?

diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 9b4b46a..efdf2b3 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -1906,7 +1906,7 @@ static void gl_video_interpolate_frame(struct gl_video *p, int fbo,
     if (!p->surfaces[p->surface_now].pts) {
         pass_render_frame(p);
         finish_pass_fbo(p, &p->surfaces[p->surface_now].fbotex,
-                        vp_w, vp_h, 0, FBOTEX_FUZZY);
+                        vp_w, vp_h, 0, 0);
         p->surfaces[p->surface_now].pts = t ? t->pts : 0;
         p->surfaces[p->surface_now].vpts = p->image.mpi->pts;
         p->surface_idx = p->surface_now;
@@ -1942,7 +1942,7 @@ static void gl_video_interpolate_frame(struct gl_video *p, int fbo,
         MP_STATS(p, "new-pts");
         pass_render_frame(p);
         finish_pass_fbo(p, &p->surfaces[surface_dst].fbotex,
-                        vp_w, vp_h, 0, FBOTEX_FUZZY);
+                        vp_w, vp_h, 0, 0);
         p->surfaces[surface_dst].pts = t->pts;
         p->surfaces[surface_dst].vpts = p->image.mpi->pts;
         p->surface_idx = surface_dst;
@sora-chan

This comment has been minimized.

sora-chan commented Apr 26, 2015

Yes, with this patch the garbage pixels no longer appear.

@sora-chan

This comment has been minimized.

sora-chan commented Apr 26, 2015

You said there where disadvantages, what are they?

@haasn

This comment has been minimized.

Member

haasn commented Apr 26, 2015

Constantly resizing textures whenever the window size changes. This can get slow very fast, if you're just continuously changing the window size with the mouse.

But a better reason is this: You shouldn't be getting garbage pixels at the bottom even with the fuzzy flag. So clearly something is going wrong.

@haasn

This comment has been minimized.

Member

haasn commented Apr 30, 2015

Do you get it along the right edge as well? (If the window is wider than the content)

Also, does it happen for many/all window sizes, or just one very particular value?

@sora-chan

This comment has been minimized.

sora-chan commented May 1, 2015

Do you get it along the right edge as well?

No.

Also, does it happen for many/all window sizes, or just one very particular value?

It seems to only happen when in fullscreen mode and the video aspect ratio is wider than the monitor aspect ratio, and it only appears on the bottom of the video.

@haasn

This comment has been minimized.

Member

haasn commented May 1, 2015

What if you use --video-rotate=90 in fullscreen mode?

@sora-chan

This comment has been minimized.

sora-chan commented May 2, 2015

With that option there isn't any obvious garbage pixels, but i noticed this which might just be an artifact of rotation:
2015-05-02-144705_1920x1080_scrot

@sora-chan

This comment has been minimized.

sora-chan commented May 4, 2015

In regards to the OP, do you get the same problem with the same settings on your end?
What driver are you on? I'm on Radeon, could it be a driver issue?

@sora-chan

This comment has been minimized.

sora-chan commented May 14, 2015

Any progress?

@haasn

This comment has been minimized.

Member

haasn commented Jun 16, 2015

(I have no idea why I ignored this for so long.)

Let's just restrict the size of the interpolation buffer and call it a day, since I don't really understand what would be causing this issue no matter how much I've looked at the code.

@wm4

This comment has been minimized.

Contributor

wm4 commented Jul 18, 2015

Let's just restrict the size of the interpolation buffer and call it a day,

Then do that? Or did we already?

@wm4 wm4 added bug stalled labels Jul 18, 2015

haasn added a commit to haasn/mpv that referenced this issue Jul 18, 2015

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 mpv-player#1814.

@wm4 wm4 closed this in fb8d158 Jul 18, 2015

@wm4

This comment has been minimized.

Contributor

wm4 commented Jul 22, 2015

We reverted the change, because it was causing too many issues for everyone else.

@wm4 wm4 reopened this Jul 22, 2015

@sora-chan

This comment has been minimized.

sora-chan commented Jul 22, 2015

How about adding an option for it?

@sora-chan

This comment has been minimized.

sora-chan commented Aug 26, 2015

I played around with the source a bit and discovered that commenting out these two lines in gl_utils.c:348 fixes the garbage pixels and does not cause any performance issues on resize:

    if (flags & FBOTEX_FUZZY_H)
        h = MP_ALIGN_UP(h, 256);

Is there a reason for this being here? can it be removed? I didn't notice any side effects when removing it, I even compared screenshots and there was literally no difference other than dithering.

@wm4

This comment has been minimized.

Contributor

wm4 commented Aug 26, 2015

In theory, it prevents reallocating the frame buffer when continuously resizing the mpv window. Whether this code is actually active depends on the vo_opengl settings.

@wm4

This comment has been minimized.

Contributor

wm4 commented Aug 26, 2015

Oh, and maybe you could find out which caller passes the "broken" FBOTEX_FUZZY... here?

@sora-chan

This comment has been minimized.

sora-chan commented Aug 26, 2015

Oh, and maybe you could find out which caller passes the "broken" FBOTEX_FUZZY... here?

Lines 2032, 2078, and 2139 in gl_video.c
Setting those to zero also fixes the problem, but we can't do that because it causes performance issues.

@haasn

This comment has been minimized.

Member

haasn commented Jun 8, 2016

Setting those to zero also fixes the problem, but we can't do that because it causes performance issues.

@sora-chan It might be possible to revert this decision without introducing performance issues. It seems like the performance issues were (probably) caused by an oversight in the FBO code that was fixed in a15181e.

Are you still having this issue, and are you able to reproduce the performance issues that the patch caused? (I'm not - resizing is always terrible on my end)

@sora-chan

This comment has been minimized.

sora-chan commented Jun 8, 2016

Are you still having this issue

No, the issue was actually fixed quite a while ago (IIRC), I never bothered to figure out why though, nor do I remember exactly when it was fixed.

and are you able to reproduce the performance issues that the patch caused?

No not really, since the AMD card that was having this issue died recently and was faulty before hand causing kernel hangs some times (possible cause of garbage pixels too?). I'm currently on an Intel iGPU, I just went and replaced all instances of FBOTEX_FUZZY in video/out/opengl/video.c with 0 and recompiled, I didn't notice any performance difference when resizing.

@roberth1990

This comment has been minimized.

roberth1990 commented Sep 11, 2016

I am experiencing something like this, but I am not sure if it is the same issue with 0.20.0.

I am running amdgpu with kernel 4.7.3 and mesa git version.

MPV options:

video-sync=display-resample
vo=opengl-hq:interpolation:scale=ewa_lanczossharp

screenshot_20160911_042202

@roberth1990

This comment has been minimized.

roberth1990 commented Sep 11, 2016

[cplayer] Command line options: '-v' 'John.Wick.2014.1080p.BluRay.x264-SPARKS.mkv'
[cplayer] mpv 0.20.0 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Sat Aug 27 12:41:39 CEST 2016
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.28.100
[cplayer]    libavcodec      57.48.101
[cplayer]    libavformat     57.41.100
[cplayer]    libswscale      4.1.100
[cplayer]    libavfilter     6.47.100
[cplayer]    libswresample   2.1.100
[cplayer] ffmpeg version: 3.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-encoding --enable-libmpv-shared --enable-zsh-comp
[cplayer] List of enabled features: alsa any-gl asm atomics audio-input av-avpacket-int64-duration av-new-pixdesc av-pix-fmt-mmal av-subtitle-nopict av-version-info avcodec-chroma-pos-api avcodec-has-codecpar avcodec-new-codec-api avcodec-profile-name avframe-metadata avframe-skip-samples avutil-has-hwcontext avutil-hdr avutil-mastering-metadata build-date c11-tls caca cdda cplayer debug-build dlopen drm dvbin dvdnav dvdread egl-drm egl-helpers egl-x11 enca encoding fchmod gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob iconv jack jpeg lcms2 libass libass-osd libav libavdevice libavfilter libbluray libdl libm libmpv-shared librt libsmbclient libswresample libv4l2 linux-fstatfs lua nanosleep optimize oss-audio oss-audio-native plain-gl posix posix-or-mingw posix-spawn pthreads pulse resampler rubberband shm sse4-intrinsics standard-gl stdatomic subprocess termios tv tv-v4l2 vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-hwaccel vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vdpau-hwaccel videodev vt.h wayland x11 xext xinerama xrandr xss xv zlib zsh-comp
[global] config path: '' -> '/home/roberth/.config/mpv'
[global] config path: 'mpv.conf' -/-> '/home/roberth/.config/mpv/mpv.conf'
[global] config path: 'config' -> '/home/roberth/.config/mpv/config'
[global] config path: 'mpv.conf' -/-> '/home/roberth/.mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/roberth/.mpv/config'
[global] config path: 'mpv.conf' -/-> '/etc/mpv/mpv.conf'
[global] config path: 'config' -/-> '/etc/mpv/config'
[cplayer] Reading config file /home/roberth/.config/mpv/config
[cplayer] Setting option 'video-sync' = 'display-resample' (flags = 4)
[cplayer] Setting option 'vo' = 'opengl-hq:interpolation:scale=ewa_lanczossharp' (flags = 4)
[cplayer] Setting option 'vf-clr' = '' (flags = 4)
[cplayer] Setting option 'ao' = 'alsa:device=[plughw:1,0]' (flags = 4)
[cplayer] Setting option 'v' = '' (flags = 8)
[global] config path: 'input.conf' -/-> '/home/roberth/.config/mpv/input.conf'
[global] config path: 'input.conf' -/-> '/home/roberth/.mpv/input.conf'
[global] config path: 'input.conf' -/-> '/etc/mpv/input.conf'
[osc] Loading script @osc.lua...
[global] config path: 'scripts' -> '/home/roberth/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/roberth/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[osc] loading mp.defaults
[osc] loading @osc.lua
[global] config path: 'lua-settings/osc.conf' -/-> '/home/roberth/.config/mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> '/home/roberth/.mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> '/etc/mpv/lua-settings/osc.conf'
[osc] lua-settings/osc.conf not found. 
[cplayer] Run command: define-section, flags=0, args=[showhide, mouse_move script-binding osc/__keybinding1
[cplayer] mouse_leave script-binding osc/__keybinding2
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[showhide, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input, mouse_btn0 script-binding osc/__keybinding3
[cplayer] shift+mouse_btn0 script-binding osc/__keybinding4
[cplayer] mouse_btn2 script-binding osc/__keybinding5
[cplayer] mouse_btn0_dbl ignore
[cplayer] shift+mouse_btn0_dbl ignore
[cplayer] mouse_btn2_dbl ignore
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[input, ]
[cplayer] Run command: define-section, flags=0, args=[input_osc, del script-binding osc/__keybinding6
[cplayer] , default]
[cplayer] Run command: enable-section, flags=0, args=[input_osc, allow-hide-cursor+allow-vo-dragging]                                                                                                                                        
[cplayer] Run command: define-section, flags=0, args=[input_forced_osc, , force]                                                                                                                                                             
[cplayer] Run command: enable-section, flags=0, args=[input_forced_osc, allow-hide-cursor+allow-vo-dragging]                                                                                                                                 
[cplayer] Done loading @osc.lua.                                                                                                                                                                                                             
[ytdl_hook] Loading script @ytdl_hook.lua...                                                                                                                                                                                                 
[global] config path: 'scripts' -> '/home/roberth/.config/mpv/scripts'                                                                                                                                                                       
[global] config path: 'scripts' -/-> '/home/roberth/.mpv/scripts'                                                                                                                                                                            
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'                                                                                                                                                                                      
[ytdl_hook] loading mp.defaults                                                                                                                                                                                                              
[cplayer] Run command: disable-section, flags=0, args=[input]                                                                                                                                                                                
[global] config path: 'fonts' -/-> '/home/roberth/.config/mpv/fonts'                                                                                                                                                                         
[global] config path: 'fonts' -/-> '/home/roberth/.mpv/fonts'                                                                                                                                                                                
[global] config path: 'fonts' -/-> '/etc/mpv/fonts'                                                                                                                                                                                          
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.3.1 (COMPLEX)                                                                                                                                                                     
[global] config path: 'subfont.ttf' -/-> '/home/roberth/.config/mpv/subfont.ttf'                                                                                                                                                             
[global] config path: 'subfont.ttf' -/-> '/home/roberth/.mpv/subfont.ttf'                                                                                                                                                                    
[global] config path: 'subfont.ttf' -/-> '/etc/mpv/subfont.ttf'                                                                                                                                                                              
[global] config path: 'fonts.conf' -/-> '/home/roberth/.config/mpv/fonts.conf'                                                                                                                                                               
[global] config path: 'fonts.conf' -/-> '/home/roberth/.mpv/fonts.conf'                                                                                                                                                                      
[global] config path: 'fonts.conf' -/-> '/etc/mpv/fonts.conf'                                                                                                                                                                                
[osd/libass] Setting up fonts...                                                                                                                                                                                                             
[ytdl_hook] loading @ytdl_hook.lua                                                                                                                                                                                                           
[cplayer] Run command: hook-add, flags=0, args=[on_load, 1, 10]                                                                                                                                                                              
[cplayer] Done loading @ytdl_hook.lua.                                                                                                                                                                                                       
[global] config path: 'scripts' -> '/home/roberth/.config/mpv/scripts'                                                                                                                                                                       
[global] config path: 'scripts' -/-> '/home/roberth/.mpv/scripts'                                                                                                                                                                            
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'                                                                                                                                                                                      
[stats] Loading script /home/roberth/.config/mpv/scripts/stats.lua...                                                                                                                                                                        
[global] config path: 'scripts' -> '/home/roberth/.config/mpv/scripts'                                                                                                                                                                       
[global] config path: 'scripts' -/-> '/home/roberth/.mpv/scripts'                                                                                                                                                                            
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'                                                                                                                                                                                      
[stats] loading mp.defaults                                                                                                                                                                                                                  
[global] user path: '/home/roberth/.config/mpv/scripts/stats.lua' -> '/home/roberth/.config/mpv/scripts/stats.lua'                                                                                                                           
[stats] loading file /home/roberth/.config/mpv/scripts/stats.lua                                                                                                                                                                             
[global] config path: 'lua-settings/stats.conf' -/-> '/home/roberth/.config/mpv/lua-settings/stats.conf'                                                                                                                                     
[global] config path: 'lua-settings/stats.conf' -/-> '/home/roberth/.mpv/lua-settings/stats.conf'                                                                                                                                            
[global] config path: 'lua-settings/stats.conf' -/-> '/etc/mpv/lua-settings/stats.conf'                                                                                                                                                      
[stats] lua-settings/stats.conf not found.                                                                                                                                                                                                   
[cplayer] Run command: define-section, flags=0, args=[input_stats, i script-binding stats/display_stats                                                                                                                                      
[cplayer] , default]                                                                                                                                                                                                                         
[cplayer] Run command: enable-section, flags=0, args=[input_stats, allow-hide-cursor+allow-vo-dragging]                                                                                                                                      
[cplayer] Run command: define-section, flags=0, args=[input_forced_stats, , force]                                                                                                                                                           
[cplayer] Run command: enable-section, flags=0, args=[input_forced_stats, allow-hide-cursor+allow-vo-dragging]                                                                                                                               
[cplayer] Run command: define-section, flags=0, args=[input_stats, i script-binding stats/display_stats                                                                                                                                      
[cplayer] I script-binding stats/display_stats_toggle                                                                                                                                                                                        
[cplayer] , default]                                                                                                                                                                                                                         
[cplayer] Run command: enable-section, flags=0, args=[input_stats, allow-hide-cursor+allow-vo-dragging]                                                                                                                                      
[cplayer] Run command: define-section, flags=0, args=[input_forced_stats, , force]                                                                                                                                                           
[cplayer] Run command: enable-section, flags=0, args=[input_forced_stats, allow-hide-cursor+allow-vo-dragging]                                                                                                                               
[cplayer] Done loading /home/roberth/.config/mpv/scripts/stats.lua.                                                                                                                                                                          
[global] config path: 'watch_later' -> '/home/roberth/.config/mpv/watch_later'                                                                                                                                                               
[cplayer] Playing: John.Wick.2014.1080p.BluRay.x264-SPARKS.mkv
[cplayer] Running hook: ytdl_hook/on_load
[osd/libass] Using font provider fontconfig                                                                                                                                                                                                  
[osd/libass] Done.                                                                                                                                                                                                                           
[cplayer] Run command: hook-ack, flags=0, args=[on_load]                                                                                                                                                                                     
[ifo] Opening John.Wick.2014.1080p.BluRay.x264-SPARKS.mkv                                                                                                                                                                                    
[ifo/dvdnav] Opening John.Wick.2014.1080p.BluRay.x264-SPARKS.mkv                                                                                                                                                                             
[bdmv/bluray] Opening John.Wick.2014.1080p.BluRay.x264-SPARKS.mkv                                                                                                                                                                            
[file] Opening John.Wick.2014.1080p.BluRay.x264-SPARKS.mkv                                                                                                                                                                                   
[file] Stream opened successfully.                                                                                                                                                                                                           
[demux] Trying demuxers for level=normal.                                                                                                                                                                                                    
[mkv] Found the head...                                                                                                                                                                                                                      
[mkv] + a segment...                                                                                                                                                                                                                         
[mkv] Parsing seek head...                                                                                                                                                                                                                   
[mkv] |+ segment information...                                                                                                                                                                                                              
[mkv] | + muxing app: libebml v1.3.0 + libmatroska v1.4.0                                                                                                                                                                                    
[mkv] | + writing app: mkvmerge v6.2.0 ('Promised Land') built on Apr 28 2013 12:22:01                                                                                                                                                       
[mkv] | + timecode scale: 1000000                                                                                                                                                                                                            
[mkv] | + duration: 6072.928s                                                                                                                                                                                                                
[mkv] | + segment uid aa 6d 6a ef 5f ff e4 a7 96 3d df d0 29 e5 62 6f                                                                                                                                                                        
[mkv] |+ segment tracks...                                                                                                                                                                                                                   
[mkv] | + a track...                                                                                                                                                                                                                         
[mkv] |  + Track number: 1                                                                                                                                                                                                                   
[mkv] |  + Track type: Video                                                                                                                                                                                                                 
[mkv] |  + Video track                                                                                                                                                                                                                       
[mkv] |   + Display width: 1920                                                                                                                                                                                                              
[mkv] |   + Display height: 800                                                                                                                                                                                                              
[mkv] |   + Pixel width: 1920                                                                                                                                                                                                                
[mkv] |   + Pixel height: 800                                                                                                                                                                                                                
[mkv] |  + Codec ID: V_MPEG4/ISO/AVC                                                                                                                                                                                                         
[mkv] |  + CodecPrivate, length 40                                                                                                                                                                                                           
[mkv] |  + Default duration: 41.708ms ( = 23.976 fps)                                                                                                                                                                                        
[mkv] | + a track...                                                                                                                                                                                                                         
[mkv] |  + Track number: 2                                                                                                                                                                                                                   
[mkv] |  + Track type: Audio                                                                                                                                                                                                                 
[mkv] |  + Audio track                                                                                                                                                                                                                       
[mkv] |   + Sampling frequency: 48000.000000                                                                                                                                                                                                 
[mkv] |   + Channels: 6                                                                                                                                                                                                                      
[mkv] |  + Codec ID: A_AC3                                                                                                                                                                                                                   
[mkv] |  + Default duration: 32.000ms ( = 31.250 fps)                                                                                                                                                                                        
[mkv] Parsing chapters...                                                                                                                                                                                                                    
[mkv] New edition 0                                                                                                                                                                                                                          
[mkv] Default edition flag: 0                                                                                                                                                                                                                
[mkv] Chapter 0 from 00:00:00.000 to 00:00:00.000, 00:00:00.000                                                                                                                                                                              
[mkv] Chapter 1 from 00:04:57.506000000 to 00:00:00.000, 00:04:57.506                                                                                                                                                                        
[mkv] Chapter 2 from 00:12:21.866000000 to 00:00:00.000, 00:12:21.866                                                                                                                                                                        
[mkv] Chapter 3 from 00:17:07.735000000 to 00:00:00.000, 00:17:07.735                                                                                                                                                                        
[mkv] Chapter 4 from 00:26:25.167000000 to 00:00:00.000, 00:26:25.167                                                                                                                                                                        
[mkv] Chapter 5 from 00:32:40.250000000 to 00:00:00.000, 00:32:40.250                                                                                                                                                                        
[mkv] Chapter 6 from 00:36:24.599000000 to 00:00:00.000, 00:36:24.599                                                                                                                                                                        
[mkv] Chapter 7 from 00:42:16.33000000 to 00:00:00.000, 00:42:16.033                                                                                                                                                                         
[mkv] Chapter 8 from 00:45:33.272000000 to 00:00:00.000, 00:45:33.272                                                                                                                                                                        
[mkv] Chapter 9 from 00:55:02.507000000 to 00:00:00.000, 00:55:02.507                                                                                                                                                                        
[mkv] Chapter 10 from 00:59:27.564000000 to 00:00:00.000, 00:59:27.564                                                                                                                                                                       
[mkv] Chapter 11 from 01:06:13.428000000 to 00:00:00.000, 01:06:13.428                                                                                                                                                                       
[mkv] Chapter 12 from 01:14:15.910000000 to 00:00:00.000, 01:14:15.910                                                                                                                                                                       
[mkv] Chapter 13 from 01:19:13.40000000 to 00:00:00.000, 01:19:13.040                                                                                                                                                                        
[mkv] Chapter 14 from 01:27:29.786000000 to 00:00:00.000, 01:27:29.786                                                                                                                                                                       
[mkv] Chapter 15 from 01:32:24.789000000 to 00:00:00.000, 01:32:24.789                                                                                                                                                                       
[mkv] |+ found cluster                                                                                                                                                                                                                       
[mkv] Deferring reading cues.                                                                                                                                                                                                                
[mkv] All headers are parsed!                                                                                                                                                                                                                
[demux] Detected file format: Matroska                                                                                                                                                                                                       
[find_files] Loading external files in .                                                                                                                                                                                                     
[global] config path: 'sub/' -/-> '/home/roberth/.config/mpv/sub/'                                                                                                                                                                           
[global] config path: 'sub/' -/-> '/home/roberth/.mpv/sub/'                                                                                                                                                                                  
[global] config path: 'sub/' -/-> '/etc/mpv/sub/'                                                                                                                                                                                            
[global] config path: 'audio/' -/-> '/home/roberth/.config/mpv/audio/'                                                                                                                                                                       
[global] config path: 'audio/' -/-> '/home/roberth/.mpv/audio/'                                                                                                                                                                              
[global] config path: 'audio/' -/-> '/etc/mpv/audio/'                                                                                                                                                                                        
[cplayer]  (+) Video --vid=1 (*) (h264)
[cplayer]  (+) Audio --aid=1 --alang=eng (*) (ac3)
[vo/opengl-hq] Setting option 'interpolation' = '' (flags = 0)
[vo/opengl-hq] Setting option 'scale' = 'ewa_lanczossharp' (flags = 0)                                                                                                                                                                       
[vo/opengl-hq] Initializing OpenGL backend 'wayland'                                                                                                                                                                                         
[vo/opengl-hq/wayland] failed to connect to a wayland server: check if a wayland compositor is running                                                                                                                                       
[vo/opengl-hq] Initializing OpenGL backend 'x11probe'                                                                                                                                                                                        
[vo/opengl-hq/x11] X11 opening display: :0                                                                                                                                                                                                   
[vo/opengl-hq/x11] X11 running at 1920x1080 (":0" => local display)                                                                                                                                                                          
[vo/opengl-hq/x11] Detected wm supports NetWM.                                                                                                                                                                                               
[vo/opengl-hq/x11] Detected wm supports FULLSCREEN state.                                                                                                                                                                                    
[vo/opengl-hq/x11] Detected wm supports ABOVE state.                                                                                                                                                                                         
[vo/opengl-hq/x11] Detected wm supports BELOW state.                                                                                                                                                                                         
[vo/opengl-hq/x11] Detected wm supports STAYS_ON_TOP state.                                                                                                                                                                                  
[vo/opengl-hq/x11] Display 0 (HDMI-A-0): [0, 0, 1920, 1080] @ 60.000000 FPS                                                                                                                                                                  
[vo/opengl-hq/x11] Current display FPS: 60.000000                                                                                                                                                                                            
[vo/opengl-hq] GLX chose FB config with ID 0x842f7bf0                                                                                                                                                                                        
[vo/opengl-hq] GLX chose visual with ID 0x310                                                                                                                                                                                                
[vo/opengl-hq] Creating OpenGL 3.3 context...                                                                                                                                                                                                
[vo/opengl-hq] GL_VERSION='4.3 (Core Profile) Mesa 12.1.0-devel (git-83e8617)'                                                                                                                                                               
[vo/opengl-hq] Detected desktop OpenGL 4.3.                                                                                                                                                                                                  
[vo/opengl-hq] GL_VENDOR='X.Org'                                                                                                                                                                                                             
[vo/opengl-hq] GL_RENDERER='Gallium 0.4 on AMD TONGA (DRM 3.2.0 / 4.7.3-1-ARCH, LLVM 4.0.0)'                                                                                                                                                 
[vo/opengl-hq] GL_SHADING_LANGUAGE_VERSION='4.30'                                                                                                                                                                                            
[vo/opengl-hq] Loaded extension GLX_SGI_swap_control.                                                                                                                                                                                        
[vo/opengl-hq] Loaded extension GLX_SGI_video_sync.                                                                                                                                                                                          
[vo/opengl-hq] Loaded extension GL_NV_vdpau_interop.                                                                                                                                                                                         
[vo/opengl-hq] 16 bit texture depth: 16.                                                                                                                                                                                                     
[vo/opengl-hq] Reported display depth: R=8, G=8, B=8                                                                                                                                                                                         
[vo/opengl-hq] Testing FBO format 0x805b                                                                                                                                                                                                     
[vo/opengl-hq] Create FBO: 16x16 (16x16)                                                                                                                                                                                                     
[vo/opengl-hq] Using FBO format 0x805b.                                                                                                                                                                                                      
[vo/opengl-hq] Assuming 60.000000 FPS for display sync.                                                                                                                                                                                      
[vd] Container reported FPS: 23.975986                                                                                                                                                                                                       
[vd] Codec list:                                                                                                                                                                                                                             
[vd]     lavc:h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10                                                                                                                                                                               
[vd] Opening video decoder lavc:h264                                                                                                                                                                                                         
[vd] Using software decoding.                                                                                                                                                                                                                
[vd] Detected 4 logical cores.                                                                                                                                                                                                               
[vd] Requesting 5 threads for decoding.                                                                                                                                                                                                      
[vd] Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]                                                                                                                                                             
[vo/opengl-hq/x11] Disabling screensaver.                                                                                                                                                                                                    
[ad] Codec list:                                                                                                                                                                                                                             
[ad]     lavc:ac3 - ATSC A/52A (AC-3)                                                                                                                                                                                                        
[ad]     lavc:ac3_fixed (ac3) - ATSC A/52A (AC-3)                                                                                                                                                                                            
[ad] Opening audio decoder lavc:ac3                                                                                                                                                                                                          
[ad] Requesting 1 threads for decoding.                                                                                                                                                                                                      
[ad] Selected audio codec: ATSC A/52A (AC-3) [lavc:ac3]                                                                                                                                                                                      
[cplayer] Starting playback...                                                                                                                                                                                                               
[af] Audio filter chain:                                                                                                                                                                                                                     
[af]   [in] 48000Hz 5.1(side) 6ch floatp                                                                                                                                                                                                     
[af]   [out] 48000Hz 5.1(side) 6ch floatp                                                                                                                                                                                                    
[af]   [ao] 48000Hz 5.1(side) 6ch floatp                                                                                                                                                                                                     
[ao] Trying audio driver 'alsa'                                                                                                                                                                                                              
[ao/alsa] Setting option 'device' = 'plughw:1,0' (flags = 0)                                                                                                                                                                                 
[ao/alsa] requested format: 48000 Hz, 5.1(side) channels, floatp                                                                                                                                                                             
[ao/alsa] using ALSA version: 1.1.2                                                                                                                                                                                                          
[ao/alsa] opening device 'plughw:1,0'                                                                                                                                                                                                        
[ao/alsa] Playback open error: Device or resource busy
[ao] Failed to initialize audio driver 'alsa'                                                                                                                                                                                                
[cplayer] Could not open/initialize audio device -> no sound.                                                                                                                                                                                
[ad] Uninit audio decoder.
[cplayer] Audio: no audio
[vd] Decoder format: 1920x800 [0:1] yuv420p auto/auto CL=mpeg2/4/h264
[vd] Using container aspect ratio.                                                                                                                                                                                                           
[vf] Video filter chain:                                                                                                                                                                                                                     
[vf]   [in] 1920x800 yuv420p bt.709/limited CL=mpeg2/4/h264                                                                                                                                                                                  
[vf]   [out] 1920x800 yuv420p bt.709/limited CL=mpeg2/4/h264                                                                                                                                                                                 
[cplayer] VO: [opengl-hq] 1920x800 yuv420p
[cplayer] VO: Description: Extended OpenGL Renderer (high quality rendering preset)
[vo/opengl-hq] Resize: 1920x800                                                                                                                                                                                                              
[vo/opengl-hq] Window size: 1920x800                                                                                                                                                                                                         
[vo/opengl-hq] Video source: 1920x800 (1:1)                                                                                                                                                                                                  
[vo/opengl-hq] Video display: (0, 0) 1920x800 -> (0, 0) 1920x800                                                                                                                                                                             
[vo/opengl-hq] Video scale: 1.000000/1.000000                                                                                                                                                                                                
[vo/opengl-hq] OSD borders: l=0 t=0 r=0 b=0                                                                                                                                                                                                  
[vo/opengl-hq] Video borders: l=0 t=0 r=0 b=0                                                                                                                                                                                                
[vo/opengl-hq] Testing FBO format 0x805b                                                                                                                                                                                                     
[vo/opengl-hq] Create FBO: 16x16 (16x16)                                                                                                                                                                                                     
[vo/opengl-hq] Using FBO format 0x805b.                                                                                                                                                                                                      
[vo/opengl-hq] Texture for plane 0: 1920x800                                                                                                                                                                                                 
[vo/opengl-hq] Texture for plane 1: 960x400                                                                                                                                                                                                  
[vo/opengl-hq] Texture for plane 2: 960x400                                                                                                                                                                                                  
[cplayer] set video colors output-levels=0                                                                                                                                                                                                   
[vo/opengl-hq] Create FBO: 960x400 (960x400)                                                                                                                                                                                                 
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] // merging plane 1 ...                                                                                                                                                                                                  
[vo/opengl-hq] [  2] color.r = 1.000000 * vec4(texture(texture0, texcoord0)).r;                                                                                                                                                              
[vo/opengl-hq] [  3] // merging plane 2 ... into 1                                                                                                                                                                                           
[vo/opengl-hq] [  4] color.g = 1.000000 * vec4(texture(texture1, texcoord1)).r;                                                                                                                                                              
[vo/opengl-hq] Create FBO: 1920x800 (1920x800)                                                                                                                                                                                               
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] header:                                                                                                                                                                                                                       
[vo/opengl-hq] [  1] #define HOOKED_raw texture0                                                                                                                                                                                             
[vo/opengl-hq] [  2] #define HOOKED_pos texcoord0                                                                                                                                                                                            
[vo/opengl-hq] [  3] #define HOOKED_size texture_size0                                                                                                                                                                                       
[vo/opengl-hq] [  4] #define HOOKED_rot texture_rot0                                                                                                                                                                                         
[vo/opengl-hq] [  5] #define HOOKED_pt pixel_size0                                                                                                                                                                                           
[vo/opengl-hq] [  6] #define HOOKED_tex(pos) (1.000000 * vec4(texture(HOOKED_raw, pos)).rgba)                                                                                                                                                
[vo/opengl-hq] [  7] #define HOOKED_texOff(off) HOOKED_tex(HOOKED_pos + HOOKED_pt * vec2(off))                                                                                                                                               
[vo/opengl-hq] [  8] #define LUMA_raw texture0                                                                                                                                                                                               
[vo/opengl-hq] [  9] #define LUMA_pos texcoord0                                                                                                                                                                                              
[vo/opengl-hq] [ 10] #define LUMA_size texture_size0                                                                                                                                                                                         
[vo/opengl-hq] [ 11] #define LUMA_rot texture_rot0                                                                                                                                                                                           
[vo/opengl-hq] [ 12] #define LUMA_pt pixel_size0                                                                                                                                                                                             
[vo/opengl-hq] [ 13] #define LUMA_tex(pos) (1.000000 * vec4(texture(LUMA_raw, pos)).rgba)                                                                                                                                                    
[vo/opengl-hq] [ 14] #define LUMA_texOff(off) LUMA_tex(LUMA_pos + LUMA_pt * vec2(off))                                                                                                                                                       
[vo/opengl-hq] [ 15] float mod289(float x) { return x - floor(x / 289.0) * 289.0; }                                                                                                                                                          
[vo/opengl-hq] [ 16] float permute(float x) { return mod289((34.0*x + 1.0) * x); }                                                                                                                                                           
[vo/opengl-hq] [ 17] float rand(float x) { return fract(x / 41.0); }                                                                                                                                                                         
[vo/opengl-hq] [ 18] vec4 average(float range, inout float h) {                                                                                                                                                                              
[vo/opengl-hq] [ 19] float dist = rand(h) * range; h = permute(h);                                                                                                                                                                           
[vo/opengl-hq] [ 20] float dir = rand(h) * 6.2831853; h = permute(h);                                                                                                                                                                        
[vo/opengl-hq] [ 21] vec2 o = dist * vec2(cos(dir), sin(dir));                                                                                                                                                                               
[vo/opengl-hq] [ 22] vec4 ref[4];                                                                                                                                                                                                            
[vo/opengl-hq] [ 23] ref[0] = HOOKED_texOff(vec2( o.x, o.y));                                                                                                                                                                                
[vo/opengl-hq] [ 24] ref[1] = HOOKED_texOff(vec2(-o.y, o.x));                                                                                                                                                                                
[vo/opengl-hq] [ 25] ref[2] = HOOKED_texOff(vec2(-o.x, -o.y));                                                                                                                                                                               
[vo/opengl-hq] [ 26] ref[3] = HOOKED_texOff(vec2( o.y, -o.x));                                                                                                                                                                               
[vo/opengl-hq] [ 27] return (ref[0] + ref[1] + ref[2] + ref[3])/4.0;                                                                                                                                                                         
[vo/opengl-hq] [ 28] }                                                                                                                                                                                                                       
[vo/opengl-hq] body:                                                                                                                                                                                                                         
[vo/opengl-hq] [  1] {                                                                                                                                                                                                                       
[vo/opengl-hq] [  2] vec3 _m = vec3(HOOKED_pos, random) + vec3(1.0);                                                                                                                                                                         
[vo/opengl-hq] [  3] float h = permute(permute(permute(_m.x)+_m.y)+_m.z);                                                                                                                                                                    
[vo/opengl-hq] [  4] color = HOOKED_tex(HOOKED_pos);                                                                                                                                                                                         
[vo/opengl-hq] [  5] vec4 avg, diff;                                                                                                                                                                                                         
[vo/opengl-hq] [  6] avg = average(16.000000, h);                                                                                                                                                                                            
[vo/opengl-hq] [  7] diff = abs(color - avg);                                                                                                                                                                                                
[vo/opengl-hq] [  8] color = mix(avg, color, greaterThan(diff, vec4(0.003906)));                                                                                                                                                             
[vo/opengl-hq] [  9] vec3 noise;                                                                                                                                                                                                             
[vo/opengl-hq] [ 10] noise.x = rand(h); h = permute(h);                                                                                                                                                                                      
[vo/opengl-hq] [ 11] noise.y = rand(h); h = permute(h);                                                                                                                                                                                      
[vo/opengl-hq] [ 12] noise.z = rand(h); h = permute(h);                                                                                                                                                                                      
[vo/opengl-hq] [ 13] color.xyz += 0.005859 * (noise - vec3(0.5));                                                                                                                                                                            
[vo/opengl-hq] [ 14] }                                                                                                                                                                                                                       
[vo/opengl-hq] [ 15] color.g = 0.000000;                                                                                                                                                                                                     
[vo/opengl-hq] [ 16] color.b = 0.000000;                                                                                                                                                                                                     
[vo/opengl-hq] [ 17] color.a = 1.000000;                                                                                                                                                                                                     
[vo/opengl-hq] Create FBO: 960x400 (960x400)                                                                                                                                                                                                 
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] header:                                                                                                                                                                                                                       
[vo/opengl-hq] [  1] #define HOOKED_raw texture0                                                                                                                                                                                             
[vo/opengl-hq] [  2] #define HOOKED_pos texcoord0                                                                                                                                                                                            
[vo/opengl-hq] [  3] #define HOOKED_size texture_size0                                                                                                                                                                                       
[vo/opengl-hq] [  4] #define HOOKED_rot texture_rot0                                                                                                                                                                                         
[vo/opengl-hq] [  5] #define HOOKED_pt pixel_size0                                                                                                                                                                                           
[vo/opengl-hq] [  6] #define HOOKED_tex(pos) (1.000000 * vec4(texture(HOOKED_raw, pos)).rgba)                                                                                                                                                
[vo/opengl-hq] [  7] #define HOOKED_texOff(off) HOOKED_tex(HOOKED_pos + HOOKED_pt * vec2(off))                                                                                                                                               
[vo/opengl-hq] [  8] #define CHROMA_raw texture0                                                                                                                                                                                             
[vo/opengl-hq] [  9] #define CHROMA_pos texcoord0                                                                                                                                                                                            
[vo/opengl-hq] [ 10] #define CHROMA_size texture_size0                                                                                                                                                                                       
[vo/opengl-hq] [ 11] #define CHROMA_rot texture_rot0                                                                                                                                                                                         
[vo/opengl-hq] [ 12] #define CHROMA_pt pixel_size0                                                                                                                                                                                           
[vo/opengl-hq] [ 13] #define CHROMA_tex(pos) (1.000000 * vec4(texture(CHROMA_raw, pos)).rgba)                                                                                                                                                
[vo/opengl-hq] [ 14] #define CHROMA_texOff(off) CHROMA_tex(CHROMA_pos + CHROMA_pt * vec2(off))                                                                                                                                               
[vo/opengl-hq] [ 15] float mod289(float x) { return x - floor(x / 289.0) * 289.0; }                                                                                                                                                          
[vo/opengl-hq] [ 16] float permute(float x) { return mod289((34.0*x + 1.0) * x); }                                                                                                                                                           
[vo/opengl-hq] [ 17] float rand(float x) { return fract(x / 41.0); }                                                                                                                                                                         
[vo/opengl-hq] [ 18] vec4 average(float range, inout float h) {                                                                                                                                                                              
[vo/opengl-hq] [ 19] float dist = rand(h) * range; h = permute(h);                                                                                                                                                                           
[vo/opengl-hq] [ 20] float dir = rand(h) * 6.2831853; h = permute(h);                                                                                                                                                                        
[vo/opengl-hq] [ 21] vec2 o = dist * vec2(cos(dir), sin(dir));                                                                                                                                                                               
[vo/opengl-hq] [ 22] vec4 ref[4];                                                                                                                                                                                                            
[vo/opengl-hq] [ 23] ref[0] = HOOKED_texOff(vec2( o.x, o.y));                                                                                                                                                                                
[vo/opengl-hq] [ 24] ref[1] = HOOKED_texOff(vec2(-o.y, o.x));                                                                                                                                                                                
[vo/opengl-hq] [ 25] ref[2] = HOOKED_texOff(vec2(-o.x, -o.y));                                                                                                                                                                               
[vo/opengl-hq] [ 26] ref[3] = HOOKED_texOff(vec2( o.y, -o.x));                                                                                                                                                                               
[vo/opengl-hq] [ 27] return (ref[0] + ref[1] + ref[2] + ref[3])/4.0;                                                                                                                                                                         
[vo/opengl-hq] [ 28] }                                                                                                                                                                                                                       
[vo/opengl-hq] body:                                                                                                                                                                                                                         
[vo/opengl-hq] [  1] {                                                                                                                                                                                                                       
[vo/opengl-hq] [  2] vec3 _m = vec3(HOOKED_pos, random) + vec3(1.0);                                                                                                                                                                         
[vo/opengl-hq] [  3] float h = permute(permute(permute(_m.x)+_m.y)+_m.z);                                                                                                                                                                    
[vo/opengl-hq] [  4] color = HOOKED_tex(HOOKED_pos);                                                                                                                                                                                         
[vo/opengl-hq] [  5] vec4 avg, diff;                                                                                                                                                                                                         
[vo/opengl-hq] [  6] avg = average(16.000000, h);                                                                                                                                                                                            
[vo/opengl-hq] [  7] diff = abs(color - avg);                                                                                                                                                                                                
[vo/opengl-hq] [  8] color = mix(avg, color, greaterThan(diff, vec4(0.003906)));                                                                                                                                                             
[vo/opengl-hq] [  9] vec3 noise;                                                                                                                                                                                                             
[vo/opengl-hq] [ 10] noise.x = rand(h); h = permute(h);                                                                                                                                                                                      
[vo/opengl-hq] [ 11] noise.y = rand(h); h = permute(h);                                                                                                                                                                                      
[vo/opengl-hq] [ 12] noise.z = rand(h); h = permute(h);                                                                                                                                                                                      
[vo/opengl-hq] [ 13] color.xyz += 0.005859 * (noise - vec3(0.5));                                                                                                                                                                            
[vo/opengl-hq] [ 14] }                                                                                                                                                                                                                       
[vo/opengl-hq] [ 15] color.b = 0.000000;                                                                                                                                                                                                     
[vo/opengl-hq] [ 16] color.a = 1.000000;                                                                                                                                                                                                     
[vo/opengl-hq] Create FBO: 960x800 (960x1024)                                                                                                                                                                                                
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] // upscaling plane 1                                                                                                                                                                                                    
[vo/opengl-hq] [  2] #undef tex                                                                                                                                                                                                              
[vo/opengl-hq] [  3] #define tex texture0                                                                                                                                                                                                    
[vo/opengl-hq] [  4] vec2 pos = texcoord0;                                                                                                                                                                                                   
[vo/opengl-hq] [  5] vec2 size = texture_size0;                                                                                                                                                                                              
[vo/opengl-hq] [  6] vec2 pt = pixel_size0;                                                                                                                                                                                                  
[vo/opengl-hq] [  7] // pass 1                                                                                                                                                                                                               
[vo/opengl-hq] [  8] color = vec4(0.0);                                                                                                                                                                                                      
[vo/opengl-hq] [  9] {                                                                                                                                                                                                                       
[vo/opengl-hq] [ 10] vec2 dir = vec2(0.0, 1.0);                                                                                                                                                                                              
[vo/opengl-hq] [ 11] pt *= dir;                                                                                                                                                                                                              
[vo/opengl-hq] [ 12] float fcoord = dot(fract(pos * size - vec2(0.5)), dir);                                                                                                                                                                 
[vo/opengl-hq] [ 13] vec2 base = pos - fcoord * pt - pt * vec2(2.0);                                                                                                                                                                         
[vo/opengl-hq] [ 14] vec4 c;                                                                                                                                                                                                                 
[vo/opengl-hq] [ 15] float fcoord_lut = LUT_POS(fcoord, 64.0);                                                                                                                                                                               
[vo/opengl-hq] [ 16] vec4 c1 = texture(lut, vec2(0.25, fcoord_lut));                                                                                                                                                                         
[vo/opengl-hq] [ 17] vec4 c2 = texture(lut, vec2(0.75, fcoord_lut));                                                                                                                                                                         
[vo/opengl-hq] [ 18] float weights[6] = float[](c1.r, c1.g, c1.b, c2.r, c2.g, c2.b);                                                                                                                                                         
[vo/opengl-hq] [ 19] // scaler samples                                                                                                                                                                                                       
[vo/opengl-hq] [ 20] c = texture(tex, base + pt * vec2(0.0));                                                                                                                                                                                
[vo/opengl-hq] [ 21] color += vec4(weights[0]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 22] c = texture(tex, base + pt * vec2(1.0));                                                                                                                                                                                
[vo/opengl-hq] [ 23] color += vec4(weights[1]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 24] c = texture(tex, base + pt * vec2(2.0));                                                                                                                                                                                
[vo/opengl-hq] [ 25] color += vec4(weights[2]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 26] c = texture(tex, base + pt * vec2(3.0));                                                                                                                                                                                
[vo/opengl-hq] [ 27] color += vec4(weights[3]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 28] c = texture(tex, base + pt * vec2(4.0));                                                                                                                                                                                
[vo/opengl-hq] [ 29] color += vec4(weights[4]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 30] c = texture(tex, base + pt * vec2(5.0));                                                                                                                                                                                
[vo/opengl-hq] [ 31] color += vec4(weights[5]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 32] }                                                                                                                                                                                                                       
[vo/opengl-hq] [ 33] color *= 1.000000;                                                                                                                                                                                                      
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)                                                                                                                                                                                              
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] #undef tex                                                                                                                                                                                                              
[vo/opengl-hq] [  2] #define tex texture0                                                                                                                                                                                                    
[vo/opengl-hq] [  3] vec2 pos = texcoord0;                                                                                                                                                                                                   
[vo/opengl-hq] [  4] vec2 size = texture_size0;                                                                                                                                                                                              
[vo/opengl-hq] [  5] vec2 pt = pixel_size0;                                                                                                                                                                                                  
[vo/opengl-hq] [  6] // pass 2                                                                                                                                                                                                               
[vo/opengl-hq] [  7] color = vec4(0.0);                                                                                                                                                                                                      
[vo/opengl-hq] [  8] {                                                                                                                                                                                                                       
[vo/opengl-hq] [  9] vec2 dir = vec2(1.0, 0.0);                                                                                                                                                                                              
[vo/opengl-hq] [ 10] pt *= dir;                                                                                                                                                                                                              
[vo/opengl-hq] [ 11] float fcoord = dot(fract(pos * size - vec2(0.5)), dir);                                                                                                                                                                 
[vo/opengl-hq] [ 12] vec2 base = pos - fcoord * pt - pt * vec2(2.0);                                                                                                                                                                         
[vo/opengl-hq] [ 13] vec4 c;                                                                                                                                                                                                                 
[vo/opengl-hq] [ 14] float fcoord_lut = LUT_POS(fcoord, 64.0);                                                                                                                                                                               
[vo/opengl-hq] [ 15] vec4 c1 = texture(lut, vec2(0.25, fcoord_lut));                                                                                                                                                                         
[vo/opengl-hq] [ 16] vec4 c2 = texture(lut, vec2(0.75, fcoord_lut));                                                                                                                                                                         
[vo/opengl-hq] [ 17] float weights[6] = float[](c1.r, c1.g, c1.b, c2.r, c2.g, c2.b);                                                                                                                                                         
[vo/opengl-hq] [ 18] // scaler samples                                                                                                                                                                                                       
[vo/opengl-hq] [ 19] c = texture(tex, base + pt * vec2(0.0));                                                                                                                                                                                
[vo/opengl-hq] [ 20] color += vec4(weights[0]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 21] c = texture(tex, base + pt * vec2(1.0));                                                                                                                                                                                
[vo/opengl-hq] [ 22] color += vec4(weights[1]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 23] c = texture(tex, base + pt * vec2(2.0));                                                                                                                                                                                
[vo/opengl-hq] [ 24] color += vec4(weights[2]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 25] c = texture(tex, base + pt * vec2(3.0));                                                                                                                                                                                
[vo/opengl-hq] [ 26] color += vec4(weights[3]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 27] c = texture(tex, base + pt * vec2(4.0));                                                                                                                                                                                
[vo/opengl-hq] [ 28] color += vec4(weights[4]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 29] c = texture(tex, base + pt * vec2(5.0));                                                                                                                                                                                
[vo/opengl-hq] [ 30] color += vec4(weights[5]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 31] }                                                                                                                                                                                                                       
[vo/opengl-hq] [ 32] color.b = 0.000000;                                                                                                                                                                                                     
[vo/opengl-hq] [ 33] color.a = 1.000000;                                                                                                                                                                                                     
[vo/opengl-hq] Create FBO: 1920x800 (1920x800)                                                                                                                                                                                               
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] // combining planes                                                                                                                                                                                                     
[vo/opengl-hq] [  2] color.r = 1.000000 * vec4(texture(texture0, texcoord0)).r;                                                                                                                                                              
[vo/opengl-hq] [  3] color.gb = 1.000000 * vec4(texture(texture1, texcoord1)).rg;                                                                                                                                                            
[vo/opengl-hq] [  4] // color conversion                                                                                                                                                                                                     
[vo/opengl-hq] [  5] color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;                                                                                                                                                              
[vo/opengl-hq] [  6] color.a = 1.0;                                                                                                                                                                                                          
[vo/opengl-hq] [  7] // scaler pre-conversion                                                                                                                                                                                                
[vo/opengl-hq] [  8] color.rgb = clamp(color.rgb, 0.0, 1.0);                                                                                                                                                                                 
[vo/opengl-hq] [  9] color.rgb = pow(color.rgb, vec3(2.4));                                                                                                                                                                                  
[vo/opengl-hq] [ 10] // main scaling                                                                                                                                                                                                         
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)                                                                                                                                                                                              
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] #undef tex                                                                                                                                                                                                              
[vo/opengl-hq] [  2] #define tex texture0                                                                                                                                                                                                    
[vo/opengl-hq] [  3] vec2 pos = texcoord0;                                                                                                                                                                                                   
[vo/opengl-hq] [  4] vec2 size = texture_size0;                                                                                                                                                                                              
[vo/opengl-hq] [  5] vec2 pt = pixel_size0;                                                                                                                                                                                                  
[vo/opengl-hq] [  6] color = texture(tex, pos);                                                                                                                                                                                              
[vo/opengl-hq] [  7] color *= 1.000000;                                                                                                                                                                                                      
[vo/opengl-hq] [  8] color.a = 1.000000;                                                                                                                                                                                                     
[vo/opengl-hq] [  9] // scaler post-conversion                                                                                                                                                                                               
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)                                                                                                                                                                                              
[vo/opengl-hq] Dither to 8.                                                                                                                                                                                                                  
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] color.rgb = 1.000000 * vec4(texture(texture0, texcoord0)).rgb;                                                                                                                                                          
[vo/opengl-hq] [  2] // color mapping                                                                                                                                                                                                        
[vo/opengl-hq] [  3] color.rgb = clamp(color.rgb, 0.0, 1.0);                                                                                                                                                                                 
[vo/opengl-hq] [  4] color.rgb = pow(color.rgb, vec3(1.0/2.4));                                                                                                                                                                              
[vo/opengl-hq] [  5] // dithering                                                                                                                                                                                                            
[vo/opengl-hq] [  6] vec2 dither_pos = gl_FragCoord.xy / 64.0;                                                                                                                                                                               
[vo/opengl-hq] [  7] float dither_value = texture(dither, dither_pos).r;                                                                                                                                                                     
[vo/opengl-hq] [  8] color = floor(color * 255.0 + dither_value + 0.5 / 4096.0) / 255.0;                                                                                                                                                     
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/TTF/DejaVuSans.ttf, 0, DejaVuSans                                                                                                                                          
[cplayer] first video frame after restart shown                                                                                                                                                                                              
[cplayer] playback restart complete                                                                                                                                                                                                          
[statusline] V: 00:00:00 / 01:41:12 (0%) DS: 2.500/0
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)                                                                                                                                                                                              
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)                                                                                                                                                                                              
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] color = vec4(0.0);                                                                                                                                                                                                      
[vo/opengl-hq] [  2] {                                                                                                                                                                                                                       
[vo/opengl-hq] [  3] vec4 c;                                                                                                                                                                                                                 
[vo/opengl-hq] [  4] float fcoord_lut = LUT_POS(fcoord, 64.0);                                                                                                                                                                               
[vo/opengl-hq] [  5] float weights[4];                                                                                                                                                                                                       
[vo/opengl-hq] [  6] c = texture(lut, vec2(1.0 / 2.0 + 0.0 / 1.0, fcoord_lut));                                                                                                                                                              
[vo/opengl-hq] [  7] weights[0] = c.r;                                                                                                                                                                                                       
[vo/opengl-hq] [  8] weights[1] = c.g;                                                                                                                                                                                                       
[vo/opengl-hq] [  9] weights[2] = c.b;                                                                                                                                                                                                       
[vo/opengl-hq] [ 10] weights[3] = c.a;                                                                                                                                                                                                       
[vo/opengl-hq] [ 11] // scaler samples                                                                                                                                                                                                       
[vo/opengl-hq] [ 12] c = texture(texture0, texcoord0);                                                                                                                                                                                       
[vo/opengl-hq] [ 13] color += vec4(weights[0]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 14] c = texture(texture1, texcoord1);                                                                                                                                                                                       
[vo/opengl-hq] [ 15] color += vec4(weights[1]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 16] c = texture(texture2, texcoord2);                                                                                                                                                                                       
[vo/opengl-hq] [ 17] color += vec4(weights[2]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 18] c = texture(texture3, texcoord3);                                                                                                                                                                                       
[vo/opengl-hq] [ 19] color += vec4(weights[3]) * c;                                                                                                                                                                                          
[vo/opengl-hq] [ 20] }                                                                                                                                                                                                                       
[vo/opengl-hq] [ 21] // color mapping                                                                                                                                                                                                        
[vo/opengl-hq] [ 22] color.rgb = clamp(color.rgb, 0.0, 1.0);                                                                                                                                                                                 
[vo/opengl-hq] [ 23] color.rgb = pow(color.rgb, vec3(1.0/2.4));                                                                                                                                                                              
[vo/opengl-hq] [ 24] // dithering                                                                                                                                                                                                            
[vo/opengl-hq] [ 25] vec2 dither_pos = gl_FragCoord.xy / 64.0;                                                                                                                                                                               
[vo/opengl-hq] [ 26] float dither_value = texture(dither, dither_pos).r;                                                                                                                                                                     
[vo/opengl-hq] [ 27] color = floor(color * 255.0 + dither_value + 0.5 / 4096.0) / 255.0;                                                                                                                                                     
[statusline] V: 00:00:00 / 01:41:12 (0%) DS: 2.333/0
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)
[statusline] V: 00:00:00 / 01:41:12 (0%) DS: 2.500/0
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)
[statusline] V: 00:00:00 / 01:41:12 (0%) DS: 2.400/0
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)
[statusline] V: 00:00:00 / 01:41:12 (0%) DS: 2.500/1
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)
[statusline] V: 00:00:00 / 01:41:12 (0%) DS: 2.429/1
[vo/opengl-hq] Create FBO: 1920x800 (2048x1024)
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.492/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: enable-section, flags=0, args=[input, ]                                                                                                                                                                               
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/opengl-hq] Reallocating OSD texture to 1024x512.                                                                                                                                                                                         
[vo/opengl-hq] recompiling a shader program:                                                                                                                                                                                                 
[vo/opengl-hq] [  1] // OSD (libass)                                                                                                                                                                                                         
[vo/opengl-hq] [  2] color = vec4(ass_color.rgb, ass_color.a * texture(osdtex, texcoord).r);                                                                                                                                                 
[vo/opengl-hq] [  3] // color mapping                                                                                                                                                                                                        
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.492/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.492/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.493/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.493/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.493/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:02 / 01:41:12 (0%) DS: 2.493/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:03 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:03 / 01:41:12 (0%) DS: 2.493/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:03 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding2]                                                                                                                                                                     
[statusline] V: 00:00:03 / 01:41:12 (0%) DS: 2.494/1
[cplayer] Run command: disable-section, flags=0, args=[input]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: enable-section, flags=0, args=[input, ]                                                                                                                                                                               
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:27 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]                                                                                                                                                                     
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:28 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: disable-section, flags=0, args=[input]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: enable-section, flags=0, args=[input, ]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:29 / 01:41:12 (0%) DS: 2.500/1
[cplayer] Run command: quit, flags=9, args=[0]
[cplayer] EOF code: 6  
[vd] Uninit video.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/opengl-hq] flushing shader cache
[vo/opengl-hq/x11] Enabling screensaver.
[vo/opengl-hq/x11] uninit ...
@haasn

This comment has been minimized.

Member

haasn commented Sep 11, 2016

@roberth1990 Does replacing FBOTEX_FUZZY by 0 in video/out/opengl/video.c also fix it for you?

@lamarpavel

This comment has been minimized.

lamarpavel commented Sep 11, 2016

Heh, I've had this for some months, even made a screen shot some time ago to post about it here but never got around to it and I didn't know there was already a thread for it. So here is the screen shot and log:

https://0x0.st/Sq5.png

http://hastebin.com/raw/pefoseqipo

mesa 12.0.2-1
xf86-video-amdgpu 1.1.0-1

@lamarpavel

This comment has been minimized.

lamarpavel commented Sep 14, 2016

Here is another example of a video without black bars (native resolution in full screen): https://www.youtube.com/watch?v=c7M686pXr6M
screen shot: https://0x0.st/SfD.png

Does replacing FBOTEX_FUZZY by 0 in video/out/opengl/video.c also fix it for you?

I'll see if that works now, anything else I should test while I'm building from source?

edit: The above screen shot was still with mpv 0.20.0 from the arch repos. It's interesting to note that when not in full screen, the garbage pixels at the bottom don't appear but the gray line at the right side is flickering. In full screen however the gray line stops flickering and the garbage pixels at the bottom appear.

@lamarpavel

This comment has been minimized.

lamarpavel commented Sep 14, 2016

So yeah, replacing FBOXTEX_FUZZY with 0 in current master did fix it.

For reference: http://hastebin.com/raw/nawuqadapu

@haasn

This comment has been minimized.

Member

haasn commented Sep 16, 2016

@wm4 Seems like we can/should get rid of FBOTEX_FUZZY completely.

@wm4

This comment has been minimized.

Contributor

wm4 commented Sep 17, 2016

I don't mind, but what makes me nervous is that we still don't know what exactly causes these garbage pixels? (Since they shouldn't be happening.)

@lamarpavel

This comment has been minimized.

lamarpavel commented Sep 17, 2016

I have the exact same mpv configuration on different machines and these glitches appear only with the setup with an AMD card. On another setup with an Intel GPU I am using the same version of X11, mesa and mpv with the same window manager. The difference is really only the GPU and the GPU driver (mesa/radeon/xf86-video-amdgpu vs. mesa/Intel/xf86-video-intel). In both cases I am using vaapi for acceleration, though with the AMD card it's libva-mesa-driver as opposed to libva-intel-driver. When I get back home next week I'll try turning off the vaapi accel and see if that makes a difference - because it's either that or the video driver. Not that it would be your job to fix in either case, but narrowing it down should help creating a bug report to the mesa devs.

@wm4

This comment has been minimized.

Contributor

wm4 commented Sep 26, 2016

@lamarpavel : ping

This might actually be our fault, since cropping with hw decoding is not necessarily handled well.

@lamarpavel

This comment has been minimized.

lamarpavel commented Sep 27, 2016

Disabling hardware accel (hwdec=no) does not get rid of the garbage pixels. An interesting observation is that these artifacts do not appear in a foreseeable manner, they are just there most of the time when scaling to a resolution with different ratio (eg. 21:9 to full screen on a 16:9 screen) such that black bars appear. It appears these pixels are always on the same row, which is the very last of the actual image and never on the black bars. However, they are not in the same pattern all the time and starting other OpenGL applications has an impact on their appearance. I just opened a video with mpv and saw the garbage pixels, then closed mpv and ran quake3 for a minute, right after that the garbage pixels were not there in mpv for the first video I opened. But that is not entirely reproducible all of the time.

Note that this was with the release version:

mpv 0.20.0 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
 built on Sat Aug 27 12:41:39 CEST 2016
ffmpeg library versions:
   libavutil       55.28.100
   libavcodec      57.48.101
   libavformat     57.41.100
   libswscale      4.1.100
   libavfilter     6.47.100
   libswresample   2.1.100
ffmpeg version: 3.1.3

The artifacts are in fact gone with the patch applied as described a few posts earlier.

@haasn haasn closed this in 2af2fa7 Sep 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment