mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 11:47:04 +00:00
swscale/rgb2xyz: expose these functions internally
Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
parent
775de8c19d
commit
403a20b2e6
@ -637,8 +637,8 @@ static int check_image_pointers(const uint8_t * const data[4], enum AVPixelForma
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xyz12Torgb48(struct SwsContext *c, uint8_t *dst, int dst_stride,
|
void ff_xyz12Torgb48(const SwsContext *c, uint8_t *dst, int dst_stride,
|
||||||
const uint8_t *src, int src_stride, int w, int h)
|
const uint8_t *src, int src_stride, int w, int h)
|
||||||
{
|
{
|
||||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat);
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat);
|
||||||
|
|
||||||
@ -696,8 +696,8 @@ static void xyz12Torgb48(struct SwsContext *c, uint8_t *dst, int dst_stride,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rgb48Toxyz12(struct SwsContext *c, uint8_t *dst, int dst_stride,
|
void ff_rgb48Toxyz12(const SwsContext *c, uint8_t *dst, int dst_stride,
|
||||||
const uint8_t *src, int src_stride, int w, int h)
|
const uint8_t *src, int src_stride, int w, int h)
|
||||||
{
|
{
|
||||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
|
||||||
|
|
||||||
@ -1001,7 +1001,7 @@ static int scale_internal(SwsContext *c,
|
|||||||
base = srcStride[0] < 0 ? c->xyz_scratch - srcStride[0] * (srcSliceH-1) :
|
base = srcStride[0] < 0 ? c->xyz_scratch - srcStride[0] * (srcSliceH-1) :
|
||||||
c->xyz_scratch;
|
c->xyz_scratch;
|
||||||
|
|
||||||
xyz12Torgb48(c, base, srcStride[0], src2[0], srcStride[0], c->srcW, srcSliceH);
|
ff_xyz12Torgb48(c, base, srcStride[0], src2[0], srcStride[0], c->srcW, srcSliceH);
|
||||||
src2[0] = base;
|
src2[0] = base;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1073,7 +1073,7 @@ static int scale_internal(SwsContext *c,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* replace on the same data */
|
/* replace on the same data */
|
||||||
rgb48Toxyz12(c, dst, dstStride2[0], dst, dstStride2[0], c->dstW, ret);
|
ff_rgb48Toxyz12(c, dst, dstStride2[0], dst, dstStride2[0], c->dstW, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset slice direction at end of frame */
|
/* reset slice direction at end of frame */
|
||||||
|
@ -1034,6 +1034,12 @@ void ff_copyPlane(const uint8_t *src, int srcStride,
|
|||||||
int srcSliceY, int srcSliceH, int width,
|
int srcSliceY, int srcSliceH, int width,
|
||||||
uint8_t *dst, int dstStride);
|
uint8_t *dst, int dstStride);
|
||||||
|
|
||||||
|
void ff_xyz12Torgb48(const SwsContext *c, uint8_t *dst, int dst_stride,
|
||||||
|
const uint8_t *src, int src_stride, int w, int h);
|
||||||
|
|
||||||
|
void ff_rgb48Toxyz12(const SwsContext *c, uint8_t *dst, int dst_stride,
|
||||||
|
const uint8_t *src, int src_stride, int w, int h);
|
||||||
|
|
||||||
static inline void fillPlane16(uint8_t *plane, int stride, int width, int height, int y,
|
static inline void fillPlane16(uint8_t *plane, int stride, int width, int height, int y,
|
||||||
int alpha, int bits, const int big_endian)
|
int alpha, int bits, const int big_endian)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user