wok-6.x view libquicktime/stuff/ffmpeg.u @ rev 21980
updated stuntman (1.2.6 -> 1.2.15)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Oct 11 17:56:48 2019 +0100 (2019-10-11) |
parents | |
children |
line source
1 --- plugins/ffmpeg/audio.c
2 +++ plugins/ffmpeg/audio.c
3 @@ -45,6 +45,11 @@
4 #define ENCODE_AUDIO 1
5 #endif
7 +#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
8 +/* from libavcodec/avcodec.h dated Dec 23 2012 */
9 +#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
10 +#endif
11 +
12 /* The following code was ported from gmerlin_avdecoder (http://gmerlin.sourceforge.net) */
14 /* MPEG Audio header parsing code */
15 --- plugins/ffmpeg/params.c
16 +++ plugins/ffmpeg/params.c
17 @@ -101,6 +101,17 @@
18 } \
19 }
21 +#define PARAM_DICT_INT(name, dict_name) \
22 + { \
23 + if(!strcasecmp(name, key)) \
24 + { \
25 + char buf[128]; \
26 + snprintf(buf, sizeof(buf), "%d", *(int*)value); \
27 + av_dict_set(options, dict_name, buf, 0); \
28 + found = 1; \
29 + } \
30 + }
31 +
32 #define PARAM_DICT_FLAG(name, dict_name) \
33 { \
34 if(!strcasecmp(name, key)) \
35 @@ -202,8 +213,15 @@
36 PARAM_INT("ff_max_b_frames",max_b_frames);
37 PARAM_FLOAT("ff_b_quant_factor",b_quant_factor);
38 PARAM_INT("ff_b_frame_strategy",b_frame_strategy);
39 +
40 +#if LIBAVCODEC_VERSION_MAJOR >= 55
41 + PARAM_DICT_INT("ff_luma_elim_threshold","luma_elim_threshold");
42 + PARAM_DICT_INT("ff_chroma_elim_threshold","chroma_elim_threshold");
43 +#else
44 PARAM_INT("ff_luma_elim_threshold",luma_elim_threshold);
45 PARAM_INT("ff_chroma_elim_threshold",chroma_elim_threshold);
46 +#endif
47 +
48 PARAM_INT("ff_strict_std_compliance",strict_std_compliance);
49 PARAM_QP2LAMBDA("ff_b_quant_offset",b_quant_offset);
50 PARAM_INT("ff_rc_min_rate",rc_min_rate);
51 @@ -241,8 +259,15 @@
52 PARAM_QP2LAMBDA("ff_lmax", lmax);
53 PARAM_INT("ff_noise_reduction",noise_reduction);
54 PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000);
55 +
56 +#if LIBAVCODEC_VERSION_MAJOR >= 55
57 + PARAM_DICT_INT("ff_inter_threshold","inter_threshold");
58 + PARAM_DICT_INT("ff_quantizer_noise_shaping","quantizer_noise_shaping");
59 +#else
60 PARAM_INT("ff_inter_threshold",inter_threshold);
61 PARAM_INT("ff_quantizer_noise_shaping",quantizer_noise_shaping);
62 +#endif
63 +
64 PARAM_INT("ff_thread_count",thread_count);
65 PARAM_INT("ff_me_threshold",me_threshold);
66 PARAM_INT("ff_mb_threshold",mb_threshold);
67 @@ -272,8 +297,16 @@
68 PARAM_FLAG("ff_flag_bitexact",CODEC_FLAG_BITEXACT);
69 PARAM_FLAG("ff_flag_ac_pred",CODEC_FLAG_AC_PRED);
70 // PARAM_FLAG("ff_flag_h263p_umv",CODEC_FLAG_H263P_UMV); // Unused
71 +
72 +#if LIBAVCODEC_VERSION_MAJOR >= 55
73 + PARAM_DICT_FLAG("ff_flag_cbp_rd","cbp_rd");
74 + PARAM_DICT_FLAG("ff_flag_qp_rd","qp_rd");
75 + PARAM_DICT_FLAG("ff_flag2_strict_gop","strict_gop");
76 +#else
77 PARAM_FLAG("ff_flag_cbp_rd",CODEC_FLAG_CBP_RD);
78 PARAM_FLAG("ff_flag_qp_rd",CODEC_FLAG_QP_RD);
79 + PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
80 +#endif
82 #if LIBAVCODEC_VERSION_MAJOR >= 54
83 PARAM_DICT_FLAG("ff_flag_h263p_aiv", "aiv");
84 @@ -288,7 +321,6 @@
85 PARAM_FLAG("ff_flag_loop_filter",CODEC_FLAG_LOOP_FILTER);
86 PARAM_FLAG("ff_flag_closed_gop",CODEC_FLAG_CLOSED_GOP);
87 PARAM_FLAG2("ff_flag2_fast",CODEC_FLAG2_FAST);
88 - PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
89 PARAM_ENUM("ff_coder_type",coder_type,coder_type);
91 }