[vlc-commits] avcodec: elim thresholds are only in libavcodec < 55 (refs #8291)
Rémi Denis-Courmont
git at videolan.org
Sat Mar 9 22:12:59 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 9 22:59:57 2013 +0200| [4b0b6c8e5794780fa15fc0e5dd9b91a9758ea22b] | committer: Rémi Denis-Courmont
avcodec: elim thresholds are only in libavcodec < 55 (refs #8291)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b0b6c8e5794780fa15fc0e5dd9b91a9758ea22b
---
modules/codec/avcodec/encoder.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 9a60b3b..5490bd2 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -133,7 +133,9 @@ struct encoder_sys_t
bool b_trellis;
int i_quality; /* for VBR */
float f_lumi_masking, f_dark_masking, f_p_masking, f_border_masking;
+#if (LIBAVCODEC_VERSION_MAJOR < 55)
int i_luma_elim, i_chroma_elim;
+#endif
int i_aac_profile; /* AAC profile to use.*/
AVFrame *frame;
@@ -144,10 +146,12 @@ static const char *const ppsz_enc_options[] = {
"rc-buffer-size", "rc-buffer-aggressivity", "pre-me", "hurry-up",
"interlace", "interlace-me", "i-quant-factor", "noise-reduction", "mpeg4-matrix",
"trellis", "qscale", "strict", "lumi-masking", "dark-masking",
- "p-masking", "border-masking", "luma-elim-threshold",
- "chroma-elim-threshold",
- "aac-profile",
- NULL
+ "p-masking", "border-masking",
+#if (LIBAVCODEC_VERSION_MAJOR < 55)
+ "luma-elim-threshold", "chroma-elim-threshold",
+#endif
+ "aac-profile",
+ NULL
};
static const uint16_t mpa_bitrate_tab[2][15] =
@@ -364,8 +368,10 @@ int OpenEncoder( vlc_object_t *p_this )
p_sys->f_dark_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "dark-masking" );
p_sys->f_p_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "p-masking" );
p_sys->f_border_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "border-masking" );
+#if (LIBAVCODEC_VERSION_MAJOR < 55)
p_sys->i_luma_elim = var_GetInteger( p_enc, ENC_CFG_PREFIX "luma-elim-threshold" );
p_sys->i_chroma_elim = var_GetInteger( p_enc, ENC_CFG_PREFIX "chroma-elim-threshold" );
+#endif
psz_val = var_GetString( p_enc, ENC_CFG_PREFIX "aac-profile" );
/* libavcodec uses faac encoder atm, and it has issues with
@@ -437,8 +443,10 @@ int OpenEncoder( vlc_object_t *p_this )
p_context->dark_masking = p_sys->f_dark_masking;
p_context->p_masking = p_sys->f_p_masking;
p_context->border_masking = p_sys->f_border_masking;
+#if (LIBAVCODEC_VERSION_MAJOR < 55)
p_context->luma_elim_threshold = p_sys->i_luma_elim;
p_context->chroma_elim_threshold = p_sys->i_chroma_elim;
+#endif
if( p_sys->i_key_int > 0 )
p_context->gop_size = p_sys->i_key_int;
More information about the vlc-commits
mailing list