Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eda6effcab | |||
| 45900618ae | |||
| 16e49d85b6 | |||
| bfdfeadf11 | |||
| 7ae6229b97 | |||
| 2156d9bd7d | |||
| 0a055cc62e | |||
| c8d43c22db | |||
| d9b7557732 | |||
| 15d7b7d7cc |
@@ -729,6 +729,10 @@ add_ldflags(){
|
||||
append LDFLAGS $($ldflags_filter "$@")
|
||||
}
|
||||
|
||||
add_stripflags(){
|
||||
append ASMSTRIPFLAGS "$@"
|
||||
}
|
||||
|
||||
add_extralibs(){
|
||||
prepend extralibs $($ldflags_filter "$@")
|
||||
}
|
||||
@@ -886,6 +890,20 @@ check_ldflags(){
|
||||
test_ldflags "$@" && add_ldflags "$@"
|
||||
}
|
||||
|
||||
test_stripflags(){
|
||||
log test_stripflags "$@"
|
||||
# call check_cc to get a fresh TMPO
|
||||
check_cc <<EOF
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
check_cmd $strip $ASMSTRIPFLAGS "$@" $TMPO
|
||||
}
|
||||
|
||||
check_stripflags(){
|
||||
log check_stripflags "$@"
|
||||
test_stripflags "$@" && add_stripflags "$@"
|
||||
}
|
||||
|
||||
check_header(){
|
||||
log check_header "$@"
|
||||
header=$1
|
||||
@@ -4460,6 +4478,10 @@ check_ldflags -Wl,--warn-common
|
||||
check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
|
||||
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
|
||||
|
||||
# add some strip flags
|
||||
# -wN '..@*' is more selective than -x, but not available everywhere.
|
||||
check_stripflags -wN \'..@*\' || check_stripflags -x
|
||||
|
||||
enabled xmm_clobber_test &&
|
||||
check_ldflags -Wl,--wrap,avcodec_open2 \
|
||||
-Wl,--wrap,avcodec_decode_audio4 \
|
||||
@@ -4810,6 +4832,7 @@ LD_PATH=$LD_PATH
|
||||
DLLTOOL=$dlltool
|
||||
LDFLAGS=$LDFLAGS
|
||||
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
|
||||
ASMSTRIPFLAGS=$ASMSTRIPFLAGS
|
||||
YASMFLAGS=$YASMFLAGS
|
||||
BUILDSUF=$build_suffix
|
||||
PROGSSUF=$progs_suffix
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.1.2
|
||||
PROJECT_NUMBER = 2.1.3
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
||||
@@ -110,10 +110,10 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int XAVS_frame(AVCodecContext *ctx, AVPacket *pkt,
|
||||
static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
const AVFrame *frame, int *got_packet)
|
||||
{
|
||||
XavsContext *x4 = ctx->priv_data;
|
||||
XavsContext *x4 = avctx->priv_data;
|
||||
xavs_nal_t *nal;
|
||||
int nnal, i, ret;
|
||||
xavs_picture_t pic_out;
|
||||
@@ -129,29 +129,29 @@ static int XAVS_frame(AVCodecContext *ctx, AVPacket *pkt,
|
||||
|
||||
x4->pic.i_pts = frame->pts;
|
||||
x4->pic.i_type = XAVS_TYPE_AUTO;
|
||||
x4->pts_buffer[ctx->frame_number % (ctx->max_b_frames+1)] = frame->pts;
|
||||
x4->pts_buffer[avctx->frame_number % (avctx->max_b_frames+1)] = frame->pts;
|
||||
}
|
||||
|
||||
if (xavs_encoder_encode(x4->enc, &nal, &nnal,
|
||||
frame? &x4->pic: NULL, &pic_out) < 0)
|
||||
return -1;
|
||||
|
||||
ret = encode_nals(ctx, pkt, nal, nnal);
|
||||
ret = encode_nals(avctx, pkt, nal, nnal);
|
||||
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
|
||||
if (!ret) {
|
||||
if (!frame && !(x4->end_of_stream)) {
|
||||
if ((ret = ff_alloc_packet2(ctx, pkt, 4)) < 0)
|
||||
if ((ret = ff_alloc_packet2(avctx, pkt, 4)) < 0)
|
||||
return ret;
|
||||
|
||||
pkt->data[0] = 0x0;
|
||||
pkt->data[1] = 0x0;
|
||||
pkt->data[2] = 0x01;
|
||||
pkt->data[3] = 0xb1;
|
||||
pkt->dts = 2*x4->pts_buffer[(x4->out_frame_count-1)%(ctx->max_b_frames+1)] -
|
||||
x4->pts_buffer[(x4->out_frame_count-2)%(ctx->max_b_frames+1)];
|
||||
pkt->dts = 2*x4->pts_buffer[(x4->out_frame_count-1)%(avctx->max_b_frames+1)] -
|
||||
x4->pts_buffer[(x4->out_frame_count-2)%(avctx->max_b_frames+1)];
|
||||
x4->end_of_stream = END_OF_STREAM;
|
||||
*got_packet = 1;
|
||||
}
|
||||
@@ -160,11 +160,11 @@ static int XAVS_frame(AVCodecContext *ctx, AVPacket *pkt,
|
||||
|
||||
avctx->coded_frame->pts = pic_out.i_pts;
|
||||
pkt->pts = pic_out.i_pts;
|
||||
if (ctx->has_b_frames) {
|
||||
if (avctx->has_b_frames) {
|
||||
if (!x4->out_frame_count)
|
||||
pkt->dts = pkt->pts - (x4->pts_buffer[1] - x4->pts_buffer[0]);
|
||||
else
|
||||
pkt->dts = x4->pts_buffer[(x4->out_frame_count-1)%(ctx->max_b_frames+1)];
|
||||
pkt->dts = x4->pts_buffer[(x4->out_frame_count-1)%(avctx->max_b_frames+1)];
|
||||
} else
|
||||
pkt->dts = pkt->pts;
|
||||
|
||||
|
||||
+5
-5
@@ -370,9 +370,6 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
|
||||
for(probe_size= PROBE_BUF_MIN; probe_size<=max_probe_size && !*fmt;
|
||||
probe_size = FFMIN(probe_size<<1, FFMAX(max_probe_size, probe_size+1))) {
|
||||
|
||||
if (probe_size < offset) {
|
||||
continue;
|
||||
}
|
||||
score = probe_size < max_probe_size ? AVPROBE_SCORE_RETRY : 0;
|
||||
|
||||
/* read probe data */
|
||||
@@ -387,7 +384,10 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
|
||||
score = 0;
|
||||
ret = 0; /* error was end of file, nothing read */
|
||||
}
|
||||
pd.buf_size = buf_offset += ret;
|
||||
buf_offset += ret;
|
||||
if (buf_offset < offset)
|
||||
continue;
|
||||
pd.buf_size = buf_offset - offset;
|
||||
pd.buf = &buf[offset];
|
||||
|
||||
memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
|
||||
@@ -408,7 +408,7 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
|
||||
}
|
||||
|
||||
/* rewind. reuse probe buffer to avoid seeking */
|
||||
ret = ffio_rewind_with_probe_data(pb, &buf, pd.buf_size);
|
||||
ret = ffio_rewind_with_probe_data(pb, &buf, buf_offset);
|
||||
|
||||
return ret < 0 ? ret : score;
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ $(SUBDIR)%-test.i: $(SUBDIR)%.c
|
||||
$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
|
||||
$(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
|
||||
$(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
|
||||
-$(STRIP) -wN '..@*' $@
|
||||
-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
|
||||
|
||||
LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
|
||||
$(LIBOBJS) $(LIBOBJS:.o=.s) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
|
||||
|
||||
Reference in New Issue
Block a user