summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-01 22:03:38 +0100
committerwm4 <wm4@nowhere>2017-12-01 22:03:38 +0100
commit9d367cb0f9780a9d53f410dd11a23ca4cfec5e2f (patch)
tree053b61c9a7d1e6aa0ae1186e5ee8a9e713ffabb7 /video/mp_image.c
parentd891239d723e6197bdbb9bae7daafe593fff34bc (diff)
downloadmpv-9d367cb0f9780a9d53f410dd11a23ca4cfec5e2f.tar.bz2
mpv-9d367cb0f9780a9d53f410dd11a23ca4cfec5e2f.tar.xz
vd_lavc, mp_image: remove weird mpv specific palette constant
Was for times when we were trying to be less dependent on libav* I guess.
Diffstat (limited to 'video/mp_image.c')
-rw-r--r--video/mp_image.c6
1 files changed, 3 insertions, 3 deletions
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);