wok annotate libquicktime/stuff/ffmpeg.u @ rev 21850

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