summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/imgutils.c
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-10-01 15:25:44 +0200
committerGitHub <noreply@github.com>2018-10-01 15:25:44 +0200
commit8e8fcee4a55de171303ebe526d3cf051522111bf (patch)
treefef75d382fc6216a093eeaf80560473dff19d883 /media/ffvpx/libavutil/imgutils.c
parent79b00fc33b5cb6d56d29b50efac6d62ce3a89018 (diff)
parent45c24f05d023a2cd8289ed40a13708392ce2e6a4 (diff)
downloadUXP-8e8fcee4a55de171303ebe526d3cf051522111bf.tar
UXP-8e8fcee4a55de171303ebe526d3cf051522111bf.tar.gz
UXP-8e8fcee4a55de171303ebe526d3cf051522111bf.tar.lz
UXP-8e8fcee4a55de171303ebe526d3cf051522111bf.tar.xz
UXP-8e8fcee4a55de171303ebe526d3cf051522111bf.zip
Merge pull request #805 from MoonchildProductions/revert-801-update-from-upstream
Revert "Update ffvpx code to 4.0.2"
Diffstat (limited to 'media/ffvpx/libavutil/imgutils.c')
-rw-r--r--media/ffvpx/libavutil/imgutils.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/media/ffvpx/libavutil/imgutils.c b/media/ffvpx/libavutil/imgutils.c
index 4938a7ef6..500517880 100644
--- a/media/ffvpx/libavutil/imgutils.c
+++ b/media/ffvpx/libavutil/imgutils.c
@@ -125,7 +125,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
size[0] = linesizes[0] * height;
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) {
+ desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits words */
return size[0] + 256 * 4;
}
@@ -216,7 +216,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
av_free(buf);
return ret;
}
- if (desc->flags & AV_PIX_FMT_FLAG_PAL || (desc->flags & FF_PSEUDOPAL && pointers[1])) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
if (align < 4) {
av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a minimum alignment of 4\n");
@@ -225,7 +225,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
}
if ((desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) && pointers[1] &&
+ desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) &&
pointers[1] - pointers[0] > linesizes[0] * h) {
/* zero-initialize the padding before the palette */
memset(pointers[0] + linesizes[0] * h, 0,
@@ -242,10 +242,9 @@ typedef struct ImgUtils {
} ImgUtils;
static const AVClass imgutils_class = {
- .class_name = "IMGUTILS",
- .item_name = av_default_item_name,
- .option = NULL,
- .version = LIBAVUTIL_VERSION_INT,
+ .class_name = "IMGUTILS",
+ .item_name = av_default_item_name,
+ .version = LIBAVUTIL_VERSION_INT,
.log_level_offset_offset = offsetof(ImgUtils, log_offset),
.parent_log_context_offset = offsetof(ImgUtils, log_ctx),
};
@@ -354,13 +353,12 @@ static void image_copy(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4],
return;
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) {
+ desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
copy_plane(dst_data[0], dst_linesizes[0],
src_data[0], src_linesizes[0],
width, height);
/* copy the palette */
- if ((desc->flags & AV_PIX_FMT_FLAG_PAL) || (dst_data[1] && src_data[1]))
- memcpy(dst_data[1], src_data[1], 4*256);
+ memcpy(dst_data[1], src_data[1], 4*256);
} else {
int i, planes_nb = 0;
@@ -443,7 +441,7 @@ int av_image_get_buffer_size(enum AVPixelFormat pix_fmt,
return ret;
// do not include palette for these pseudo-paletted formats
- if (desc->flags & FF_PSEUDOPAL)
+ if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
return FFALIGN(width, align) * height;
return av_image_fill_arrays(data, linesize, NULL, pix_fmt,