mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
effectv: Define the fast PRNG function at a central place
This commit is contained in:
parent
414d0548e2
commit
757f80b23e
5 changed files with 12 additions and 33 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <math.h>
|
||||
|
||||
#include "gstaging.h"
|
||||
#include "gsteffectv.h"
|
||||
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/controller/gstcontroller.h>
|
||||
|
@ -88,15 +89,6 @@ gst_agingtv_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline guint
|
||||
fastrand (void)
|
||||
{
|
||||
static guint fastrand_val;
|
||||
|
||||
return (fastrand_val = fastrand_val * 1103515245 + 12345);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
coloraging (guint32 * src, guint32 * dest, gint video_area, gint * c)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "gstdice.h"
|
||||
#include "gsteffectv.h"
|
||||
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/controller/gstcontroller.h>
|
||||
|
@ -96,14 +97,6 @@ gst_dicetv_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline guint
|
||||
fastrand (void)
|
||||
{
|
||||
static guint fastrand_val;
|
||||
|
||||
return (fastrand_val = fastrand_val * 1103515245 + 12345);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_dicetv_transform (GstBaseTransform * trans, GstBuffer * in, GstBuffer * out)
|
||||
{
|
||||
|
|
|
@ -23,3 +23,11 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
static inline guint
|
||||
fastrand (void)
|
||||
{
|
||||
static guint fastrand_val;
|
||||
|
||||
return (fastrand_val = fastrand_val * 1103515245 + 12345);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "gstquark.h"
|
||||
#include "gsteffectv.h"
|
||||
|
||||
#include <gst/video/video.h>
|
||||
|
||||
|
@ -84,14 +85,6 @@ gst_quarktv_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline guint
|
||||
fastrand (void)
|
||||
{
|
||||
static guint fastrand_val;
|
||||
|
||||
return (fastrand_val = fastrand_val * 1103515245 + 12345);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_quarktv_transform (GstBaseTransform * trans, GstBuffer * in,
|
||||
GstBuffer * out)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "gstshagadelic.h"
|
||||
#include "gsteffectv.h"
|
||||
|
||||
#include <gst/video/video.h>
|
||||
|
||||
|
@ -83,14 +84,6 @@ gst_shagadelictv_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline guint
|
||||
fastrand (void)
|
||||
{
|
||||
static guint fastrand_val;
|
||||
|
||||
return (fastrand_val = fastrand_val * 1103515245 + 12345);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_shagadelic_initialize (GstShagadelicTV * filter)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue