diff mbox series

[FFmpeg-devel,v2,4/5] swscale/rgb2xyz: expose these functions internally

Message ID 20241007175303.576863-4-ffmpeg@haasn.xyz
State New
Headers show
Series [FFmpeg-devel,v2,1/5] swscale/rgb2xyz: minor style fixes | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 fail Make failed

Commit Message

Niklas Haas Oct. 7, 2024, 5:53 p.m. UTC
From: Niklas Haas <git@haasn.dev>

---
 libswscale/swscale.c          | 12 ++++++------
 libswscale/swscale_internal.h |  6 ++++++
 2 files changed, 12 insertions(+), 6 deletions(-)

Comments

Michael Niedermayer Oct. 7, 2024, 6:38 p.m. UTC | #1
On Mon, Oct 07, 2024 at 07:53:02PM +0200, Niklas Haas wrote:
> From: Niklas Haas <git@haasn.dev>
> 
> ---
>  libswscale/swscale.c          | 12 ++++++------
>  libswscale/swscale_internal.h |  6 ++++++
>  2 files changed, 12 insertions(+), 6 deletions(-)

if they will be used, sure ok

thx

[...]
diff mbox series

Patch

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 2d7b987071..5f77cad402 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -637,8 +637,8 @@  static int check_image_pointers(const uint8_t * const data[4], enum AVPixelForma
     return 1;
 }
 
-static void xyz12Torgb48(struct SwsContext *c, uint8_t *dst, int dst_stride,
-                         const uint8_t *src, int src_stride, int w, int h)
+void ff_xyz12Torgb48(const SwsContext *c, uint8_t *dst, int dst_stride,
+                     const uint8_t *src, int src_stride, int w, int h)
 {
     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,
-                         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)
 {
     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) :
                                   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;
     }
 
@@ -1073,7 +1073,7 @@  static int scale_internal(SwsContext *c,
         }
 
         /* 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 */
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 1a991f11d8..cbafb9c8b4 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -1034,6 +1034,12 @@  void ff_copyPlane(const uint8_t *src, int srcStride,
                   int srcSliceY, int srcSliceH, int width,
                   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,
                                int alpha, int bits, const int big_endian)
 {