Skip to content

Commit

Permalink
swscale: add opaque parameter to input functions
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Aug 19, 2022
1 parent ef2c2a2 commit f2de911
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 85 deletions.
12 changes: 6 additions & 6 deletions libswscale/hscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ static int lum_convert(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int
uint8_t * dst = desc->dst->plane[0].line[i];

if (c->lumToYV12) {
c->lumToYV12(dst, src[0], src[1], src[2], srcW, pal);
c->lumToYV12(dst, src[0], src[1], src[2], srcW, pal, c->input_opaque);
} else if (c->readLumPlanar) {
c->readLumPlanar(dst, src, srcW, c->input_rgb2yuv_table);
c->readLumPlanar(dst, src, srcW, c->input_rgb2yuv_table, c->input_opaque);
}


if (desc->alpha) {
dst = desc->dst->plane[3].line[i];
if (c->alpToYV12) {
c->alpToYV12(dst, src[3], src[1], src[2], srcW, pal);
c->alpToYV12(dst, src[3], src[1], src[2], srcW, pal, c->input_opaque);
} else if (c->readAlpPlanar) {
c->readAlpPlanar(dst, src, srcW, NULL);
c->readAlpPlanar(dst, src, srcW, NULL, c->input_opaque);
}
}
}
Expand Down Expand Up @@ -224,9 +224,9 @@ static int chr_convert(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int
uint8_t * dst1 = desc->dst->plane[1].line[i];
uint8_t * dst2 = desc->dst->plane[2].line[i];
if (c->chrToYV12) {
c->chrToYV12(dst1, dst2, src[0], src[1], src[2], srcW, pal);
c->chrToYV12(dst1, dst2, src[0], src[1], src[2], srcW, pal, c->input_opaque);
} else if (c->readChrPlanar) {
c->readChrPlanar(dst1, dst2, src, srcW, c->input_rgb2yuv_table);
c->readChrPlanar(dst1, dst2, src, srcW, c->input_rgb2yuv_table, c->input_opaque);
}
}
return sliceH;
Expand Down
Loading

0 comments on commit f2de911

Please sign in to comment.