Removing VP8_FOURCC_MASK & VP9_FOURCC_MASK.
There is no reason to have fourcc masks, everything just works without them. Change-Id: I1d48100e7b7d5ef55ec49a708ba6adcb9ab4ecd8
This commit is contained in:
parent
d39485a776
commit
cccadd245c
@ -63,10 +63,8 @@ typedef long off_t; /* NOLINT */
|
||||
|
||||
#define RAW_FRAME_HDR_SZ sizeof(uint32_t)
|
||||
|
||||
#define VP8_FOURCC (0x30385056)
|
||||
#define VP9_FOURCC (0x30395056)
|
||||
#define VP8_FOURCC_MASK (0x00385056)
|
||||
#define VP9_FOURCC_MASK (0x00395056)
|
||||
#define VP8_FOURCC 0x30385056
|
||||
#define VP9_FOURCC 0x30395056
|
||||
|
||||
enum VideoFileType {
|
||||
FILE_TYPE_RAW,
|
||||
|
7
vpxdec.c
7
vpxdec.c
@ -40,13 +40,12 @@ static const struct {
|
||||
char const *name;
|
||||
const vpx_codec_iface_t *(*iface)(void);
|
||||
uint32_t fourcc;
|
||||
uint32_t fourcc_mask;
|
||||
} ifaces[] = {
|
||||
#if CONFIG_VP8_DECODER
|
||||
{"vp8", vpx_codec_vp8_dx, VP8_FOURCC_MASK, 0x00FFFFFF},
|
||||
{"vp8", vpx_codec_vp8_dx, VP8_FOURCC},
|
||||
#endif
|
||||
#if CONFIG_VP9_DECODER
|
||||
{"vp9", vpx_codec_vp9_dx, VP9_FOURCC_MASK, 0x00FFFFFF},
|
||||
{"vp9", vpx_codec_vp9_dx, VP9_FOURCC},
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -670,7 +669,7 @@ int main_loop(int argc, const char **argv_) {
|
||||
|
||||
/* Try to determine the codec from the fourcc. */
|
||||
for (i = 0; i < sizeof(ifaces) / sizeof(ifaces[0]); i++)
|
||||
if ((vpx_input_ctx.fourcc & ifaces[i].fourcc_mask) == ifaces[i].fourcc) {
|
||||
if (vpx_input_ctx.fourcc == ifaces[i].fourcc) {
|
||||
vpx_codec_iface_t *vpx_iface = ifaces[i].iface();
|
||||
|
||||
if (iface && iface != vpx_iface)
|
||||
|
@ -82,9 +82,9 @@ int file_is_webm(struct WebmInputContext *webm_ctx,
|
||||
|
||||
codec_id = nestegg_track_codec_id(webm_ctx->nestegg_ctx, i);
|
||||
if (codec_id == NESTEGG_CODEC_VP8) {
|
||||
vpx_ctx->fourcc = VP8_FOURCC_MASK;
|
||||
vpx_ctx->fourcc = VP8_FOURCC;
|
||||
} else if (codec_id == NESTEGG_CODEC_VP9) {
|
||||
vpx_ctx->fourcc = VP9_FOURCC_MASK;
|
||||
vpx_ctx->fourcc = VP9_FOURCC;
|
||||
} else {
|
||||
fatal("Not VPx video, quitting.\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user