Commit cd8cb549 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ARM: ac3dsp: optimised update_bap_counts()
  mpegaudiodec: Fix av_dlog() invocation.
  h264/10bit: add HAVE_ALIGNED_STACK checks.
  Update 8-bit H.264 IDCT function names to reflect bit-depth.
  Add IDCT functions for 10-bit H.264.
  mpegaudioenc: Fix broken av_dlog statement.
  Employ correct printf format specifiers, mostly in debug output.
  ARM: fix MUL64 inline asm for pre-armv6

Conflicts:
	libavcodec/mpegaudioenc.c
	libavformat/ape.c
	libavformat/mxfdec.c
	libavformat/r3d.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 06a9da73 8e112df4
OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_init_arm.o \
arm/ac3dsp_arm.o
OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_init_arm.o \
......
/*
* Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "asm.S"
function ff_ac3_update_bap_counts_arm, export=1
push {lr}
ldrb lr, [r1], #1
1:
lsl r3, lr, #1
ldrh r12, [r0, r3]
subs r2, r2, #1
ldrbgt lr, [r1], #1
add r12, r12, #1
strh r12, [r0, r3]
bgt 1b
pop {pc}
endfunc
......@@ -35,10 +35,12 @@ void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
int snr_offset, int floor,
const uint8_t *bap_tab, uint8_t *bap);
int ff_ac3_compute_mantissa_size_arm(int cnt[5], uint8_t *bap, int nb_coefs);
void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len);
av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
{
c->update_bap_counts = ff_ac3_update_bap_counts_arm;
if (HAVE_ARMV6) {
c->bit_alloc_calc_bap = ff_ac3_bit_alloc_calc_bap_armv6;
}
......
......@@ -41,6 +41,8 @@ static inline av_const int MULL(int a, int b, unsigned shift)
}
#define MULH MULH
#define MUL64 MUL64
#if HAVE_ARMV6
static inline av_const int MULH(int a, int b)
{
......@@ -48,6 +50,13 @@ static inline av_const int MULH(int a, int b)
__asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
return r;
}
static inline av_const int64_t MUL64(int a, int b)
{
int64_t x;
__asm__ ("smull %Q0, %R0, %1, %2" : "=r"(x) : "r"(a), "r"(b));
return x;
}
#else
static inline av_const int MULH(int a, int b)
{
......@@ -55,15 +64,14 @@ static inline av_const int MULH(int a, int b)
__asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));
return hi;
}
#endif
static inline av_const int64_t MUL64(int a, int b)
{
int64_t x;
__asm__ ("smull %Q0, %R0, %1, %2" : "=r"(x) : "r"(a), "r"(b));
__asm__ ("smull %Q0, %R0, %1, %2" : "=&r"(x) : "r"(a), "r"(b));
return x;
}
#define MUL64 MUL64
#endif
static inline av_const int64_t MAC64(int64_t d, int a, int b)
{
......
......@@ -66,7 +66,6 @@ typedef struct H264DSPContext{
void (*h264_idct_dc_add)(uint8_t *dst/*align 4*/, DCTELEM *block/*align 16*/, int stride);
void (*h264_idct8_dc_add)(uint8_t *dst/*align 8*/, DCTELEM *block/*align 16*/, int stride);
void (*h264_dct)(DCTELEM block[4][4]);
void (*h264_idct_add16)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
void (*h264_idct8_add4)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
void (*h264_idct_add8)(uint8_t **dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
......
......@@ -406,8 +406,9 @@ static av_cold int decode_init(AVCodecContext * avctx)
k = i & 1;
is_table_lsf[j][k ^ 1][i] = FIXR(f);
is_table_lsf[j][k][i] = FIXR(1.0);
av_dlog(avctx, "is_table_lsf %d %d: %x %x\n",
i, j, is_table_lsf[j][0][i], is_table_lsf[j][1][i]);
av_dlog(avctx, "is_table_lsf %d %d: %f %f\n",
i, j, (float) is_table_lsf[j][0][i],
(float) is_table_lsf[j][1][i]);
}
}
......
......@@ -548,13 +548,11 @@ static void compute_bit_allocation(MpegAudioContext *s,
}
}
}
#if 0
printf("current=%d max=%d max_sb=%d alloc=%d\n",
current_frame_size, max_frame_size, max_sb,
bit_alloc[max_sb]);
#endif
if (max_sb < 0)
break;
av_dlog(NULL, "current=%d max=%d max_sb=%d max_ch=%d alloc=%d\n",
current_frame_size, max_frame_size, max_sb, max_ch,
bit_alloc[max_ch][max_sb]);
/* find alloc table entry (XXX: not optimal, should use
pointer table) */
......
......@@ -12,8 +12,9 @@ YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o \
MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o
YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \
x86/h264_deblock_10bit.o \
x86/h264_weight.o \
x86/h264_idct.o \
x86/h264_idct_10bit.o \
x86/h264_weight.o \
YASM-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred.o
MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
......
......@@ -73,7 +73,7 @@ SECTION .text
INIT_MMX
; ff_h264_idct_add_mmx(uint8_t *dst, int16_t *block, int stride)
cglobal h264_idct_add_mmx, 3, 3, 0
cglobal h264_idct_add_8_mmx, 3, 3, 0
IDCT4_ADD r0, r1, r2
RET
......@@ -125,7 +125,7 @@ cglobal h264_idct_add_mmx, 3, 3, 0
SUMSUB_BA w, 0, 4
SUMSUB_BA w, 3, 2
SUMSUB_BA w, 1, 5
SWAP 7, 6, 4, 5, 2, 3, 1, 0 ; 70315246 -> 01234567
SWAP 7, 6, 4, 5, 2, 3, 1, 0 ; 70315246 -> 01234567
%endmacro
%macro IDCT8_1D_FULL 1
......@@ -177,7 +177,7 @@ cglobal h264_idct_add_mmx, 3, 3, 0
INIT_MMX
; ff_h264_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
cglobal h264_idct8_add_mmx, 3, 4, 0
cglobal h264_idct8_add_8_mmx, 3, 4, 0
%assign pad 128+4-(stack_offset&7)
SUB rsp, pad
......@@ -237,7 +237,7 @@ cglobal h264_idct8_add_mmx, 3, 4, 0
INIT_XMM
; ff_h264_idct8_add_sse2(uint8_t *dst, int16_t *block, int stride)
cglobal h264_idct8_add_sse2, 3, 4, 10
cglobal h264_idct8_add_8_sse2, 3, 4, 10
IDCT8_ADD_SSE r0, r1, r2, r3
RET
......@@ -261,7 +261,7 @@ cglobal h264_idct8_add_sse2, 3, 4, 10
packuswb m1, m1
%endmacro
%macro DC_ADD_MMX2_OP 3-4
%macro DC_ADD_MMX2_OP 4
%1 m2, [%2 ]
%1 m3, [%2+%3 ]
%1 m4, [%2+%3*2]
......@@ -282,13 +282,13 @@ cglobal h264_idct8_add_sse2, 3, 4, 10
INIT_MMX
; ff_h264_idct_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
cglobal h264_idct_dc_add_mmx2, 3, 3, 0
cglobal h264_idct_dc_add_8_mmx2, 3, 3, 0
DC_ADD_MMX2_INIT r1, r2
DC_ADD_MMX2_OP movh, r0, r2, r1
RET
; ff_h264_idct8_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
cglobal h264_idct8_dc_add_mmx2, 3, 3, 0
cglobal h264_idct8_dc_add_8_mmx2, 3, 3, 0
DC_ADD_MMX2_INIT r1, r2
DC_ADD_MMX2_OP mova, r0, r2, r1
lea r0, [r0+r2*4]
......@@ -297,7 +297,7 @@ cglobal h264_idct8_dc_add_mmx2, 3, 3, 0
; ff_h264_idct_add16_mmx(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add16_mmx, 5, 7, 0
cglobal h264_idct_add16_8_mmx, 5, 7, 0
xor r5, r5
%ifdef PIC
lea r11, [scan8_mem]
......@@ -319,7 +319,7 @@ cglobal h264_idct_add16_mmx, 5, 7, 0
; ff_h264_idct8_add4_mmx(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct8_add4_mmx, 5, 7, 0
cglobal h264_idct8_add4_8_mmx, 5, 7, 0
%assign pad 128+4-(stack_offset&7)
SUB rsp, pad
......@@ -351,7 +351,7 @@ cglobal h264_idct8_add4_mmx, 5, 7, 0
; ff_h264_idct_add16_mmx2(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add16_mmx2, 5, 7, 0
cglobal h264_idct_add16_8_mmx2, 5, 7, 0
xor r5, r5
%ifdef PIC
lea r11, [scan8_mem]
......@@ -398,7 +398,7 @@ cglobal h264_idct_add16_mmx2, 5, 7, 0
; ff_h264_idct_add16intra_mmx(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add16intra_mmx, 5, 7, 0
cglobal h264_idct_add16intra_8_mmx, 5, 7, 0
xor r5, r5
%ifdef PIC
lea r11, [scan8_mem]
......@@ -421,7 +421,7 @@ cglobal h264_idct_add16intra_mmx, 5, 7, 0
; ff_h264_idct_add16intra_mmx2(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add16intra_mmx2, 5, 7, 0
cglobal h264_idct_add16intra_8_mmx2, 5, 7, 0
xor r5, r5
%ifdef PIC
lea r11, [scan8_mem]
......@@ -466,7 +466,7 @@ cglobal h264_idct_add16intra_mmx2, 5, 7, 0
; ff_h264_idct8_add4_mmx2(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct8_add4_mmx2, 5, 7, 0
cglobal h264_idct8_add4_8_mmx2, 5, 7, 0
%assign pad 128+4-(stack_offset&7)
SUB rsp, pad
......@@ -529,7 +529,7 @@ cglobal h264_idct8_add4_mmx2, 5, 7, 0
INIT_XMM
; ff_h264_idct8_add4_sse2(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct8_add4_sse2, 5, 7, 10
cglobal h264_idct8_add4_8_sse2, 5, 7, 10
xor r5, r5
%ifdef PIC
lea r11, [scan8_mem]
......@@ -607,7 +607,7 @@ h264_idct_add8_mmx_plane:
; ff_h264_idct_add8_mmx(uint8_t **dest, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add8_mmx, 5, 7, 0
cglobal h264_idct_add8_8_mmx, 5, 7, 0
mov r5, 16
add r2, 512
%ifdef PIC
......@@ -668,7 +668,7 @@ h264_idct_add8_mmx2_plane
; ff_h264_idct_add8_mmx2(uint8_t **dest, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add8_mmx2, 5, 7, 0
cglobal h264_idct_add8_8_mmx2, 5, 7, 0
mov r5, 16
add r2, 512
%ifdef ARCH_X86_64
......@@ -744,7 +744,7 @@ x264_add8x4_idct_sse2:
; ff_h264_idct_add16_sse2(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add16_sse2, 5, 5, 8
cglobal h264_idct_add16_8_sse2, 5, 5, 8
%ifdef ARCH_X86_64
mov r10, r0
%endif
......@@ -791,7 +791,7 @@ cglobal h264_idct_add16_sse2, 5, 5, 8
; ff_h264_idct_add16intra_sse2(uint8_t *dst, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add16intra_sse2, 5, 7, 8
cglobal h264_idct_add16intra_8_sse2, 5, 7, 8
%ifdef ARCH_X86_64
mov r10, r0
%endif
......@@ -840,7 +840,7 @@ cglobal h264_idct_add16intra_sse2, 5, 7, 8
; ff_h264_idct_add8_sse2(uint8_t **dest, const int *block_offset,
; DCTELEM *block, int stride, const uint8_t nnzc[6*8])
cglobal h264_idct_add8_sse2, 5, 7, 8
cglobal h264_idct_add8_8_sse2, 5, 7, 8
add r2, 512
%ifdef ARCH_X86_64
mov r10, r0
......
This diff is collapsed.
This diff is collapsed.
......@@ -153,7 +153,7 @@ static int movie_init(AVFilterContext *ctx)
movie->w = movie->codec_ctx->width;
movie->h = movie->codec_ctx->height;
av_log(ctx, AV_LOG_INFO, "seek_point:%lld format_name:%s file_name:%s stream_index:%d\n",
av_log(ctx, AV_LOG_INFO, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
movie->seek_point, movie->format_name, movie->file_name,
movie->stream_index);
......
......@@ -101,14 +101,14 @@ static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
av_log(s, AV_LOG_DEBUG, "Descriptor Block:\n\n");
av_log(s, AV_LOG_DEBUG, "magic = \"%c%c%c%c\"\n", ape_ctx->magic[0], ape_ctx->magic[1], ape_ctx->magic[2], ape_ctx->magic[3]);
av_log(s, AV_LOG_DEBUG, "fileversion = %d\n", ape_ctx->fileversion);
av_log(s, AV_LOG_DEBUG, "descriptorlength = %d\n", ape_ctx->descriptorlength);
av_log(s, AV_LOG_DEBUG, "headerlength = %d\n", ape_ctx->headerlength);
av_log(s, AV_LOG_DEBUG, "seektablelength = %d\n", ape_ctx->seektablelength);
av_log(s, AV_LOG_DEBUG, "wavheaderlength = %d\n", ape_ctx->wavheaderlength);
av_log(s, AV_LOG_DEBUG, "audiodatalength = %d\n", ape_ctx->audiodatalength);
av_log(s, AV_LOG_DEBUG, "audiodatalength_high = %d\n", ape_ctx->audiodatalength_high);
av_log(s, AV_LOG_DEBUG, "wavtaillength = %d\n", ape_ctx->wavtaillength);
av_log(s, AV_LOG_DEBUG, "fileversion = %"PRId16"\n", ape_ctx->fileversion);
av_log(s, AV_LOG_DEBUG, "descriptorlength = %"PRIu32"\n", ape_ctx->descriptorlength);
av_log(s, AV_LOG_DEBUG, "headerlength = %"PRIu32"\n", ape_ctx->headerlength);
av_log(s, AV_LOG_DEBUG, "seektablelength = %"PRIu32"\n", ape_ctx->seektablelength);
av_log(s, AV_LOG_DEBUG, "wavheaderlength = %"PRIu32"\n", ape_ctx->wavheaderlength);
av_log(s, AV_LOG_DEBUG, "audiodatalength = %"PRIu32"\n", ape_ctx->audiodatalength);
av_log(s, AV_LOG_DEBUG, "audiodatalength_high = %"PRIu32"\n", ape_ctx->audiodatalength_high);
av_log(s, AV_LOG_DEBUG, "wavtaillength = %"PRIu32"\n", ape_ctx->wavtaillength);
av_log(s, AV_LOG_DEBUG, "md5 = ");
for (i = 0; i < 16; i++)
av_log(s, AV_LOG_DEBUG, "%02x", ape_ctx->md5[i]);
......@@ -116,14 +116,14 @@ static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
av_log(s, AV_LOG_DEBUG, "\nHeader Block:\n\n");
av_log(s, AV_LOG_DEBUG, "compressiontype = %d\n", ape_ctx->compressiontype);
av_log(s, AV_LOG_DEBUG, "formatflags = %d\n", ape_ctx->formatflags);
av_log(s, AV_LOG_DEBUG, "blocksperframe = %d\n", ape_ctx->blocksperframe);
av_log(s, AV_LOG_DEBUG, "finalframeblocks = %d\n", ape_ctx->finalframeblocks);
av_log(s, AV_LOG_DEBUG, "totalframes = %d\n", ape_ctx->totalframes);
av_log(s, AV_LOG_DEBUG, "bps = %d\n", ape_ctx->bps);
av_log(s, AV_LOG_DEBUG, "channels = %d\n", ape_ctx->channels);
av_log(s, AV_LOG_DEBUG, "samplerate = %d\n", ape_ctx->samplerate);
av_log(s, AV_LOG_DEBUG, "compressiontype = %"PRIu16"\n", ape_ctx->compressiontype);
av_log(s, AV_LOG_DEBUG, "formatflags = %"PRIu16"\n", ape_ctx->formatflags);
av_log(s, AV_LOG_DEBUG, "blocksperframe = %"PRIu32"\n", ape_ctx->blocksperframe);
av_log(s, AV_LOG_DEBUG, "finalframeblocks = %"PRIu32"\n", ape_ctx->finalframeblocks);
av_log(s, AV_LOG_DEBUG, "totalframes = %"PRIu32"\n", ape_ctx->totalframes);
av_log(s, AV_LOG_DEBUG, "bps = %"PRIu16"\n", ape_ctx->bps);
av_log(s, AV_LOG_DEBUG, "channels = %"PRIu16"\n", ape_ctx->channels);
av_log(s, AV_LOG_DEBUG, "samplerate = %"PRIu32"\n", ape_ctx->samplerate);
av_log(s, AV_LOG_DEBUG, "\nSeektable\n\n");
if ((ape_ctx->seektablelength / sizeof(uint32_t)) != ape_ctx->totalframes) {
......@@ -140,12 +140,14 @@ static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
av_log(s, AV_LOG_DEBUG, "\nFrames\n\n");
for (i = 0; i < ape_ctx->totalframes; i++)
av_log(s, AV_LOG_DEBUG, "%8d %8lld %8d (%d samples)\n", i, ape_ctx->frames[i].pos, ape_ctx->frames[i].size, ape_ctx->frames[i].nblocks);
av_log(s, AV_LOG_DEBUG, "%8d %8"PRId64" %8d (%d samples)\n", i,
ape_ctx->frames[i].pos, ape_ctx->frames[i].size,
ape_ctx->frames[i].nblocks);
av_log(s, AV_LOG_DEBUG, "\nCalculated information:\n\n");
av_log(s, AV_LOG_DEBUG, "junklength = %d\n", ape_ctx->junklength);
av_log(s, AV_LOG_DEBUG, "firstframe = %d\n", ape_ctx->firstframe);
av_log(s, AV_LOG_DEBUG, "totalsamples = %d\n", ape_ctx->totalsamples);
av_log(s, AV_LOG_DEBUG, "junklength = %"PRIu32"\n", ape_ctx->junklength);
av_log(s, AV_LOG_DEBUG, "firstframe = %"PRIu32"\n", ape_ctx->firstframe);
av_log(s, AV_LOG_DEBUG, "totalsamples = %"PRIu32"\n", ape_ctx->totalsamples);
#endif
}
......@@ -169,7 +171,8 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
ape->fileversion = avio_rl16(pb);
if (ape->fileversion < APE_MIN_VERSION || ape->fileversion > APE_MAX_VERSION) {
av_log(s, AV_LOG_ERROR, "Unsupported file version - %d.%02d\n", ape->fileversion / 1000, (ape->fileversion % 1000) / 10);
av_log(s, AV_LOG_ERROR, "Unsupported file version - %"PRId16".%02"PRId16"\n",
ape->fileversion / 1000, (ape->fileversion % 1000) / 10);
return -1;
}
......@@ -247,11 +250,12 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
return AVERROR(EINVAL);
}
if(ape->totalframes > UINT_MAX / sizeof(APEFrame)){
av_log(s, AV_LOG_ERROR, "Too many frames: %d\n", ape->totalframes);
av_log(s, AV_LOG_ERROR, "Too many frames: %"PRIu32"\n",
ape->totalframes);
return -1;
}
if (ape->seektablelength && (ape->seektablelength / sizeof(*ape->seektable)) < ape->totalframes) {
av_log(s, AV_LOG_ERROR, "Number of seek entries is less than number of frames: %zd vs. %d\n",
av_log(s, AV_LOG_ERROR, "Number of seek entries is less than number of frames: %ld vs. %"PRIu32"\n",
ape->seektablelength / sizeof(*ape->seektable), ape->totalframes);
return AVERROR_INVALIDDATA;
}
......@@ -301,7 +305,9 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
avio_seek(pb, 0, SEEK_SET);
}
av_log(s, AV_LOG_DEBUG, "Decoding file - v%d.%02d, compression level %d\n", ape->fileversion / 1000, (ape->fileversion % 1000) / 10, ape->compressiontype);
av_log(s, AV_LOG_DEBUG, "Decoding file - v%d.%02d, compression level %"PRIu16"\n",
ape->fileversion / 1000, (ape->fileversion % 1000) / 10,
ape->compressiontype);
/* now we are ready: build format streams */
st = av_new_stream(s, 0);
......
......@@ -522,8 +522,8 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int
case 0x3F06: av_dlog(NULL, "IndexSID %d\n", avio_rb32(pb)); break;
case 0x3F07: av_dlog(NULL, "BodySID %d\n", avio_rb32(pb)); break;
case 0x3F0B: av_dlog(NULL, "IndexEditRate %d/%d\n", avio_rb32(pb), avio_rb32(pb)); break;
case 0x3F0C: av_dlog(NULL, "IndexStartPosition %"PRId64"\n", avio_rb64(pb)); break;
case 0x3F0D: av_dlog(NULL, "IndexDuration %"PRId64"\n", avio_rb64(pb)); break;
case 0x3F0C: av_dlog(NULL, "IndexStartPosition %"PRIu64"\n", avio_rb64(pb)); break;
case 0x3F0D: av_dlog(NULL, "IndexDuration %"PRIu64"\n", avio_rb64(pb)); break;
}
return 0;
}
......@@ -920,7 +920,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (klv_read_packet(&klv, s->pb) < 0)
return -1;
PRINT_KEY(s, "read header", klv.key);
av_dlog(s, "size %"PRId64" offset %#"PRIx64"\n", klv.length, klv.offset);
av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
/* FIXME avoid seek */
......
......@@ -43,7 +43,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
if (atom->size < 8)
return -1;
atom->tag = avio_rl32(s->pb);
av_dlog(s, "atom %d %.4s offset %#"PRIx64"\n",
av_dlog(s, "atom %u %.4s offset %#"PRIx64"\n",
atom->size, (char*)&atom->tag, atom->offset);
return atom->size;
}
......@@ -356,7 +356,8 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
frame_num = sample_time*st->codec->time_base.den/
((int64_t)st->codec->time_base.num*st->time_base.den);
av_dlog(s, "seek frame num %d timestamp %"PRId64"\n", frame_num, sample_time);
av_dlog(s, "seek frame num %d timestamp %"PRId64"\n",
frame_num, sample_time);
if (frame_num < r3d->video_offsets_count) {
avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET);
......
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