summaryrefslogtreecommitdiff
path: root/video/mp_image.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index 53b25c5..5591b2f 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
- * mpv is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * mpv is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with mpv. If not, see <http://www.gnu.org/licenses/>.
- *
- * Almost LGPL.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MPLAYER_MP_IMAGE_H
@@ -30,8 +28,6 @@
#include "csputils.h"
#include "video/img_format.h"
-#define MP_PALETTE_SIZE (256 * 4)
-
#define MP_IMGFIELD_TOP_FIRST 0x02
#define MP_IMGFIELD_REPEAT_FIRST 0x04
#define MP_IMGFIELD_INTERLACED 0x20
@@ -50,12 +46,18 @@ struct mp_spherical_params {
float ref_angles[3]; // yaw/pitch/roll, refer to AVSphericalMapping
};
+enum mp_image_hw_flags {
+ MP_IMAGE_HW_FLAG_OPAQUE = 1, // an opaque hw format is used - the exact
+ // format is subject to hwctx internals
+};
+
// Describes image parameters that usually stay constant.
// New fields can be added in the future. Code changing the parameters should
// usually copy the whole struct, so that fields added later will be preserved.
struct mp_image_params {
enum mp_imgfmt imgfmt; // pixel format
enum mp_imgfmt hw_subfmt; // underlying format for some hwaccel pixfmts
+ unsigned hw_flags; // bit mask of mp_image_hw_flags
int w, h; // image dimensions
int p_w, p_h; // define pixel aspect ratio (undefined: 0/0)
struct mp_colorspace color;
@@ -129,7 +131,6 @@ struct mp_image *mp_image_from_buffer(int imgfmt, int w, int h, int stride_align
struct mp_image *mp_image_alloc(int fmt, int w, int h);
void mp_image_copy(struct mp_image *dmpi, struct mp_image *mpi);
-void mp_image_copy_gpu(struct mp_image *dst, struct mp_image *src);
void mp_image_copy_attributes(struct mp_image *dmpi, struct mp_image *mpi);
struct mp_image *mp_image_new_copy(struct mp_image *img);
struct mp_image *mp_image_new_ref(struct mp_image *img);
@@ -185,6 +186,4 @@ void memcpy_pic(void *dst, const void *src, int bytesPerLine, int height,
void memset_pic(void *dst, int fill, int bytesPerLine, int height, int stride);
void memset16_pic(void *dst, int fill, int unitsPerLine, int height, int stride);
-void mp_check_gpu_memcpy(struct mp_log *log, bool *once);
-
#endif /* MPLAYER_MP_IMAGE_H */