/* * Copyright (c) 2013 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
staticvoid fix_framerate(int *num, int *den) { // Some versions of vpxenc used 1/(2*fps) for the timebase, so // we can guess the framerate using only the timebase in this // case. Other files would require reading ahead to guess the // timebase, like we do for webm. if (*den > 0 && *den < 1000000000 && *num > 0 && *num < 1000) { // Correct for the factor of 2 applied to the timebase in the encoder. if (*num & 1)
*den *= 2; else
*num /= 2;
} else { // Don't know FPS for sure, and don't have readahead code // (yet?), so just default to 30fps.
*num = 30;
*den = 1;
}
}
int file_is_ivf(struct VpxInputContext *input_ctx) { char raw_hdr[32]; int is_ivf = 0;
if (fread(raw_hdr, 1, 32, input_ctx->file) == 32) { if (memcmp(IVF_SIGNATURE, raw_hdr, 4) == 0) {
is_ivf = 1;
if (mem_get_le16(raw_hdr + 4) != 0) {
fprintf(stderr, "Error: Unrecognized IVF version! This file may not" " decode properly.");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.