mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 19:47:15 +08:00
75 lines
3.6 KiB
Diff
75 lines
3.6 KiB
Diff
diff -upr mplayer-vaapi-20101115.orig/patches/mplayer-vaapi.patch mplayer-vaapi-20101115/patches/mplayer-vaapi.patch
|
|
--- mplayer-vaapi-20101115.orig/patches/mplayer-vaapi.patch 2010-11-15 11:14:06.000000000 +0200
|
|
+++ mplayer-vaapi-20101115/patches/mplayer-vaapi.patch 2011-01-23 22:41:12.000000000 +0200
|
|
@@ -689,20 +689,20 @@ index bdf4d2f..65f0bd1 100644
|
|
--- a/libmpcodecs/img_format.c
|
|
+++ b/libmpcodecs/img_format.c
|
|
@@ -96,6 +96,14 @@ const char *vo_format_name(int format)
|
|
- case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first";
|
|
- case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation";
|
|
- case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT";
|
|
-+ case IMGFMT_VAAPI_MPEG2: return "MPEG-2 VA-API Acceleration";
|
|
-+ case IMGFMT_VAAPI_MPEG2_IDCT: return "MPEG-2 VA-API Acceleration (Motion Compensation and IDCT)";
|
|
-+ case IMGFMT_VAAPI_MPEG2_MOCO: return "MPEG-2 VA-API Acceleration (Motion Compensation)";
|
|
-+ case IMGFMT_VAAPI_MPEG4: return "MPEG-4 VA-API Acceleration";
|
|
-+ case IMGFMT_VAAPI_H263: return "H.263 VA-API Acceleration";
|
|
-+ case IMGFMT_VAAPI_H264: return "H.264 VA-API Acceleration";
|
|
-+ case IMGFMT_VAAPI_WMV3: return "WMV3 VA-API Acceleration";
|
|
-+ case IMGFMT_VAAPI_VC1: return "VC-1 VA-API Acceleration";
|
|
- case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration";
|
|
- case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration";
|
|
- case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration";
|
|
+ case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first";
|
|
+ case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation";
|
|
+ case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT";
|
|
++ case IMGFMT_VAAPI_MPEG2: return "MPEG-2 VA-API Acceleration";
|
|
++ case IMGFMT_VAAPI_MPEG2_IDCT: return "MPEG-2 VA-API Acceleration (Motion Compensation and IDCT)";
|
|
++ case IMGFMT_VAAPI_MPEG2_MOCO: return "MPEG-2 VA-API Acceleration (Motion Compensation)";
|
|
++ case IMGFMT_VAAPI_MPEG4: return "MPEG-4 VA-API Acceleration";
|
|
++ case IMGFMT_VAAPI_H263: return "H.263 VA-API Acceleration";
|
|
++ case IMGFMT_VAAPI_H264: return "H.264 VA-API Acceleration";
|
|
++ case IMGFMT_VAAPI_WMV3: return "WMV3 VA-API Acceleration";
|
|
++ case IMGFMT_VAAPI_VC1: return "VC-1 VA-API Acceleration";
|
|
+ case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration";
|
|
+ case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration";
|
|
+ case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration";
|
|
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h
|
|
index c95ed4d..403690e 100644
|
|
--- a/libmpcodecs/img_format.h
|
|
@@ -1259,9 +1259,9 @@ index 6d3ee7d..ac9371f 100644
|
|
+// void *get_hwaccel_context(void);
|
|
+#define VOCTRL_GET_HWACCEL_CONTEXT 33
|
|
+
|
|
- #define VO_TRUE 1
|
|
- #define VO_FALSE 0
|
|
- #define VO_ERROR -1
|
|
+ #define VO_TRUE 1
|
|
+ #define VO_FALSE 0
|
|
+ #define VO_ERROR -1
|
|
diff --git a/libvo/vo_vaapi.c b/libvo/vo_vaapi.c
|
|
new file mode 100644
|
|
index 0000000..f920d91
|
|
@@ -3688,10 +3688,10 @@ index 0000000..f920d91
|
|
+ enable_osd();
|
|
+}
|
|
+
|
|
-+static void draw_eosd(EOSD_ImageList *imgs)
|
|
++static void draw_eosd(struct mp_eosd_image_list *imgs)
|
|
+{
|
|
-+ ASS_Image *img = imgs->imgs;
|
|
-+ ASS_Image *i;
|
|
++ struct mp_eosd_image_list *img = eosd_image_first(imgs);
|
|
++ struct mp_eosd_image *i;
|
|
+ VAStatus status;
|
|
+
|
|
+ if (!va_eosd_draw_alpha)
|
|
@@ -3717,7 +3717,7 @@ index 0000000..f920d91
|
|
+
|
|
+ memset(va_eosd_image_data, 0, va_eosd_image.data_size);
|
|
+
|
|
-+ for (i = img; i; i = i->next)
|
|
++ for (i = img; i; i = eosd_image_next(imgs))
|
|
+ va_eosd_draw_alpha(i->bitmap, i->w, i->h, i->stride,
|
|
+ i->dst_x, i->dst_y, i->color);
|
|
+
|