From d0a2f0af9db7e84f1274c4ccf5d54022527664e2 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 1 Aug 2011 17:18:13 +0300 Subject: Move an int64_t down in MpegEncContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows using the same arm assembler offsets for both EABI and the mach-o ABI. Signed-off-by: Martin Storsjö --- libavcodec/arm/asm-offsets.h | 12 ++++++------ libavcodec/mpegvideo.h | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/arm/asm-offsets.h b/libavcodec/arm/asm-offsets.h index 110d33dbb5..89994569c1 100644 --- a/libavcodec/arm/asm-offsets.h +++ b/libavcodec/arm/asm-offsets.h @@ -29,11 +29,11 @@ #endif /* MpegEncContext */ -#define Y_DC_SCALE 0xb4 -#define C_DC_SCALE 0xb8 -#define AC_PRED 0xbc -#define BLOCK_LAST_INDEX 0xc0 -#define H263_AIC 0xf0 -#define INTER_SCANTAB_RASTER_END 0x138 +#define Y_DC_SCALE 0xa8 +#define C_DC_SCALE 0xac +#define AC_PRED 0xb0 +#define BLOCK_LAST_INDEX 0xb4 +#define H263_AIC 0xe4 +#define INTER_SCANTAB_RASTER_END 0x12c #endif /* AVCODEC_ARM_ASM_OFFSETS_H */ diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 315f319a80..00293db7c9 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -234,7 +234,6 @@ typedef struct MpegEncContext { int picture_number; //FIXME remove, unclear definition int picture_in_gop_number; ///< 0-> first pic in gop, ... int b_frames_since_non_b; ///< used for encoding, relative to not yet reordered input - int64_t user_specified_pts;///< last non zero pts from AVFrame which was passed into avcodec_encode_video() int mb_width, mb_height; ///< number of MBs horizontally & vertically int mb_stride; ///< mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 int b8_stride; ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressing @@ -261,6 +260,8 @@ typedef struct MpegEncContext { /* WARNING: changes above this line require updates to hardcoded * offsets used in asm. */ + int64_t user_specified_pts;///< last non zero pts from AVFrame which was passed into avcodec_encode_video() + /** bit output */ PutBitContext pb; -- cgit v1.2.3 From 9a83adaf346bc5e38183427b2bd11084c11d1c8b Mon Sep 17 00:00:00 2001 From: Måns Rullgård Date: Mon, 1 Aug 2011 20:21:04 +0300 Subject: arm: Avoid using the movw instruction needlessly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes building for ARM11 without Thumb2. Signed-off-by: Martin Storsjö --- libavcodec/arm/ac3dsp_armv6.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/arm/ac3dsp_armv6.S b/libavcodec/arm/ac3dsp_armv6.S index d3058ffcec..b6aee867b3 100644 --- a/libavcodec/arm/ac3dsp_armv6.S +++ b/libavcodec/arm/ac3dsp_armv6.S @@ -37,7 +37,7 @@ function ff_ac3_bit_alloc_calc_bap_armv6, export=1 ldrb r10, [r4], #1 1: ldrsh r9, [r0], #2 @ mask[band] - movw r8, #0x1fe0 + mov r8, #0xff0 sub r9, r9, r12 @ - snr_offset mov r11, r10 ldrb r10, [r4], #1 @ band_start_tab[band++] @@ -45,7 +45,7 @@ function ff_ac3_bit_alloc_calc_bap_armv6, export=1 it lt movlt r9, #0 cmp r10, r3 @ - end - and r9, r9, r8 @ & 0x1fe0 + and r9, r9, r8, lsl #1 @ & 0x1fe0 ite gt subgt r8, r3, r11 suble r8, r10, r11 -- cgit v1.2.3 From 933a6fd5a1a2dfe3da58b6e15b394bf05d32f2eb Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 3 Aug 2011 23:27:50 +0200 Subject: cosmetics: fix indentation/alignment in AVCodec declarations --- libavcodec/8bps.c | 2 +- libavcodec/tscc.c | 2 +- libavcodec/xsubdec.c | 10 +++++----- libavcodec/xsubenc.c | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c index 7c53432738..de8dd8ee84 100644 --- a/libavcodec/8bps.c +++ b/libavcodec/8bps.c @@ -229,5 +229,5 @@ AVCodec ff_eightbps_decoder = { .close = decode_end, .decode = decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"), + .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"), }; diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index b97c527c94..df4b09b07c 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -207,6 +207,6 @@ AVCodec ff_tscc_decoder = { .close = decode_end, .decode = decode_frame, .capabilities = CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), + .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), }; diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index 0791fdd05c..af87388928 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -134,10 +134,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, } AVCodec ff_xsub_decoder = { - .name = "xsub", - .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_XSUB, - .init = decode_init, - .decode = decode_frame, + .name = "xsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_XSUB, + .init = decode_init, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("XSUB"), }; diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c index 6e3fed0cd5..b33640dd2c 100644 --- a/libavcodec/xsubenc.c +++ b/libavcodec/xsubenc.c @@ -211,10 +211,10 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) } AVCodec ff_xsub_encoder = { - .name = "xsub", - .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_XSUB, - .init = xsub_encoder_init, - .encode = xsub_encode, + .name = "xsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_XSUB, + .init = xsub_encoder_init, + .encode = xsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"), }; -- cgit v1.2.3 From fed6c90b68fa00ad399e0b6d51c1e41d0d3730a0 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 3 Aug 2011 23:28:26 +0200 Subject: cosmetics: remove some stray comments from AVCodec declarations --- libavcodec/cljr.c | 1 - libavcodec/vcr1.c | 1 - 2 files changed, 2 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c index f79cf11bea..3050fe204e 100644 --- a/libavcodec/cljr.c +++ b/libavcodec/cljr.c @@ -159,7 +159,6 @@ AVCodec ff_cljr_encoder = { .priv_data_size = sizeof(CLJRContext), .init = encode_init, .encode = encode_frame, - //encode_end, .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), }; #endif diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c index 9eb6a72875..f745089422 100644 --- a/libavcodec/vcr1.c +++ b/libavcodec/vcr1.c @@ -196,7 +196,6 @@ AVCodec ff_vcr1_encoder = { .priv_data_size = sizeof(VCR1Context), .init = encode_init, .encode = encode_frame, - //encode_end, .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"), }; #endif -- cgit v1.2.3