[vlc-commits] chroma: i420_nv12: remove forward declaration
Thomas Guillem
git at videolan.org
Fri Mar 16 16:08:19 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 9 18:40:50 2018 +0100| [52e2c531f142f53bec4079b0776afa2f3e3de7ee] | committer: Thomas Guillem
chroma: i420_nv12: remove forward declaration
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=52e2c531f142f53bec4079b0776afa2f3e3de7ee
---
modules/video_chroma/i420_nv12.c | 103 ++++++++++++++++++---------------------
1 file changed, 47 insertions(+), 56 deletions(-)
diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index b08f7ecd19..43b3253e01 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -34,19 +34,58 @@
#include <vlc_picture.h>
#include "copy.h"
-/*****************************************************************************
- * Local and extern prototypes.
- *****************************************************************************/
-static void I420_NV12( filter_t *, picture_t *, picture_t * );
-static void YV12_NV12( filter_t *, picture_t *, picture_t * );
-static picture_t *I420_NV12_Filter( filter_t *, picture_t * );
-static picture_t *YV12_NV12_Filter( filter_t *, picture_t * );
-
struct filter_sys_t
{
copy_cache_t cache;
};
+static void I420_YUV( filter_sys_t *p_sys, picture_t *p_src, picture_t *p_dst, bool invertUV )
+{
+ p_dst->format.i_x_offset = p_src->format.i_x_offset;
+ p_dst->format.i_y_offset = p_src->format.i_y_offset;
+
+ const size_t u_plane = invertUV ? V_PLANE : U_PLANE;
+ const size_t v_plane = invertUV ? U_PLANE : V_PLANE;
+
+ const size_t pitch[3] = {
+ p_src->p[Y_PLANE].i_pitch,
+ p_src->p[u_plane].i_pitch,
+ p_src->p[v_plane].i_pitch,
+ };
+
+ const uint8_t *plane[3] = {
+ (uint8_t*)p_src->p[Y_PLANE].p_pixels,
+ (uint8_t*)p_src->p[u_plane].p_pixels,
+ (uint8_t*)p_src->p[v_plane].p_pixels,
+ };
+
+ Copy420_P_to_SP( p_dst, plane, pitch,
+ p_src->format.i_y_offset + p_src->format.i_visible_height,
+ &p_sys->cache );
+}
+
+/*****************************************************************************
+ * planar I420 4:2:0 Y:U:V to planar NV12 4:2:0 Y:UV
+ *****************************************************************************/
+static void I420_NV12( filter_t *p_filter, picture_t *p_src,
+ picture_t *p_dst )
+{
+ I420_YUV( p_filter->p_sys, p_src, p_dst, false );
+}
+
+/*****************************************************************************
+ * planar YV12 4:2:0 Y:V:U to planar NV12 4:2:0 Y:UV
+ *****************************************************************************/
+static void YV12_NV12( filter_t *p_filter, picture_t *p_src,
+ picture_t *p_dst )
+{
+ I420_YUV( p_filter->p_sys, p_src, p_dst, true );
+}
+
+/* Following functions are local */
+VIDEO_FILTER_WRAPPER( I420_NV12 )
+VIDEO_FILTER_WRAPPER( YV12_NV12 )
+
/*****************************************************************************
* Create: allocate a chroma function
*****************************************************************************
@@ -108,54 +147,6 @@ static void Delete(vlc_object_t *p_this)
CopyCleanCache( &p_sys->cache );
}
-/* Following functions are local */
-VIDEO_FILTER_WRAPPER( I420_NV12 )
-VIDEO_FILTER_WRAPPER( YV12_NV12 )
-
-static void I420_YUV( filter_sys_t *p_sys, picture_t *p_src, picture_t *p_dst, bool invertUV )
-{
- p_dst->format.i_x_offset = p_src->format.i_x_offset;
- p_dst->format.i_y_offset = p_src->format.i_y_offset;
-
- const size_t u_plane = invertUV ? V_PLANE : U_PLANE;
- const size_t v_plane = invertUV ? U_PLANE : V_PLANE;
-
- const size_t pitch[3] = {
- p_src->p[Y_PLANE].i_pitch,
- p_src->p[u_plane].i_pitch,
- p_src->p[v_plane].i_pitch,
- };
-
- const uint8_t *plane[3] = {
- (uint8_t*)p_src->p[Y_PLANE].p_pixels,
- (uint8_t*)p_src->p[u_plane].p_pixels,
- (uint8_t*)p_src->p[v_plane].p_pixels,
- };
-
- Copy420_P_to_SP( p_dst, plane, pitch,
- p_src->format.i_y_offset + p_src->format.i_visible_height,
- &p_sys->cache );
-}
-
-/*****************************************************************************
- * planar I420 4:2:0 Y:U:V to planar NV12 4:2:0 Y:UV
- *****************************************************************************/
-static void I420_NV12( filter_t *p_filter, picture_t *p_src,
- picture_t *p_dst )
-{
- I420_YUV( p_filter->p_sys, p_src, p_dst, false );
-}
-
-/*****************************************************************************
- * planar YV12 4:2:0 Y:V:U to planar NV12 4:2:0 Y:UV
- *****************************************************************************/
-static void YV12_NV12( filter_t *p_filter, picture_t *p_src,
- picture_t *p_dst )
-{
- I420_YUV( p_filter->p_sys, p_src, p_dst, true );
-}
-
-
/*****************************************************************************
* Module descriptor
*****************************************************************************/
More information about the vlc-commits
mailing list