Skip to content

Commit

Permalink
Merge remote-tracking branch 'qatar/master'
Browse files Browse the repository at this point in the history
* qatar/master:
  Fix NASM include directive
  dsputil_mmx: Honor HAVE_AMD3DNOW
  lavf,lavd: remove all usage of AVFormatParameters from demuxers.
  jack: add 'channels' private option.
  VC-1: fix reading of custom PAR.
  Remove redundant and dubious video codec detection by its extradata
  mpeg12: remove repeat-field code disabled since May 2002
  patch checklist: suggest fate instead of regression tests
  Turn on resampling on sudden size change instead of bailing out during recode.
  avtools: reinitialise filter chain when input video stream changes dimensions

Conflicts:
	Makefile
	avconv.c
	doc/developer.texi
	ffplay.c
	libavcodec/x86/dsputil_mmx.c
	libavdevice/libdc1394.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Aug 15, 2011
2 parents 6ae356c + cc73511 commit 1a34478
Show file tree
Hide file tree
Showing 46 changed files with 94 additions and 242 deletions.
15 changes: 13 additions & 2 deletions avconv.c
Expand Up @@ -1262,7 +1262,20 @@ static void do_video_out(AVFormatContext *s,
sws_scale(ost->img_resample_ctx, formatted_picture->data, formatted_picture->linesize,
0, ost->resample_height, final_picture->data, final_picture->linesize);
}
#else
if (resample_changed) {
avfilter_graph_free(&ost->graph);
if (configure_video_filters(ist, ost)) {
fprintf(stderr, "Error reinitialising filters!\n");
exit_program(1);
}
}
#endif
if (resample_changed) {
ost->resample_width = dec->width;
ost->resample_height = dec->height;
ost->resample_pix_fmt = dec->pix_fmt;
}

/* duplicates frame if needed */
for(i=0;i<nb_frames;i++) {
Expand Down Expand Up @@ -2375,8 +2388,6 @@ static int transcode(AVFormatContext **output_files,
}
assert_codec_experimental(ist->st->codec, 0);
assert_avoptions(ost->opts);
//if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
}
}

Expand Down
2 changes: 1 addition & 1 deletion common.mak
Expand Up @@ -27,7 +27,7 @@ IFLAGS := -I. -I$(SRC_PATH)/
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
CFLAGS += $(ECFLAGS)
CCFLAGS = $(CFLAGS)
YASMFLAGS += $(IFLAGS) -Pconfig.asm
YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
HOSTCFLAGS += $(IFLAGS)
LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)

Expand Down
2 changes: 1 addition & 1 deletion doc/developer.texi
Expand Up @@ -327,7 +327,7 @@ send a reminder by email. Your patch should eventually be dealt with.

@enumerate
@item
Does 'make fate' pass with the patch applied?
Does @code{make fate} pass with the patch applied?
@item
Was the patch generated with git format-patch or send-email?
@item
Expand Down
2 changes: 0 additions & 2 deletions ffmpeg.c
Expand Up @@ -2482,8 +2482,6 @@ static int transcode(AVFormatContext **output_files,
}
assert_codec_experimental(ist->st->codec, 0);
assert_avoptions(ost->opts);
//if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
}
}

Expand Down
14 changes: 14 additions & 0 deletions ffplay.c
Expand Up @@ -1728,6 +1728,8 @@ static int video_thread(void *arg)
#if CONFIG_AVFILTER
AVFilterGraph *graph = avfilter_graph_alloc();
AVFilterContext *filt_out = NULL;
int last_w = is->video_st->codec->width;
int last_h = is->video_st->codec->height;

if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
goto the_end;
Expand All @@ -1744,6 +1746,18 @@ static int video_thread(void *arg)
while (is->paused && !is->videoq.abort_request)
SDL_Delay(10);
#if CONFIG_AVFILTER
if ( last_w != is->video_st->codec->width
|| last_h != is->video_st->codec->height) {
av_dlog(NULL, "Changing size %dx%d -> %dx%d\n", last_w, last_h,
is->video_st->codec->width, is->video_st->codec->height);
avfilter_graph_free(&graph);
graph = avfilter_graph_alloc();
if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
goto the_end;
filt_out = is->out_video_filter;
last_w = is->video_st->codec->width;
last_h = is->video_st->codec->height;
}
ret = av_vsink_buffer_get_video_buffer_ref(filt_out, &picref, 0);
if (picref) {
avfilter_fill_frame_from_video_buffer_ref(frame, picref);
Expand Down
12 changes: 0 additions & 12 deletions libavcodec/mpeg12.c
Expand Up @@ -2296,18 +2296,6 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
return buf_size;
}

#if 0
if (s->repeat_field % 2 == 1) {
s->repeat_field++;
//fprintf(stderr,"\nRepeating last frame: %d -> %d! pict: %d %d", avctx->frame_number-1, avctx->frame_number,
// s2->picture_number, s->repeat_field);
if (avctx->flags & CODEC_FLAG_REPEAT_FIELD) {
*data_size = sizeof(AVPicture);
goto the_end;
}
}
#endif

if(s->mpeg_enc_ctx_allocated==0 && avctx->codec_tag == AV_RL32("VCR2"))
vcr2_init_sequence(avctx);

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/ac3dsp.asm
Expand Up @@ -19,8 +19,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/dct32_sse.asm
Expand Up @@ -19,8 +19,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA 32

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/deinterlace.asm
Expand Up @@ -20,8 +20,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
10 changes: 5 additions & 5 deletions libavcodec/x86/dsputil_mmx.c
Expand Up @@ -2579,11 +2579,11 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2;
#endif
#if HAVE_7REGS
if( mm_flags&AV_CPU_FLAG_3DNOW )
if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW))
c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov;
#endif

} else if (mm_flags & AV_CPU_FLAG_3DNOW) {
} else if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW)) {
c->prefetch = prefetch_3dnow;

if (!high_bit_depth) {
Expand Down Expand Up @@ -2732,11 +2732,11 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
}
#endif

if(mm_flags & AV_CPU_FLAG_3DNOW){
if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW)) {
c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow;
c->vector_fmul = vector_fmul_3dnow;
}
if(mm_flags & AV_CPU_FLAG_3DNOWEXT){
if (HAVE_AMD3DNOWEXT && (mm_flags & AV_CPU_FLAG_3DNOWEXT)) {
c->vector_fmul_reverse = vector_fmul_reverse_3dnow2;
#if HAVE_6REGS
c->vector_fmul_window = vector_fmul_window_3dnow2;
Expand Down Expand Up @@ -2767,7 +2767,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
c->scalarproduct_float = ff_scalarproduct_float_sse;
#endif
}
if(mm_flags & AV_CPU_FLAG_3DNOW)
if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW))
c->vector_fmul_add = vector_fmul_add_3dnow; // faster than sse
if(mm_flags & AV_CPU_FLAG_SSE2){
#if HAVE_YASM
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/x86/dsputil_yasm.asm
Expand Up @@ -19,7 +19,7 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "x86inc.asm"

SECTION_RODATA
pb_f: times 16 db 15
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/dsputilenc_yasm.asm
Expand Up @@ -21,8 +21,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;*****************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION .text

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/x86/fft_mmx.asm
Expand Up @@ -28,7 +28,7 @@
; in blocks as conventient to the vector size.
; i.e. {4x real, 4x imaginary, 4x real, ...} (or 2x respectively)

%include "libavutil/x86/x86inc.asm"
%include "x86inc.asm"

%ifdef ARCH_X86_64
%define pointer resq
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/fmtconvert.asm
Expand Up @@ -19,8 +19,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_TEXT

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_chromamc.asm
Expand Up @@ -20,8 +20,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_chromamc_10bit.asm
Expand Up @@ -22,8 +22,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_deblock.asm
Expand Up @@ -24,8 +24,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION .text

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_deblock_10bit.asm
Expand Up @@ -24,8 +24,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_idct.asm
Expand Up @@ -26,8 +26,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;*****************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_idct_10bit.asm
Expand Up @@ -22,8 +22,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_intrapred.asm
Expand Up @@ -22,8 +22,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_intrapred_10bit.asm
Expand Up @@ -22,8 +22,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_qpel_10bit.asm
Expand Up @@ -22,8 +22,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA 32

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/x86/h264_weight.asm
Expand Up @@ -21,7 +21,7 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "x86inc.asm"

SECTION .text

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/h264_weight_10bit.asm
Expand Up @@ -22,8 +22,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA 32

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/vc1dsp_yasm.asm
Expand Up @@ -19,8 +19,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

cextern pw_4
cextern pw_5
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/vp3dsp.asm
Expand Up @@ -19,8 +19,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

; MMX-optimized functions cribbed from the original VP3 source code.

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/vp56dsp.asm
Expand Up @@ -20,8 +20,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

cextern pw_64

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/x86/vp8dsp.asm
Expand Up @@ -20,8 +20,8 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

%include "libavutil/x86/x86inc.asm"
%include "libavutil/x86/x86util.asm"
%include "x86inc.asm"
%include "x86util.asm"

SECTION_RODATA

Expand Down
8 changes: 0 additions & 8 deletions libavdevice/alsa-audio-dec.c
Expand Up @@ -61,14 +61,6 @@ static av_cold int audio_read_header(AVFormatContext *s1,
enum CodecID codec_id;
double o;

#if FF_API_FORMAT_PARAMETERS
if (ap->sample_rate > 0)
s->sample_rate = ap->sample_rate;

if (ap->channels > 0)
s->channels = ap->channels;
#endif

st = av_new_stream(s1, 0);
if (!st) {
av_log(s1, AV_LOG_ERROR, "Cannot add stream\n");
Expand Down

0 comments on commit 1a34478

Please sign in to comment.