mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-01 17:31:10 +00:00
fieldanalysis: Port to 1.0
I was also vaguely forced to overhaul some bits and pieces and mess with the data structures. This was mostly due to caps not being part of buffers and so I had to switch to using GstVideoFrame and GstVideoInfo.
This commit is contained in:
parent
33a012219d
commit
a5e92acee9
2 changed files with 385 additions and 339 deletions
File diff suppressed because it is too large
Load diff
|
@ -61,6 +61,7 @@ G_BEGIN_DECLS
|
||||||
typedef struct _GstFieldAnalysis GstFieldAnalysis;
|
typedef struct _GstFieldAnalysis GstFieldAnalysis;
|
||||||
typedef struct _GstFieldAnalysisClass GstFieldAnalysisClass;
|
typedef struct _GstFieldAnalysisClass GstFieldAnalysisClass;
|
||||||
typedef struct _FieldAnalysisFields FieldAnalysisFields;
|
typedef struct _FieldAnalysisFields FieldAnalysisFields;
|
||||||
|
typedef struct _FieldAnalysisHistory FieldAnalysisHistory;
|
||||||
typedef struct _FieldAnalysis FieldAnalysis;
|
typedef struct _FieldAnalysis FieldAnalysis;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -78,12 +79,6 @@ enum FieldParity
|
||||||
BOTH_FIELDS
|
BOTH_FIELDS
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _FieldAnalysisFields
|
|
||||||
{
|
|
||||||
GstBuffer *buf;
|
|
||||||
gboolean parity;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _FieldAnalysis
|
struct _FieldAnalysis
|
||||||
{
|
{
|
||||||
/* frame, top, bottom, top with prev bottom, bottom with prev top */
|
/* frame, top, bottom, top with prev bottom, bottom with prev top */
|
||||||
|
@ -94,6 +89,18 @@ struct _FieldAnalysis
|
||||||
gboolean drop;
|
gboolean drop;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _FieldAnalysisFields
|
||||||
|
{
|
||||||
|
GstVideoFrame frame;
|
||||||
|
gboolean parity;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _FieldAnalysisHistory
|
||||||
|
{
|
||||||
|
GstVideoFrame frame;
|
||||||
|
FieldAnalysis results;
|
||||||
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
METHOD_32DETECT,
|
METHOD_32DETECT,
|
||||||
|
@ -107,15 +114,12 @@ struct _GstFieldAnalysis
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
GstPad *sinkpad, *srcpad;
|
||||||
|
|
||||||
GQueue *frames;
|
guint nframes;
|
||||||
gint width, height;
|
FieldAnalysisHistory frames[2];
|
||||||
gint data_offset;
|
GstVideoInfo vinfo;
|
||||||
gint line_stride; /* step size in bytes from the 0th sample of one line to the next */
|
gfloat (*same_field) (GstFieldAnalysis *, FieldAnalysisFields (*)[2]);
|
||||||
gint sample_incr; /* step size in bytes from one sample to the next */
|
gfloat (*same_frame) (GstFieldAnalysis *, FieldAnalysisFields (*)[2]);
|
||||||
FieldAnalysis results[2];
|
guint64 (*block_score_for_row) (GstFieldAnalysis *, FieldAnalysisFields (*)[2], guint8 *, guint8 *);
|
||||||
gfloat (*same_field) (GstFieldAnalysis *, FieldAnalysisFields *);
|
|
||||||
gfloat (*same_frame) (GstFieldAnalysis *, FieldAnalysisFields *);
|
|
||||||
guint64 (*block_score_for_row) (GstFieldAnalysis *, guint8 *, guint8 *);
|
|
||||||
gboolean is_telecine;
|
gboolean is_telecine;
|
||||||
gboolean first_buffer; /* indicates the first buffer for which a buffer will be output
|
gboolean first_buffer; /* indicates the first buffer for which a buffer will be output
|
||||||
* after a discont or flushing seek */
|
* after a discont or flushing seek */
|
||||||
|
|
Loading…
Reference in a new issue