Commit d4393288 authored by Janne Grunau's avatar Janne Grunau

move rl32() to its only user tools/dav1d/input/ivf.c

Replace it with the version used in dav1d_fuzzer to avoid an integer
promotion.
parent d5421c30
......@@ -60,14 +60,6 @@ static inline int u64log2(const uint64_t v) {
return 63 - clzll(v);
}
static inline unsigned rl16(const uint8_t *const ptr) {
return (ptr[1] << 8) | ptr[0];
}
static inline unsigned rl32(const uint8_t *const ptr) {
return (rl16(&ptr[2]) << 16) | rl16(ptr);
}
static inline unsigned inv_recenter(const unsigned r, const unsigned v) {
if (v > (r << 1))
return v;
......
......@@ -34,14 +34,16 @@
#include <stdlib.h>
#include <string.h>
#include "common/intops.h"
#include "input/demuxer.h"
typedef struct DemuxerPriv {
FILE *f;
} IvfInputContext;
static unsigned rl32(const uint8_t *const p) {
return ((uint32_t)p[3] << 24U) | (p[2] << 16U) | (p[1] << 8U) | p[0];
}
static int ivf_open(IvfInputContext *const c, const char *const file,
unsigned fps[2], unsigned *const num_frames)
{
......
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