source: projects/specs/trunk/nonfree/self-build-libquicktime/ffmpeg2.0.patch @ 10787

Revision 10787, 5.1 KB checked in by ara_t, 7 years ago (diff)

add ffmpeg2.0.patch

  • plugins/ffmpeg/ffmpeg.h

    Binary files a/plugins/ffmpeg/.lqt_ffmpeg.c.swp and b/plugins/ffmpeg/.lqt_ffmpeg.c.swp differ
    diff -rupN a/plugins/ffmpeg/ffmpeg.h b/plugins/ffmpeg/ffmpeg.h
    a b void lqt_ffmpeg_set_parameter(AVCodecCon 
    4545 
    4646 
    4747#endif 
     48#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 
     49#define CODEC_FLAG2_STRICT_GOP 0x00000002 
     50#define CODEC_FLAG_QP_RD 0x08000000 
     51#define CODEC_FLAG_CBP_RD 0x04000000 
  • plugins/ffmpeg/lqt_ffmpeg.c

    diff -rupN a/plugins/ffmpeg/lqt_ffmpeg.c b/plugins/ffmpeg/lqt_ffmpeg.c
    a b int ffmpeg_num_video_codecs = -1; 
    8989    PARAM_QSCALE, \ 
    9090    PARAM_QCOMPRESS, \ 
    9191    PARAM_QBLUR, \ 
    92     PARAM_QUANTIZER_NOISE_SHAPING, \ 
    9392    PARAM_TRELLIS 
    9493 
    95 #define ENCODE_PARAM_VIDEO_QUANTIZER_IP \ 
    96   ENCODE_PARAM_VIDEO_QUANTIZER_I, \ 
    97   PARAM_I_QUANT_FACTOR, \ 
    98   PARAM_I_QUANT_OFFSET 
    99  
    100 #define ENCODE_PARAM_VIDEO_QUANTIZER_IPB \ 
    101   ENCODE_PARAM_VIDEO_QUANTIZER_IP, \ 
    102   PARAM_B_QUANT_FACTOR, \ 
    103   PARAM_B_QUANT_OFFSET 
    104  
    10594#define ENCODE_PARAM_VIDEO_FRAMETYPES_IP \ 
    10695  { \ 
    10796    .name =      "frame_types", \ 
    static lqt_parameter_info_static_t encod 
    207196  ENCODE_PARAM_VIDEO_FRAMETYPES_IPB, 
    208197  PARAM_FLAG_AC_PRED_MPEG4, 
    209198  ENCODE_PARAM_VIDEO_RATECONTROL, 
    210   ENCODE_PARAM_VIDEO_QUANTIZER_IPB, 
    211199  PARAM_FLAG_CBP_RD, 
    212200  ENCODE_PARAM_VIDEO_ME, 
    213201  PARAM_FLAG_GMC, 
    static lqt_parameter_info_static_t encod 
    225213static lqt_parameter_info_static_t encode_parameters_dx50[] = { 
    226214  ENCODE_PARAM_VIDEO_FRAMETYPES_IP, 
    227215  ENCODE_PARAM_VIDEO_RATECONTROL, 
    228   ENCODE_PARAM_VIDEO_QUANTIZER_IP, 
    229216  ENCODE_PARAM_VIDEO_ME, 
    230217  ENCODE_PARAM_VIDEO_ME_PRE, 
    231218  ENCODE_PARAM_VIDEO_MASKING, 
    static lqt_parameter_info_static_t encod 
    237224static lqt_parameter_info_static_t encode_parameters_h263[] = { 
    238225  ENCODE_PARAM_VIDEO_FRAMETYPES_IP, 
    239226  ENCODE_PARAM_VIDEO_RATECONTROL, 
    240   ENCODE_PARAM_VIDEO_QUANTIZER_IP, 
    241227  ENCODE_PARAM_VIDEO_ME, 
    242228  PARAM_FLAG_4MV, 
    243229  ENCODE_PARAM_VIDEO_ME_PRE, 
    static lqt_parameter_info_static_t encod 
    250236static lqt_parameter_info_static_t encode_parameters_h263p[] = { 
    251237  ENCODE_PARAM_VIDEO_FRAMETYPES_IP, 
    252238  ENCODE_PARAM_VIDEO_RATECONTROL, 
    253   ENCODE_PARAM_VIDEO_QUANTIZER_IP, 
    254239  ENCODE_PARAM_VIDEO_ME, 
    255240  PARAM_FLAG_4MV, 
    256241  ENCODE_PARAM_VIDEO_ME_PRE, 
    static lqt_parameter_info_static_t encod 
    264249static lqt_parameter_info_static_t encode_parameters_msmpeg4v3[] = { 
    265250  ENCODE_PARAM_VIDEO_FRAMETYPES_IP, 
    266251  ENCODE_PARAM_VIDEO_RATECONTROL, 
    267   ENCODE_PARAM_VIDEO_QUANTIZER_IP, 
    268252  ENCODE_PARAM_VIDEO_ME, 
    269253  ENCODE_PARAM_VIDEO_ME_PRE, 
    270254  ENCODE_PARAM_VIDEO_MASKING, 
  • plugins/ffmpeg/params.c

    diff -rupN a/plugins/ffmpeg/params.c b/plugins/ffmpeg/params.c
    a b void lqt_ffmpeg_set_parameter(AVCodecCon 
    202202  PARAM_INT("ff_max_b_frames",max_b_frames); 
    203203  PARAM_FLOAT("ff_b_quant_factor",b_quant_factor); 
    204204  PARAM_INT("ff_b_frame_strategy",b_frame_strategy); 
     205#if (LIBAVCODEC_VERSION_MAJOR < 55) 
    205206  PARAM_INT("ff_luma_elim_threshold",luma_elim_threshold); 
    206207  PARAM_INT("ff_chroma_elim_threshold",chroma_elim_threshold); 
     208#endif 
    207209  PARAM_INT("ff_strict_std_compliance",strict_std_compliance); 
    208210  PARAM_QP2LAMBDA("ff_b_quant_offset",b_quant_offset); 
    209211  PARAM_INT("ff_rc_min_rate",rc_min_rate); 
    void lqt_ffmpeg_set_parameter(AVCodecCon 
    241243  PARAM_QP2LAMBDA("ff_lmax", lmax); 
    242244  PARAM_INT("ff_noise_reduction",noise_reduction); 
    243245  PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000); 
     246#if #if (LIBAVCODEC_VERSION_MAJOR < 55) 
    244247  PARAM_INT("ff_inter_threshold",inter_threshold); 
    245248  PARAM_INT("ff_quantizer_noise_shaping",quantizer_noise_shaping); 
     249#endif 
    246250  PARAM_INT("ff_thread_count",thread_count); 
    247251  PARAM_INT("ff_me_threshold",me_threshold); 
    248252  PARAM_INT("ff_mb_threshold",mb_threshold); 
  • plugins/ffmpeg/params.h

    diff -rupN a/plugins/ffmpeg/params.h b/plugins/ffmpeg/params.h
    a b the reference. Unused for constant quant 
    177177    .val_max =     { .val_int = 1 }, \ 
    178178  } 
    179179 
     180#if (LIBAVCODEC_VERSION_MAJOR < 55) 
    180181#define PARAM_LUMA_ELIM_THRESHOLD \ 
    181182  { \ 
    182183    .name =        "ff_luma_elim_threshold", \ 
    recommendation") \ 
    202203chrominamce. Negative values also consider dc \ 
    203204coefficient. 7 is JVT recommendation") \ 
    204205  } 
     206#endif 
    205207 
    206208#define PARAM_STRICT_STANDARD_COMPLIANCE \ 
    207209  { \ 
    with max and/or min bitrate, this must b 
    739741 
    740742/* Does nothing */ 
    741743/** Frame types */ 
     744#if (LIBAVCODEC_VERSION_MAJOR < 55) 
    742745#define PARAM_INTER_THRESHOLD \ 
    743746  { \ 
    744747    .name =        "ff_inter_threshold", \ 
    with max and/or min bitrate, this must b 
    759762    .help_string = TRS("Choose quantization such that noise will be masked by " \ 
    760763                       "similar-frequency content in the image")        \ 
    761764  } 
     765#endif 
    762766 
    763767/** Motion estimation */ 
    764768#define PARAM_ME_THRESHOLD \ 
Note: See TracBrowser for help on using the repository browser.