Song Zhao | c03ba12 | 2020-12-23 21:54:02 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2020 Amlogic, Inc. All rights reserved. |
| 3 | * |
| 4 | * This source code is subject to the terms and conditions defined in the |
| 5 | * file 'LICENSE' which is part of this source code package. |
| 6 | * |
| 7 | * Description: |
| 8 | * User space AV sync module. |
| 9 | * |
| 10 | * Author: song.zhao@amlogic.com |
| 11 | */ |
| 12 | #ifndef AML_AVSYNC_PATTERN_H__ |
| 13 | #define AML_AVSYNC_PATTERN_H__ |
| 14 | |
| 15 | enum frame_pattern { |
| 16 | AV_SYNC_FRAME_P32 = 0, |
| 17 | AV_SYNC_FRAME_P22 = 1, |
| 18 | AV_SYNC_FRAME_P41 = 2, |
Song Zhao | 35a82df | 2021-04-15 10:58:49 -0700 | [diff] [blame^] | 19 | AV_SYNC_FRAME_P11 = 3, |
Song Zhao | c03ba12 | 2020-12-23 21:54:02 -0800 | [diff] [blame] | 20 | AV_SYNC_FRAME_PMAX, |
| 21 | }; |
| 22 | |
| 23 | void* create_pattern_detector(); |
| 24 | void destroy_pattern_detector(void *handle); |
| 25 | void reset_pattern(void *handle); |
Song Zhao | 35a82df | 2021-04-15 10:58:49 -0700 | [diff] [blame^] | 26 | bool detect_pattern(void* handle, enum frame_pattern pattern, int cur_peroid, int last_peroid); |
Song Zhao | c03ba12 | 2020-12-23 21:54:02 -0800 | [diff] [blame] | 27 | void correct_pattern(void* handle, struct vframe *frame, struct vframe *nextframe, |
| 28 | int cur_peroid, int last_peroid, pts90K systime, pts90K vsync_interval, bool *expire); |
| 29 | #endif |