Ticket #1607: drc_scale.txt

File drc_scale.txt, 1.6 KB (added by peter@…, 17 years ago)

the tiny patch

Line 
1Index: libmpcodecs/ad_ffmpeg.c
2===================================================================
3--- libmpcodecs/ad_ffmpeg.c (revision 29972)
4+++ libmpcodecs/ad_ffmpeg.c (working copy)
5@@ -71,6 +71,11 @@
6 lavc_context->codec_type = CODEC_TYPE_AUDIO;
7 lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
8
9+ {
10+ extern float lavc_param_drc_scale; // parsed from lavdopts in vd_ffmpeg.c
11+ lavc_context->drc_scale = lavc_param_drc_scale;
12+ }
13+
14 /* alloc extra data */
15 if (sh_audio->wf && sh_audio->wf->cbSize > 0) {
16 lavc_context->extradata = av_mallocz(sh_audio->wf->cbSize + FF_INPUT_BUFFER_PADDING_SIZE);
17Index: libmpcodecs/vd_ffmpeg.c
18===================================================================
19--- libmpcodecs/vd_ffmpeg.c (revision 29972)
20+++ libmpcodecs/vd_ffmpeg.c (working copy)
21@@ -79,6 +79,7 @@
22 static char *lavc_param_skip_frame_str = NULL;
23 static int lavc_param_threads=1;
24 static int lavc_param_bitexact=0;
25+ float lavc_param_drc_scale=0.0; // audio param, for ad_ffmpeg.c
26 static char *lavc_avopt = NULL;
27
28 const m_option_t lavc_decode_opts_conf[]={
29@@ -99,6 +100,7 @@
30 {"skipframe", &lavc_param_skip_frame_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
31 {"threads", &lavc_param_threads, CONF_TYPE_INT, CONF_RANGE, 1, 8, NULL},
32 {"bitexact", &lavc_param_bitexact, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_BITEXACT, NULL},
33+ {"drc_scale", &lavc_param_drc_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 2.0, NULL},
34 {"o", &lavc_avopt, CONF_TYPE_STRING, 0, 0, 0, NULL},
35 {NULL, NULL, 0, 0, 0, 0, NULL}
36 };