summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c4
-rw-r--r--video/mp_image.c6
-rw-r--r--video/mp_image.h2
3 files changed, 3 insertions, 9 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 3c24c7e246..b0b3cd9208 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -52,10 +52,6 @@
#include "video/sws_utils.h"
#include "video/out/vo.h"
-#if AVPALETTE_SIZE != MP_PALETTE_SIZE
-#error palette too large, adapt video/mp_image.h:MP_PALETTE_SIZE
-#endif
-
#include "options/m_option.h"
static void init_avctx(struct dec_video *vd);
diff --git a/video/mp_image.c b/video/mp_image.c
index 6934ff4c58..603c5969ec 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -77,7 +77,7 @@ static int mp_image_layout(int imgfmt, int w, int h, int stride_align,
out_plane_size[n] = out_stride[n] * alloc_h;
}
if (desc.flags & MP_IMGFLAG_PAL)
- out_plane_size[1] = MP_PALETTE_SIZE;
+ out_plane_size[1] = AVPALETTE_SIZE;
int sum = 0;
for (int n = 0; n < MP_MAX_PLANES; n++) {
@@ -472,7 +472,7 @@ static void mp_image_copy_cb(struct mp_image *dst, struct mp_image *src,
}
// Watch out for AV_PIX_FMT_FLAG_PSEUDOPAL retardation
if ((dst->fmt.flags & MP_IMGFLAG_PAL) && dst->planes[1] && src->planes[1])
- memcpy(dst->planes[1], src->planes[1], MP_PALETTE_SIZE);
+ memcpy(dst->planes[1], src->planes[1], AVPALETTE_SIZE);
}
void mp_image_copy(struct mp_image *dst, struct mp_image *src)
@@ -508,7 +508,7 @@ void mp_image_copy_attributes(struct mp_image *dst, struct mp_image *src)
if ((dst->fmt.flags & MP_IMGFLAG_PAL) && (src->fmt.flags & MP_IMGFLAG_PAL)) {
if (dst->planes[1] && src->planes[1]) {
if (mp_image_make_writeable(dst))
- memcpy(dst->planes[1], src->planes[1], MP_PALETTE_SIZE);
+ memcpy(dst->planes[1], src->planes[1], AVPALETTE_SIZE);
}
}
av_buffer_unref(&dst->icc_profile);
diff --git a/video/mp_image.h b/video/mp_image.h
index cf8436a36d..5591b2fd9f 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -28,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