Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2018-11-04 21:02:07 +0300
committerPhilip Langdale <philipl@overt.org>2018-11-15 04:41:01 +0300
commitfa74e4aef2103e27424d2cfae3f142149b6a3b36 (patch)
tree692223a83e3b850bd80788e2eb7baf5121a705ce /libavfilter/yadif.h
parent19d3d0c0570981ddc8a224f07d734ff75d76e234 (diff)
avfilter/yadif_common: Add field type tracking to help bwdif
The bwdif filter can use common yadif frame management if we track when a field is the first or last field in a sequence. While this information is not used by yadif, the added benefit of removing the duplicated frame management logic makes it worth tracking this state in the common code.
Diffstat (limited to 'libavfilter/yadif.h')
-rw-r--r--libavfilter/yadif.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavfilter/yadif.h b/libavfilter/yadif.h
index 32d6f4a0d4..c928911b35 100644
--- a/libavfilter/yadif.h
+++ b/libavfilter/yadif.h
@@ -41,6 +41,12 @@ enum YADIFDeint {
YADIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced
};
+enum YADIFCurrentField {
+ YADIF_FIELD_BACK_END = -1, ///< The last frame in a sequence
+ YADIF_FIELD_END = 0, ///< The first or last field in a sequence
+ YADIF_FIELD_NORMAL = 1, ///< A normal field in the middle of a sequence
+};
+
typedef struct YADIFContext {
const AVClass *class;
@@ -70,6 +76,14 @@ typedef struct YADIFContext {
int eof;
uint8_t *temp_line;
int temp_line_size;
+
+ /*
+ * An algorithm that treats first and/or last fields in a sequence
+ * differently can use this to detect those cases. It is the algorithm's
+ * responsibility to set the value to YADIF_FIELD_NORMAL after processing
+ * the first field.
+ */
+ int current_field; ///< YADIFCurrentField
} YADIFContext;
void ff_yadif_init_x86(YADIFContext *yadif);