ffmpeg2.0.patch 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Binary files a/plugins/ffmpeg/.lqt_ffmpeg.c.swp and b/plugins/ffmpeg/.lqt_ffmpeg.c.swp differ
  2. diff -rupN a/plugins/ffmpeg/ffmpeg.h b/plugins/ffmpeg/ffmpeg.h
  3. --- a/plugins/ffmpeg/ffmpeg.h 2012-02-15 20:48:30.000000000 +0100
  4. +++ b/plugins/ffmpeg/ffmpeg.h 2013-07-15 15:05:19.307534593 +0200
  5. @@ -45,3 +45,7 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
  6. #endif
  7. +#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
  8. +#define CODEC_FLAG2_STRICT_GOP 0x00000002
  9. +#define CODEC_FLAG_QP_RD 0x08000000
  10. +#define CODEC_FLAG_CBP_RD 0x04000000
  11. diff -rupN a/plugins/ffmpeg/lqt_ffmpeg.c b/plugins/ffmpeg/lqt_ffmpeg.c
  12. --- a/plugins/ffmpeg/lqt_ffmpeg.c 2012-02-15 20:48:30.000000000 +0100
  13. +++ b/plugins/ffmpeg/lqt_ffmpeg.c 2013-07-15 15:19:09.730831655 +0200
  14. @@ -89,19 +89,8 @@ int ffmpeg_num_video_codecs = -1;
  15. PARAM_QSCALE, \
  16. PARAM_QCOMPRESS, \
  17. PARAM_QBLUR, \
  18. - PARAM_QUANTIZER_NOISE_SHAPING, \
  19. PARAM_TRELLIS
  20. -#define ENCODE_PARAM_VIDEO_QUANTIZER_IP \
  21. - ENCODE_PARAM_VIDEO_QUANTIZER_I, \
  22. - PARAM_I_QUANT_FACTOR, \
  23. - PARAM_I_QUANT_OFFSET
  24. -
  25. -#define ENCODE_PARAM_VIDEO_QUANTIZER_IPB \
  26. - ENCODE_PARAM_VIDEO_QUANTIZER_IP, \
  27. - PARAM_B_QUANT_FACTOR, \
  28. - PARAM_B_QUANT_OFFSET
  29. -
  30. #define ENCODE_PARAM_VIDEO_FRAMETYPES_IP \
  31. { \
  32. .name = "frame_types", \
  33. @@ -207,7 +196,6 @@ static lqt_parameter_info_static_t encod
  34. ENCODE_PARAM_VIDEO_FRAMETYPES_IPB,
  35. PARAM_FLAG_AC_PRED_MPEG4,
  36. ENCODE_PARAM_VIDEO_RATECONTROL,
  37. - ENCODE_PARAM_VIDEO_QUANTIZER_IPB,
  38. PARAM_FLAG_CBP_RD,
  39. ENCODE_PARAM_VIDEO_ME,
  40. PARAM_FLAG_GMC,
  41. @@ -225,7 +213,6 @@ static lqt_parameter_info_static_t encod
  42. static lqt_parameter_info_static_t encode_parameters_dx50[] = {
  43. ENCODE_PARAM_VIDEO_FRAMETYPES_IP,
  44. ENCODE_PARAM_VIDEO_RATECONTROL,
  45. - ENCODE_PARAM_VIDEO_QUANTIZER_IP,
  46. ENCODE_PARAM_VIDEO_ME,
  47. ENCODE_PARAM_VIDEO_ME_PRE,
  48. ENCODE_PARAM_VIDEO_MASKING,
  49. @@ -237,7 +224,6 @@ static lqt_parameter_info_static_t encod
  50. static lqt_parameter_info_static_t encode_parameters_h263[] = {
  51. ENCODE_PARAM_VIDEO_FRAMETYPES_IP,
  52. ENCODE_PARAM_VIDEO_RATECONTROL,
  53. - ENCODE_PARAM_VIDEO_QUANTIZER_IP,
  54. ENCODE_PARAM_VIDEO_ME,
  55. PARAM_FLAG_4MV,
  56. ENCODE_PARAM_VIDEO_ME_PRE,
  57. @@ -250,7 +236,6 @@ static lqt_parameter_info_static_t encod
  58. static lqt_parameter_info_static_t encode_parameters_h263p[] = {
  59. ENCODE_PARAM_VIDEO_FRAMETYPES_IP,
  60. ENCODE_PARAM_VIDEO_RATECONTROL,
  61. - ENCODE_PARAM_VIDEO_QUANTIZER_IP,
  62. ENCODE_PARAM_VIDEO_ME,
  63. PARAM_FLAG_4MV,
  64. ENCODE_PARAM_VIDEO_ME_PRE,
  65. @@ -264,7 +249,6 @@ static lqt_parameter_info_static_t encod
  66. static lqt_parameter_info_static_t encode_parameters_msmpeg4v3[] = {
  67. ENCODE_PARAM_VIDEO_FRAMETYPES_IP,
  68. ENCODE_PARAM_VIDEO_RATECONTROL,
  69. - ENCODE_PARAM_VIDEO_QUANTIZER_IP,
  70. ENCODE_PARAM_VIDEO_ME,
  71. ENCODE_PARAM_VIDEO_ME_PRE,
  72. ENCODE_PARAM_VIDEO_MASKING,
  73. diff -rupN a/plugins/ffmpeg/params.c b/plugins/ffmpeg/params.c
  74. --- a/plugins/ffmpeg/params.c 2012-03-07 15:10:41.000000000 +0100
  75. +++ b/plugins/ffmpeg/params.c 2013-07-15 15:09:38.214189953 +0200
  76. @@ -202,8 +202,10 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
  77. PARAM_INT("ff_max_b_frames",max_b_frames);
  78. PARAM_FLOAT("ff_b_quant_factor",b_quant_factor);
  79. PARAM_INT("ff_b_frame_strategy",b_frame_strategy);
  80. +#if (LIBAVCODEC_VERSION_MAJOR < 55)
  81. PARAM_INT("ff_luma_elim_threshold",luma_elim_threshold);
  82. PARAM_INT("ff_chroma_elim_threshold",chroma_elim_threshold);
  83. +#endif
  84. PARAM_INT("ff_strict_std_compliance",strict_std_compliance);
  85. PARAM_QP2LAMBDA("ff_b_quant_offset",b_quant_offset);
  86. PARAM_INT("ff_rc_min_rate",rc_min_rate);
  87. @@ -241,8 +243,10 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
  88. PARAM_QP2LAMBDA("ff_lmax", lmax);
  89. PARAM_INT("ff_noise_reduction",noise_reduction);
  90. PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000);
  91. +#if #if (LIBAVCODEC_VERSION_MAJOR < 55)
  92. PARAM_INT("ff_inter_threshold",inter_threshold);
  93. PARAM_INT("ff_quantizer_noise_shaping",quantizer_noise_shaping);
  94. +#endif
  95. PARAM_INT("ff_thread_count",thread_count);
  96. PARAM_INT("ff_me_threshold",me_threshold);
  97. PARAM_INT("ff_mb_threshold",mb_threshold);
  98. diff -rupN a/plugins/ffmpeg/params.h b/plugins/ffmpeg/params.h
  99. --- a/plugins/ffmpeg/params.h 2011-05-11 17:13:39.000000000 +0200
  100. +++ b/plugins/ffmpeg/params.h 2013-07-15 15:09:04.860858069 +0200
  101. @@ -177,6 +177,7 @@ the reference. Unused for constant quant
  102. .val_max = { .val_int = 1 }, \
  103. }
  104. +#if (LIBAVCODEC_VERSION_MAJOR < 55)
  105. #define PARAM_LUMA_ELIM_THRESHOLD \
  106. { \
  107. .name = "ff_luma_elim_threshold", \
  108. @@ -202,6 +203,7 @@ recommendation") \
  109. chrominamce. Negative values also consider dc \
  110. coefficient. 7 is JVT recommendation") \
  111. }
  112. +#endif
  113. #define PARAM_STRICT_STANDARD_COMPLIANCE \
  114. { \
  115. @@ -739,6 +741,7 @@ with max and/or min bitrate, this must b
  116. /* Does nothing */
  117. /** Frame types */
  118. +#if (LIBAVCODEC_VERSION_MAJOR < 55)
  119. #define PARAM_INTER_THRESHOLD \
  120. { \
  121. .name = "ff_inter_threshold", \
  122. @@ -759,6 +762,7 @@ with max and/or min bitrate, this must b
  123. .help_string = TRS("Choose quantization such that noise will be masked by " \
  124. "similar-frequency content in the image") \
  125. }
  126. +#endif
  127. /** Motion estimation */
  128. #define PARAM_ME_THRESHOLD \