wok-next diff libquicktime/stuff/ffmpeg.u @ rev 18082
Up marco: copy glib schemas
author | Yuri Pourre <yuripourre@gmail.com> |
---|---|
date | Fri May 22 18:30:18 2015 -0300 (2015-05-22) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libquicktime/stuff/ffmpeg.u Fri May 22 18:30:18 2015 -0300 1.3 @@ -0,0 +1,91 @@ 1.4 +--- plugins/ffmpeg/audio.c 1.5 ++++ plugins/ffmpeg/audio.c 1.6 +@@ -45,6 +45,11 @@ 1.7 + #define ENCODE_AUDIO 1 1.8 + #endif 1.9 + 1.10 ++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE 1.11 ++/* from libavcodec/avcodec.h dated Dec 23 2012 */ 1.12 ++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio 1.13 ++#endif 1.14 ++ 1.15 + /* The following code was ported from gmerlin_avdecoder (http://gmerlin.sourceforge.net) */ 1.16 + 1.17 + /* MPEG Audio header parsing code */ 1.18 +--- plugins/ffmpeg/params.c 1.19 ++++ plugins/ffmpeg/params.c 1.20 +@@ -101,6 +101,17 @@ 1.21 + } \ 1.22 + } 1.23 + 1.24 ++#define PARAM_DICT_INT(name, dict_name) \ 1.25 ++ { \ 1.26 ++ if(!strcasecmp(name, key)) \ 1.27 ++ { \ 1.28 ++ char buf[128]; \ 1.29 ++ snprintf(buf, sizeof(buf), "%d", *(int*)value); \ 1.30 ++ av_dict_set(options, dict_name, buf, 0); \ 1.31 ++ found = 1; \ 1.32 ++ } \ 1.33 ++ } 1.34 ++ 1.35 + #define PARAM_DICT_FLAG(name, dict_name) \ 1.36 + { \ 1.37 + if(!strcasecmp(name, key)) \ 1.38 +@@ -202,8 +213,15 @@ 1.39 + PARAM_INT("ff_max_b_frames",max_b_frames); 1.40 + PARAM_FLOAT("ff_b_quant_factor",b_quant_factor); 1.41 + PARAM_INT("ff_b_frame_strategy",b_frame_strategy); 1.42 ++ 1.43 ++#if LIBAVCODEC_VERSION_MAJOR >= 55 1.44 ++ PARAM_DICT_INT("ff_luma_elim_threshold","luma_elim_threshold"); 1.45 ++ PARAM_DICT_INT("ff_chroma_elim_threshold","chroma_elim_threshold"); 1.46 ++#else 1.47 + PARAM_INT("ff_luma_elim_threshold",luma_elim_threshold); 1.48 + PARAM_INT("ff_chroma_elim_threshold",chroma_elim_threshold); 1.49 ++#endif 1.50 ++ 1.51 + PARAM_INT("ff_strict_std_compliance",strict_std_compliance); 1.52 + PARAM_QP2LAMBDA("ff_b_quant_offset",b_quant_offset); 1.53 + PARAM_INT("ff_rc_min_rate",rc_min_rate); 1.54 +@@ -241,8 +259,15 @@ 1.55 + PARAM_QP2LAMBDA("ff_lmax", lmax); 1.56 + PARAM_INT("ff_noise_reduction",noise_reduction); 1.57 + PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000); 1.58 ++ 1.59 ++#if LIBAVCODEC_VERSION_MAJOR >= 55 1.60 ++ PARAM_DICT_INT("ff_inter_threshold","inter_threshold"); 1.61 ++ PARAM_DICT_INT("ff_quantizer_noise_shaping","quantizer_noise_shaping"); 1.62 ++#else 1.63 + PARAM_INT("ff_inter_threshold",inter_threshold); 1.64 + PARAM_INT("ff_quantizer_noise_shaping",quantizer_noise_shaping); 1.65 ++#endif 1.66 ++ 1.67 + PARAM_INT("ff_thread_count",thread_count); 1.68 + PARAM_INT("ff_me_threshold",me_threshold); 1.69 + PARAM_INT("ff_mb_threshold",mb_threshold); 1.70 +@@ -272,8 +297,16 @@ 1.71 + PARAM_FLAG("ff_flag_bitexact",CODEC_FLAG_BITEXACT); 1.72 + PARAM_FLAG("ff_flag_ac_pred",CODEC_FLAG_AC_PRED); 1.73 + // PARAM_FLAG("ff_flag_h263p_umv",CODEC_FLAG_H263P_UMV); // Unused 1.74 ++ 1.75 ++#if LIBAVCODEC_VERSION_MAJOR >= 55 1.76 ++ PARAM_DICT_FLAG("ff_flag_cbp_rd","cbp_rd"); 1.77 ++ PARAM_DICT_FLAG("ff_flag_qp_rd","qp_rd"); 1.78 ++ PARAM_DICT_FLAG("ff_flag2_strict_gop","strict_gop"); 1.79 ++#else 1.80 + PARAM_FLAG("ff_flag_cbp_rd",CODEC_FLAG_CBP_RD); 1.81 + PARAM_FLAG("ff_flag_qp_rd",CODEC_FLAG_QP_RD); 1.82 ++ PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP); 1.83 ++#endif 1.84 + 1.85 + #if LIBAVCODEC_VERSION_MAJOR >= 54 1.86 + PARAM_DICT_FLAG("ff_flag_h263p_aiv", "aiv"); 1.87 +@@ -288,7 +321,6 @@ 1.88 + PARAM_FLAG("ff_flag_loop_filter",CODEC_FLAG_LOOP_FILTER); 1.89 + PARAM_FLAG("ff_flag_closed_gop",CODEC_FLAG_CLOSED_GOP); 1.90 + PARAM_FLAG2("ff_flag2_fast",CODEC_FLAG2_FAST); 1.91 +- PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP); 1.92 + PARAM_ENUM("ff_coder_type",coder_type,coder_type); 1.93 + 1.94 + }