* FFmpeg main
* Copyright (c) 2000-2003 Fabrice Bellard
*
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define HAVE_AV_CONFIG_H
static int frame_rate = 25;
static int frame_rate_base = 1;
static float video_qscale = 0;
-static int video_lmin = 2*FF_QP2LAMBDA;
-static int video_lmax = 31*FF_QP2LAMBDA;
-static int video_mb_lmin = 2*FF_QP2LAMBDA;
-static int video_mb_lmax = 31*FF_QP2LAMBDA;
static int video_qdiff = 3;
static uint16_t *intra_matrix = NULL;
static uint16_t *inter_matrix = NULL;
// fprintf(stderr, "next:%lld dts:%lld off:%lld %d\n", ist->next_pts, pkt.dts, input_files_ts_offset[ist->file_index], ist->st->codec->codec_type);
if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE) {
int64_t delta= av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q) - ist->next_pts;
- if(ABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE && !copy_ts){
+ if(FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE && !copy_ts){
input_files_ts_offset[ist->file_index]-= delta;
if (verbose > 2)
fprintf(stderr, "timestamp discontinuity %"PRId64", new offset= %"PRId64"\n", delta, input_files_ts_offset[ist->file_index]);
}
}
-static void opt_lmax(const char *arg)
-{
- video_lmax = atof(arg)*FF_QP2LAMBDA;
-}
-
-static void opt_lmin(const char *arg)
-{
- video_lmin = atof(arg)*FF_QP2LAMBDA;
-}
-
-static void opt_mb_lmin(const char *arg)
-{
- video_mb_lmin = atof(arg)*FF_QP2LAMBDA;
- if (video_mb_lmin < 1 ||
- video_mb_lmin > FF_LAMBDA_MAX) {
- fprintf(stderr, "mblmin must be >= 1 and <= %d\n", FF_LAMBDA_MAX / FF_QP2LAMBDA);
- exit(1);
- }
-}
-
-static void opt_mb_lmax(const char *arg)
-{
- video_mb_lmax = atof(arg)*FF_QP2LAMBDA;
- if (video_mb_lmax < 1 ||
- video_mb_lmax > FF_LAMBDA_MAX) {
- fprintf(stderr, "mblmax must be >= 1 and <= %d\n", FF_LAMBDA_MAX / FF_QP2LAMBDA);
- exit(1);
- }
-}
-
static void opt_qdiff(const char *arg)
{
video_qdiff = atoi(arg);
if(inter_matrix)
video_enc->inter_matrix = inter_matrix;
- video_enc->lmin = video_lmin;
- video_enc->lmax = video_lmax;
- video_enc->mb_lmin = video_mb_lmin;
- video_enc->mb_lmax = video_mb_lmax;
video_enc->max_qdiff = video_qdiff;
video_enc->rc_eq = video_rc_eq;
video_enc->thread_count = thread_count;
{ "intra", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&intra_only}, "use only intra frames"},
{ "vn", OPT_BOOL | OPT_VIDEO, {(void*)&video_disable}, "disable video" },
{ "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
- { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantiser scale (VBR)", "q" },
- { "lmin", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_lmin}, "min video lagrange factor (VBR)", "lambda" },
- { "lmax", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_lmax}, "max video lagrange factor (VBR)", "lambda" },
- { "mblmin", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_lmin}, "min macroblock quantiser scale (VBR)", "q" },
- { "mblmax", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_lmax}, "max macroblock quantiser scale (VBR)", "q" },
- { "qdiff", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qdiff}, "max difference between the quantiser scale (VBR)", "q" },
+ { "qscale", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qscale}, "use fixed video quantizer scale (VBR)", "q" },
+ { "qdiff", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qdiff}, "max difference between the quantizer scale (VBR)", "q" },
{ "rc_eq", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_eq}, "set rate control equation", "equation" },
{ "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_override_string}, "rate control override for specific intervals", "override" },
{ "vcodec", HAS_ARG | OPT_VIDEO, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
static void show_banner(void)
{
- fprintf(stderr, "FFmpeg version " FFMPEG_VERSION ", Copyright (c) 2000-2004 Fabrice Bellard\n");
+ fprintf(stderr, "FFmpeg version " FFMPEG_VERSION ", Copyright (c) 2000-2006 Fabrice Bellard, et al.\n");
fprintf(stderr, " configuration: " FFMPEG_CONFIGURATION "\n");
fprintf(stderr, " libavutil version: " AV_STRINGIFY(LIBAVUTIL_VERSION) "\n");
fprintf(stderr, " libavcodec version: " AV_STRINGIFY(LIBAVCODEC_VERSION) "\n");
show_banner();
#ifdef CONFIG_GPL
printf(
- "This program is free software; you can redistribute it and/or modify\n"
+ "FFmpeg is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version.\n"
"\n"
- "This program is distributed in the hope that it will be useful,\n"
+ "FFmpeg is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
- "along with this program; if not, write to the Free Software\n"
+ "along with FFmpeg; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
);
#else
printf(
- "This library is free software; you can redistribute it and/or\n"
+ "FFmpeg is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Lesser General Public\n"
"License as published by the Free Software Foundation; either\n"
- "version 2 of the License, or (at your option) any later version.\n"
+ "version 2.1 of the License, or (at your option) any later version.\n"
"\n"
- "This library is distributed in the hope that it will be useful,\n"
+ "FFmpeg is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
"Lesser General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU Lesser General Public\n"
- "License along with this library; if not, write to the Free Software\n"
+ "License along with FFmpeg; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
);
#endif