Make ivfrate build standalone, Makefile tweaks.

git-svn-id: https://svn.eduke32.com/eduke32@3132 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-11-08 21:54:17 +00:00
parent b2162f554d
commit 61f79336d6
3 changed files with 9 additions and 5 deletions

View file

@ -444,7 +444,7 @@ $(OBJ)/%.$o: $(SRC)/%.c
#### Utilities
$(IVFRATE): $(SRC)/ivfrate.c
$(IVFRATE): $(SRC)/ivfrate.c $(SRC)/animvpx.h
if $(COMPILER) -Wall -Wextra $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
#### Lunatic
@ -530,7 +530,7 @@ $(RSRC)/editor_banner.c: $(RSRC)/build.bmp
# PHONIES
clean:
-rm -f $(OBJ)/* $(EDUKE32) $(EDUKE32).memmap $(MAPSTER32) $(MAPSTER32).memmap core* duke3d_w32$(EXESUFFIX) && $(MAKE) -C $(JAUDIOLIBDIR) clean && $(MAKE) -C $(ENETDIR) clean
-rm -f $(OBJ)/* $(EDUKE32) $(EDUKE32).memmap $(MAPSTER32) $(MAPSTER32).memmap $(IVFRATE) core* duke3d_w32$(EXESUFFIX) && $(MAKE) -C $(JAUDIOLIBDIR) clean && $(MAKE) -C $(ENETDIR) clean
ifeq ($(PLATFORM),DARWIN)
-rm -rf EDuke32.app Mapster32.app
endif

View file

@ -6,8 +6,10 @@
#define ANIM_VPX_H
#define VPX_CODEC_DISABLE_COMPAT 1
#ifndef ANIMVPX_STANDALONE
# include <vpx/vpx_decoder.h>
//#include <vpx/vp8dx.h>
#endif
// IVF format: http://wiki.multimedia.cx/index.php?title=IVF
#pragma pack(push,1)
@ -29,10 +31,10 @@ typedef struct
} animvpx_ivf_header_t;
#pragma pack(pop)
#ifndef ANIMVPX_STANDALONE
extern const char *animvpx_read_ivf_header_errmsg[7];
int32_t animvpx_read_ivf_header(int32_t inhandle, animvpx_ivf_header_t *hdr);
typedef struct
{
const char *errmsg; // non-NULL if codec error? better always check...
@ -85,6 +87,7 @@ void animvpx_restore_glstate(void);
int32_t animvpx_render_frame(animvpx_codec_ctx *codec);
void animvpx_print_stats(const animvpx_codec_ctx *codec);
#endif
static inline int32_t animvpx_check_header(const animvpx_ivf_header_t *hdr)
{

View file

@ -10,6 +10,7 @@
#include <stdint.h>
#define Bmemcmp memcmp
#define USE_OPENGL
#define ANIMVPX_STANDALONE
#include "animvpx.h"
@ -78,7 +79,7 @@ int main(int argc, char **argv)
unsigned long numer = strtoul(argv[2], NULL, 10);
unsigned long denom = strtoul(argv[3], NULL, 10);
uint32_t numer32=numer, denom32=denom;
const int NUMER_OFS = offsetof(animvpx_ivf_header_t, fpsnumer);
const int NUMER_OFS = 16; //offsetof(animvpx_ivf_header_t, fpsnumer);
if (denom == 0)
{