Commit 7ae473e8 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  nuv: K&R formatting cosmetics
  build: generalise rules and variable settings for av* programs
  nuv: check RTjpeg header for validity
  Revert "nuv: check per-frame header for validity."
  imc: remove unused field IMCContext.one_div_log2
  imc: fix size of a memset()
  imc: remove empty if() block
  fate: simplify variable setting filter.mak
  lavf: Declare an AVRational struct without a struct literal

Conflicts:
	Makefile
	configure
	libavcodec/nuv.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a80ce390 cf22705e
......@@ -17,7 +17,7 @@ PROGS-$(CONFIG_FFSERVER) += ffserver
PROGS := $(PROGS-yes:%=%$(EXESUF))
INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
OBJS = $(PROGS-yes:%=%.o) cmdutils.o
OBJS = cmdutils.o
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
TOOLS = qt-faststart trasher
......@@ -88,12 +88,19 @@ endef
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
ffplay.o: CFLAGS += $(SDL_CFLAGS)
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
define DOPROG
OBJS-$(1) += $(1).o
$(1)_g$(EXESUF): $(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
$(1)_g$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
-include $$(OBJS-$(1):.o=.d)
endef
$(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P))))
%$(PROGSSUF)_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
$(LD) $(LDFLAGS) -o $@ $(OBJS-$*) cmdutils.o $(FF_EXTRALIBS)
OBJDIRS += tools
......
......@@ -3926,7 +3926,7 @@ CXX_O=$CXX_O
LD_O=$LD_O
DLLTOOL=$dlltool
LDFLAGS=$LDFLAGS
FFSERVERLDFLAGS=$FFSERVERLDFLAGS
LDFLAGS-ffserver=$FFSERVERLDFLAGS
SHFLAGS=$SHFLAGS
YASMFLAGS=$YASMFLAGS
BUILDSUF=$build_suffix
......@@ -3960,8 +3960,8 @@ HOSTCC_C=$HOSTCC_C
HOSTCC_O=$HOSTCC_O
TARGET_EXEC=$target_exec
TARGET_PATH=$target_path
SDL_LIBS=$sdl_libs
SDL_CFLAGS=$sdl_cflags
LIBS-ffplay=$sdl_libs
CFLAGS-ffplay=$sdl_cflags
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
INSTALL=$install
......
......@@ -92,7 +92,6 @@ typedef struct {
float sqrt_tab[30];
GetBitContext gb;
float one_div_log2;
DSPContext dsp;
FFTContext fft;
......@@ -227,10 +226,6 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
imc_huffman_bits[i][j], 2, 2, INIT_VLC_USE_NEW_STATIC);
}
}
q->one_div_log2 = 1 / log(2);
if (avctx->codec_id == CODEC_ID_IAC) {
}
if (avctx->codec_id == CODEC_ID_IAC) {
iac_generate_tabs(q, avctx->sample_rate);
......@@ -792,7 +787,7 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch)
chctx->decoder_reset = 1;
if (chctx->decoder_reset) {
memset(q->out_samples, 0, sizeof(q->out_samples));
memset(q->out_samples, 0, COEFFS * sizeof(*q->out_samples));
for (i = 0; i < BANDS; i++)
chctx->old_floor[i] = 1.0;
for (i = 0; i < COEFFS; i++)
......
This diff is collapsed.
......@@ -25,6 +25,9 @@
#include <stdint.h>
#include "dsputil.h"
#define RTJPEG_FILE_VERSION 0
#define RTJPEG_HEADER_SIZE 12
typedef struct {
int w, h;
DSPContext *dsp;
......
......@@ -2798,7 +2798,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
/* round guessed framerate to a "standard" framerate if it's
* within 1% of the original estimate*/
for (j = 1; j < MAX_STD_TIMEBASES; j++) {
AVRational std_fps = (AVRational){get_std_framerate(j), 12*1001};
AVRational std_fps = { get_std_framerate(j), 12*1001 };
double error = fabs(av_q2d(st->avg_frame_rate) / av_q2d(std_fps) - 1);
if (error < best_error) {
......
......@@ -19,21 +19,16 @@ $(FATE_AMIX): CMP = oneoff
$(FATE_AMIX): CMP_UNIT = f32
FATE_FILTER += $(FATE_AMIX)
FATE_SAMPLES_AVCONV += $(FATE_AMIX)
FATE_ASYNCTS += fate-filter-asyncts
FATE_FILTER += fate-filter-asyncts
fate-filter-asyncts: SRC = $(SAMPLES)/nellymoser/nellymoser-discont.flv
fate-filter-asyncts: CMD = pcm -i $(SRC) -af aresample=min_comp=0.001:min_hard_comp=0.1
fate-filter-asyncts: CMP = oneoff
fate-filter-asyncts: REF = $(SAMPLES)/nellymoser/nellymoser-discont.pcm
FATE_FILTER += $(FATE_ASYNCTS)
FATE_SAMPLES_AVCONV += $(FATE_ASYNCTS)
fate-filter-delogo: CMD = framecrc -i $(SAMPLES)/real/rv30.rm -vf delogo=show=0:x=290:y=25:w=26:h=16 -an
FATE_FILTER += fate-filter-delogo
FATE_SAMPLES_AVCONV += fate-filter-delogo
FATE_YADIF += fate-filter-yadif-mode0
fate-filter-yadif-mode0: CMD = framecrc -flags bitexact -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -vf yadif=0
......@@ -42,6 +37,6 @@ FATE_YADIF += fate-filter-yadif-mode1
fate-filter-yadif-mode1: CMD = framecrc -flags bitexact -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -vf yadif=1
FATE_FILTER += $(FATE_YADIF)
FATE_SAMPLES_AVCONV += $(FATE_YADIF)
FATE_SAMPLES_AVCONV += $(FATE_FILTER)
fate-filter: $(FATE_FILTER)
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