Commit a349ee3b authored by Deb Mukherjee's avatar Deb Mukherjee

Resolves some lint errors

And also fixes some style consistency issues.

Change-Id: I3dc6d44e17d2d6075dc9b02c4255a7395046c5e0
parent 29771770
......@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
}
// Flush encoder.
while (encode_frame(&codec, NULL, -1, writer)) {};
while (encode_frame(&codec, NULL, -1, writer)) {}
printf("\n");
fclose(infile);
......
......@@ -183,7 +183,7 @@ static void parse_command_line(int argc, const char **argv_,
enc_cfg->kf_min_dist = arg_parse_uint(&arg);
enc_cfg->kf_max_dist = enc_cfg->kf_min_dist;
} else if (arg_match(&arg, &scale_factors_arg, argi)) {
snprintf(string_options, 1024, "%s scale-factors=%s",
snprintf(string_options, sizeof(string_options), "%s scale-factors=%s",
string_options, arg.val);
} else if (arg_match(&arg, &passes_arg, argi)) {
passes = arg_parse_uint(&arg);
......@@ -198,10 +198,10 @@ static void parse_command_line(int argc, const char **argv_,
} else if (arg_match(&arg, &fpf_name_arg, argi)) {
fpf_file_name = arg.val;
} else if (arg_match(&arg, &min_q_arg, argi)) {
snprintf(string_options, 1024, "%s min-quantizers=%s",
snprintf(string_options, sizeof(string_options), "%s min-quantizers=%s",
string_options, arg.val);
} else if (arg_match(&arg, &max_q_arg, argi)) {
snprintf(string_options, 1024, "%s max-quantizers=%s",
snprintf(string_options, sizeof(string_options), "%s max-quantizers=%s",
string_options, arg.val);
} else if (arg_match(&arg, &min_bitrate_arg, argi)) {
min_bitrate = arg_parse_uint(&arg);
......
......@@ -516,9 +516,8 @@ static int evaluate_inter_mode(unsigned int* sse, int rate2, int* distortion2,
// Adjust rd for ZEROMV and LAST, if LAST is the closest reference frame.
if (this_mode == ZEROMV &&
x->e_mbd.mode_info_context->mbmi.ref_frame == LAST_FRAME &&
(denoise_aggressive || cpi->closest_reference_frame == LAST_FRAME))
{
this_rd = ((int64_t)this_rd) * rd_adj / 100;
(denoise_aggressive || cpi->closest_reference_frame == LAST_FRAME)) {
this_rd = ((int64_t)this_rd) * rd_adj / 100;
}
check_for_encode_breakout(*sse, x);
......
......@@ -112,22 +112,19 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx,
* structure. More memory may be required at the time the stream
* information becomes known.
*/
if (!ctx->priv)
{
vp8_init_ctx(ctx);
priv = (vpx_codec_alg_priv_t *)ctx->priv;
/* initialize number of fragments to zero */
priv->fragments.count = 0;
/* is input fragments enabled? */
priv->fragments.enabled =
(priv->base.init_flags & VPX_CODEC_USE_INPUT_FRAGMENTS);
/*post processing level initialized to do nothing */
}
else
{
priv = (vpx_codec_alg_priv_t *)ctx->priv;
if (!ctx->priv) {
vp8_init_ctx(ctx);
priv = (vpx_codec_alg_priv_t *)ctx->priv;
/* initialize number of fragments to zero */
priv->fragments.count = 0;
/* is input fragments enabled? */
priv->fragments.enabled =
(priv->base.init_flags & VPX_CODEC_USE_INPUT_FRAGMENTS);
/*post processing level initialized to do nothing */
} else {
priv = (vpx_codec_alg_priv_t *)ctx->priv;
}
priv->yv12_frame_buffers.use_frame_threads =
......@@ -138,11 +135,10 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx,
if (priv->yv12_frame_buffers.use_frame_threads &&
((ctx->priv->init_flags & VPX_CODEC_USE_ERROR_CONCEALMENT) ||
(ctx->priv->init_flags & VPX_CODEC_USE_INPUT_FRAGMENTS)))
{
/* row-based threading, error concealment, and input fragments will
* not be supported when using frame-based threading */
res = VPX_CODEC_INVALID_PARAM;
(ctx->priv->init_flags & VPX_CODEC_USE_INPUT_FRAGMENTS))) {
/* row-based threading, error concealment, and input fragments will
* not be supported when using frame-based threading */
res = VPX_CODEC_INVALID_PARAM;
}
return res;
......
......@@ -47,52 +47,49 @@ struct VpxDecInputContext {
struct WebmInputContext *webm_ctx;
};
static const arg_def_t looparg = ARG_DEF(NULL, "loops", 1,
"Number of times to decode the file");
static const arg_def_t codecarg = ARG_DEF(NULL, "codec", 1,
"Codec to use");
static const arg_def_t use_yv12 = ARG_DEF(NULL, "yv12", 0,
"Output raw YV12 frames");
static const arg_def_t use_i420 = ARG_DEF(NULL, "i420", 0,
"Output raw I420 frames");
static const arg_def_t flipuvarg = ARG_DEF(NULL, "flipuv", 0,
"Flip the chroma planes in the output");
static const arg_def_t rawvideo = ARG_DEF(NULL, "rawvideo", 0,
"Output raw YUV frames");
static const arg_def_t noblitarg = ARG_DEF(NULL, "noblit", 0,
"Don't process the decoded frames");
static const arg_def_t progressarg = ARG_DEF(NULL, "progress", 0,
"Show progress after each frame decodes");
static const arg_def_t limitarg = ARG_DEF(NULL, "limit", 1,
"Stop decoding after n frames");
static const arg_def_t skiparg = ARG_DEF(NULL, "skip", 1,
"Skip the first n input frames");
static const arg_def_t postprocarg = ARG_DEF(NULL, "postproc", 0,
"Postprocess decoded frames");
static const arg_def_t summaryarg = ARG_DEF(NULL, "summary", 0,
"Show timing summary");
static const arg_def_t outputfile = ARG_DEF("o", "output", 1,
"Output file name pattern (see below)");
static const arg_def_t threadsarg = ARG_DEF("t", "threads", 1,
"Max threads to use");
static const arg_def_t verbosearg = ARG_DEF("v", "verbose", 0,
"Show version string");
static const arg_def_t error_concealment = ARG_DEF(NULL, "error-concealment", 0,
"Enable decoder error-concealment");
static const arg_def_t scalearg = ARG_DEF("S", "scale", 0,
"Scale output frames uniformly");
static const arg_def_t continuearg =
ARG_DEF("k", "keep-going", 0, "(debug) Continue decoding after error");
static const arg_def_t fb_arg =
ARG_DEF(NULL, "frame-buffers", 1, "Number of frame buffers to use");
static const arg_def_t md5arg = ARG_DEF(NULL, "md5", 0,
"Compute the MD5 sum of the decoded frame");
static const arg_def_t looparg = ARG_DEF(
NULL, "loops", 1, "Number of times to decode the file");
static const arg_def_t codecarg = ARG_DEF(
NULL, "codec", 1, "Codec to use");
static const arg_def_t use_yv12 = ARG_DEF(
NULL, "yv12", 0, "Output raw YV12 frames");
static const arg_def_t use_i420 = ARG_DEF(
NULL, "i420", 0, "Output raw I420 frames");
static const arg_def_t flipuvarg = ARG_DEF(
NULL, "flipuv", 0, "Flip the chroma planes in the output");
static const arg_def_t rawvideo = ARG_DEF(
NULL, "rawvideo", 0, "Output raw YUV frames");
static const arg_def_t noblitarg = ARG_DEF(
NULL, "noblit", 0, "Don't process the decoded frames");
static const arg_def_t progressarg = ARG_DEF(
NULL, "progress", 0, "Show progress after each frame decodes");
static const arg_def_t limitarg = ARG_DEF(
NULL, "limit", 1, "Stop decoding after n frames");
static const arg_def_t skiparg = ARG_DEF(
NULL, "skip", 1, "Skip the first n input frames");
static const arg_def_t postprocarg = ARG_DEF(
NULL, "postproc", 0, "Postprocess decoded frames");
static const arg_def_t summaryarg = ARG_DEF(
NULL, "summary", 0, "Show timing summary");
static const arg_def_t outputfile = ARG_DEF(
"o", "output", 1, "Output file name pattern (see below)");
static const arg_def_t threadsarg = ARG_DEF(
"t", "threads", 1, "Max threads to use");
static const arg_def_t verbosearg = ARG_DEF(
"v", "verbose", 0, "Show version string");
static const arg_def_t error_concealment = ARG_DEF(
NULL, "error-concealment", 0, "Enable decoder error-concealment");
static const arg_def_t scalearg = ARG_DEF(
"S", "scale", 0, "Scale output frames uniformly");
static const arg_def_t continuearg = ARG_DEF(
"k", "keep-going", 0, "(debug) Continue decoding after error");
static const arg_def_t fb_arg = ARG_DEF(
NULL, "frame-buffers", 1, "Number of frame buffers to use");
static const arg_def_t md5arg = ARG_DEF(
NULL, "md5", 0, "Compute the MD5 sum of the decoded frame");
#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
static const arg_def_t outbitdeptharg = ARG_DEF(
NULL, "output-bit-depth", 1,
"Output bit-depth for decoded frames");
NULL, "output-bit-depth", 1, "Output bit-depth for decoded frames");
#endif
static const arg_def_t *all_args[] = {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment