mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +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 _GstFieldAnalysisClass GstFieldAnalysisClass;
|
||||
typedef struct _FieldAnalysisFields FieldAnalysisFields;
|
||||
typedef struct _FieldAnalysisHistory FieldAnalysisHistory;
|
||||
typedef struct _FieldAnalysis FieldAnalysis;
|
||||
|
||||
typedef enum
|
||||
|
@ -78,12 +79,6 @@ enum FieldParity
|
|||
BOTH_FIELDS
|
||||
};
|
||||
|
||||
struct _FieldAnalysisFields
|
||||
{
|
||||
GstBuffer *buf;
|
||||
gboolean parity;
|
||||
};
|
||||
|
||||
struct _FieldAnalysis
|
||||
{
|
||||
/* frame, top, bottom, top with prev bottom, bottom with prev top */
|
||||
|
@ -94,6 +89,18 @@ struct _FieldAnalysis
|
|||
gboolean drop;
|
||||
};
|
||||
|
||||
struct _FieldAnalysisFields
|
||||
{
|
||||
GstVideoFrame frame;
|
||||
gboolean parity;
|
||||
};
|
||||
|
||||
struct _FieldAnalysisHistory
|
||||
{
|
||||
GstVideoFrame frame;
|
||||
FieldAnalysis results;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
METHOD_32DETECT,
|
||||
|
@ -107,15 +114,12 @@ struct _GstFieldAnalysis
|
|||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
|
||||
GQueue *frames;
|
||||
gint width, height;
|
||||
gint data_offset;
|
||||
gint line_stride; /* step size in bytes from the 0th sample of one line to the next */
|
||||
gint sample_incr; /* step size in bytes from one sample to the next */
|
||||
FieldAnalysis results[2];
|
||||
gfloat (*same_field) (GstFieldAnalysis *, FieldAnalysisFields *);
|
||||
gfloat (*same_frame) (GstFieldAnalysis *, FieldAnalysisFields *);
|
||||
guint64 (*block_score_for_row) (GstFieldAnalysis *, guint8 *, guint8 *);
|
||||
guint nframes;
|
||||
FieldAnalysisHistory frames[2];
|
||||
GstVideoInfo vinfo;
|
||||
gfloat (*same_field) (GstFieldAnalysis *, FieldAnalysisFields (*)[2]);
|
||||
gfloat (*same_frame) (GstFieldAnalysis *, FieldAnalysisFields (*)[2]);
|
||||
guint64 (*block_score_for_row) (GstFieldAnalysis *, FieldAnalysisFields (*)[2], guint8 *, guint8 *);
|
||||
gboolean is_telecine;
|
||||
gboolean first_buffer; /* indicates the first buffer for which a buffer will be output
|
||||
* after a discont or flushing seek */
|
||||
|
|
Loading…
Reference in a new issue