Skip to content

Instantly share code, notes, and snippets.

View rossy's full-sized avatar
👊
平気、へっちゃら!

James Ross-Gowan rossy

👊
平気、へっちゃら!
View GitHub Profile
@rossy
rossy / .diff
Created October 26, 2014 04:14
diff --git i/video/decode/gpu_memcpy_sse4.h w/video/decode/gpu_memcpy_sse4.h
index c441ff3..160209b 100644
--- i/video/decode/gpu_memcpy_sse4.h
+++ w/video/decode/gpu_memcpy_sse4.h
@@ -19,14 +19,18 @@
* Taken from the QuickSync decoder by Eric Gur
*/
-#include <emmintrin.h>
+#ifndef GPU_MEMCPY_SSE4_H_
#include <windows.h>
#include <stdio.h>
void print_escaped(const wchar_t *s, FILE *stream)
{
fputwc('"', stream);
wchar_t c;
while ((c = *s++)) {
switch (c) {
@rossy
rossy / thread_name.c
Last active September 12, 2024 07:34
MinGW-w64 set_thread_name
#include <windows.h>
#include <winnt.h>
#include <winternl.h>
#include <pshpack8.h>
typedef struct {
DWORD dwType;
LPCSTR szName;
DWORD dwThreadID;
DWORD dwFlags;
[vo/opengl-hq] Detected GLES 2.0.
[vo/opengl-hq] GL_VENDOR='Google Inc.'
[vo/opengl-hq] GL_RENDERER='ANGLE (NVIDIA GeForce GTX 670 Direct3D11 vs_5_0 ps_5_0)'
[vo/opengl-hq] GL_VERSION='OpenGL ES 2.0 (ANGLE 2.1.2609bf4ca449)'
[vo/opengl-hq] GL_SHADING_LANGUAGE_VERSION='OpenGL ES GLSL ES 1.00 (ANGLE 2.1.2609bf4ca449)'
[vo/opengl-hq] Combined OpenGL extensions string:
[vo/opengl-hq] GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_sRGB GL_ANGLE_depth_texture GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_robustness G
@rossy
rossy / gist:16703760d18e44e05e65
Created December 21, 2014 00:53
mpv ANGLE/GLES3 output
Playing: [FFF] Chuunibyou demo Koi ga Shitai! - 07 [BD][720p-AAC][7F5F5B13] (1).mkv
[stream] Video (+) --vid=1 '10bit H.264 - 720p' (h264)
[stream] Audio (+) --aid=1 --alang=jpn (*) '2.0 AAC' (aac)
[stream] Subs (+) --sid=1 --slang=eng (*) 'URW' (ass)
[stream] Subs --sid=2 --slang=eng 'gg' (ass)
[vo/opengl-hq] Setting option 'fbo-format' = 'rgba' (flags = 0)
[vo/opengl-hq] Setting option 'backend' = 'angle' (flags = 0)
[vo/opengl-hq] Setting option 'swapinterval' = '1' (flags = 0)
[vo/opengl-hq] Detected GLES 3.0.
[vo/opengl-hq] GL_VENDOR='Google Inc.'
#define _WIN32_WINNT 0x0600
#include <windows.h>
#include <dwmapi.h>
#include <stdio.h>
#include <inttypes.h>
uint64_t qpc_freq;
static void print_ratio(const char *name, UNSIGNED_RATIO val)
{
@rossy
rossy / backtrace
Last active August 29, 2015 14:12
win32_pthreads deadlock log
KERNELBASE!SleepConditionVariableCS+0x28
C:\msys64\home\rossy\mpv\build/../osdep/win32/pthread.c:95
C:\msys64\home\rossy\mpv\build/../misc/dispatch.c:211
C:\msys64\home\rossy\mpv\build/../player/playloop.c:75
C:\msys64\home\rossy\mpv\build/../player/playloop.c:1023
...
KERNELBASE!SleepConditionVariableCS+0x28
C:\msys64\home\rossy\mpv\build/../osdep/win32/pthread.c:95
C:\msys64\home\rossy\mpv\build/../osdep/win32/pthread.c:115
@rossy
rossy / README.md
Last active August 29, 2015 14:12
mpv-install.bat
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"clang": {