|
FFmpeg
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <inttypes.h>#include <stdarg.h>#include <signal.h>#include "libavutil/cpu.h"#include "libavutil/avstring.h"#include "libavutil/parseutils.h"#include "libavutil/pixdesc.h"#include "libavutil/lfg.h"#include "libavutil/sfc64.h"#include "libavutil/frame.h"#include "libavutil/opt.h"#include "libavutil/time.h"#include "libavutil/pixfmt.h"#include "libavutil/avassert.h"#include "libavutil/macros.h"#include "libavutil/hwcontext.h"#include "libswscale/swscale.h"#include "libswscale/format.h"Go to the source code of this file.
Data Structures | |
| struct | options |
| struct | mode |
| struct | test_results |
Macros | |
| #define | IMPL_NEW 0 |
| #define | IMPL_LEGACY 1 |
Functions | |
| static const char * | speedup_color (double ratio) |
| static void | exit_handler (int sig) |
| static float | estimate_quantization_noise (enum AVPixelFormat fmt) |
| static int | fmt_comps (enum AVPixelFormat fmt) |
| static void | get_ssim (float ssim[4], const AVFrame *out, const AVFrame *ref, int comps) |
| static float | get_loss (const float ssim[4]) |
| static void | unref_buffers (AVFrame *frame) |
| static int | checked_sws_scale_frame (SwsContext *c, AVFrame *dst, const AVFrame *src) |
| static int | scale_new (AVFrame *dst, const AVFrame *src, const struct mode *mode, const struct options *opts, int64_t *out_time) |
| static int | scale_legacy (AVFrame *dst, const AVFrame *src, const struct mode *mode, const struct options *opts, int64_t *out_time) |
| static int | scale_hw (AVFrame *dst, const AVFrame *src, const struct mode *mode, const struct options *opts, int64_t *out_time) |
| static void | print_test_params (char *buf, size_t buf_size, const AVFrame *src, const AVFrame *dst, const struct mode *mode, const struct options *opts) |
| static void | print_results (const AVFrame *ref, const AVFrame *src, const AVFrame *dst, int dst_w, int dst_h, const struct mode *mode, const struct options *opts, const struct test_results *r, const struct test_results *ref_r, float expected_loss) |
| static int | init_frame (AVFrame **pframe, const AVFrame *ref, int width, int height, enum AVPixelFormat format) |
| static int | run_test (enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, int dst_w, int dst_h, const struct mode *mode, const struct options *opts, const AVFrame *ref, AVFrame **psrc, const struct test_results *ref_r) |
| static int | fmt_is_subsampled (enum AVPixelFormat fmt) |
| static int | fmt_is_supported_by_hw (enum AVPixelFormat fmt) |
| static int | fmt_disabled (const struct options *opts, enum AVPixelFormat fmt) |
| static int | test_formats (const struct options *opts, enum AVPixelFormat src, enum AVPixelFormat dst) |
| static int | run_self_tests (const AVFrame *ref, const struct options *opts) |
| static int | run_file_tests (const AVFrame *ref, FILE *fp, const struct options *opts) |
| static int | init_ref (AVFrame *ref, const struct options *opts) |
| static int | parse_size (struct options *opts, const char *str, char **pbuf) |
| static int | parse_implementation (const char *str) |
| static int | parse_options (int argc, char **argv, struct options *opts, FILE **fp) |
| int | main (int argc, char **argv) |
Variables | |
| const SwsFlags | flags [] |
| static FFSFC64 | prng_state |
| static SwsContext * | sws_ref_src |
| static SwsContext * | sws_src_dst |
| static SwsContext * | sws_dst_out |
| static AVBufferRef * | hw_device_ctx = NULL |
| static AVHWFramesConstraints * | hw_device_constr = NULL |
| static double | speedup_logavg |
| static double | speedup_min = 1e10 |
| static double | speedup_max = 0 |
| static int | speedup_count |
|
static |
Definition at line 111 of file swscale.c.
Referenced by exit_handler(), and print_results().
|
static |
|
static |
Definition at line 135 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 157 of file swscale.c.
Referenced by run_test().
Definition at line 166 of file swscale.c.
Referenced by run_test().
Definition at line 214 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 226 of file swscale.c.
Referenced by scale_new().
|
static |
Definition at line 238 of file swscale.c.
Referenced by init_ref(), run_test(), scale_hw(), scale_legacy(), and scale_new().
|
static |
Definition at line 248 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 282 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 327 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 453 of file swscale.c.
Referenced by print_results().
|
static |
The new scaling code does not (yet) perform error diffusion for low bit depth output, which impacts the SSIM score slightly for very low bit-depth formats (e.g. monow, monob). Since this is an expected result, drop the badness from an error to a warning for such cases. This can be removed again once error diffusion is implemented in the new ops code.
Definition at line 471 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 553 of file swscale.c.
Referenced by run_test().
|
static |
Definition at line 568 of file swscale.c.
Referenced by run_file_tests(), and run_self_tests().
|
inlinestatic |
Definition at line 671 of file swscale.c.
Referenced by fmt_disabled().
|
inlinestatic |
Definition at line 677 of file swscale.c.
Referenced by fmt_disabled().
|
inlinestatic |
Definition at line 692 of file swscale.c.
Referenced by run_self_tests().
|
inlinestatic |
Definition at line 699 of file swscale.c.
Referenced by run_self_tests().
|
static |
Definition at line 895 of file swscale.c.
Referenced by parse_options().
|
static |
Definition at line 919 of file swscale.c.
Referenced by parse_options().
|
static |
| const SwsFlags flags[] |
Definition at line 85 of file swscale.c.
Referenced by ff_sws_init_range_convert_riscv(), ff_sws_init_swscale_riscv(), ff_swscale(), ff_updateMMXDitherTables(), parse_options(), and run_self_tests().
|
static |
Definition at line 96 of file swscale.c.
Referenced by main(), and run_self_tests().
|
static |
Definition at line 99 of file swscale.c.
Referenced by main(), run_test(), and test_formats().
|
static |
Definition at line 100 of file swscale.c.
Referenced by main(), and scale_new().
|
static |
Definition at line 101 of file swscale.c.
Referenced by main(), run_test(), and test_formats().
|
static |
Definition at line 103 of file swscale.c.
Referenced by main(), parse_options(), run_test(), and scale_hw().
|
static |
Definition at line 104 of file swscale.c.
Referenced by fmt_disabled(), fmt_is_supported_by_hw(), main(), and parse_options().
|
static |
Definition at line 106 of file swscale.c.
Referenced by exit_handler(), and print_results().
|
static |
Definition at line 107 of file swscale.c.
Referenced by exit_handler(), and print_results().
|
static |
Definition at line 108 of file swscale.c.
Referenced by exit_handler(), and print_results().
|
static |
Definition at line 109 of file swscale.c.
Referenced by exit_handler(), and print_results().
1.8.17