refactor(ffmpeg): refactor process frames

* refactor best frame process

* refactor best frame process, remove alpha

* move thumb context to export

* process_frames() filter

* test: update golden files

* process_frames() filter

* test: update golden files

* tweak fps

* test: update golden files

* cleanup
This commit is contained in:
Adrian Shum 2022-10-13 15:23:23 +08:00 committed by GitHub
parent c86b39430d
commit 4d71837fb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 127 additions and 122 deletions

View file

@ -27,7 +27,7 @@ struct thumb_frame {
};
typedef struct ThumbContext {
int n, alpha, max_frames;
int n, max_frames;
struct thumb_frame *frames;
double *median;
const AVPixFmtDescriptor *desc;
@ -59,7 +59,9 @@ ThumbContext *create_thumb_context(AVStream *stream, AVFrame *frame);
void free_thumb_context(ThumbContext *thumb_ctx);
AVFrame *process_frames(ThumbContext *thumb_ctx);
int find_best_frame_index(ThumbContext *thumb_ctx);
AVFrame *select_frame(ThumbContext *thumb_ctx, int i);
void populate_histogram(ThumbContext *thumb_ctx, int n, AVFrame *frame);