From 3ec623c22f87b42c4f5a68851e4f27a5751d7dd8 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 13 Feb 2012 19:27:48 +0100 Subject: prores: fix multithreaded decoding case when slice quantisers are not the same Since quantisation matrices are stored in context, decoding slices with different quantisers in parallel leads to unpredictable content of aforementioned matrices and wrong output picture thereof. --- libavcodec/proresdec.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index 7617cb3c98..ba78b62894 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -42,7 +42,10 @@ typedef struct { int slice_num; int x_pos, y_pos; int slice_width; + int prev_slice_sf; ///< scalefactor of the previous decoded slice DECLARE_ALIGNED(16, DCTELEM, blocks)[8 * 4 * 64]; + DECLARE_ALIGNED(16, int16_t, qmat_luma_scaled)[64]; + DECLARE_ALIGNED(16, int16_t, qmat_chroma_scaled)[64]; } ProresThreadData; typedef struct { @@ -56,9 +59,6 @@ typedef struct { uint8_t qmat_luma[64]; ///< dequantization matrix for luma uint8_t qmat_chroma[64]; ///< dequantization matrix for chroma int qmat_changed; ///< 1 - global quantization matrices changed - int prev_slice_sf; ///< scalefactor of the previous decoded slice - DECLARE_ALIGNED(16, int16_t, qmat_luma_scaled)[64]; - DECLARE_ALIGNED(16, int16_t, qmat_chroma_scaled)[64]; int total_slices; ///< total number of slices in a picture ProresThreadData *slice_data; int pic_num; @@ -116,7 +116,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ctx->scantable_type = -1; // set scantable type to uninitialized memset(ctx->qmat_luma, 4, 64); memset(ctx->qmat_chroma, 4, 64); - ctx->prev_slice_sf = 0; return 0; } @@ -294,9 +293,11 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf, for (i = 0; i < num_slices; i++) { ctx->slice_data[i].index = data_ptr; + ctx->slice_data[i].prev_slice_sf = 0; data_ptr += AV_RB16(index_ptr + i * 2); } ctx->slice_data[i].index = data_ptr; + ctx->slice_data[i].prev_slice_sf = 0; if (data_ptr > buf + data_size) { av_log(avctx, AV_LOG_ERROR, "out of slice data\n"); @@ -561,11 +562,11 @@ static int decode_slice(AVCodecContext *avctx, void *tdata) /* scale quantization matrixes according with slice's scale factor */ /* TODO: this can be SIMD-optimized a lot */ - if (ctx->qmat_changed || sf != ctx->prev_slice_sf) { - ctx->prev_slice_sf = sf; + if (ctx->qmat_changed || sf != td->prev_slice_sf) { + td->prev_slice_sf = sf; for (i = 0; i < 64; i++) { - ctx->qmat_luma_scaled[ctx->dsp.idct_permutation[i]] = ctx->qmat_luma[i] * sf; - ctx->qmat_chroma_scaled[ctx->dsp.idct_permutation[i]] = ctx->qmat_chroma[i] * sf; + td->qmat_luma_scaled[ctx->dsp.idct_permutation[i]] = ctx->qmat_luma[i] * sf; + td->qmat_chroma_scaled[ctx->dsp.idct_permutation[i]] = ctx->qmat_chroma[i] * sf; } } @@ -574,7 +575,7 @@ static int decode_slice(AVCodecContext *avctx, void *tdata) (uint16_t*) (y_data + (mb_y_pos << 4) * y_linesize + (mb_x_pos << 5)), y_linesize, mbs_per_slice, 4, slice_width_factor + 2, - ctx->qmat_luma_scaled); + td->qmat_luma_scaled); /* decode U chroma plane */ decode_slice_plane(ctx, td, buf + hdr_size + y_data_size, u_data_size, @@ -582,7 +583,7 @@ static int decode_slice(AVCodecContext *avctx, void *tdata) (mb_x_pos << ctx->mb_chroma_factor)), u_linesize, mbs_per_slice, ctx->num_chroma_blocks, slice_width_factor + ctx->chroma_factor - 1, - ctx->qmat_chroma_scaled); + td->qmat_chroma_scaled); /* decode V chroma plane */ decode_slice_plane(ctx, td, buf + hdr_size + y_data_size + u_data_size, @@ -591,7 +592,7 @@ static int decode_slice(AVCodecContext *avctx, void *tdata) (mb_x_pos << ctx->mb_chroma_factor)), v_linesize, mbs_per_slice, ctx->num_chroma_blocks, slice_width_factor + ctx->chroma_factor - 1, - ctx->qmat_chroma_scaled); + td->qmat_chroma_scaled); return 0; } -- cgit v1.2.1 From 8835c2c829d84d99e237e63f432b6e9f54e2ecf6 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 10 Dec 2011 13:40:39 +0100 Subject: prores: move data shared between decoder and encoder to common file --- libavcodec/Makefile | 2 +- libavcodec/proresdata.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ libavcodec/proresdata.h | 39 +++++++++++++++++++++++++++ libavcodec/proresdec.c | 69 ++++++----------------------------------------- 4 files changed, 120 insertions(+), 62 deletions(-) create mode 100644 libavcodec/proresdata.c create mode 100644 libavcodec/proresdata.h diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 2eaef6b651..6d4ad95090 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -301,7 +301,7 @@ OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o pngdsp.o OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o -OBJS-$(CONFIG_PRORES_DECODER) += proresdec.o proresdsp.o +OBJS-$(CONFIG_PRORES_DECODER) += proresdec.o proresdata.o proresdsp.o OBJS-$(CONFIG_PTX_DECODER) += ptx.o OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \ celp_filters.o acelp_vectors.o \ diff --git a/libavcodec/proresdata.c b/libavcodec/proresdata.c new file mode 100644 index 0000000000..fcaf32a1af --- /dev/null +++ b/libavcodec/proresdata.c @@ -0,0 +1,72 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * 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 "proresdata.h" + +const uint8_t ff_prores_progressive_scan[64] = { + 0, 1, 8, 9, 2, 3, 10, 11, + 16, 17, 24, 25, 18, 19, 26, 27, + 4, 5, 12, 20, 13, 6, 7, 14, + 21, 28, 29, 22, 15, 23, 30, 31, + 32, 33, 40, 48, 41, 34, 35, 42, + 49, 56, 57, 50, 43, 36, 37, 44, + 51, 58, 59, 52, 45, 38, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63 +}; + +const uint8_t ff_prores_interlaced_scan[64] = { + 0, 8, 1, 9, 16, 24, 17, 25, + 2, 10, 3, 11, 18, 26, 19, 27, + 32, 40, 33, 34, 41, 48, 56, 49, + 42, 35, 43, 50, 57, 58, 51, 59, + 4, 12, 5, 6, 13, 20, 28, 21, + 14, 7, 15, 22, 29, 36, 44, 37, + 30, 23, 31, 38, 45, 52, 60, 53, + 46, 39, 47, 54, 61, 62, 55, 63 +}; + + +const uint8_t ff_prores_dc_codebook[4] = { + 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 + 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 + 0x4D, // rice_order = 2, exp_golomb_order = 3, switch_bits = 1 + 0x70 // rice_order = 3, exp_golomb_order = 4, switch_bits = 0 +}; + +const uint8_t ff_prores_ac_codebook[7] = { + 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 + 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 + 0x4C, // rice_order = 2, exp_golomb_order = 3, switch_bits = 0 + 0x05, // rice_order = 0, exp_golomb_order = 1, switch_bits = 1 + 0x29, // rice_order = 1, exp_golomb_order = 2, switch_bits = 1 + 0x06, // rice_order = 0, exp_golomb_order = 1, switch_bits = 2 + 0x0A, // rice_order = 0, exp_golomb_order = 2, switch_bits = 2 +}; + +/** + * Lookup tables for adaptive switching between codebooks + * according with previous run/level value. + */ +const uint8_t ff_prores_run_to_cb_index[16] = + { 5, 5, 3, 3, 0, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 2 }; + +const uint8_t ff_prores_lev_to_cb_index[10] = { 0, 6, 3, 5, 0, 1, 1, 1, 1, 2 }; diff --git a/libavcodec/proresdata.h b/libavcodec/proresdata.h new file mode 100644 index 0000000000..1e5d05ece6 --- /dev/null +++ b/libavcodec/proresdata.h @@ -0,0 +1,39 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * 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 + */ + +#ifndef AVCODEC_PRORESDATA_H +#define AVCODEC_PRORESDATA_H + +#include + +#define FRAME_ID MKBETAG('i', 'c', 'p', 'f') + +extern const uint8_t ff_prores_progressive_scan[64]; +extern const uint8_t ff_prores_interlaced_scan[64]; + +#define FIRST_DC_CB 0xB8 // rice_order = 5, exp_golomb_order = 6, switch_bits = 0 +extern const uint8_t ff_prores_dc_codebook[4]; +extern const uint8_t ff_prores_ac_codebook[7]; +extern const uint8_t ff_prores_run_to_cb_index[16]; +extern const uint8_t ff_prores_lev_to_cb_index[10]; + +#endif /* AVCODEC_PRORESDATA_H */ diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index ba78b62894..207fd9742e 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -34,6 +34,7 @@ #include "libavutil/intmath.h" #include "avcodec.h" +#include "proresdata.h" #include "proresdsp.h" #include "get_bits.h" @@ -75,29 +76,6 @@ typedef struct { } ProresContext; -static const uint8_t progressive_scan[64] = { - 0, 1, 8, 9, 2, 3, 10, 11, - 16, 17, 24, 25, 18, 19, 26, 27, - 4, 5, 12, 20, 13, 6, 7, 14, - 21, 28, 29, 22, 15, 23, 30, 31, - 32, 33, 40, 48, 41, 34, 35, 42, - 49, 56, 57, 50, 43, 36, 37, 44, - 51, 58, 59, 52, 45, 38, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63 -}; - -static const uint8_t interlaced_scan[64] = { - 0, 8, 1, 9, 16, 24, 17, 25, - 2, 10, 3, 11, 18, 26, 19, 27, - 32, 40, 33, 34, 41, 48, 56, 49, - 42, 35, 43, 50, 57, 58, 51, 59, - 4, 12, 5, 6, 13, 20, 28, 21, - 14, 7, 15, 22, 29, 36, 44, 37, - 30, 23, 31, 38, 45, 52, 60, 53, - 46, 39, 47, 54, 61, 62, 55, 63 -}; - - static av_cold int decode_init(AVCodecContext *avctx) { ProresContext *ctx = avctx->priv_data; @@ -175,10 +153,10 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, if (ctx->scantable_type != ctx->frame_type) { if (!ctx->frame_type) ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, - progressive_scan); + ff_prores_progressive_scan); else ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, - interlaced_scan); + ff_prores_interlaced_scan); ctx->scantable_type = ctx->frame_type; } @@ -352,16 +330,6 @@ static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook) #define LSB2SIGN(x) (-((x) & 1)) #define TOSIGNED(x) (((x) >> 1) ^ LSB2SIGN(x)) -#define FIRST_DC_CB 0xB8 // rice_order = 5, exp_golomb_order = 6, switch_bits = 0 - -static uint8_t dc_codebook[4] = { - 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 - 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 - 0x4D, // rice_order = 2, exp_golomb_order = 3, switch_bits = 1 - 0x70 // rice_order = 3, exp_golomb_order = 4, switch_bits = 0 -}; - - /** * Decode DC coefficients for all blocks in a slice. */ @@ -380,7 +348,7 @@ static inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out, delta = 3; for (i = 1; i < nblocks; i++, out += 64) { - code = decode_vlc_codeword(gb, dc_codebook[FFMIN(FFABS(delta), 3)]); + code = decode_vlc_codeword(gb, ff_prores_dc_codebook[FFMIN(FFABS(delta), 3)]); sign = -(((delta >> 15) & 1) ^ (code & 1)); delta = (((code + 1) >> 1) ^ sign) - sign; @@ -390,26 +358,6 @@ static inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out, } -static uint8_t ac_codebook[7] = { - 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 - 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 - 0x4C, // rice_order = 2, exp_golomb_order = 3, switch_bits = 0 - 0x05, // rice_order = 0, exp_golomb_order = 1, switch_bits = 1 - 0x29, // rice_order = 1, exp_golomb_order = 2, switch_bits = 1 - 0x06, // rice_order = 0, exp_golomb_order = 1, switch_bits = 2 - 0x0A, // rice_order = 0, exp_golomb_order = 2, switch_bits = 2 -}; - -/** - * Lookup tables for adaptive switching between codebooks - * according with previous run/level value. - */ -static uint8_t run_to_cb_index[16] = - { 5, 5, 3, 3, 0, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 2 }; - -static uint8_t lev_to_cb_index[10] = { 0, 6, 3, 5, 0, 1, 1, 1, 1, 2 }; - - /** * Decode AC coefficients for all blocks in a slice. */ @@ -429,20 +377,20 @@ static inline void decode_ac_coeffs(GetBitContext *gb, DCTELEM *out, block_mask = blocks_per_slice - 1; for (pos = blocks_per_slice - 1; pos < max_coeffs;) { - run_cb_index = run_to_cb_index[FFMIN(run, 15)]; - lev_cb_index = lev_to_cb_index[FFMIN(level, 9)]; + run_cb_index = ff_prores_run_to_cb_index[FFMIN(run, 15)]; + lev_cb_index = ff_prores_lev_to_cb_index[FFMIN(level, 9)]; bits_left = get_bits_left(gb); if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left))) return; - run = decode_vlc_codeword(gb, ac_codebook[run_cb_index]); + run = decode_vlc_codeword(gb, ff_prores_ac_codebook[run_cb_index]); bits_left = get_bits_left(gb); if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left))) return; - level = decode_vlc_codeword(gb, ac_codebook[lev_cb_index]) + 1; + level = decode_vlc_codeword(gb, ff_prores_ac_codebook[lev_cb_index]) + 1; pos += run + 1; if (pos >= max_coeffs) @@ -629,7 +577,6 @@ static int decode_picture(ProresContext *ctx, int pic_num, } -#define FRAME_ID MKBETAG('i', 'c', 'p', 'f') #define MOVE_DATA_PTR(nbytes) buf += (nbytes); buf_size -= (nbytes) static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, -- cgit v1.2.1 From 1a265f6187e9036b649fc08f8293b5e1fcd8dfbe Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 2 Feb 2012 20:54:53 +0100 Subject: prores encoder --- Changelog | 1 + doc/general.texi | 2 +- libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 2 +- libavcodec/proresdsp.c | 17 + libavcodec/proresdsp.h | 3 + libavcodec/proresenc.c | 836 +++++++++++++++++++++++++++++++++++++++++++++++++ libavcodec/version.h | 2 +- 8 files changed, 861 insertions(+), 3 deletions(-) create mode 100644 libavcodec/proresenc.c diff --git a/Changelog b/Changelog index 8bcccf499e..3639e60d0c 100644 --- a/Changelog +++ b/Changelog @@ -7,6 +7,7 @@ version : - Support for fragmentation in the mov/mp4 muxer - ISMV (Smooth Streaming) muxer - CDXL demuxer and decoder +- Apple ProRes encoder version 0.8: diff --git a/doc/general.texi b/doc/general.texi index 14624bc521..7471802d2a 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -406,7 +406,7 @@ following image formats are supported: @tab Used in Chinese MP3 players. @item ANSI/ASCII art @tab @tab X @item Apple MJPEG-B @tab @tab X -@item Apple ProRes @tab @tab X +@item Apple ProRes @tab X @tab X @item Apple QuickDraw @tab @tab X @tab fourcc: qdrw @item Asus v1 @tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 6d4ad95090..298b521cc6 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -302,6 +302,7 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o OBJS-$(CONFIG_PRORES_DECODER) += proresdec.o proresdata.o proresdsp.o +OBJS-$(CONFIG_PRORES_ENCODER) += proresenc.o proresdata.o proresdsp.o OBJS-$(CONFIG_PTX_DECODER) += ptx.o OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \ celp_filters.o acelp_vectors.o \ diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 1c7217720c..de37083d17 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -168,7 +168,7 @@ void avcodec_register_all(void) REGISTER_DECODER (PICTOR, pictor); REGISTER_ENCDEC (PNG, png); REGISTER_ENCDEC (PPM, ppm); - REGISTER_DECODER (PRORES, prores); + REGISTER_ENCDEC (PRORES, prores); REGISTER_DECODER (PTX, ptx); REGISTER_DECODER (QDRAW, qdraw); REGISTER_DECODER (QPEG, qpeg); diff --git a/libavcodec/proresdsp.c b/libavcodec/proresdsp.c index 7e753e9dc7..e19eed208b 100644 --- a/libavcodec/proresdsp.c +++ b/libavcodec/proresdsp.c @@ -51,13 +51,30 @@ static void prores_idct_put_c(uint16_t *out, int linesize, DCTELEM *block, const put_pixels(out, linesize >> 1, block); } +static void prores_fdct_c(const uint16_t *src, int linesize, DCTELEM *block) +{ + int x, y; + const uint16_t *tsrc = src; + + for (y = 0; y < 8; y++) { + for (x = 0; x < 8; x++) + block[y * 8 + x] = tsrc[x]; + tsrc += linesize >> 1; + } + ff_jpeg_fdct_islow_10(block); +} + void ff_proresdsp_init(ProresDSPContext *dsp) { dsp->idct_put = prores_idct_put_c; dsp->idct_permutation_type = FF_NO_IDCT_PERM; + dsp->fdct = prores_fdct_c; + dsp->dct_permutation_type = FF_NO_IDCT_PERM; if (HAVE_MMX) ff_proresdsp_x86_init(dsp); ff_init_scantable_permutation(dsp->idct_permutation, dsp->idct_permutation_type); + ff_init_scantable_permutation(dsp->dct_permutation, + dsp->dct_permutation_type); } diff --git a/libavcodec/proresdsp.h b/libavcodec/proresdsp.h index 8b864faabd..f6578258a1 100644 --- a/libavcodec/proresdsp.h +++ b/libavcodec/proresdsp.h @@ -30,7 +30,10 @@ typedef struct { int idct_permutation_type; uint8_t idct_permutation[64]; + int dct_permutation_type; + uint8_t dct_permutation[64]; void (* idct_put) (uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat); + void (* fdct) (const uint16_t *src, int linesize, DCTELEM *block); } ProresDSPContext; void ff_proresdsp_init(ProresDSPContext *dsp); diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c new file mode 100644 index 0000000000..c41982fa89 --- /dev/null +++ b/libavcodec/proresenc.c @@ -0,0 +1,836 @@ +/* + * Apple ProRes encoder + * + * Copyright (c) 2012 Konstantin Shishkov + * + * 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 "libavutil/opt.h" +#include "avcodec.h" +#include "put_bits.h" +#include "bytestream.h" +#include "internal.h" +#include "proresdsp.h" +#include "proresdata.h" + +#define CFACTOR_Y422 2 +#define CFACTOR_Y444 3 + +#define MAX_MBS_PER_SLICE 8 + +#define MAX_PLANES 3 // should be increased to 4 when there's PIX_FMT_YUV444AP10 + +enum { + PRORES_PROFILE_PROXY = 0, + PRORES_PROFILE_LT, + PRORES_PROFILE_STANDARD, + PRORES_PROFILE_HQ, +}; + +#define NUM_MB_LIMITS 4 +static const int prores_mb_limits[NUM_MB_LIMITS] = { + 1620, // up to 720x576 + 2700, // up to 960x720 + 6075, // up to 1440x1080 + 9216, // up to 2048x1152 +}; + +static const struct prores_profile { + const char *full_name; + uint32_t tag; + int min_quant; + int max_quant; + int br_tab[NUM_MB_LIMITS]; + uint8_t quant[64]; +} prores_profile_info[4] = { + { + .full_name = "proxy", + .tag = MKTAG('a', 'p', 'c', 'o'), + .min_quant = 4, + .max_quant = 8, + .br_tab = { 300, 242, 220, 194 }, + .quant = { + 4, 7, 9, 11, 13, 14, 15, 63, + 7, 7, 11, 12, 14, 15, 63, 63, + 9, 11, 13, 14, 15, 63, 63, 63, + 11, 11, 13, 14, 63, 63, 63, 63, + 11, 13, 14, 63, 63, 63, 63, 63, + 13, 14, 63, 63, 63, 63, 63, 63, + 13, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, + }, + }, + { + .full_name = "LT", + .tag = MKTAG('a', 'p', 'c', 's'), + .min_quant = 1, + .max_quant = 9, + .br_tab = { 720, 560, 490, 440 }, + .quant = { + 4, 5, 6, 7, 9, 11, 13, 15, + 5, 5, 7, 8, 11, 13, 15, 17, + 6, 7, 9, 11, 13, 15, 15, 17, + 7, 7, 9, 11, 13, 15, 17, 19, + 7, 9, 11, 13, 14, 16, 19, 23, + 9, 11, 13, 14, 16, 19, 23, 29, + 9, 11, 13, 15, 17, 21, 28, 35, + 11, 13, 16, 17, 21, 28, 35, 41, + }, + }, + { + .full_name = "standard", + .tag = MKTAG('a', 'p', 'c', 'n'), + .min_quant = 1, + .max_quant = 6, + .br_tab = { 1050, 808, 710, 632 }, + .quant = { + 4, 4, 5, 5, 6, 7, 7, 9, + 4, 4, 5, 6, 7, 7, 9, 9, + 5, 5, 6, 7, 7, 9, 9, 10, + 5, 5, 6, 7, 7, 9, 9, 10, + 5, 6, 7, 7, 8, 9, 10, 12, + 6, 7, 7, 8, 9, 10, 12, 15, + 6, 7, 7, 9, 10, 11, 14, 17, + 7, 7, 9, 10, 11, 14, 17, 21, + }, + }, + { + .full_name = "high quality", + .tag = MKTAG('a', 'p', 'c', 'h'), + .min_quant = 1, + .max_quant = 6, + .br_tab = { 1566, 1216, 1070, 950 }, + .quant = { + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 5, + 4, 4, 4, 4, 4, 4, 5, 5, + 4, 4, 4, 4, 4, 5, 5, 6, + 4, 4, 4, 4, 5, 5, 6, 7, + 4, 4, 4, 4, 5, 6, 7, 7, + }, + } +// for 4444 profile bitrate numbers are { 2350, 1828, 1600, 1425 } +}; + +#define TRELLIS_WIDTH 16 +#define SCORE_LIMIT INT_MAX / 2 + +struct TrellisNode { + int prev_node; + int quant; + int bits; + int score; +}; + +typedef struct ProresContext { + AVClass *class; + DECLARE_ALIGNED(16, DCTELEM, blocks)[MAX_PLANES][64 * 4 * MAX_MBS_PER_SLICE]; + DECLARE_ALIGNED(16, uint16_t, emu_buf)[16*16]; + int16_t quants[16][64]; + + ProresDSPContext dsp; + ScanTable scantable; + + int mb_width, mb_height; + int mbs_per_slice; + int num_chroma_blocks, chroma_factor; + int slices_width; + int num_slices; + int num_planes; + int bits_per_mb; + + int profile; + const struct prores_profile *profile_info; + + struct TrellisNode *nodes; + int *slice_q; +} ProresContext; + +static void get_slice_data(ProresContext *ctx, const uint16_t *src, + int linesize, int x, int y, int w, int h, + DCTELEM *blocks, + int mbs_per_slice, int blocks_per_mb) +{ + const uint16_t *esrc; + const int mb_width = 4 * blocks_per_mb; + int elinesize; + int i, j, k; + + for (i = 0; i < mbs_per_slice; i++, src += mb_width) { + if (x >= w) { + memset(blocks, 0, 64 * (mbs_per_slice - i) * blocks_per_mb + * sizeof(*blocks)); + return; + } + if (x + mb_width <= w && y + 16 <= h) { + esrc = src; + elinesize = linesize; + } else { + int bw, bh, pix; + const int estride = 16 / sizeof(*ctx->emu_buf); + + esrc = ctx->emu_buf; + elinesize = 16; + + bw = FFMIN(w - x, mb_width); + bh = FFMIN(h - y, 16); + + for (j = 0; j < bh; j++) { + memcpy(ctx->emu_buf + j * estride, src + j * linesize, + bw * sizeof(*src)); + pix = ctx->emu_buf[j * estride + bw - 1]; + for (k = bw; k < mb_width; k++) + ctx->emu_buf[j * estride + k] = pix; + } + for (; j < 16; j++) + memcpy(ctx->emu_buf + j * estride, + ctx->emu_buf + (bh - 1) * estride, + mb_width * sizeof(*ctx->emu_buf)); + } + ctx->dsp.fdct(esrc, elinesize, blocks); + blocks += 64; + if (blocks_per_mb > 2) { + ctx->dsp.fdct(src + 8, linesize, blocks); + blocks += 64; + } + ctx->dsp.fdct(src + linesize * 4, linesize, blocks); + blocks += 64; + if (blocks_per_mb > 2) { + ctx->dsp.fdct(src + linesize * 4 + 8, linesize, blocks); + blocks += 64; + } + + x += mb_width; + } +} + +/** + * Write an unsigned rice/exp golomb codeword. + */ +static inline void encode_vlc_codeword(PutBitContext *pb, uint8_t codebook, int val) +{ + unsigned int rice_order, exp_order, switch_bits, switch_val; + int exponent; + + /* number of prefix bits to switch between Rice and expGolomb */ + switch_bits = (codebook & 3) + 1; + rice_order = codebook >> 5; /* rice code order */ + exp_order = (codebook >> 2) & 7; /* exp golomb code order */ + + switch_val = switch_bits << rice_order; + + if (val >= switch_val) { + val -= switch_val - (1 << exp_order); + exponent = av_log2(val); + + put_bits(pb, exponent - exp_order + switch_bits, 0); + put_bits(pb, 1, 1); + put_bits(pb, exponent, val); + } else { + exponent = val >> rice_order; + + if (exponent) + put_bits(pb, exponent, 0); + put_bits(pb, 1, 1); + if (rice_order) + put_sbits(pb, rice_order, val); + } +} + +#define GET_SIGN(x) ((x) >> 31) +#define MAKE_CODE(x) (((x) << 1) ^ GET_SIGN(x)) + +static void encode_dcs(PutBitContext *pb, DCTELEM *blocks, + int blocks_per_slice, int scale) +{ + int i; + int codebook = 3, code, dc, prev_dc, delta, sign, new_sign; + + prev_dc = (blocks[0] - 0x4000) / scale; + encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc)); + codebook = 3; + blocks += 64; + + for (i = 1; i < blocks_per_slice; i++, blocks += 64) { + dc = (blocks[0] - 0x4000) / scale; + delta = dc - prev_dc; + new_sign = GET_SIGN(delta); + delta = (delta ^ sign) - sign; + code = MAKE_CODE(delta); + encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code); + codebook = (code + (code & 1)) >> 1; + codebook = FFMIN(codebook, 3); + sign = new_sign; + prev_dc = dc; + } +} + +static void encode_acs(PutBitContext *pb, DCTELEM *blocks, + int blocks_per_slice, + int plane_size_factor, + const uint8_t *scan, const int16_t *qmat) +{ + int idx, i; + int run, level, run_cb, lev_cb; + int max_coeffs, abs_level; + + max_coeffs = blocks_per_slice << 6; + run_cb = ff_prores_run_to_cb_index[4]; + lev_cb = ff_prores_lev_to_cb_index[2]; + run = 0; + + for (i = 1; i < 64; i++) { + for (idx = scan[i]; idx < max_coeffs; idx += 64) { + level = blocks[idx] / qmat[scan[i]]; + if (level) { + abs_level = FFABS(level); + encode_vlc_codeword(pb, ff_prores_ac_codebook[run_cb], run); + encode_vlc_codeword(pb, ff_prores_ac_codebook[lev_cb], + abs_level - 1); + put_sbits(pb, 1, GET_SIGN(level)); + + run_cb = ff_prores_run_to_cb_index[FFMIN(run, 15)]; + lev_cb = ff_prores_lev_to_cb_index[FFMIN(abs_level, 9)]; + run = 0; + } else { + run++; + } + } + } +} + +static int encode_slice_plane(ProresContext *ctx, PutBitContext *pb, + const uint16_t *src, int linesize, + int mbs_per_slice, DCTELEM *blocks, + int blocks_per_mb, int plane_size_factor, + const int16_t *qmat) +{ + int blocks_per_slice, saved_pos; + + saved_pos = put_bits_count(pb); + blocks_per_slice = mbs_per_slice * blocks_per_mb; + + encode_dcs(pb, blocks, blocks_per_slice, qmat[0]); + encode_acs(pb, blocks, blocks_per_slice, plane_size_factor, + ctx->scantable.permutated, qmat); + flush_put_bits(pb); + + return (put_bits_count(pb) - saved_pos) >> 3; +} + +static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, + PutBitContext *pb, + int sizes[4], int x, int y, int quant, + int mbs_per_slice) +{ + ProresContext *ctx = avctx->priv_data; + int i, xp, yp; + int total_size = 0; + const uint16_t *src; + int slice_width_factor = av_log2(mbs_per_slice); + int num_cblocks, pwidth; + int plane_factor, is_chroma; + + for (i = 0; i < ctx->num_planes; i++) { + is_chroma = (i == 1 || i == 2); + plane_factor = slice_width_factor + 2; + if (is_chroma) + plane_factor += ctx->chroma_factor - 3; + if (!is_chroma || ctx->chroma_factor == CFACTOR_Y444) { + xp = x << 4; + yp = y << 4; + num_cblocks = 4; + pwidth = avctx->width; + } else { + xp = x << 3; + yp = y << 4; + num_cblocks = 2; + pwidth = avctx->width >> 1; + } + src = (const uint16_t*)(pic->data[i] + yp * pic->linesize[i]) + xp; + + get_slice_data(ctx, src, pic->linesize[i], xp, yp, + pwidth, avctx->height, ctx->blocks[0], + mbs_per_slice, num_cblocks); + sizes[i] = encode_slice_plane(ctx, pb, src, pic->linesize[i], + mbs_per_slice, ctx->blocks[0], + num_cblocks, plane_factor, + ctx->quants[quant]); + total_size += sizes[i]; + } + return total_size; +} + +static inline int estimate_vlc(uint8_t codebook, int val) +{ + unsigned int rice_order, exp_order, switch_bits, switch_val; + int exponent; + + /* number of prefix bits to switch between Rice and expGolomb */ + switch_bits = (codebook & 3) + 1; + rice_order = codebook >> 5; /* rice code order */ + exp_order = (codebook >> 2) & 7; /* exp golomb code order */ + + switch_val = switch_bits << rice_order; + + if (val >= switch_val) { + val -= switch_val - (1 << exp_order); + exponent = av_log2(val); + + return exponent * 2 - exp_order + switch_bits + 1; + } else { + return (val >> rice_order) + rice_order + 1; + } +} + +static int estimate_dcs(int *error, DCTELEM *blocks, int blocks_per_slice, + int scale) +{ + int i; + int codebook = 3, code, dc, prev_dc, delta, sign, new_sign; + int bits; + + prev_dc = (blocks[0] - 0x4000) / scale; + bits = estimate_vlc(FIRST_DC_CB, MAKE_CODE(prev_dc)); + codebook = 3; + blocks += 64; + *error += FFABS(blocks[0] - 0x4000) % scale; + + for (i = 1; i < blocks_per_slice; i++, blocks += 64) { + dc = (blocks[0] - 0x4000) / scale; + *error += FFABS(blocks[0] - 0x4000) % scale; + delta = dc - prev_dc; + new_sign = GET_SIGN(delta); + delta = (delta ^ sign) - sign; + code = MAKE_CODE(delta); + bits += estimate_vlc(ff_prores_dc_codebook[codebook], code); + codebook = (code + (code & 1)) >> 1; + codebook = FFMIN(codebook, 3); + sign = new_sign; + prev_dc = dc; + } + + return bits; +} + +static int estimate_acs(int *error, DCTELEM *blocks, int blocks_per_slice, + int plane_size_factor, + const uint8_t *scan, const int16_t *qmat) +{ + int idx, i; + int run, level, run_cb, lev_cb; + int max_coeffs, abs_level; + int bits = 0; + + max_coeffs = blocks_per_slice << 6; + run_cb = ff_prores_run_to_cb_index[4]; + lev_cb = ff_prores_lev_to_cb_index[2]; + run = 0; + + for (i = 1; i < 64; i++) { + for (idx = scan[i]; idx < max_coeffs; idx += 64) { + level = blocks[idx] / qmat[scan[i]]; + *error += FFABS(blocks[idx]) % qmat[scan[i]]; + if (level) { + abs_level = FFABS(level); + bits += estimate_vlc(ff_prores_ac_codebook[run_cb], run); + bits += estimate_vlc(ff_prores_ac_codebook[lev_cb], + abs_level - 1) + 1; + + run_cb = ff_prores_run_to_cb_index[FFMIN(run, 15)]; + lev_cb = ff_prores_lev_to_cb_index[FFMIN(abs_level, 9)]; + run = 0; + } else { + run++; + } + } + } + + return bits; +} + +static int estimate_slice_plane(ProresContext *ctx, int *error, int plane, + const uint16_t *src, int linesize, + int mbs_per_slice, + int blocks_per_mb, int plane_size_factor, + const int16_t *qmat) +{ + int blocks_per_slice; + int bits; + + blocks_per_slice = mbs_per_slice * blocks_per_mb; + + bits = estimate_dcs(error, ctx->blocks[plane], blocks_per_slice, qmat[0]); + bits += estimate_acs(error, ctx->blocks[plane], blocks_per_slice, + plane_size_factor, ctx->scantable.permutated, qmat); + + return FFALIGN(bits, 8); +} + +static int find_slice_quant(AVCodecContext *avctx, const AVFrame *pic, + int trellis_node, int x, int y, int mbs_per_slice) +{ + ProresContext *ctx = avctx->priv_data; + int i, q, pq, xp, yp; + const uint16_t *src; + int slice_width_factor = av_log2(mbs_per_slice); + int num_cblocks[MAX_PLANES], pwidth; + int plane_factor[MAX_PLANES], is_chroma[MAX_PLANES]; + const int min_quant = ctx->profile_info->min_quant; + const int max_quant = ctx->profile_info->max_quant; + int error, bits, bits_limit; + int mbs, prev, cur, new_score; + int slice_bits[TRELLIS_WIDTH], slice_score[TRELLIS_WIDTH]; + + mbs = x + mbs_per_slice; + + for (i = 0; i < ctx->num_planes; i++) { + is_chroma[i] = (i == 1 || i == 2); + plane_factor[i] = slice_width_factor + 2; + if (is_chroma[i]) + plane_factor[i] += ctx->chroma_factor - 3; + if (!is_chroma[i] || ctx->chroma_factor == CFACTOR_Y444) { + xp = x << 4; + yp = y << 4; + num_cblocks[i] = 4; + pwidth = avctx->width; + } else { + xp = x << 3; + yp = y << 4; + num_cblocks[i] = 2; + pwidth = avctx->width >> 1; + } + src = (const uint16_t*)(pic->data[i] + yp * pic->linesize[i]) + xp; + + get_slice_data(ctx, src, pic->linesize[i], xp, yp, + pwidth, avctx->height, ctx->blocks[i], + mbs_per_slice, num_cblocks[i]); + } + + for (q = min_quant; q <= max_quant; q++) { + ctx->nodes[trellis_node + q].prev_node = -1; + ctx->nodes[trellis_node + q].quant = q; + } + + // todo: maybe perform coarser quantising to fit into frame size when needed + for (q = min_quant; q <= max_quant; q++) { + bits = 0; + error = 0; + for (i = 0; i < ctx->num_planes; i++) { + bits += estimate_slice_plane(ctx, &error, i, + src, pic->linesize[i], + mbs_per_slice, + num_cblocks[i], plane_factor[i], + ctx->quants[q]); + } + if (bits > 65000 * 8) { + error = SCORE_LIMIT; + break; + } + slice_bits[q] = bits; + slice_score[q] = error; + } + + bits_limit = mbs * ctx->bits_per_mb; + for (pq = min_quant; pq <= max_quant; pq++) { + prev = trellis_node - TRELLIS_WIDTH + pq; + + for (q = min_quant; q <= max_quant; q++) { + cur = trellis_node + q; + + bits = ctx->nodes[prev].bits + slice_bits[q]; + error = slice_score[q]; + if (bits > bits_limit) + error = SCORE_LIMIT; + + if (ctx->nodes[prev].score < SCORE_LIMIT && error < SCORE_LIMIT) + new_score = ctx->nodes[prev].score + error; + else + new_score = SCORE_LIMIT; + if (ctx->nodes[cur].prev_node == -1 || + ctx->nodes[cur].score >= new_score) { + + ctx->nodes[cur].bits = bits; + ctx->nodes[cur].score = new_score; + ctx->nodes[cur].prev_node = prev; + } + } + } + + error = ctx->nodes[trellis_node + min_quant].score; + pq = trellis_node + min_quant; + for (q = min_quant + 1; q <= max_quant; q++) { + if (ctx->nodes[trellis_node + q].score <= error) { + error = ctx->nodes[trellis_node + q].score; + pq = trellis_node + q; + } + } + + return pq; +} + +static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, + const AVFrame *pic, int *got_packet) +{ + ProresContext *ctx = avctx->priv_data; + uint8_t *orig_buf, *buf, *slice_hdr, *slice_sizes, *tmp; + uint8_t *picture_size_pos; + PutBitContext pb; + int x, y, i, mb, q = 0; + int sizes[4] = { 0 }; + int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1); + int frame_size, picture_size, slice_size; + int mbs_per_slice = ctx->mbs_per_slice; + int pkt_size, ret; + + *avctx->coded_frame = *pic; + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; + avctx->coded_frame->key_frame = 1; + + pkt_size = ctx->mb_width * ctx->mb_height * 64 * 3 * 12 + + ctx->num_slices * 2 + 200 + FF_MIN_BUFFER_SIZE; + + if ((ret = ff_alloc_packet(pkt, pkt_size)) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); + return ret; + } + + orig_buf = pkt->data; + + // frame atom + orig_buf += 4; // frame size + bytestream_put_be32 (&orig_buf, FRAME_ID); // frame container ID + buf = orig_buf; + + // frame header + tmp = buf; + buf += 2; // frame header size will be stored here + bytestream_put_be16 (&buf, 0); // version 1 + bytestream_put_buffer(&buf, "Lavc", 4); // creator + bytestream_put_be16 (&buf, avctx->width); + bytestream_put_be16 (&buf, avctx->height); + bytestream_put_byte (&buf, ctx->chroma_factor << 6); // frame flags + bytestream_put_byte (&buf, 0); // reserved + bytestream_put_byte (&buf, 0); // primaries + bytestream_put_byte (&buf, 0); // transfer function + bytestream_put_byte (&buf, 6); // colour matrix - ITU-R BT.601-4 + bytestream_put_byte (&buf, 0x40); // source format and alpha information + bytestream_put_byte (&buf, 0); // reserved + bytestream_put_byte (&buf, 0x03); // matrix flags - both matrices are present + // luma quantisation matrix + for (i = 0; i < 64; i++) + bytestream_put_byte(&buf, ctx->profile_info->quant[i]); + // chroma quantisation matrix + for (i = 0; i < 64; i++) + bytestream_put_byte(&buf, ctx->profile_info->quant[i]); + bytestream_put_be16 (&tmp, buf - orig_buf); // write back frame header size + + // picture header + picture_size_pos = buf + 1; + bytestream_put_byte (&buf, 0x40); // picture header size (in bits) + buf += 4; // picture data size will be stored here + bytestream_put_be16 (&buf, ctx->num_slices); // total number of slices + bytestream_put_byte (&buf, av_log2(ctx->mbs_per_slice) << 4); // slice width and height in MBs + + // seek table - will be filled during slice encoding + slice_sizes = buf; + buf += ctx->num_slices * 2; + + // slices + for (y = 0; y < ctx->mb_height; y++) { + mbs_per_slice = ctx->mbs_per_slice; + for (x = mb = 0; x < ctx->mb_width; x += mbs_per_slice, mb++) { + while (ctx->mb_width - x < mbs_per_slice) + mbs_per_slice >>= 1; + q = find_slice_quant(avctx, pic, (mb + 1) * TRELLIS_WIDTH, x, y, + mbs_per_slice); + } + + for (x = ctx->slices_width - 1; x >= 0; x--) { + ctx->slice_q[x] = ctx->nodes[q].quant; + q = ctx->nodes[q].prev_node; + } + + mbs_per_slice = ctx->mbs_per_slice; + for (x = mb = 0; x < ctx->mb_width; x += mbs_per_slice, mb++) { + q = ctx->slice_q[mb]; + + while (ctx->mb_width - x < mbs_per_slice) + mbs_per_slice >>= 1; + + bytestream_put_byte(&buf, slice_hdr_size << 3); + slice_hdr = buf; + buf += slice_hdr_size - 1; + init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); + encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); + + bytestream_put_byte(&slice_hdr, q); + slice_size = slice_hdr_size + sizes[ctx->num_planes - 1]; + for (i = 0; i < ctx->num_planes - 1; i++) { + bytestream_put_be16(&slice_hdr, sizes[i]); + slice_size += sizes[i]; + } + bytestream_put_be16(&slice_sizes, slice_size); + buf += slice_size - slice_hdr_size; + } + } + + orig_buf -= 8; + frame_size = buf - orig_buf; + picture_size = buf - picture_size_pos - 6; + bytestream_put_be32(&orig_buf, frame_size); + bytestream_put_be32(&picture_size_pos, picture_size); + + pkt->size = frame_size; + pkt->flags |= AV_PKT_FLAG_KEY; + *got_packet = 1; + + return 0; +} + +static av_cold int encode_close(AVCodecContext *avctx) +{ + ProresContext *ctx = avctx->priv_data; + + if (avctx->coded_frame->data[0]) + avctx->release_buffer(avctx, avctx->coded_frame); + + av_freep(&avctx->coded_frame); + + av_freep(&ctx->nodes); + av_freep(&ctx->slice_q); + + return 0; +} + +static av_cold int encode_init(AVCodecContext *avctx) +{ + ProresContext *ctx = avctx->priv_data; + int mps; + int i, j; + int min_quant, max_quant; + + avctx->bits_per_raw_sample = 10; + avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); + + ff_proresdsp_init(&ctx->dsp); + ff_init_scantable(ctx->dsp.dct_permutation, &ctx->scantable, + ff_prores_progressive_scan); + + mps = ctx->mbs_per_slice; + if (mps & (mps - 1)) { + av_log(avctx, AV_LOG_ERROR, + "there should be an integer power of two MBs per slice\n"); + return AVERROR(EINVAL); + } + + ctx->chroma_factor = avctx->pix_fmt == PIX_FMT_YUV422P10 + ? CFACTOR_Y422 + : CFACTOR_Y444; + ctx->profile_info = prores_profile_info + ctx->profile; + ctx->num_planes = 3; + + ctx->mb_width = FFALIGN(avctx->width, 16) >> 4; + ctx->mb_height = FFALIGN(avctx->height, 16) >> 4; + ctx->slices_width = ctx->mb_width / mps; + ctx->slices_width += av_popcount(ctx->mb_width - ctx->slices_width * mps); + ctx->num_slices = ctx->mb_height * ctx->slices_width; + + for (i = 0; i < NUM_MB_LIMITS - 1; i++) + if (prores_mb_limits[i] >= ctx->mb_width * ctx->mb_height) + break; + ctx->bits_per_mb = ctx->profile_info->br_tab[i]; + + min_quant = ctx->profile_info->min_quant; + max_quant = ctx->profile_info->max_quant; + for (i = min_quant; i <= max_quant; i++) { + for (j = 0; j < 64; j++) + ctx->quants[i][j] = ctx->profile_info->quant[j] * i; + } + + avctx->codec_tag = ctx->profile_info->tag; + + av_log(avctx, AV_LOG_DEBUG, "profile %d, %d slices, %d bits per MB\n", + ctx->profile, ctx->num_slices, ctx->bits_per_mb); + + ctx->nodes = av_malloc((ctx->slices_width + 1) * TRELLIS_WIDTH + * sizeof(*ctx->nodes)); + if (!ctx->nodes) { + encode_close(avctx); + return AVERROR(ENOMEM); + } + for (i = min_quant; i <= max_quant; i++) { + ctx->nodes[i].prev_node = -1; + ctx->nodes[i].bits = 0; + ctx->nodes[i].score = 0; + } + + ctx->slice_q = av_malloc(ctx->slices_width * sizeof(*ctx->slice_q)); + if (!ctx->slice_q) { + encode_close(avctx); + return AVERROR(ENOMEM); + } + + return 0; +} + +#define OFFSET(x) offsetof(ProresContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM + +static const AVOption options[] = { + { "mbs_per_slice", "macroblocks per slice", OFFSET(mbs_per_slice), + AV_OPT_TYPE_INT, { 8 }, 1, MAX_MBS_PER_SLICE, VE }, + { "profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, + { PRORES_PROFILE_STANDARD }, + PRORES_PROFILE_PROXY, PRORES_PROFILE_HQ, VE, "profile" }, + { "proxy", NULL, 0, AV_OPT_TYPE_CONST, { PRORES_PROFILE_PROXY }, + 0, 0, VE, "profile" }, + { "lt", NULL, 0, AV_OPT_TYPE_CONST, { PRORES_PROFILE_LT }, + 0, 0, VE, "profile" }, + { "standard", NULL, 0, AV_OPT_TYPE_CONST, { PRORES_PROFILE_STANDARD }, + 0, 0, VE, "profile" }, + { "hq", NULL, 0, AV_OPT_TYPE_CONST, { PRORES_PROFILE_HQ }, + 0, 0, VE, "profile" }, + { NULL } +}; + +static const AVClass proresenc_class = { + .class_name = "ProRes encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +AVCodec ff_prores_encoder = { + .name = "prores", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PRORES, + .priv_data_size = sizeof(ProresContext), + .init = encode_init, + .close = encode_close, + .encode2 = encode_frame, + .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"), + .pix_fmts = (const enum PixelFormat[]) { + PIX_FMT_YUV422P10, PIX_FMT_YUV444P10, PIX_FMT_NONE + }, + .priv_class = &proresenc_class, +}; diff --git a/libavcodec/version.h b/libavcodec/version.h index 56aadb24a4..bf2848d4b2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -21,7 +21,7 @@ #define AVCODEC_VERSION_H #define LIBAVCODEC_VERSION_MAJOR 54 -#define LIBAVCODEC_VERSION_MINOR 1 +#define LIBAVCODEC_VERSION_MINOR 2 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ -- cgit v1.2.1 From 735be9cdfb39ac295243796a38de70cc5499f2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 11:37:35 +0200 Subject: rtsp: Make rtsp_demuxer_class static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtspdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 785d162b41..80420aa42d 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -388,7 +388,7 @@ static int rtsp_read_close(AVFormatContext *s) return 0; } -const AVClass rtsp_demuxer_class = { +static const AVClass rtsp_demuxer_class = { .class_name = "RTSP demuxer", .item_name = av_default_item_name, .option = ff_rtsp_options, -- cgit v1.2.1 From a082ac412520cd5d812bd57e5ccdad2af557125b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 11:44:31 +0200 Subject: mpegvideo: Remove a leftover function declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/mpegvideo_common.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index 9f6307ea7c..faa50e6ef0 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -41,12 +41,6 @@ int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); -/** - * Allocate a Picture. - * The pixels are allocated/set by calling get_buffer() if shared = 0. - */ -int alloc_picture(MpegEncContext *s, Picture *pic, int shared); - /** * Set the given MpegEncContext to common defaults (same for encoding and decoding). * The changed fields will not depend upon the prior state of the MpegEncContext. -- cgit v1.2.1 From 167f3b8de71657dec0948f0a859259f35b318fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 11:28:39 +0200 Subject: libavformat: Add an ff_ prefix to some lavf internal symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prefix the functions/tables brktimegm, pcm_read_seek, dv_offset_reset, voc_get_packet, codec_movaudio_tags, codec_movvideo_tags. After this, lavf has no global symbols without the proper prefix. Signed-off-by: Martin Storsjö --- libavformat/aea.c | 2 +- libavformat/aiffdec.c | 2 +- libavformat/au.c | 2 +- libavformat/avidec.c | 2 +- libavformat/avs.c | 2 +- libavformat/c93.c | 2 +- libavformat/cutils.c | 2 +- libavformat/dv.c | 4 ++-- libavformat/dv.h | 2 +- libavformat/dvenc.c | 6 +++--- libavformat/internal.h | 2 +- libavformat/isom.c | 4 ++-- libavformat/isom.h | 4 ++-- libavformat/matroskadec.c | 2 +- libavformat/matroskaenc.c | 4 ++-- libavformat/mmf.c | 2 +- libavformat/mov.c | 6 +++--- libavformat/movenc.c | 6 +++--- libavformat/omadec.c | 2 +- libavformat/pcm.c | 4 ++-- libavformat/pcm.h | 4 ++-- libavformat/pcmdec.c | 2 +- libavformat/rsodec.c | 2 +- libavformat/sol.c | 2 +- libavformat/soxdec.c | 2 +- libavformat/voc.h | 4 ++-- libavformat/vocdec.c | 4 ++-- libavformat/wav.c | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/libavformat/aea.c b/libavformat/aea.c index 25450a4841..e360b10415 100644 --- a/libavformat/aea.c +++ b/libavformat/aea.c @@ -99,7 +99,7 @@ AVInputFormat ff_aea_demuxer = { .read_probe = aea_read_probe, .read_header = aea_read_header, .read_packet = aea_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, .flags= AVFMT_GENERIC_INDEX, .extensions = "aea", }; diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 46396cda6f..c6b51877b5 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -318,6 +318,6 @@ AVInputFormat ff_aiff_demuxer = { .read_probe = aiff_probe, .read_header = aiff_read_header, .read_packet = aiff_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, .codec_tag= (const AVCodecTag* const []){ff_codec_aiff_tags, 0}, }; diff --git a/libavformat/au.c b/libavformat/au.c index e56869b4b9..dddc854ade 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -190,7 +190,7 @@ AVInputFormat ff_au_demuxer = { .read_probe = au_probe, .read_header = au_read_header, .read_packet = au_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, .codec_tag= (const AVCodecTag* const []){codec_au_tags, 0}, }; #endif diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 26ccaadd12..82db45abf3 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1306,7 +1306,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp /* Feed the DV video stream version of the timestamp to the */ /* DV demux so it can synthesize correct timestamps. */ - dv_offset_reset(avi->dv_demux, timestamp); + ff_dv_offset_reset(avi->dv_demux, timestamp); avio_seek(s->pb, pos, SEEK_SET); avi->stream_index= -1; diff --git a/libavformat/avs.c b/libavformat/avs.c index 32e7546d60..22b4614cb8 100644 --- a/libavformat/avs.c +++ b/libavformat/avs.c @@ -124,7 +124,7 @@ static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt) int ret, size; size = avio_tell(s->pb); - ret = voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size); + ret = ff_voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size); size = avio_tell(s->pb) - size; avs->remaining_audio_size -= size; diff --git a/libavformat/c93.c b/libavformat/c93.c index 21058da727..f8f8f96ddc 100644 --- a/libavformat/c93.c +++ b/libavformat/c93.c @@ -123,7 +123,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO; } avio_skip(pb, 26); /* VOC header */ - ret = voc_get_packet(s, pkt, c93->audio, datasize - 26); + ret = ff_voc_get_packet(s, pkt, c93->audio, datasize - 26); if (ret > 0) { pkt->stream_index = 1; pkt->flags |= AV_PKT_FLAG_KEY; diff --git a/libavformat/cutils.c b/libavformat/cutils.c index 995524400e..f58e152cac 100644 --- a/libavformat/cutils.c +++ b/libavformat/cutils.c @@ -47,7 +47,7 @@ void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem) /* This is our own gmtime_r. It differs from its POSIX counterpart in a couple of places, though. */ -struct tm *brktimegm(time_t secs, struct tm *tm) +struct tm *ff_brktimegm(time_t secs, struct tm *tm) { int days, y, ny, m; int md[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; diff --git a/libavformat/dv.c b/libavformat/dv.c index 6714bf2afc..873cc3fe3d 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -402,7 +402,7 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c, return offset + s->data_offset; } -void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset) +void ff_dv_offset_reset(DVDemuxContext *c, int64_t frame_offset) { c->frames= frame_offset; if (c->ach) @@ -494,7 +494,7 @@ static int dv_read_seek(AVFormatContext *s, int stream_index, if (avio_seek(s->pb, offset, SEEK_SET) < 0) return -1; - dv_offset_reset(c, offset / c->sys->frame_size); + ff_dv_offset_reset(c, offset / c->sys->frame_size); return 0; } diff --git a/libavformat/dv.h b/libavformat/dv.h index b4bb10d4bc..e8b2d37904 100644 --- a/libavformat/dv.h +++ b/libavformat/dv.h @@ -34,7 +34,7 @@ typedef struct DVDemuxContext DVDemuxContext; DVDemuxContext* avpriv_dv_init_demux(AVFormatContext* s); int avpriv_dv_get_packet(DVDemuxContext*, AVPacket *); int avpriv_dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int); -void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset); +void ff_dv_offset_reset(DVDemuxContext *c, int64_t frame_offset); typedef struct DVMuxContext DVMuxContext; diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index 56db4d2691..8ebdd7fa1d 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -82,7 +82,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu case dv_timecode: ct = (time_t)av_rescale_rnd(c->frames, c->sys->time_base.num, c->sys->time_base.den, AV_ROUND_DOWN); - brktimegm(ct, &tc); + ff_brktimegm(ct, &tc); /* * LTC drop-frame frame counter drops two frames (0 and 1) every * minute, unless it is exactly divisible by 10 @@ -143,7 +143,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu case dv_video_recdate: /* VAUX recording date */ ct = c->start_time + av_rescale_rnd(c->frames, c->sys->time_base.num, c->sys->time_base.den, AV_ROUND_DOWN); - brktimegm(ct, &tc); + ff_brktimegm(ct, &tc); buf[1] = 0xff; /* ds, tm, tens of time zone, units of time zone */ /* 0xff is very likely to be "unknown" */ buf[2] = (3 << 6) | /* reserved -- always 1 */ @@ -159,7 +159,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu case dv_video_rectime: /* VAUX recording time */ ct = c->start_time + av_rescale_rnd(c->frames, c->sys->time_base.num, c->sys->time_base.den, AV_ROUND_DOWN); - brktimegm(ct, &tc); + ff_brktimegm(ct, &tc); buf[1] = (3 << 6) | /* reserved -- always 1 */ 0x3f; /* tens of frame, units of frame: 0x3f - "unknown" ? */ buf[2] = (1 << 7) | /* reserved -- always 1 */ diff --git a/libavformat/internal.h b/libavformat/internal.h index 322dff94af..fb298539b6 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -54,7 +54,7 @@ do {\ } while(0) #endif -struct tm *brktimegm(time_t secs, struct tm *tm); +struct tm *ff_brktimegm(time_t secs, struct tm *tm); char *ff_data_to_hex(char *buf, const uint8_t *src, int size, int lowercase); diff --git a/libavformat/isom.c b/libavformat/isom.c index eab304c006..51e89a0a62 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -66,7 +66,7 @@ const AVCodecTag ff_mp4_obj_type[] = { { CODEC_ID_NONE , 0 }, }; -const AVCodecTag codec_movvideo_tags[] = { +const AVCodecTag ff_codec_movvideo_tags[] = { /* { CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */ { CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */ @@ -223,7 +223,7 @@ const AVCodecTag codec_movvideo_tags[] = { { CODEC_ID_NONE, 0 }, }; -const AVCodecTag codec_movaudio_tags[] = { +const AVCodecTag ff_codec_movaudio_tags[] = { { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') }, { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */ { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */ diff --git a/libavformat/isom.h b/libavformat/isom.h index 91fbf759f8..e74a552644 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -30,8 +30,8 @@ /* isom.c */ extern const AVCodecTag ff_mp4_obj_type[]; -extern const AVCodecTag codec_movvideo_tags[]; -extern const AVCodecTag codec_movaudio_tags[]; +extern const AVCodecTag ff_codec_movvideo_tags[]; +extern const AVCodecTag ff_codec_movaudio_tags[]; extern const AVCodecTag ff_codec_movsubtitle_tags[]; int ff_mov_iso639_to_lang(const char lang[4], int mp4); diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index ca211a2786..31b40a8386 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1422,7 +1422,7 @@ static int matroska_read_header(AVFormatContext *s) && (track->codec_priv.size >= 86) && (track->codec_priv.data != NULL)) { track->video.fourcc = AV_RL32(track->codec_priv.data); - codec_id=ff_codec_get_id(codec_movvideo_tags, track->video.fourcc); + codec_id=ff_codec_get_id(ff_codec_movvideo_tags, track->video.fourcc); } else if (codec_id == CODEC_ID_PCM_S16BE) { switch (track->audio.bitdepth) { case 8: codec_id = CODEC_ID_PCM_U8; break; diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index e93dd65dff..984d0f1565 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -480,7 +480,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { if (qt_id) { if (!codec->codec_tag) - codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id); + codec->codec_tag = ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id); if (codec->extradata_size) avio_write(dyn_cp, codec->extradata, codec->extradata_size); } else { @@ -583,7 +583,7 @@ static int mkv_write_tracks(AVFormatContext *s) put_ebml_uint(pb, MATROSKA_ID_TRACKDEFAULTDURATION, av_q2d(codec->time_base)*1E9); if (!native_id && - ff_codec_get_tag(codec_movvideo_tags, codec->codec_id) && + ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id) && (!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id) || codec->codec_id == CODEC_ID_SVQ1 || codec->codec_id == CODEC_ID_SVQ3 diff --git a/libavformat/mmf.c b/libavformat/mmf.c index 4d34cf2ac4..837b5cd67a 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -297,7 +297,7 @@ AVInputFormat ff_mmf_demuxer = { .read_probe = mmf_probe, .read_header = mmf_read_header, .read_packet = mmf_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, }; #endif #if CONFIG_MMF_MUXER diff --git a/libavformat/mov.c b/libavformat/mov.c index 9deb820ebd..690cd1ed46 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1126,7 +1126,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) if (st->codec->codec_tag && st->codec->codec_tag != format && - (c->fc->video_codec_id ? ff_codec_get_id(codec_movvideo_tags, format) != c->fc->video_codec_id + (c->fc->video_codec_id ? ff_codec_get_id(ff_codec_movvideo_tags, format) != c->fc->video_codec_id : st->codec->codec_tag != MKTAG('j','p','e','g')) ){ /* Multiple fourcc, we skip JPEG. This is not correct, we should @@ -1144,7 +1144,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) sc->dref_id= dref_id; st->codec->codec_tag = format; - id = ff_codec_get_id(codec_movaudio_tags, format); + id = ff_codec_get_id(ff_codec_movaudio_tags, format); if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8))) id = ff_codec_get_id(ff_codec_wav_tags, av_bswap32(format)&0xFFFF); @@ -1152,7 +1152,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) st->codec->codec_type = AVMEDIA_TYPE_AUDIO; } else if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO && /* do not overwrite codec type */ format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */ - id = ff_codec_get_id(codec_movvideo_tags, format); + id = ff_codec_get_id(ff_codec_movvideo_tags, format); if (id <= 0) id = ff_codec_get_id(ff_codec_bmp_tags, format); if (id > 0) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 4193ec5e64..ce00866df8 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -829,7 +829,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) else if (track->enc->codec_id == CODEC_ID_RAWVIDEO) tag = mov_get_rawvideo_codec_tag(s, track); else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) { - tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id); + tag = ff_codec_get_tag(ff_codec_movvideo_tags, track->enc->codec_id); if (!tag) { // if no mac fcc found, try with Microsoft tags tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id); if (tag) @@ -837,7 +837,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) "the file may be unplayable!\n"); } } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) { - tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id); + tag = ff_codec_get_tag(ff_codec_movaudio_tags, track->enc->codec_id); if (!tag) { // if no mac fcc found, try with Microsoft tags int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id); if (ms_tag) { @@ -3230,7 +3230,7 @@ AVOutputFormat ff_mov_muxer = { .write_packet = ff_mov_write_packet, .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH, - .codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0}, + .codec_tag = (const AVCodecTag* const []){ff_codec_movvideo_tags, ff_codec_movaudio_tags, 0}, .priv_class = &mov_muxer_class, }; #endif diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 60b42fa9a9..fc9c2921e6 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -412,7 +412,7 @@ static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t ti { OMAContext *oc = s->priv_data; - pcm_read_seek(s, stream_index, timestamp, flags); + ff_pcm_read_seek(s, stream_index, timestamp, flags); if (oc->encrypted) { /* readjust IV for CBC */ diff --git a/libavformat/pcm.c b/libavformat/pcm.c index 7d5fed5601..892e8ca24e 100644 --- a/libavformat/pcm.c +++ b/libavformat/pcm.c @@ -23,8 +23,8 @@ #include "avformat.h" #include "pcm.h" -int pcm_read_seek(AVFormatContext *s, - int stream_index, int64_t timestamp, int flags) +int ff_pcm_read_seek(AVFormatContext *s, + int stream_index, int64_t timestamp, int flags) { AVStream *st; int block_align, byte_rate; diff --git a/libavformat/pcm.h b/libavformat/pcm.h index 228df1394b..30cbc86ee3 100644 --- a/libavformat/pcm.h +++ b/libavformat/pcm.h @@ -24,7 +24,7 @@ #include "avformat.h" -int pcm_read_seek(AVFormatContext *s, - int stream_index, int64_t timestamp, int flags); +int ff_pcm_read_seek(AVFormatContext *s, + int stream_index, int64_t timestamp, int flags); #endif /* AVFORMAT_PCM_H */ diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index 1e36cc4e76..512bc0a21e 100644 --- a/libavformat/pcmdec.c +++ b/libavformat/pcmdec.c @@ -67,7 +67,7 @@ AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ .priv_data_size = sizeof(RawAudioDemuxerContext), \ .read_header = ff_raw_read_header, \ .read_packet = raw_read_packet, \ - .read_seek = pcm_read_seek, \ + .read_seek = ff_pcm_read_seek, \ .flags = AVFMT_GENERIC_INDEX, \ .extensions = ext, \ .raw_codec_id = codec, \ diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c index c148b2ee57..72c12e7421 100644 --- a/libavformat/rsodec.c +++ b/libavformat/rsodec.c @@ -94,6 +94,6 @@ AVInputFormat ff_rso_demuxer = { .extensions = "rso", .read_header = rso_read_header, .read_packet = rso_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, .codec_tag = (const AVCodecTag* const []){ff_codec_rso_tags, 0}, }; diff --git a/libavformat/sol.c b/libavformat/sol.c index 4b3a5adbc0..d02373c65a 100644 --- a/libavformat/sol.c +++ b/libavformat/sol.c @@ -147,5 +147,5 @@ AVInputFormat ff_sol_demuxer = { .read_probe = sol_probe, .read_header = sol_read_header, .read_packet = sol_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, }; diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c index 29d13d4f7b..6ce1848539 100644 --- a/libavformat/soxdec.c +++ b/libavformat/soxdec.c @@ -148,5 +148,5 @@ AVInputFormat ff_sox_demuxer = { .read_probe = sox_probe, .read_header = sox_read_header, .read_packet = sox_read_packet, - .read_seek = pcm_read_seek, + .read_seek = ff_pcm_read_seek, }; diff --git a/libavformat/voc.h b/libavformat/voc.h index abd8fdbfff..1668618fda 100644 --- a/libavformat/voc.h +++ b/libavformat/voc.h @@ -45,7 +45,7 @@ typedef enum voc_type { extern const unsigned char ff_voc_magic[21]; extern const AVCodecTag ff_voc_codec_tags[]; -int voc_get_packet(AVFormatContext *s, AVPacket *pkt, - AVStream *st, int max_size); +int ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, + AVStream *st, int max_size); #endif /* AVFORMAT_VOC_H */ diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c index 6b3438f758..e8c11afbe3 100644 --- a/libavformat/vocdec.c +++ b/libavformat/vocdec.c @@ -62,7 +62,7 @@ static int voc_read_header(AVFormatContext *s) } int -voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) +ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) { VocDecContext *voc = s->priv_data; AVCodecContext *dec = st->codec; @@ -153,7 +153,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) static int voc_read_packet(AVFormatContext *s, AVPacket *pkt) { - return voc_get_packet(s, pkt, s->streams[0], 0); + return ff_voc_get_packet(s, pkt, s->streams[0], 0); } AVInputFormat ff_voc_demuxer = { diff --git a/libavformat/wav.c b/libavformat/wav.c index 7b3a0f44f3..bccc3dbdee 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -582,7 +582,7 @@ static int wav_read_seek(AVFormatContext *s, default: break; } - return pcm_read_seek(s, stream_index, timestamp, flags); + return ff_pcm_read_seek(s, stream_index, timestamp, flags); } AVInputFormat ff_wav_demuxer = { -- cgit v1.2.1 From ddce8953a5056800ec795df2dfd84fc17a11b5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 9 Feb 2012 11:28:46 +0200 Subject: h263: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/h263.c | 8 ++--- libavcodec/h263.h | 42 ++++++++++++------------- libavcodec/h263data.h | 24 +++++++------- libavcodec/h263dec.c | 4 +-- libavcodec/intelh263dec.c | 4 +-- libavcodec/ituh263dec.c | 78 +++++++++++++++++++++++----------------------- libavcodec/ituh263enc.c | 44 +++++++++++++------------- libavcodec/mpeg4videodec.c | 50 ++++++++++++++--------------- libavcodec/mpeg4videoenc.c | 6 ++-- libavcodec/mpegvideo_enc.c | 10 +++--- libavcodec/msmpeg4.c | 16 +++++----- libavcodec/msmpeg4data.c | 12 +++---- libavcodec/rv10.c | 2 +- libavcodec/rv34data.h | 2 +- libavcodec/snowenc.c | 2 +- libavcodec/svq1dec.c | 6 ++-- libavcodec/svq1enc.c | 4 +-- libavcodec/wmv2enc.c | 2 +- 18 files changed, 158 insertions(+), 158 deletions(-) diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 77a1bb828b..7f1966f8bf 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -98,7 +98,7 @@ void ff_h263_update_motion_val(MpegEncContext * s){ } } -int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr) +int ff_h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr) { int x, y, wrap, a, c, pred_dc; int16_t *dc_val; @@ -226,7 +226,7 @@ void ff_h263_loop_filter(MpegEncContext * s){ } } -void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n) +void ff_h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n) { int x, y, wrap, a, c, pred_dc, scale, i; int16_t *dc_val, *ac_val, *ac_val1; @@ -313,8 +313,8 @@ void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n) ac_val1[8 + i] = block[s->dsp.idct_permutation[i ]]; } -int16_t *h263_pred_motion(MpegEncContext * s, int block, int dir, - int *px, int *py) +int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, + int *px, int *py) { int wrap; int16_t *A, *B, *C, (*mot_val)[2]; diff --git a/libavcodec/h263.h b/libavcodec/h263.h index 73c5966605..d26cf636eb 100644 --- a/libavcodec/h263.h +++ b/libavcodec/h263.h @@ -38,16 +38,16 @@ extern const AVRational ff_h263_pixel_aspect[16]; extern const uint8_t ff_h263_cbpy_tab[16][2]; -extern const uint8_t cbpc_b_tab[4][2]; +extern const uint8_t ff_cbpc_b_tab[4][2]; -extern const uint8_t mvtab[33][2]; +extern const uint8_t ff_mvtab[33][2]; extern const uint8_t ff_h263_intra_MCBPC_code[9]; extern const uint8_t ff_h263_intra_MCBPC_bits[9]; extern const uint8_t ff_h263_inter_MCBPC_code[28]; extern const uint8_t ff_h263_inter_MCBPC_bits[28]; -extern const uint8_t h263_mbtype_b_tab[15][2]; +extern const uint8_t ff_h263_mbtype_b_tab[15][2]; extern VLC ff_h263_intra_MCBPC_vlc; extern VLC ff_h263_inter_MCBPC_vlc; @@ -55,41 +55,41 @@ extern VLC ff_h263_cbpy_vlc; extern RLTable ff_h263_rl_inter; -extern RLTable rl_intra_aic; +extern RLTable ff_rl_intra_aic; -extern const uint16_t h263_format[8][2]; -extern const uint8_t modified_quant_tab[2][32]; +extern const uint16_t ff_h263_format[8][2]; +extern const uint8_t ff_modified_quant_tab[2][32]; extern uint16_t ff_mba_max[6]; extern uint8_t ff_mba_length[7]; extern uint8_t ff_h263_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; -int h263_decode_motion(MpegEncContext * s, int pred, int f_code); +int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code); av_const int ff_h263_aspect_to_info(AVRational aspect); int ff_h263_decode_init(AVCodecContext *avctx); int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt); int ff_h263_decode_end(AVCodecContext *avctx); -void h263_encode_mb(MpegEncContext *s, - DCTELEM block[6][64], - int motion_x, int motion_y); -void h263_encode_picture_header(MpegEncContext *s, int picture_number); -void h263_encode_gob_header(MpegEncContext * s, int mb_line); -int16_t *h263_pred_motion(MpegEncContext * s, int block, int dir, - int *px, int *py); -void h263_encode_init(MpegEncContext *s); -void h263_decode_init_vlc(MpegEncContext *s); -int h263_decode_picture_header(MpegEncContext *s); +void ff_h263_encode_mb(MpegEncContext *s, + DCTELEM block[6][64], + int motion_x, int motion_y); +void ff_h263_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line); +int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, + int *px, int *py); +void ff_h263_encode_init(MpegEncContext *s); +void ff_h263_decode_init_vlc(MpegEncContext *s); +int ff_h263_decode_picture_header(MpegEncContext *s); int ff_h263_decode_gob_header(MpegEncContext *s); void ff_h263_update_motion_val(MpegEncContext * s); void ff_h263_loop_filter(MpegEncContext * s); int ff_h263_decode_mba(MpegEncContext *s); void ff_h263_encode_mba(MpegEncContext *s); void ff_init_qscale_tab(MpegEncContext *s); -int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr); -void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n); +int ff_h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr); +void ff_h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n); /** @@ -119,7 +119,7 @@ static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code int l, bit_size, code; if (val == 0) { - return mvtab[0][1]; + return ff_mvtab[0][1]; } else { bit_size = f_code - 1; /* modulo encoding */ @@ -128,7 +128,7 @@ static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code val--; code = (val >> bit_size) + 1; - return mvtab[code][1] + 1 + bit_size; + return ff_mvtab[code][1] + 1 + bit_size; } } diff --git a/libavcodec/h263data.h b/libavcodec/h263data.h index 966da56110..e3b83ad2e4 100644 --- a/libavcodec/h263data.h +++ b/libavcodec/h263data.h @@ -57,7 +57,7 @@ const uint8_t ff_h263_inter_MCBPC_bits[28] = { 11, 13, 13, 13,/* inter4Q*/ }; -const uint8_t h263_mbtype_b_tab[15][2] = { +const uint8_t ff_h263_mbtype_b_tab[15][2] = { {1, 1}, {3, 3}, {1, 5}, @@ -75,7 +75,7 @@ const uint8_t h263_mbtype_b_tab[15][2] = { {1, 8}, }; -const uint8_t cbpc_b_tab[4][2] = { +const uint8_t ff_cbpc_b_tab[4][2] = { {0, 1}, {2, 2}, {7, 3}, @@ -88,7 +88,7 @@ const uint8_t ff_h263_cbpy_tab[16][2] = {2,5}, {3,6}, {5,4}, {10,4}, {4,4}, {8,4}, {6,4}, {3,2} }; -const uint8_t mvtab[33][2] = +const uint8_t ff_mvtab[33][2] = { {1,1}, {1,2}, {1,3}, {1,4}, {3,6}, {5,7}, {4,7}, {3,7}, {11,9}, {10,9}, {9,9}, {17,10}, {16,10}, {15,10}, {14,10}, {13,10}, @@ -98,7 +98,7 @@ const uint8_t mvtab[33][2] = }; /* third non intra table */ -const uint16_t inter_vlc[103][2] = { +const uint16_t ff_inter_vlc[103][2] = { { 0x2, 2 },{ 0xf, 4 },{ 0x15, 6 },{ 0x17, 7 }, { 0x1f, 8 },{ 0x25, 9 },{ 0x24, 9 },{ 0x21, 10 }, { 0x20, 10 },{ 0x7, 11 },{ 0x6, 11 },{ 0x20, 11 }, @@ -127,7 +127,7 @@ const uint16_t inter_vlc[103][2] = { { 0x5e, 12 },{ 0x5f, 12 },{ 0x3, 7 }, }; -const int8_t inter_level[102] = { +const int8_t ff_inter_level[102] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, @@ -143,7 +143,7 @@ const int8_t inter_level[102] = { 1, 1, 1, 1, 1, 1, }; -const int8_t inter_run[102] = { +const int8_t ff_inter_run[102] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, @@ -162,9 +162,9 @@ const int8_t inter_run[102] = { RLTable ff_h263_rl_inter = { 102, 58, - inter_vlc, - inter_run, - inter_level, + ff_inter_vlc, + ff_inter_run, + ff_inter_level, }; static const uint16_t intra_vlc_aic[103][2] = { @@ -228,7 +228,7 @@ static const int8_t intra_level_aic[102] = { 1, 1, 1, 1, 1, 1, }; -RLTable rl_intra_aic = { +RLTable ff_rl_intra_aic = { 102, 58, intra_vlc_aic, @@ -236,7 +236,7 @@ RLTable rl_intra_aic = { intra_level_aic, }; -const uint16_t h263_format[8][2] = { +const uint16_t ff_h263_format[8][2] = { { 0, 0 }, { 128, 96 }, { 176, 144 }, @@ -250,7 +250,7 @@ const uint8_t ff_aic_dc_scale_table[32]={ 0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62 }; -const uint8_t modified_quant_tab[2][32]={ +const uint8_t ff_modified_quant_tab[2][32]={ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 { 0, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9,10,11,12,13,14,15,16,17,18,18,19,20,21,22,23,24,25,26,27,28 diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index f056d1fbe2..5404c90153 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -113,7 +113,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) if (MPV_common_init(s) < 0) return -1; - h263_decode_init_vlc(s); + ff_h263_decode_init_vlc(s); return 0; } @@ -421,7 +421,7 @@ retry: } else if (CONFIG_FLV_DECODER && s->h263_flv) { ret = ff_flv_decode_picture_header(s); } else { - ret = h263_decode_picture_header(s); + ret = ff_h263_decode_picture_header(s); } if(ret==FRAME_SKIPPED) return get_consumed_bytes(s, buf_size); diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c index bedfabff02..250ac6945c 100644 --- a/libavcodec/intelh263dec.c +++ b/libavcodec/intelh263dec.c @@ -65,8 +65,8 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) s->pb_frame = get_bits1(&s->gb); if (format < 6) { - s->width = h263_format[format][0]; - s->height = h263_format[format][1]; + s->width = ff_h263_format[format][0]; + s->height = ff_h263_format[format][1]; s->avctx->sample_aspect_ratio.num = 12; s->avctx->sample_aspect_ratio.den = 11; } else { diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 148bb33a36..144d035e0e 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -101,7 +101,7 @@ static VLC cbpc_b_vlc; /* init vlcs */ /* XXX: find a better solution to handle static init */ -void h263_decode_init_vlc(MpegEncContext *s) +void ff_h263_decode_init_vlc(MpegEncContext *s) { static int done = 0; @@ -118,18 +118,18 @@ void h263_decode_init_vlc(MpegEncContext *s) &ff_h263_cbpy_tab[0][1], 2, 1, &ff_h263_cbpy_tab[0][0], 2, 1, 64); INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 33, - &mvtab[0][1], 2, 1, - &mvtab[0][0], 2, 1, 538); + &ff_mvtab[0][1], 2, 1, + &ff_mvtab[0][0], 2, 1, 538); init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]); - init_rl(&rl_intra_aic, ff_h263_static_rl_table_store[1]); + init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]); INIT_VLC_RL(ff_h263_rl_inter, 554); - INIT_VLC_RL(rl_intra_aic, 554); + INIT_VLC_RL(ff_rl_intra_aic, 554); INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, - &h263_mbtype_b_tab[0][1], 2, 1, - &h263_mbtype_b_tab[0][0], 2, 1, 80); + &ff_h263_mbtype_b_tab[0][1], 2, 1, + &ff_h263_mbtype_b_tab[0][0], 2, 1, 80); INIT_VLC_STATIC(&cbpc_b_vlc, CBPC_B_VLC_BITS, 4, - &cbpc_b_tab[0][1], 2, 1, - &cbpc_b_tab[0][0], 2, 1, 8); + &ff_cbpc_b_tab[0][1], 2, 1, + &ff_cbpc_b_tab[0][0], 2, 1, 8); } } @@ -269,7 +269,7 @@ int ff_h263_resync(MpegEncContext *s){ return -1; } -int h263_decode_motion(MpegEncContext * s, int pred, int f_code) +int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code) { int code, val, sign, shift; code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2); @@ -379,16 +379,16 @@ static void preview_obmc(MpegEncContext *s){ if ((cbpc & 16) == 0) { s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 motion prediction */ - mot_val= h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + mot_val= ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); if (s->umvplus) mx = h263p_decode_umotion(s, pred_x); else - mx = h263_decode_motion(s, pred_x, 1); + mx = ff_h263_decode_motion(s, pred_x, 1); if (s->umvplus) my = h263p_decode_umotion(s, pred_y); else - my = h263_decode_motion(s, pred_y, 1); + my = ff_h263_decode_motion(s, pred_y, 1); mot_val[0 ]= mot_val[2 ]= mot_val[0+stride]= mot_val[2+stride]= mx; @@ -397,16 +397,16 @@ static void preview_obmc(MpegEncContext *s){ } else { s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; for(i=0;i<4;i++) { - mot_val = h263_pred_motion(s, i, 0, &pred_x, &pred_y); + mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); if (s->umvplus) mx = h263p_decode_umotion(s, pred_x); else - mx = h263_decode_motion(s, pred_x, 1); + mx = ff_h263_decode_motion(s, pred_x, 1); if (s->umvplus) my = h263p_decode_umotion(s, pred_y); else - my = h263_decode_motion(s, pred_y, 1); + my = ff_h263_decode_motion(s, pred_y, 1); if (s->umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1) skip_bits1(&s->gb); /* Bit stuffing to prevent PSC */ mot_val[0] = mx; @@ -430,7 +430,7 @@ static void h263_decode_dquant(MpegEncContext *s){ if(s->modified_quant){ if(get_bits1(&s->gb)) - s->qscale= modified_quant_tab[get_bits1(&s->gb)][ s->qscale ]; + s->qscale= ff_modified_quant_tab[get_bits1(&s->gb)][ s->qscale ]; else s->qscale= get_bits(&s->gb, 5); }else @@ -448,7 +448,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, scan_table = s->intra_scantable.permutated; if (s->h263_aic && s->mb_intra) { - rl = &rl_intra_aic; + rl = &ff_rl_intra_aic; i = 0; if (s->ac_pred) { if (s->h263_aic_dir) @@ -537,7 +537,7 @@ retry: if (i >= 64){ if(s->alt_inter_vlc && rl == &ff_h263_rl_inter && !s->mb_intra){ //Looks like a hack but no, it's the way it is supposed to work ... - rl = &rl_intra_aic; + rl = &ff_rl_intra_aic; i = 0; s->gb= gb; s->dsp.clear_block(block); @@ -554,7 +554,7 @@ retry: } not_coded: if (s->mb_intra && s->h263_aic) { - h263_pred_acdc(s, block, n); + ff_h263_pred_acdc(s, block, n); i = 63; } s->block_last_index[n] = i; @@ -653,11 +653,11 @@ int ff_h263_decode_mb(MpegEncContext *s, s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 motion prediction */ s->mv_type = MV_TYPE_16X16; - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); if (s->umvplus) mx = h263p_decode_umotion(s, pred_x); else - mx = h263_decode_motion(s, pred_x, 1); + mx = ff_h263_decode_motion(s, pred_x, 1); if (mx >= 0xffff) return -1; @@ -665,7 +665,7 @@ int ff_h263_decode_mb(MpegEncContext *s, if (s->umvplus) my = h263p_decode_umotion(s, pred_y); else - my = h263_decode_motion(s, pred_y, 1); + my = ff_h263_decode_motion(s, pred_y, 1); if (my >= 0xffff) return -1; @@ -678,18 +678,18 @@ int ff_h263_decode_mb(MpegEncContext *s, s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; s->mv_type = MV_TYPE_8X8; for(i=0;i<4;i++) { - mot_val = h263_pred_motion(s, i, 0, &pred_x, &pred_y); + mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); if (s->umvplus) mx = h263p_decode_umotion(s, pred_x); else - mx = h263_decode_motion(s, pred_x, 1); + mx = ff_h263_decode_motion(s, pred_x, 1); if (mx >= 0xffff) return -1; if (s->umvplus) my = h263p_decode_umotion(s, pred_y); else - my = h263_decode_motion(s, pred_y, 1); + my = ff_h263_decode_motion(s, pred_y, 1); if (my >= 0xffff) return -1; s->mv[0][i][0] = mx; @@ -761,11 +761,11 @@ int ff_h263_decode_mb(MpegEncContext *s, //FIXME UMV if(USES_LIST(mb_type, 0)){ - int16_t *mot_val= h263_pred_motion(s, 0, 0, &mx, &my); + int16_t *mot_val= ff_h263_pred_motion(s, 0, 0, &mx, &my); s->mv_dir = MV_DIR_FORWARD; - mx = h263_decode_motion(s, mx, 1); - my = h263_decode_motion(s, my, 1); + mx = ff_h263_decode_motion(s, mx, 1); + my = ff_h263_decode_motion(s, my, 1); s->mv[0][0][0] = mx; s->mv[0][0][1] = my; @@ -774,11 +774,11 @@ int ff_h263_decode_mb(MpegEncContext *s, } if(USES_LIST(mb_type, 1)){ - int16_t *mot_val= h263_pred_motion(s, 0, 1, &mx, &my); + int16_t *mot_val= ff_h263_pred_motion(s, 0, 1, &mx, &my); s->mv_dir |= MV_DIR_BACKWARD; - mx = h263_decode_motion(s, mx, 1); - my = h263_decode_motion(s, my, 1); + mx = ff_h263_decode_motion(s, mx, 1); + my = ff_h263_decode_motion(s, my, 1); s->mv[1][0][0] = mx; s->mv[1][0][1] = my; @@ -829,8 +829,8 @@ intra: } while(pb_mv_count--){ - h263_decode_motion(s, 0, 1); - h263_decode_motion(s, 0, 1); + ff_h263_decode_motion(s, 0, 1); + ff_h263_decode_motion(s, 0, 1); } /* decode each block */ @@ -864,7 +864,7 @@ end: } /* most is hardcoded. should extend to handle all h263 streams */ -int h263_decode_picture_header(MpegEncContext *s) +int ff_h263_decode_picture_header(MpegEncContext *s) { int format, width, height, i; uint32_t startcode; @@ -916,8 +916,8 @@ int h263_decode_picture_header(MpegEncContext *s) if (format != 7 && format != 6) { s->h263_plus = 0; /* H.263v1 */ - width = h263_format[format][0]; - height = h263_format[format][1]; + width = ff_h263_format[format][0]; + height = ff_h263_format[format][1]; if (!width) return -1; @@ -1024,8 +1024,8 @@ int h263_decode_picture_header(MpegEncContext *s) s->avctx->sample_aspect_ratio= ff_h263_pixel_aspect[s->aspect_ratio_info]; } } else { - width = h263_format[format][0]; - height = h263_format[format][1]; + width = ff_h263_format[format][0]; + height = ff_h263_format[format][1]; s->avctx->sample_aspect_ratio= (AVRational){12,11}; } if ((width == 0) || (height == 0)) diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 6efba2d65a..5b247dce07 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -102,7 +102,7 @@ av_const int ff_h263_aspect_to_info(AVRational aspect){ return FF_ASPECT_EXTENDED; } -void h263_encode_picture_header(MpegEncContext * s, int picture_number) +void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number) { int format, coded_frame_rate, coded_frame_rate_base, i, temp_ref; int best_clock_code=1; @@ -141,7 +141,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number) put_bits(&s->pb, 1, 0); /* camera off */ put_bits(&s->pb, 1, 0); /* freeze picture release off */ - format = ff_match_2uint16(h263_format, FF_ARRAY_ELEMS(h263_format), s->width, s->height); + format = ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format), s->width, s->height); if (!s->h263_plus) { /* H.263v1 */ put_bits(&s->pb, 3, format); @@ -247,7 +247,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number) /** * Encode a group of blocks header. */ -void h263_encode_gob_header(MpegEncContext * s, int mb_line) +void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line) { put_bits(&s->pb, 17, 1); /* GBSC */ @@ -333,7 +333,7 @@ static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) } else { i = 0; if (s->h263_aic && s->mb_intra) - rl = &rl_intra_aic; + rl = &ff_rl_intra_aic; if(s->alt_inter_vlc && !s->mb_intra){ int aic_vlc_bits=0; @@ -353,14 +353,14 @@ static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) if(level<0) level= -level; code = get_rl_index(rl, last, run, level); - aic_code = get_rl_index(&rl_intra_aic, last, run, level); + aic_code = get_rl_index(&ff_rl_intra_aic, last, run, level); inter_vlc_bits += rl->table_vlc[code][1]+1; - aic_vlc_bits += rl_intra_aic.table_vlc[aic_code][1]+1; + aic_vlc_bits += ff_rl_intra_aic.table_vlc[aic_code][1]+1; if (code == rl->n) { inter_vlc_bits += 1+6+8-1; } - if (aic_code == rl_intra_aic.n) { + if (aic_code == ff_rl_intra_aic.n) { aic_vlc_bits += 1+6+8-1; wrong_pos += run + 1; }else @@ -370,7 +370,7 @@ static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) } i = 0; if(aic_vlc_bits < inter_vlc_bits && wrong_pos > 63) - rl = &rl_intra_aic; + rl = &ff_rl_intra_aic; } } @@ -454,9 +454,9 @@ static void h263p_encode_umotion(MpegEncContext * s, int val) } } -void h263_encode_mb(MpegEncContext * s, - DCTELEM block[6][64], - int motion_x, int motion_y) +void ff_h263_encode_mb(MpegEncContext * s, + DCTELEM block[6][64], + int motion_x, int motion_y) { int cbpc, cbpy, i, cbp, pred_x, pred_y; int16_t pred_dc; @@ -500,7 +500,7 @@ void h263_encode_mb(MpegEncContext * s, } /* motion vectors: 16x16 mode */ - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); if (!s->umvplus) { ff_h263_encode_motion_vector(s, motion_x - pred_x, @@ -527,7 +527,7 @@ void h263_encode_mb(MpegEncContext * s, for(i=0; i<4; i++){ /* motion vectors: 8x8 mode*/ - h263_pred_motion(s, i, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); motion_x = s->current_picture.f.motion_val[0][s->block_index[i]][0]; motion_y = s->current_picture.f.motion_val[0][s->block_index[i]][1]; @@ -561,7 +561,7 @@ void h263_encode_mb(MpegEncContext * s, if(i<4) scale= s->y_dc_scale; else scale= s->c_dc_scale; - pred_dc = h263_pred_dc(s, i, &dc_ptr[i]); + pred_dc = ff_h263_pred_dc(s, i, &dc_ptr[i]); level -= pred_dc; /* Quant */ if (level >= 0) @@ -662,7 +662,7 @@ void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code) if (val == 0) { /* zero vector */ code = 0; - put_bits(&s->pb, mvtab[code][1], mvtab[code][0]); + put_bits(&s->pb, ff_mvtab[code][1], ff_mvtab[code][0]); } else { bit_size = f_code - 1; range = 1 << bit_size; @@ -676,7 +676,7 @@ void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code) code = (val >> bit_size) + 1; bits = val & (range - 1); - put_bits(&s->pb, mvtab[code][1] + 1, (mvtab[code][0] << 1) | sign); + put_bits(&s->pb, ff_mvtab[code][1] + 1, (ff_mvtab[code][0] << 1) | sign); if (bit_size > 0) { put_bits(&s->pb, bit_size, bits); } @@ -692,7 +692,7 @@ static void init_mv_penalty_and_fcode(MpegEncContext *s) for(mv=-MAX_MV; mv<=MAX_MV; mv++){ int len; - if(mv==0) len= mvtab[0][1]; + if(mv==0) len= ff_mvtab[0][1]; else{ int val, bit_size, code; @@ -704,9 +704,9 @@ static void init_mv_penalty_and_fcode(MpegEncContext *s) val--; code = (val >> bit_size) + 1; if(code<33){ - len= mvtab[code][1] + 1 + bit_size; + len= ff_mvtab[code][1] + 1 + bit_size; }else{ - len= mvtab[32][1] + av_log2(code>>5) + 2 + bit_size; + len= ff_mvtab[32][1] + av_log2(code>>5) + 2 + bit_size; } } @@ -768,7 +768,7 @@ static void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab, uint8_t *len_t } } -void h263_encode_init(MpegEncContext *s) +void ff_h263_encode_init(MpegEncContext *s) { static int done = 0; @@ -776,9 +776,9 @@ void h263_encode_init(MpegEncContext *s) done = 1; init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]); - init_rl(&rl_intra_aic, ff_h263_static_rl_table_store[1]); + init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]); - init_uni_h263_rl_tab(&rl_intra_aic, NULL, uni_h263_intra_aic_rl_len); + init_uni_h263_rl_tab(&ff_rl_intra_aic, NULL, uni_h263_intra_aic_rl_len); init_uni_h263_rl_tab(&ff_h263_rl_inter , NULL, uni_h263_inter_rl_len); init_mv_penalty_and_fcode(s); diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index e15c348454..629430b54a 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -651,13 +651,13 @@ try_again: if ((cbpc & 16) == 0) { /* 16x16 motion prediction */ - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); if(!s->mcsel){ - mx = h263_decode_motion(s, pred_x, s->f_code); + mx = ff_h263_decode_motion(s, pred_x, s->f_code); if (mx >= 0xffff) return -1; - my = h263_decode_motion(s, pred_y, s->f_code); + my = ff_h263_decode_motion(s, pred_y, s->f_code); if (my >= 0xffff) return -1; s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; @@ -675,12 +675,12 @@ try_again: int i; s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; for(i=0;i<4;i++) { - int16_t *mot_val= h263_pred_motion(s, i, 0, &pred_x, &pred_y); - mx = h263_decode_motion(s, pred_x, s->f_code); + int16_t *mot_val= ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); + mx = ff_h263_decode_motion(s, pred_x, s->f_code); if (mx >= 0xffff) return -1; - my = h263_decode_motion(s, pred_y, s->f_code); + my = ff_h263_decode_motion(s, pred_y, s->f_code); if (my >= 0xffff) return -1; mot_val[0] = mx; @@ -1223,14 +1223,14 @@ static int mpeg4_decode_mb(MpegEncContext *s, s->field_select[0][0]= get_bits1(&s->gb); s->field_select[0][1]= get_bits1(&s->gb); - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); for(i=0; i<2; i++){ - mx = h263_decode_motion(s, pred_x, s->f_code); + mx = ff_h263_decode_motion(s, pred_x, s->f_code); if (mx >= 0xffff) return -1; - my = h263_decode_motion(s, pred_y/2, s->f_code); + my = ff_h263_decode_motion(s, pred_y/2, s->f_code); if (my >= 0xffff) return -1; @@ -1241,13 +1241,13 @@ static int mpeg4_decode_mb(MpegEncContext *s, s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 motion prediction */ s->mv_type = MV_TYPE_16X16; - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); - mx = h263_decode_motion(s, pred_x, s->f_code); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + mx = ff_h263_decode_motion(s, pred_x, s->f_code); if (mx >= 0xffff) return -1; - my = h263_decode_motion(s, pred_y, s->f_code); + my = ff_h263_decode_motion(s, pred_y, s->f_code); if (my >= 0xffff) return -1; @@ -1258,12 +1258,12 @@ static int mpeg4_decode_mb(MpegEncContext *s, s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; s->mv_type = MV_TYPE_8X8; for(i=0;i<4;i++) { - mot_val = h263_pred_motion(s, i, 0, &pred_x, &pred_y); - mx = h263_decode_motion(s, pred_x, s->f_code); + mot_val = ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); + mx = ff_h263_decode_motion(s, pred_x, s->f_code); if (mx >= 0xffff) return -1; - my = h263_decode_motion(s, pred_y, s->f_code); + my = ff_h263_decode_motion(s, pred_y, s->f_code); if (my >= 0xffff) return -1; s->mv[0][i][0] = mx; @@ -1359,8 +1359,8 @@ static int mpeg4_decode_mb(MpegEncContext *s, if(USES_LIST(mb_type, 0)){ s->mv_dir = MV_DIR_FORWARD; - mx = h263_decode_motion(s, s->last_mv[0][0][0], s->f_code); - my = h263_decode_motion(s, s->last_mv[0][0][1], s->f_code); + mx = ff_h263_decode_motion(s, s->last_mv[0][0][0], s->f_code); + my = ff_h263_decode_motion(s, s->last_mv[0][0][1], s->f_code); s->last_mv[0][1][0]= s->last_mv[0][0][0]= s->mv[0][0][0] = mx; s->last_mv[0][1][1]= s->last_mv[0][0][1]= s->mv[0][0][1] = my; } @@ -1368,8 +1368,8 @@ static int mpeg4_decode_mb(MpegEncContext *s, if(USES_LIST(mb_type, 1)){ s->mv_dir |= MV_DIR_BACKWARD; - mx = h263_decode_motion(s, s->last_mv[1][0][0], s->b_code); - my = h263_decode_motion(s, s->last_mv[1][0][1], s->b_code); + mx = ff_h263_decode_motion(s, s->last_mv[1][0][0], s->b_code); + my = ff_h263_decode_motion(s, s->last_mv[1][0][1], s->b_code); s->last_mv[1][1][0]= s->last_mv[1][0][0]= s->mv[1][0][0] = mx; s->last_mv[1][1][1]= s->last_mv[1][0][1]= s->mv[1][0][1] = my; } @@ -1380,8 +1380,8 @@ static int mpeg4_decode_mb(MpegEncContext *s, s->mv_dir = MV_DIR_FORWARD; for(i=0; i<2; i++){ - mx = h263_decode_motion(s, s->last_mv[0][i][0] , s->f_code); - my = h263_decode_motion(s, s->last_mv[0][i][1]/2, s->f_code); + mx = ff_h263_decode_motion(s, s->last_mv[0][i][0] , s->f_code); + my = ff_h263_decode_motion(s, s->last_mv[0][i][1]/2, s->f_code); s->last_mv[0][i][0]= s->mv[0][i][0] = mx; s->last_mv[0][i][1]= (s->mv[0][i][1] = my)*2; } @@ -1391,8 +1391,8 @@ static int mpeg4_decode_mb(MpegEncContext *s, s->mv_dir |= MV_DIR_BACKWARD; for(i=0; i<2; i++){ - mx = h263_decode_motion(s, s->last_mv[1][i][0] , s->b_code); - my = h263_decode_motion(s, s->last_mv[1][i][1]/2, s->b_code); + mx = ff_h263_decode_motion(s, s->last_mv[1][i][0] , s->b_code); + my = ff_h263_decode_motion(s, s->last_mv[1][i][1]/2, s->b_code); s->last_mv[1][i][0]= s->mv[1][i][0] = mx; s->last_mv[1][i][1]= (s->mv[1][i][1] = my)*2; } @@ -1404,8 +1404,8 @@ static int mpeg4_decode_mb(MpegEncContext *s, if(IS_SKIP(mb_type)) mx=my=0; else{ - mx = h263_decode_motion(s, 0, 1); - my = h263_decode_motion(s, 0, 1); + mx = ff_h263_decode_motion(s, 0, 1); + my = ff_h263_decode_motion(s, 0, 1); } s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT; diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 41c153d0b0..523cbfd08b 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -693,7 +693,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } /* motion vectors: 16x16 mode */ - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); ff_h263_encode_motion_vector(s, motion_x - pred_x, motion_y - pred_y, s->f_code); @@ -717,7 +717,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } /* motion vectors: 16x8 interlaced mode */ - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); pred_y /=2; put_bits(&s->pb, 1, s->field_select[0][0]); @@ -745,7 +745,7 @@ void mpeg4_encode_mb(MpegEncContext * s, for(i=0; i<4; i++){ /* motion vectors: 8x8 mode*/ - h263_pred_motion(s, i, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); ff_h263_encode_motion_vector(s, s->current_picture.f.motion_val[0][ s->block_index[i] ][0] - pred_x, s->current_picture.f.motion_val[0][ s->block_index[i] ][1] - pred_y, s->f_code); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 2e0e9820f9..709b3df51e 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -658,7 +658,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) case CODEC_ID_H263: if (!CONFIG_H263_ENCODER) return -1; - if (ff_match_2uint16(h263_format, FF_ARRAY_ELEMS(h263_format), + if (ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format), s->width, s->height) == 8) { av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for " @@ -786,7 +786,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) if (CONFIG_H261_ENCODER && s->out_format == FMT_H261) ff_h261_encode_init(s); if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) - h263_encode_init(s); + ff_h263_encode_init(s); if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version) ff_msmpeg4_encode_init(s); if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) @@ -2020,7 +2020,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, case CODEC_ID_RV10: case CODEC_ID_RV20: if (CONFIG_H263_ENCODER) - h263_encode_mb(s, s->block, motion_x, motion_y); + ff_h263_encode_mb(s, s->block, motion_x, motion_y); break; case CODEC_ID_MJPEG: if (CONFIG_MJPEG_ENCODER) @@ -2450,7 +2450,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ case CODEC_ID_H263: case CODEC_ID_H263P: if (CONFIG_H263_ENCODER) - h263_encode_gob_header(s, mb_y); + ff_h263_encode_gob_header(s, mb_y); break; } @@ -3200,7 +3200,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1) ff_flv_encode_picture_header(s, picture_number); else if (CONFIG_H263_ENCODER) - h263_encode_picture_header(s, picture_number); + ff_h263_encode_picture_header(s, picture_number); break; case FMT_MPEG1: if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 11a191570e..b4fcc00a74 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -507,7 +507,7 @@ static void msmpeg4v2_encode_motion(MpegEncContext * s, int val) if (val == 0) { /* zero vector */ code = 0; - put_bits(&s->pb, mvtab[code][1], mvtab[code][0]); + put_bits(&s->pb, ff_mvtab[code][1], ff_mvtab[code][0]); } else { bit_size = s->f_code - 1; range = 1 << bit_size; @@ -526,7 +526,7 @@ static void msmpeg4v2_encode_motion(MpegEncContext * s, int val) code = (val >> bit_size) + 1; bits = val & (range - 1); - put_bits(&s->pb, mvtab[code][1] + 1, (mvtab[code][0] << 1) | sign); + put_bits(&s->pb, ff_mvtab[code][1] + 1, (ff_mvtab[code][0] << 1) | sign); if (bit_size > 0) { put_bits(&s->pb, bit_size, bits); } @@ -575,7 +575,7 @@ void msmpeg4_encode_mb(MpegEncContext * s, s->misc_bits += get_bits_diff(s); - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); msmpeg4v2_encode_motion(s, motion_x - pred_x); msmpeg4v2_encode_motion(s, motion_y - pred_y); }else{ @@ -586,7 +586,7 @@ void msmpeg4_encode_mb(MpegEncContext * s, s->misc_bits += get_bits_diff(s); /* motion vector */ - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); ff_msmpeg4_encode_motion(s, motion_x - pred_x, motion_y - pred_y); } @@ -1134,7 +1134,7 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) cbp|= cbpy<<2; if(s->msmpeg4_version==1 || (cbp&3) != 3) cbp^= 0x3C; - h263_pred_motion(s, 0, 0, &mx, &my); + ff_h263_pred_motion(s, 0, 0, &mx, &my); mx= msmpeg4v2_decode_motion(s, mx, 1); my= msmpeg4v2_decode_motion(s, my, 1); @@ -1220,7 +1220,7 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) s->rl_table_index = decode012(&s->gb); s->rl_chroma_table_index = s->rl_table_index; } - h263_pred_motion(s, 0, 0, &mx, &my); + ff_h263_pred_motion(s, 0, 0, &mx, &my); if (ff_msmpeg4_decode_motion(s, &mx, &my) < 0) return -1; s->mv_dir = MV_DIR_FORWARD; @@ -1316,8 +1316,8 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) &v2_mb_type[0][1], 2, 1, &v2_mb_type[0][0], 2, 1, 128); INIT_VLC_STATIC(&v2_mv_vlc, V2_MV_VLC_BITS, 33, - &mvtab[0][1], 2, 1, - &mvtab[0][0], 2, 1, 538); + &ff_mvtab[0][1], 2, 1, + &ff_mvtab[0][0], 2, 1, 538); INIT_VLC_STATIC(&ff_mb_non_intra_vlc[0], MB_NON_INTRA_VLC_BITS, 128, &wmv2_inter_table[0][0][1], 8, 4, diff --git a/libavcodec/msmpeg4data.c b/libavcodec/msmpeg4data.c index 6799a9ccd2..e51c72596f 100644 --- a/libavcodec/msmpeg4data.c +++ b/libavcodec/msmpeg4data.c @@ -592,9 +592,9 @@ static const int8_t table4_run[168] = { 29, 30, 31, 32, 33, 34, 35, 36, }; -extern const uint16_t inter_vlc[103][2]; -extern const int8_t inter_level[102]; -extern const int8_t inter_run[102]; +extern const uint16_t ff_inter_vlc[103][2]; +extern const int8_t ff_inter_level[102]; +extern const int8_t ff_inter_run[102]; extern const uint16_t ff_mpeg4_intra_vlc[103][2]; extern const int8_t ff_mpeg4_intra_level[102]; @@ -647,9 +647,9 @@ RLTable rl_table[NB_RL_TABLES] = { { 102, 58, - inter_vlc, - inter_run, - inter_level, + ff_inter_vlc, + ff_inter_run, + ff_inter_level, }, }; diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 1d7fd6b468..e2dc8e1712 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -471,7 +471,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) if (MPV_common_init(s) < 0) return -1; - h263_decode_init_vlc(s); + ff_h263_decode_init_vlc(s); /* init rv vlc */ if (!done) { diff --git a/libavcodec/rv34data.h b/libavcodec/rv34data.h index 41c5b20ad7..30641249da 100644 --- a/libavcodec/rv34data.h +++ b/libavcodec/rv34data.h @@ -101,7 +101,7 @@ static const uint8_t rv34_quant_to_vlc_set[2][31] = { /** * table for obtaining the quantizer difference - * @todo Use with modified_quant_tab from h263data.h. + * @todo Use with ff_modified_quant_tab from h263data.h. */ static const uint8_t rv34_dquant_tab[2][32]={ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index cd60c3a512..05b6f0fa86 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -199,7 +199,7 @@ static av_cold int encode_init(AVCodecContext *avctx) s->m.me.map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); s->m.obmc_scratchpad= av_mallocz(MB_SIZE*MB_SIZE*12*sizeof(uint32_t)); - h263_encode_init(&s->m); //mv_penalty + ff_h263_encode_init(&s->m); //mv_penalty s->max_ref_frames = FFMAX(FFMIN(avctx->refs, MAX_REF_FRAMES), 1); diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 69dbd1b25d..1cbf1f51c9 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -43,7 +43,7 @@ #undef NDEBUG #include -extern const uint8_t mvtab[33][2]; +extern const uint8_t ff_mvtab[33][2]; static VLC svq1_block_type; static VLC svq1_motion_component; @@ -769,8 +769,8 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx) &ff_svq1_block_type_vlc[0][0], 2, 1, 6); INIT_VLC_STATIC(&svq1_motion_component, 7, 33, - &mvtab[0][1], 2, 1, - &mvtab[0][0], 2, 1, 176); + &ff_mvtab[0][1], 2, 1, + &ff_mvtab[0][0], 2, 1, 176); for (i = 0; i < 6; i++) { static const uint8_t sizes[2][6] = {{14, 10, 14, 18, 16, 18}, {10, 10, 14, 14, 14, 16}}; diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 80bae3cc85..ef136b94f0 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -402,7 +402,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane int mx, my, pred_x, pred_y, dxy; int16_t *motion_ptr; - motion_ptr= h263_pred_motion(&s->m, 0, 0, &pred_x, &pred_y); + motion_ptr= ff_h263_pred_motion(&s->m, 0, 0, &pred_x, &pred_y); if(s->m.mb_type[x + y*s->m.mb_stride]&CANDIDATE_MB_TYPE_INTER){ for(i=0; i<6; i++) init_put_bits(&s->reorder_pb[i], reorder_buffer[1][i], 7*32); @@ -492,7 +492,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); s->mb_type = av_mallocz((s->y_block_width+1)*s->y_block_height*sizeof(int16_t)); s->dummy = av_mallocz((s->y_block_width+1)*s->y_block_height*sizeof(int32_t)); - h263_encode_init(&s->m); //mv_penalty + ff_h263_encode_init(&s->m); //mv_penalty return 0; } diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index 9879cb87e9..78acad13b0 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -171,7 +171,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, wmv2_inter_table[w->cbp_table_index][cbp + 64][0]); /* motion vector */ - h263_pred_motion(s, 0, 0, &pred_x, &pred_y); + ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); ff_msmpeg4_encode_motion(s, motion_x - pred_x, motion_y - pred_y); } else { -- cgit v1.2.1 From e96b4a53df101403c54e329abfadad2edddc47c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 9 Feb 2012 11:37:58 +0200 Subject: vlc/rl: Add ff_ prefix to the nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/4xm.c | 2 +- libavcodec/bitstream.c | 6 +++--- libavcodec/cook.c | 6 +++--- libavcodec/dnxhddec.c | 12 ++++++------ libavcodec/dv.c | 2 +- libavcodec/faxcompr.c | 10 +++++----- libavcodec/fraps.c | 4 ++-- libavcodec/get_bits.h | 12 ++++++------ libavcodec/h261dec.c | 2 +- libavcodec/h261enc.c | 2 +- libavcodec/huffman.c | 2 +- libavcodec/huffyuv.c | 12 ++++++------ libavcodec/indeo5.c | 2 +- libavcodec/ituh263dec.c | 4 ++-- libavcodec/ituh263enc.c | 4 ++-- libavcodec/ivi_common.c | 4 ++-- libavcodec/mimic.c | 2 +- libavcodec/mjpegdec.c | 10 +++++----- libavcodec/motionpixels.c | 2 +- libavcodec/mpc8.c | 4 ++-- libavcodec/mpeg12.c | 4 ++-- libavcodec/mpeg12enc.c | 4 ++-- libavcodec/mpeg4videodec.c | 6 +++--- libavcodec/mpeg4videoenc.c | 2 +- libavcodec/mpegvideo.c | 6 +++--- libavcodec/msmpeg4.c | 4 ++-- libavcodec/rl.h | 6 +++--- libavcodec/rv34.c | 8 ++++---- libavcodec/rv40.c | 16 ++++++++-------- libavcodec/smacker.c | 6 +++--- libavcodec/truemotion2.c | 2 +- libavcodec/utvideo.c | 12 ++++++------ libavcodec/vorbisdec.c | 2 +- libavcodec/vp3.c | 18 +++++++++--------- libavcodec/vp6.c | 8 ++++---- libavcodec/wma.c | 6 +++--- 36 files changed, 107 insertions(+), 107 deletions(-) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 8d7db98653..e120bb0861 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -918,7 +918,7 @@ static av_cold int decode_end(AVCodecContext *avctx) av_freep(&f->cfrm[i].data); f->cfrm[i].allocated_size = 0; } - free_vlc(&f->pre_vlc); + ff_free_vlc(&f->pre_vlc); if (f->current_picture.data[0]) avctx->release_buffer(avctx, &f->current_picture); if (f->last_picture.data[0]) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 8ac4802961..f77b9c4e3f 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -253,9 +253,9 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, (byte/word/long) to store the 'bits', 'codes', and 'symbols' tables. 'use_static' should be set to 1 for tables, which should be freed - with av_free_static(), 0 if free_vlc() will be used. + with av_free_static(), 0 if ff_free_vlc() will be used. */ -int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, +int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, @@ -318,7 +318,7 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, } -void free_vlc(VLC *vlc) +void ff_free_vlc(VLC *vlc) { av_freep(&vlc->table); } diff --git a/libavcodec/cook.c b/libavcodec/cook.c index d2ed819b83..8b6e116365 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -321,11 +321,11 @@ static av_cold int cook_decode_close(AVCodecContext *avctx) /* Free the VLC tables. */ for (i = 0; i < 13; i++) - free_vlc(&q->envelope_quant_index[i]); + ff_free_vlc(&q->envelope_quant_index[i]); for (i = 0; i < 7; i++) - free_vlc(&q->sqvh[i]); + ff_free_vlc(&q->sqvh[i]); for (i = 0; i < q->num_subpackets; i++) - free_vlc(&q->subpacket[i].ccpl); + ff_free_vlc(&q->subpacket[i].ccpl); av_log(avctx, AV_LOG_DEBUG, "Memory deallocated.\n"); diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 956196ce64..bf5acf3260 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -79,9 +79,9 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid) } ctx->cid_table = &ff_dnxhd_cid_table[index]; - free_vlc(&ctx->ac_vlc); - free_vlc(&ctx->dc_vlc); - free_vlc(&ctx->run_vlc); + ff_free_vlc(&ctx->ac_vlc); + ff_free_vlc(&ctx->dc_vlc); + ff_free_vlc(&ctx->run_vlc); init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257, ctx->cid_table->ac_bits, 1, 1, @@ -391,9 +391,9 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) if (ctx->picture.data[0]) avctx->release_buffer(avctx, &ctx->picture); - free_vlc(&ctx->ac_vlc); - free_vlc(&ctx->dc_vlc); - free_vlc(&ctx->run_vlc); + ff_free_vlc(&ctx->ac_vlc); + ff_free_vlc(&ctx->dc_vlc); + ff_free_vlc(&ctx->run_vlc); return 0; } diff --git a/libavcodec/dv.c b/libavcodec/dv.c index db231fb2bb..cd55378294 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -313,7 +313,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx) dv_rl_vlc[i].level = level; dv_rl_vlc[i].run = run; } - free_vlc(&dv_vlc); + ff_free_vlc(&dv_vlc); dv_vlc_map_tableinit(); } diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c index e59dad676a..a0fa82551e 100644 --- a/libavcodec/faxcompr.c +++ b/libavcodec/faxcompr.c @@ -110,11 +110,11 @@ av_cold void ff_ccitt_unpack_init(void) ccitt_vlc[1].table = code_table2; ccitt_vlc[1].table_allocated = 648; for(i = 0; i < 2; i++){ - init_vlc_sparse(&ccitt_vlc[i], 9, CCITT_SYMS, - ccitt_codes_lens[i], 1, 1, - ccitt_codes_bits[i], 1, 1, - ccitt_syms, 2, 2, - INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_sparse(&ccitt_vlc[i], 9, CCITT_SYMS, + ccitt_codes_lens[i], 1, 1, + ccitt_codes_bits[i], 1, 1, + ccitt_syms, 2, 2, + INIT_VLC_USE_NEW_STATIC); } INIT_VLC_STATIC(&ccitt_group3_2d_vlc, 9, 11, ccitt_group3_2d_lens, 1, 1, diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 5f5e55e8ff..807f3c06b3 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -113,13 +113,13 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w, if(j) dst[i] += dst[i - stride]; else if(Uoff) dst[i] += 0x80; if (get_bits_left(&gb) < 0) { - free_vlc(&vlc); + ff_free_vlc(&vlc); return AVERROR_INVALIDDATA; } } dst += stride; } - free_vlc(&vlc); + ff_free_vlc(&vlc); return 0; } diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 1668600b2d..158e6d2e69 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -364,19 +364,19 @@ static inline void align_get_bits(GetBitContext *s) bits, bits_wrap, bits_size, \ codes, codes_wrap, codes_size, \ flags) \ - init_vlc_sparse(vlc, nb_bits, nb_codes, \ - bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, \ - NULL, 0, 0, flags) + ff_init_vlc_sparse(vlc, nb_bits, nb_codes, \ + bits, bits_wrap, bits_size, \ + codes, codes_wrap, codes_size, \ + NULL, 0, 0, flags) -int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, +int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags); #define INIT_VLC_LE 2 #define INIT_VLC_USE_NEW_STATIC 4 -void free_vlc(VLC *vlc); +void ff_free_vlc(VLC *vlc); #define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size) do { \ static VLC_TYPE table[static_size][2]; \ diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 66ea4be2a1..a71a202258 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -66,7 +66,7 @@ static av_cold void h261_decode_init_vlc(H261Context *h){ INIT_VLC_STATIC(&h261_cbp_vlc, H261_CBP_VLC_BITS, 63, &h261_cbp_tab[0][1], 2, 1, &h261_cbp_tab[0][0], 2, 1, 512); - init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); + ff_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); INIT_VLC_RL(h261_rl_tcoeff, 552); } } diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index 1072d9eabc..43bc85cc59 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -240,7 +240,7 @@ void ff_h261_encode_init(MpegEncContext *s){ if (!done) { done = 1; - init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); + ff_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); } s->min_qcoeff= -127; diff --git a/libavcodec/huffman.c b/libavcodec/huffman.c index 4fb6530d39..9446332b7d 100644 --- a/libavcodec/huffman.c +++ b/libavcodec/huffman.c @@ -61,7 +61,7 @@ static int build_huff_tree(VLC *vlc, Node *nodes, int head, int flags) int pos = 0; get_tree_codes(bits, lens, xlat, nodes, head, 0, 0, &pos, no_zero_count); - return init_vlc_sparse(vlc, 9, pos, lens, 2, 2, bits, 4, 4, xlat, 1, 1, 0); + return ff_init_vlc_sparse(vlc, 9, pos, lens, 2, 2, bits, 4, 4, xlat, 1, 1, 0); } diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 57b5f32fc8..dc3276e266 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -294,8 +294,8 @@ static void generate_joint_tables(HYuvContext *s){ i++; } } - free_vlc(&s->vlc[3+p]); - init_vlc_sparse(&s->vlc[3+p], VLC_BITS, i, len, 1, 1, bits, 2, 2, symbols, 2, 2, 0); + ff_free_vlc(&s->vlc[3+p]); + ff_init_vlc_sparse(&s->vlc[3+p], VLC_BITS, i, len, 1, 1, bits, 2, 2, symbols, 2, 2, 0); } }else{ uint8_t (*map)[4] = (uint8_t(*)[4])s->pix_bgr_map; @@ -335,7 +335,7 @@ static void generate_joint_tables(HYuvContext *s){ } } } - free_vlc(&s->vlc[3]); + ff_free_vlc(&s->vlc[3]); init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1, bits, 2, 2, 0); } } @@ -352,7 +352,7 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){ if(generate_bits_table(s->bits[i], s->len[i])<0){ return -1; } - free_vlc(&s->vlc[i]); + ff_free_vlc(&s->vlc[i]); init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0); } @@ -384,7 +384,7 @@ static int read_old_huffman_tables(HYuvContext *s){ memcpy(s->len[2] , s->len [1], 256*sizeof(uint8_t)); for(i=0; i<3; i++){ - free_vlc(&s->vlc[i]); + ff_free_vlc(&s->vlc[i]); init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0); } @@ -1218,7 +1218,7 @@ static av_cold int decode_end(AVCodecContext *avctx) av_freep(&s->bitstream_buffer); for(i=0; i<6; i++){ - free_vlc(&s->vlc[i]); + ff_free_vlc(&s->vlc[i]); } return 0; diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index 5263251f8d..deb76b9795 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -813,7 +813,7 @@ static av_cold int decode_close(AVCodecContext *avctx) ff_ivi_free_buffers(&ctx->planes[0]); if (ctx->mb_vlc.cust_tab.table) - free_vlc(&ctx->mb_vlc.cust_tab); + ff_free_vlc(&ctx->mb_vlc.cust_tab); if (ctx->frame.data[0]) avctx->release_buffer(avctx, &ctx->frame); diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 144d035e0e..5ff3c62a25 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -120,8 +120,8 @@ void ff_h263_decode_init_vlc(MpegEncContext *s) INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 33, &ff_mvtab[0][1], 2, 1, &ff_mvtab[0][0], 2, 1, 538); - init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]); - init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]); + ff_init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]); + ff_init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]); INIT_VLC_RL(ff_h263_rl_inter, 554); INIT_VLC_RL(ff_rl_intra_aic, 554); INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 5b247dce07..752b3073a3 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -775,8 +775,8 @@ void ff_h263_encode_init(MpegEncContext *s) if (!done) { done = 1; - init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]); - init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]); + ff_init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]); + ff_init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]); init_uni_h263_rl_tab(&ff_rl_intra_aic, NULL, uni_h263_intra_aic_rl_len); init_uni_h263_rl_tab(&ff_h263_rl_inter , NULL, uni_h263_inter_rl_len); diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c index eedcd28ada..670be5e7f2 100644 --- a/libavcodec/ivi_common.c +++ b/libavcodec/ivi_common.c @@ -132,7 +132,7 @@ int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab, ff_ivi_huff_desc_copy(&huff_tab->cust_desc, &new_huff); if (huff_tab->cust_tab.table) - free_vlc(&huff_tab->cust_tab); + ff_free_vlc(&huff_tab->cust_tab); result = ff_ivi_create_huff_from_desc(&huff_tab->cust_desc, &huff_tab->cust_tab, 0); if (result) { @@ -237,7 +237,7 @@ void av_cold ff_ivi_free_buffers(IVIPlaneDesc *planes) av_freep(&planes[p].bands[b].bufs[2]); if (planes[p].bands[b].blk_vlc.cust_tab.table) - free_vlc(&planes[p].bands[b].blk_vlc.cust_tab); + ff_free_vlc(&planes[p].bands[b].blk_vlc.cust_tab); for (t = 0; t < planes[p].bands[b].num_tiles; t++) av_freep(&planes[p].bands[b].tiles[t].mbs); av_freep(&planes[p].bands[b].tiles); diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index b93f51fa3e..08d8d2a894 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -412,7 +412,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) for(i = 0; i < 16; i++) if(ctx->buf_ptrs[i].data[0]) ff_thread_release_buffer(avctx, &ctx->buf_ptrs[i]); - free_vlc(&ctx->vlc); + ff_free_vlc(&ctx->vlc); return 0; } diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 48a872bdb7..8e9f3f3d45 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -62,8 +62,8 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table, if (is_ac) huff_sym[0] = 16 * 256; - return init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1, - huff_code, 2, 2, huff_sym, 2, 2, use_static); + return ff_init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1, + huff_code, 2, 2, huff_sym, 2, 2, use_static); } static void build_basic_mjpeg_vlc(MJpegDecodeContext *s) @@ -191,7 +191,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) len -= n; /* build VLC and flush previous vlc if present */ - free_vlc(&s->vlcs[class][index]); + ff_free_vlc(&s->vlcs[class][index]); av_log(s->avctx, AV_LOG_DEBUG, "class=%d index=%d nb_codes=%d\n", class, index, code_max + 1); if (build_vlc(&s->vlcs[class][index], bits_table, val_table, @@ -199,7 +199,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) return -1; if (class > 0) { - free_vlc(&s->vlcs[2][index]); + ff_free_vlc(&s->vlcs[2][index]); if (build_vlc(&s->vlcs[2][index], bits_table, val_table, code_max + 1, 0, 0) < 0) return -1; @@ -1632,7 +1632,7 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx) for (i = 0; i < 3; i++) { for (j = 0; j < 4; j++) - free_vlc(&s->vlcs[i][j]); + ff_free_vlc(&s->vlcs[i][j]); } for (i = 0; i < MAX_COMPONENTS; i++) { av_freep(&s->blocks[i]); diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index d054e00342..24e6018b51 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -286,7 +286,7 @@ static int mp_decode_frame(AVCodecContext *avctx, if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0)) goto end; mp_decode_frame_helper(mp, &gb); - free_vlc(&mp->vlc); + ff_free_vlc(&mp->vlc); end: *data_size = sizeof(AVFrame); diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index b97f3ed62c..f5eb4d6651 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -182,13 +182,13 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) q3_vlc[0].table = q3_0_table; q3_vlc[0].table_allocated = 512; - init_vlc_sparse(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE, + ff_init_vlc_sparse(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE, mpc8_q3_bits, 1, 1, mpc8_q3_codes, 1, 1, mpc8_q3_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); q3_vlc[1].table = q3_1_table; q3_vlc[1].table_allocated = 516; - init_vlc_sparse(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE, + ff_init_vlc_sparse(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE, mpc8_q4_bits, 1, 1, mpc8_q4_codes, 1, 1, mpc8_q4_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 4515ef04a7..da4dd2c170 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -693,8 +693,8 @@ av_cold void ff_mpeg12_init_vlcs(void) INIT_VLC_STATIC(&mb_btype_vlc, MB_BTYPE_VLC_BITS, 11, &table_mb_btype[0][1], 2, 1, &table_mb_btype[0][0], 2, 1, 64); - init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]); - init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]); + ff_init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]); + ff_init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]); INIT_2D_VLC_RL(ff_rl_mpeg1, 680); INIT_2D_VLC_RL(ff_rl_mpeg2, 674); diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 81d366d810..7ac8ce0e79 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -715,8 +715,8 @@ void ff_mpeg1_encode_init(MpegEncContext *s) int i; done=1; - init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]); - init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]); + ff_init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]); + ff_init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]); for(i=0; i<64; i++) { diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 629430b54a..b243a23be7 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2205,9 +2205,9 @@ static av_cold int decode_init(AVCodecContext *avctx) if (!done) { done = 1; - init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]); - init_rl(&rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]); - init_rl(&rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]); + ff_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]); + ff_init_rl(&rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]); + ff_init_rl(&rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]); INIT_VLC_RL(ff_mpeg4_rl_intra, 554); INIT_VLC_RL(rvlc_rl_inter, 1072); INIT_VLC_RL(rvlc_rl_intra, 1072); diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 523cbfd08b..b7c2da7a69 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1230,7 +1230,7 @@ static av_cold int encode_init(AVCodecContext *avctx) init_uni_dc_tab(); - init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]); + ff_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]); init_uni_mpeg4_rl_tab(&ff_mpeg4_rl_intra, uni_mpeg4_intra_rl_bits, uni_mpeg4_intra_rl_len); init_uni_mpeg4_rl_tab(&ff_h263_rl_inter, uni_mpeg4_inter_rl_bits, uni_mpeg4_inter_rl_len); diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d1c06c0b01..81e098cd62 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1003,8 +1003,8 @@ void MPV_common_end(MpegEncContext *s) avcodec_default_free_buffers(s->avctx); } -void init_rl(RLTable *rl, - uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3]) +void ff_init_rl(RLTable *rl, + uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3]) { int8_t max_level[MAX_RUN + 1], max_run[MAX_LEVEL + 1]; uint8_t index_run[MAX_RUN + 1]; @@ -1055,7 +1055,7 @@ void init_rl(RLTable *rl, } } -void init_vlc_rl(RLTable *rl) +void ff_init_vlc_rl(RLTable *rl) { int i, q; diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index b4fcc00a74..a58d1357a4 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -262,7 +262,7 @@ av_cold void ff_msmpeg4_encode_init(MpegEncContext *s) init_mv_table(&mv_tables[0]); init_mv_table(&mv_tables[1]); for(i=0;itable = &table_data[table_offs[num]]; vlc->table_allocated = table_offs[num + 1] - table_offs[num]; - init_vlc_sparse(vlc, FFMIN(maxbits, 9), realsize, - bits2, 1, 1, - cw, 2, 2, - syms, 2, 2, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_sparse(vlc, FFMIN(maxbits, 9), realsize, + bits2, 1, 1, + cw, 2, 2, + syms, 2, 2, INIT_VLC_USE_NEW_STATIC); } /** diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 04cc4bcfa9..142259ffc0 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -80,18 +80,18 @@ static av_cold void rv40_init_tables(void) for(i = 0; i < NUM_PTYPE_VLCS; i++){ ptype_vlc[i].table = &ptype_table[i << PTYPE_VLC_BITS]; ptype_vlc[i].table_allocated = 1 << PTYPE_VLC_BITS; - init_vlc_sparse(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE, - ptype_vlc_bits[i], 1, 1, - ptype_vlc_codes[i], 1, 1, - ptype_vlc_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_sparse(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE, + ptype_vlc_bits[i], 1, 1, + ptype_vlc_codes[i], 1, 1, + ptype_vlc_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); } for(i = 0; i < NUM_BTYPE_VLCS; i++){ btype_vlc[i].table = &btype_table[i << BTYPE_VLC_BITS]; btype_vlc[i].table_allocated = 1 << BTYPE_VLC_BITS; - init_vlc_sparse(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE, - btype_vlc_bits[i], 1, 1, - btype_vlc_codes[i], 1, 1, - btype_vlc_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_init_vlc_sparse(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE, + btype_vlc_bits[i], 1, 1, + btype_vlc_codes[i], 1, 1, + btype_vlc_syms, 1, 1, INIT_VLC_USE_NEW_STATIC); } } diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 192466280d..c7889afb59 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -267,9 +267,9 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int *recodes = huff.values; if(vlc[0].table) - free_vlc(&vlc[0]); + ff_free_vlc(&vlc[0]); if(vlc[1].table) - free_vlc(&vlc[1]); + ff_free_vlc(&vlc[1]); av_free(tmp1.bits); av_free(tmp1.lengths); av_free(tmp1.values); @@ -718,7 +718,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, for(i = 0; i < 4; i++) { if(vlc[i].table) - free_vlc(&vlc[i]); + ff_free_vlc(&vlc[i]); av_free(h[i].bits); av_free(h[i].lengths); av_free(h[i].values); diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 4045342ffa..60e19f1d5b 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -187,7 +187,7 @@ static void tm2_free_codes(TM2Codes *code) { av_free(code->recode); if(code->vlc.table) - free_vlc(&code->vlc); + ff_free_vlc(&code->vlc); } static inline int tm2_get_token(GetBitContext *gb, TM2Codes *code) diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index 413a3743c5..2419d4f845 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -103,10 +103,10 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym) code += 0x80000000u >> (he[i].len - 1); } - return init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1, - bits, sizeof(*bits), sizeof(*bits), - codes, sizeof(*codes), sizeof(*codes), - syms, sizeof(*syms), sizeof(*syms), 0); + return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1, + bits, sizeof(*bits), sizeof(*bits), + codes, sizeof(*codes), sizeof(*codes), + syms, sizeof(*syms), sizeof(*syms), 0); } static int decode_plane(UtvideoContext *c, int plane_no, @@ -207,11 +207,11 @@ static int decode_plane(UtvideoContext *c, int plane_no, get_bits_left(&gb)); } - free_vlc(&vlc); + ff_free_vlc(&vlc); return 0; fail: - free_vlc(&vlc); + ff_free_vlc(&vlc); return AVERROR_INVALIDDATA; } diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index aa4bdff93e..1f1df91330 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -203,7 +203,7 @@ static void vorbis_free(vorbis_context *vc) for (i = 0; i < vc->codebook_count; ++i) { av_free(vc->codebooks[i].codevectors); - free_vlc(&vc->codebooks[i].vlc); + ff_free_vlc(&vc->codebooks[i].vlc); } av_freep(&vc->codebooks); diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 602b5fa7a1..da70e66ab9 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -292,17 +292,17 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx) return 0; for (i = 0; i < 16; i++) { - free_vlc(&s->dc_vlc[i]); - free_vlc(&s->ac_vlc_1[i]); - free_vlc(&s->ac_vlc_2[i]); - free_vlc(&s->ac_vlc_3[i]); - free_vlc(&s->ac_vlc_4[i]); + ff_free_vlc(&s->dc_vlc[i]); + ff_free_vlc(&s->ac_vlc_1[i]); + ff_free_vlc(&s->ac_vlc_2[i]); + ff_free_vlc(&s->ac_vlc_3[i]); + ff_free_vlc(&s->ac_vlc_4[i]); } - free_vlc(&s->superblock_run_length_vlc); - free_vlc(&s->fragment_run_length_vlc); - free_vlc(&s->mode_code_vlc); - free_vlc(&s->motion_vector_vlc); + ff_free_vlc(&s->superblock_run_length_vlc); + ff_free_vlc(&s->fragment_run_length_vlc); + ff_free_vlc(&s->mode_code_vlc); + ff_free_vlc(&s->motion_vector_vlc); /* release all frames */ vp3_decode_flush(avctx); diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c index 9433983be3..59bbca79bd 100644 --- a/libavcodec/vp6.c +++ b/libavcodec/vp6.c @@ -233,7 +233,7 @@ static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[], nodes[map[2*i+1]].count = b + !b; } - free_vlc(vlc); + ff_free_vlc(vlc); /* then build the huffman tree according to probabilities */ return ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp, FF_HUFFMAN_FLAG_HNODE_FIRST); @@ -611,11 +611,11 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx) ff_vp56_free(avctx); for (pt=0; pt<2; pt++) { - free_vlc(&s->dccv_vlc[pt]); - free_vlc(&s->runv_vlc[pt]); + ff_free_vlc(&s->dccv_vlc[pt]); + ff_free_vlc(&s->runv_vlc[pt]); for (ct=0; ct<3; ct++) for (cg=0; cg<6; cg++) - free_vlc(&s->ract_vlc[pt][ct][cg]); + ff_free_vlc(&s->ract_vlc[pt][ct][cg]); } return 0; } diff --git a/libavcodec/wma.c b/libavcodec/wma.c index 4eaf6fcc1e..1746c73a79 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -417,13 +417,13 @@ int ff_wma_end(AVCodecContext *avctx) ff_mdct_end(&s->mdct_ctx[i]); if (s->use_exp_vlc) { - free_vlc(&s->exp_vlc); + ff_free_vlc(&s->exp_vlc); } if (s->use_noise_coding) { - free_vlc(&s->hgain_vlc); + ff_free_vlc(&s->hgain_vlc); } for (i = 0; i < 2; i++) { - free_vlc(&s->coef_vlc[i]); + ff_free_vlc(&s->coef_vlc[i]); av_free(s->run_table[i]); av_free(s->level_table[i]); av_free(s->int_table[i]); -- cgit v1.2.1 From 99560a4caab1a0a13504fe0897481d7c98b432fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 11:40:48 +0200 Subject: libavcodec: Add ff_ prefix to some nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prefix the functions atrac_generate_tables, atrac_iqmf, dct_quantize_c. Signed-off-by: Martin Storsjö --- libavcodec/atrac.c | 4 ++-- libavcodec/atrac.h | 4 ++-- libavcodec/atrac1.c | 6 +++--- libavcodec/atrac3.c | 8 ++++---- libavcodec/dnxhdenc.c | 2 +- libavcodec/mpegvideo_common.h | 2 +- libavcodec/mpegvideo_enc.c | 6 +++--- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/libavcodec/atrac.c b/libavcodec/atrac.c index da6cd305fb..b9b33aad48 100644 --- a/libavcodec/atrac.c +++ b/libavcodec/atrac.c @@ -48,7 +48,7 @@ static const float qmf_48tap_half[24] = { * Generate common tables */ -void atrac_generate_tables(void) +void ff_atrac_generate_tables(void) { int i; float s; @@ -79,7 +79,7 @@ void atrac_generate_tables(void) */ -void atrac_iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float *delayBuf, float *temp) +void ff_atrac_iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float *delayBuf, float *temp) { int i, j; float *p1, *p3; diff --git a/libavcodec/atrac.h b/libavcodec/atrac.h index 2223a5e620..39fb331ca7 100644 --- a/libavcodec/atrac.h +++ b/libavcodec/atrac.h @@ -30,7 +30,7 @@ extern float ff_atrac_sf_table[64]; -void atrac_generate_tables(void); -void atrac_iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float *delayBuf, float *temp); +void ff_atrac_generate_tables(void); +void ff_atrac_iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float *delayBuf, float *temp); #endif /* AVCODEC_ATRAC_H */ diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 9ead80d5c8..7078ce6a85 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -262,14 +262,14 @@ static void at1_subband_synthesis(AT1Ctx *q, AT1SUCtx* su, float *pOut) float iqmf_temp[512 + 46]; /* combine low and middle bands */ - atrac_iqmf(q->bands[0], q->bands[1], 128, temp, su->fst_qmf_delay, iqmf_temp); + ff_atrac_iqmf(q->bands[0], q->bands[1], 128, temp, su->fst_qmf_delay, iqmf_temp); /* delay the signal of the high band by 23 samples */ memcpy( su->last_qmf_delay, &su->last_qmf_delay[256], sizeof(float) * 23); memcpy(&su->last_qmf_delay[23], q->bands[2], sizeof(float) * 256); /* combine (low + middle) and high bands */ - atrac_iqmf(temp, su->last_qmf_delay, 256, pOut, su->snd_qmf_delay, iqmf_temp); + ff_atrac_iqmf(temp, su->last_qmf_delay, 256, pOut, su->snd_qmf_delay, iqmf_temp); } @@ -378,7 +378,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) ff_init_ff_sine_windows(5); - atrac_generate_tables(); + ff_atrac_generate_tables(); dsputil_init(&q->dsp, avctx); ff_fmt_convert_init(&q->fmt_conv, avctx); diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 6dec6a3abe..c588c07d8f 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -812,9 +812,9 @@ static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf, p2= p1+256; p3= p2+256; p4= p3+256; - atrac_iqmf (p1, p2, 256, p1, q->pUnits[i].delayBuf1, q->tempBuf); - atrac_iqmf (p4, p3, 256, p3, q->pUnits[i].delayBuf2, q->tempBuf); - atrac_iqmf (p1, p3, 512, p1, q->pUnits[i].delayBuf3, q->tempBuf); + ff_atrac_iqmf (p1, p2, 256, p1, q->pUnits[i].delayBuf1, q->tempBuf); + ff_atrac_iqmf (p4, p3, 256, p3, q->pUnits[i].delayBuf2, q->tempBuf); + ff_atrac_iqmf (p1, p3, 512, p1, q->pUnits[i].delayBuf3, q->tempBuf); } return 0; @@ -1014,7 +1014,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) return ret; } - atrac_generate_tables(); + ff_atrac_generate_tables(); /* Generate gain tables. */ for (i=0 ; i<16 ; i++) diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 322151324c..0780878d07 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -264,7 +264,7 @@ static int dnxhd_encode_init(AVCodecContext *avctx) dsputil_init(&ctx->m.dsp, avctx); ff_dct_common_init(&ctx->m); if (!ctx->m.dct_quantize) - ctx->m.dct_quantize = dct_quantize_c; + ctx->m.dct_quantize = ff_dct_quantize_c; if (ctx->cid_table->bit_depth == 10) { ctx->m.dct_quantize = dnxhd_10bit_dct_quantize; diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index faa50e6ef0..5612d4e025 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -39,7 +39,7 @@ #include "faandct.h" #include -int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); +int ff_dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); /** * Set the given MpegEncContext to common defaults (same for encoding and decoding). diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 709b3df51e..5890f8c92e 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -768,7 +768,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) return -1; if (!s->dct_quantize) - s->dct_quantize = dct_quantize_c; + s->dct_quantize = ff_dct_quantize_c; if (!s->denoise_dct) s->denoise_dct = denoise_dct_c; s->fast_dct_quantize = s->dct_quantize; @@ -1976,7 +1976,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, } // non c quantize code returns incorrect block_last_index FIXME - if (s->alternate_scan && s->dct_quantize != dct_quantize_c) { + if (s->alternate_scan && s->dct_quantize != ff_dct_quantize_c) { for (i = 0; i < mb_block_count; i++) { int j; if (s->block_last_index[i] > 0) { @@ -3940,7 +3940,7 @@ STOP_TIMER("iterative search") return last_non_zero; } -int dct_quantize_c(MpegEncContext *s, +int ff_dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow) { -- cgit v1.2.1 From 9cf0841ef35239660fc313314778414e2828f025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:06:44 +0200 Subject: dsputil: Add ff_ prefix to the dsputil*_init* functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/4xm.c | 2 +- libavcodec/aacdec.c | 2 +- libavcodec/aacenc.c | 2 +- libavcodec/ac3dec.c | 2 +- libavcodec/ac3enc.c | 2 +- libavcodec/alpha/dsputil_alpha.c | 2 +- libavcodec/alsdec.c | 2 +- libavcodec/apedec.c | 2 +- libavcodec/arm/dsputil_init_arm.c | 2 +- libavcodec/asv1.c | 2 +- libavcodec/atrac1.c | 2 +- libavcodec/atrac3.c | 2 +- libavcodec/bfin/dsputil_bfin.c | 2 +- libavcodec/bink.c | 2 +- libavcodec/binkaudio.c | 2 +- libavcodec/dca.c | 2 +- libavcodec/dnxhddec.c | 4 ++-- libavcodec/dnxhdenc.c | 2 +- libavcodec/dsputil.c | 20 ++++++++++---------- libavcodec/dsputil.h | 20 ++++++++++---------- libavcodec/dv.c | 2 +- libavcodec/eamad.c | 2 +- libavcodec/eatgq.c | 2 +- libavcodec/eatqi.c | 2 +- libavcodec/ffv1.c | 2 +- libavcodec/fraps.c | 2 +- libavcodec/h263dec.c | 2 +- libavcodec/h264.c | 4 ++-- libavcodec/huffyuv.c | 2 +- libavcodec/imc.c | 2 +- libavcodec/indeo3.c | 2 +- libavcodec/interplayvideo.c | 2 +- libavcodec/jvdec.c | 2 +- libavcodec/lagarith.c | 2 +- libavcodec/mdec.c | 2 +- libavcodec/mimic.c | 2 +- libavcodec/mips/dsputil_mmi.c | 2 +- libavcodec/mjpegdec.c | 2 +- libavcodec/mlpdec.c | 2 +- libavcodec/motion-test.c | 4 ++-- libavcodec/motionpixels.c | 2 +- libavcodec/mpc7.c | 2 +- libavcodec/mpc8.c | 2 +- libavcodec/mpegvideo.c | 2 +- libavcodec/nellymoserdec.c | 2 +- libavcodec/nellymoserenc.c | 2 +- libavcodec/nuv.c | 2 +- libavcodec/pngenc.c | 2 +- libavcodec/ppc/dsputil_altivec.c | 2 +- libavcodec/ppc/dsputil_altivec.h | 4 ++-- libavcodec/ppc/dsputil_ppc.c | 6 +++--- libavcodec/ppc/h264_altivec.c | 2 +- libavcodec/ra288.c | 2 +- libavcodec/sh4/dsputil_align.c | 2 +- libavcodec/sh4/dsputil_sh4.c | 4 ++-- libavcodec/sh4/dsputil_sh4.h | 2 +- libavcodec/snow.c | 2 +- libavcodec/sparc/dsputil_vis.c | 2 +- libavcodec/svq1enc.c | 2 +- libavcodec/truemotion2.c | 2 +- libavcodec/truespeech.c | 2 +- libavcodec/twinvq.c | 2 +- libavcodec/utils.c | 2 +- libavcodec/utvideo.c | 2 +- libavcodec/vble.c | 2 +- libavcodec/vorbisdec.c | 2 +- libavcodec/vp3.c | 2 +- libavcodec/vp56.c | 2 +- libavcodec/vp8.c | 2 +- libavcodec/wma.c | 2 +- libavcodec/wmaprodec.c | 2 +- libavcodec/x86/dsputil_mmx.c | 4 ++-- libavcodec/x86/dsputil_mmx.h | 4 ++-- libavcodec/x86/dsputilenc_mmx.c | 4 ++-- libavcodec/x86/motion_est_mmx.c | 2 +- 75 files changed, 103 insertions(+), 103 deletions(-) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index e120bb0861..139a642a47 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -880,7 +880,7 @@ static av_cold void common_init(AVCodecContext *avctx) { FourXContext * const f = avctx->priv_data; - dsputil_init(&f->dsp, avctx); + ff_dsputil_init(&f->dsp, avctx); f->avctx = avctx; } diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 1100a61d3e..f9cfb764a2 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -804,7 +804,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx) ff_aac_sbr_init(); - dsputil_init(&ac->dsp, avctx); + ff_dsputil_init(&ac->dsp, avctx); ff_fmt_convert_init(&ac->fmt_conv, avctx); ac->random_state = 0x1f2e3d4c; diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 97ebbe6bab..8686187558 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -669,7 +669,7 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s) { int ret = 0; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); // window init ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024); diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 66a9ea6299..c0d7488d84 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -167,7 +167,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) ff_mdct_init(&s->imdct_256, 8, 1, 1.0); ff_mdct_init(&s->imdct_512, 9, 1, 1.0); ff_kbd_window_init(s->window, 5.0, 256); - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT); ff_fmt_convert_init(&s->fmt_conv, avctx); av_lfg_init(&s->dith_state, 0); diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 3bf5f9405c..c577c87dda 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -2468,7 +2468,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx) avctx->coded_frame= avcodec_alloc_frame(); - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT); dprint_options(s); diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c index acd8e03f2b..dc7cef9356 100644 --- a/libavcodec/alpha/dsputil_alpha.c +++ b/libavcodec/alpha/dsputil_alpha.c @@ -268,7 +268,7 @@ static void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels, put_pixels_axp_asm(block + 8, pixels + 8, line_size, h); } -void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 2948a48b5c..d54ae87fb1 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1724,7 +1724,7 @@ static av_cold int decode_init(AVCodecContext *avctx) } } - dsputil_init(&ctx->dsp, avctx); + ff_dsputil_init(&ctx->dsp, avctx); avcodec_get_frame_defaults(&ctx->frame); avctx->coded_frame = &ctx->frame; diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 2b95874078..a9953e1b31 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -231,7 +231,7 @@ static av_cold int ape_decode_init(AVCodecContext *avctx) filter_alloc_fail); } - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; avcodec_get_frame_defaults(&s->frame); diff --git a/libavcodec/arm/dsputil_init_arm.c b/libavcodec/arm/dsputil_init_arm.c index 743be1a239..4295e7288f 100644 --- a/libavcodec/arm/dsputil_init_arm.c +++ b/libavcodec/arm/dsputil_init_arm.c @@ -73,7 +73,7 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block) ff_add_pixels_clamped(block, dest, line_size); } -void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c index 754c1aa89a..71b6fba9ae 100644 --- a/libavcodec/asv1.c +++ b/libavcodec/asv1.c @@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, static av_cold void common_init(AVCodecContext *avctx){ ASV1Context * const a = avctx->priv_data; - dsputil_init(&a->dsp, avctx); + ff_dsputil_init(&a->dsp, avctx); a->mb_width = (avctx->width + 15) / 16; a->mb_height = (avctx->height + 15) / 16; diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 7078ce6a85..1afd62680a 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -380,7 +380,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) ff_atrac_generate_tables(); - dsputil_init(&q->dsp, avctx); + ff_dsputil_init(&q->dsp, avctx); ff_fmt_convert_init(&q->fmt_conv, avctx); q->bands[0] = q->low; diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index c588c07d8f..fd036e720a 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -1037,7 +1037,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) q->matrix_coeff_index_next[i] = 3; } - dsputil_init(&dsp, avctx); + ff_dsputil_init(&dsp, avctx); ff_fmt_convert_init(&q->fmt_conv, avctx); q->pUnits = av_mallocz(sizeof(channel_unit)*q->channels); diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c index af76a0fc2c..8597ec14f4 100644 --- a/libavcodec/bfin/dsputil_bfin.c +++ b/libavcodec/bfin/dsputil_bfin.c @@ -195,7 +195,7 @@ static int bfin_pix_abs8_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_si */ -void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx ) +void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx ) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; diff --git a/libavcodec/bink.c b/libavcodec/bink.c index f38c030b7c..f8a9b5bc73 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -1298,7 +1298,7 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = c->has_alpha ? PIX_FMT_YUVA420P : PIX_FMT_YUV420P; avctx->idct_algo = FF_IDCT_BINK; - dsputil_init(&c->dsp, avctx); + ff_dsputil_init(&c->dsp, avctx); ff_binkdsp_init(&c->bdsp); init_bundles(c); diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index d73ffcdabc..18bb87b95e 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -79,7 +79,7 @@ static av_cold int decode_init(AVCodecContext *avctx) int i; int frame_len_bits; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_fmt_convert_init(&s->fmt_conv, avctx); /* determine frame length */ diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 3735b5a7fd..3f62c1e342 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -1933,7 +1933,7 @@ static av_cold int dca_decode_init(AVCodecContext *avctx) s->avctx = avctx; dca_init_vlcs(); - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_mdct_init(&s->imdct, 6, 1, 1.0); ff_synth_filter_init(&s->synth); ff_dcadsp_init(&s->dcadsp); diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index bf5acf3260..cc248eff09 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -127,7 +127,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si ctx->avctx->pix_fmt = PIX_FMT_YUV422P10; ctx->avctx->bits_per_raw_sample = 10; if (ctx->bit_depth != 10) { - dsputil_init(&ctx->dsp, ctx->avctx); + ff_dsputil_init(&ctx->dsp, ctx->avctx); ctx->bit_depth = 10; ctx->decode_dct_block = dnxhd_decode_dct_block_10; } @@ -135,7 +135,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si ctx->avctx->pix_fmt = PIX_FMT_YUV422P; ctx->avctx->bits_per_raw_sample = 8; if (ctx->bit_depth != 8) { - dsputil_init(&ctx->dsp, ctx->avctx); + ff_dsputil_init(&ctx->dsp, ctx->avctx); ctx->bit_depth = 8; ctx->decode_dct_block = dnxhd_decode_dct_block_8; } diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 0780878d07..10f3e8db9f 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -261,7 +261,7 @@ static int dnxhd_encode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample = ctx->cid_table->bit_depth; - dsputil_init(&ctx->m.dsp, avctx); + ff_dsputil_init(&ctx->m.dsp, avctx); ff_dct_common_init(&ctx->m); if (!ctx->m.dct_quantize) ctx->m.dct_quantize = ff_dct_quantize_c; diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 9f282416d4..d91885327d 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2747,7 +2747,7 @@ static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block) static void just_return(void *mem av_unused, int stride av_unused, int h av_unused) { return; } /* init static data */ -av_cold void dsputil_static_init(void) +av_cold void ff_dsputil_static_init(void) { int i; @@ -2784,7 +2784,7 @@ int ff_check_alignment(void){ return 0; } -av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) +av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) { int i; @@ -3136,14 +3136,14 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) } - if (HAVE_MMX) dsputil_init_mmx (c, avctx); - if (ARCH_ARM) dsputil_init_arm (c, avctx); - if (HAVE_VIS) dsputil_init_vis (c, avctx); - if (ARCH_ALPHA) dsputil_init_alpha (c, avctx); - if (ARCH_PPC) dsputil_init_ppc (c, avctx); - if (HAVE_MMI) dsputil_init_mmi (c, avctx); - if (ARCH_SH4) dsputil_init_sh4 (c, avctx); - if (ARCH_BFIN) dsputil_init_bfin (c, avctx); + if (HAVE_MMX) ff_dsputil_init_mmx (c, avctx); + if (ARCH_ARM) ff_dsputil_init_arm (c, avctx); + if (HAVE_VIS) ff_dsputil_init_vis (c, avctx); + if (ARCH_ALPHA) ff_dsputil_init_alpha (c, avctx); + if (ARCH_PPC) ff_dsputil_init_ppc (c, avctx); + if (HAVE_MMI) ff_dsputil_init_mmi (c, avctx); + if (ARCH_SH4) ff_dsputil_init_sh4 (c, avctx); + if (ARCH_BFIN) ff_dsputil_init_bfin (c, avctx); for(i=0; i<64; i++){ if(!c->put_2tap_qpel_pixels_tab[0][i]) diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index 786a0effcb..e915a82406 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -580,8 +580,8 @@ typedef struct DSPContext { op_fill_func fill_block_tab[2]; } DSPContext; -void dsputil_static_init(void); -void dsputil_init(DSPContext* p, AVCodecContext *avctx); +void ff_dsputil_static_init(void); +void ff_dsputil_init(DSPContext* p, AVCodecContext *avctx); int ff_check_alignment(void); @@ -640,14 +640,14 @@ static inline int get_penalty_factor(int lambda, int lambda2, int type){ } } -void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_dwt(DSPContext *c); void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx); diff --git a/libavcodec/dv.c b/libavcodec/dv.c index cd55378294..0781addaef 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -319,7 +319,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx) } /* Generic DSP setup */ - dsputil_init(&dsp, avctx); + ff_dsputil_init(&dsp, avctx); ff_set_cmp(&dsp, dsp.ildct_cmp, avctx->ildct_cmp); s->get_pixels = dsp.get_pixels; s->ildct_cmp = dsp.ildct_cmp[5]; diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index c5aa6ace79..54a93926d2 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -65,7 +65,7 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = PIX_FMT_YUV420P; if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_EA; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); ff_mpeg12_init_vlcs(); return 0; diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index e82ed32470..bd6fcf0588 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -50,7 +50,7 @@ static av_cold int tgq_decode_init(AVCodecContext *avctx){ s->avctx = avctx; if(avctx->idct_algo==FF_IDCT_AUTO) avctx->idct_algo=FF_IDCT_EA; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); avctx->time_base = (AVRational){1, 15}; avctx->pix_fmt = PIX_FMT_YUV420P; diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index 179b84d6a0..ca4e98b6bf 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -48,7 +48,7 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx) s->avctx = avctx; if(avctx->idct_algo==FF_IDCT_AUTO) avctx->idct_algo=FF_IDCT_EA; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); s->qscale = 1; avctx->time_base = (AVRational){1, 15}; diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 8a6f33f383..366de02ac8 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -659,7 +659,7 @@ static av_cold int common_init(AVCodecContext *avctx){ s->avctx= avctx; s->flags= avctx->flags; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); s->width = avctx->width; s->height= avctx->height; diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 807f3c06b3..3643325328 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -66,7 +66,7 @@ static av_cold int decode_init(AVCodecContext *avctx) s->avctx = avctx; s->tmpbuf = NULL; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); return 0; } diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 5404c90153..401596717b 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -557,7 +557,7 @@ retry: if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) { avctx->idct_algo= FF_IDCT_XVIDMMX; avctx->coded_width= 0; // force reinit -// dsputil_init(&s->dsp, avctx); +// ff_dsputil_init(&s->dsp, avctx); s->picture_number=0; } #endif diff --git a/libavcodec/h264.c b/libavcodec/h264.c index a80183b4a1..a22fd46188 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1037,7 +1037,7 @@ static av_cold void common_init(H264Context *h){ h->dequant_coeff_pps= -1; s->unrestricted_mv=1; - dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early + ff_dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early memset(h->pps.scaling_matrix4, 16, 6*16*sizeof(uint8_t)); memset(h->pps.scaling_matrix8, 16, 2*64*sizeof(uint8_t)); @@ -3941,7 +3941,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, h->sps.chroma_format_idc); ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma, h->sps.chroma_format_idc); s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16; - dsputil_init(&s->dsp, s->avctx); + ff_dsputil_init(&s->dsp, s->avctx); } else { av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma); return -1; diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index dc3276e266..ebbfc4528a 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -415,7 +415,7 @@ static av_cold int common_init(AVCodecContext *avctx){ s->avctx= avctx; s->flags= avctx->flags; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); s->width= avctx->width; s->height= avctx->height; diff --git a/libavcodec/imc.c b/libavcodec/imc.c index ff8e31e9e6..cfed7c4712 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -166,7 +166,7 @@ static av_cold int imc_decode_init(AVCodecContext * avctx) av_log(avctx, AV_LOG_INFO, "FFT init failed\n"); return ret; } - dsputil_init(&q->dsp, avctx); + ff_dsputil_init(&q->dsp, avctx); avctx->sample_fmt = AV_SAMPLE_FMT_FLT; avctx->channel_layout = AV_CH_LAYOUT_MONO; diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index d2b01f469a..4fbbfbbf51 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -990,7 +990,7 @@ static av_cold int decode_init(AVCodecContext *avctx) build_requant_tab(); - dsputil_init(&ctx->dsp, avctx); + ff_dsputil_init(&ctx->dsp, avctx); allocate_frame_buffers(ctx, avctx); diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index 724f5f1850..4a250a8f19 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -1017,7 +1017,7 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx) s->is_16bpp = avctx->bits_per_coded_sample == 16; avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); s->current_frame.data[0] = s->last_frame.data[0] = s->second_last_frame.data[0] = NULL; diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 5249764347..5d4fdea009 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -41,7 +41,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { JvContext *s = avctx->priv_data; avctx->pix_fmt = PIX_FMT_PAL8; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); return 0; } diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index 757873ead3..71b5bd950f 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -571,7 +571,7 @@ static av_cold int lag_decode_init(AVCodecContext *avctx) LagarithContext *l = avctx->priv_data; l->avctx = avctx; - dsputil_init(&l->dsp, avctx); + ff_dsputil_init(&l->dsp, avctx); return 0; } diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index a4e2020317..3ce24641d4 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -214,7 +214,7 @@ static int decode_frame(AVCodecContext *avctx, static av_cold void mdec_common_init(AVCodecContext *avctx){ MDECContext * const a = avctx->priv_data; - dsputil_init(&a->dsp, avctx); + ff_dsputil_init(&a->dsp, avctx); a->mb_width = (avctx->coded_width + 15) / 16; a->mb_height = (avctx->coded_height + 15) / 16; diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 08d8d2a894..11fe7a36e6 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -121,7 +121,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n"); return -1; } - dsputil_init(&ctx->dsp, avctx); + ff_dsputil_init(&ctx->dsp, avctx); ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, col_zag); return 0; diff --git a/libavcodec/mips/dsputil_mmi.c b/libavcodec/mips/dsputil_mmi.c index 20a435a065..ba044cf598 100644 --- a/libavcodec/mips/dsputil_mmi.c +++ b/libavcodec/mips/dsputil_mmi.c @@ -135,7 +135,7 @@ static void put_pixels16_mmi(uint8_t *block, const uint8_t *pixels, int line_siz } -void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx) { const int idct_algo= avctx->idct_algo; const int high_bit_depth = avctx->bits_per_raw_sample > 8; diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 8e9f3f3d45..27c47e9109 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -90,7 +90,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) s->picture_ptr = &s->picture; s->avctx = avctx; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); s->buffer_size = 0; s->buffer = NULL; diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 357e28728d..9a2496dcb5 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -238,7 +238,7 @@ static av_cold int mlp_decode_init(AVCodecContext *avctx) m->avctx = avctx; for (substr = 0; substr < MAX_SUBSTREAMS; substr++) m->substream[substr].lossless_check_data = 0xffffffff; - dsputil_init(&m->dsp, avctx); + ff_dsputil_init(&m->dsp, avctx); avcodec_get_frame_defaults(&m->frame); avctx->coded_frame = &m->frame; diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c index 8708636030..a22cb1eec5 100644 --- a/libavcodec/motion-test.c +++ b/libavcodec/motion-test.c @@ -144,11 +144,11 @@ int main(int argc, char **argv) ctx = avcodec_alloc_context3(NULL); ctx->dsp_mask = AV_CPU_FLAG_FORCE; - dsputil_init(&cctx, ctx); + ff_dsputil_init(&cctx, ctx); for (c = 0; c < flags_size; c++) { int x; ctx->dsp_mask = AV_CPU_FLAG_FORCE | flags[c]; - dsputil_init(&mmxctx, ctx); + ff_dsputil_init(&mmxctx, ctx); for (x = 0; x < 2; x++) { printf("%s for %dx%d pixels\n", c ? "mmx2" : "mmx", diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 24e6018b51..37c108f1f2 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -57,7 +57,7 @@ static av_cold int mp_decode_init(AVCodecContext *avctx) motionpixels_tableinit(); mp->avctx = avctx; - dsputil_init(&mp->dsp, avctx); + ff_dsputil_init(&mp->dsp, avctx); mp->changes_map = av_mallocz(avctx->width * h4); mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1; mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel)); diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 8b3a1b9a20..0739bf2b2f 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -74,7 +74,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) } memset(c->oldDSCF, 0, sizeof(c->oldDSCF)); av_lfg_init(&c->rnd, 0xDEADBEEF); - dsputil_init(&c->dsp, avctx); + ff_dsputil_init(&c->dsp, avctx); ff_mpadsp_init(&c->mpadsp); c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4); ff_mpc_init(); diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index f5eb4d6651..6d4547be48 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -118,7 +118,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) } memset(c->oldDSCF, 0, sizeof(c->oldDSCF)); av_lfg_init(&c->rnd, 0xDEADBEEF); - dsputil_init(&c->dsp, avctx); + ff_dsputil_init(&c->dsp, avctx); ff_mpadsp_init(&c->mpadsp); ff_mpc_init(); diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 81e098cd62..7ab79c3217 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -176,7 +176,7 @@ const uint8_t *avpriv_mpv_find_start_code(const uint8_t *restrict p, /* init common dct for both encoder and decoder */ av_cold int ff_dct_common_init(MpegEncContext *s) { - dsputil_init(&s->dsp, s->avctx); + ff_dsputil_init(&s->dsp, s->avctx); s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c; s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_c; diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 9d5e1c73dd..96fb0533de 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -122,7 +122,7 @@ static av_cold int decode_init(AVCodecContext * avctx) { av_lfg_init(&s->random_state, 0); ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0); - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) { s->scale_bias = 1.0/(32768*8); diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index d3715ac740..104e4079e7 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -148,7 +148,7 @@ static av_cold int encode_init(AVCodecContext *avctx) avctx->frame_size = NELLY_SAMPLES; s->avctx = avctx; ff_mdct_init(&s->mdct_ctx, 8, 0, 32768.0); - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); /* Generate overlap window */ ff_sine_window_init(ff_sine_128, 128); diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 5f601db66e..631b2edf4b 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -258,7 +258,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { c->codec_frameheader = avctx->codec_tag == MKTAG('R', 'J', 'P', 'G'); if (avctx->extradata_size) get_quant(avctx, c, avctx->extradata, avctx->extradata_size); - dsputil_init(&c->dsp, avctx); + ff_dsputil_init(&c->dsp, avctx); if (!codec_reinit(avctx, avctx->width, avctx->height, -1)) return 1; return 0; diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 9325348443..5735f1507f 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -427,7 +427,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){ avcodec_get_frame_defaults(&s->picture); avctx->coded_frame= &s->picture; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); s->filter_type = av_clip(avctx->prediction_method, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED); if(avctx->pix_fmt == PIX_FMT_MONOBLACK) diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c index 7ab533600d..20bff45c9c 100644 --- a/libavcodec/ppc/dsputil_altivec.c +++ b/libavcodec/ppc/dsputil_altivec.c @@ -1371,7 +1371,7 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int l } } -void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h index abf2dd3e0a..6040be1c17 100644 --- a/libavcodec/ppc/dsputil_altivec.h +++ b/libavcodec/ppc/dsputil_altivec.h @@ -40,9 +40,9 @@ void ff_vp3_idct_altivec(DCTELEM *block); void ff_vp3_idct_put_altivec(uint8_t *dest, int line_size, DCTELEM *block); void ff_vp3_idct_add_altivec(uint8_t *dest, int line_size, DCTELEM *block); -void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx); void float_init_altivec(DSPContext* c, AVCodecContext *avctx); void int_init_altivec(DSPContext* c, AVCodecContext *avctx); diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index 24b12ee2ae..b64c1dc03b 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -143,7 +143,7 @@ static void prefetch_ppc(void *mem, int stride, int h) } while(--h); } -void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; @@ -163,10 +163,10 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) } #if HAVE_ALTIVEC - if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx); + if(CONFIG_H264_DECODER) ff_dsputil_h264_init_ppc(c, avctx); if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { - dsputil_init_altivec(c, avctx); + ff_dsputil_init_altivec(c, avctx); float_init_altivec(c, avctx); int_init_altivec(c, avctx); c->gmc1 = gmc1_altivec; diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c index c8baee456e..6013712bdd 100644 --- a/libavcodec/ppc/h264_altivec.c +++ b/libavcodec/ppc/h264_altivec.c @@ -966,7 +966,7 @@ static void ff_biweight_h264_pixels ## W ## _altivec(uint8_t *dst, uint8_t *src, H264_WEIGHT(16) H264_WEIGHT( 8) -void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) { +void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index 4cb2493fc9..821e3811ed 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -62,7 +62,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx) { RA288Context *ractx = avctx->priv_data; avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - dsputil_init(&ractx->dsp, avctx); + ff_dsputil_init(&ractx->dsp, avctx); avcodec_get_frame_defaults(&ractx->frame); avctx->coded_frame = &ractx->frame; diff --git a/libavcodec/sh4/dsputil_align.c b/libavcodec/sh4/dsputil_align.c index 0c293a1248..b9b0121491 100644 --- a/libavcodec/sh4/dsputil_align.c +++ b/libavcodec/sh4/dsputil_align.c @@ -331,7 +331,7 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK) #endif -void dsputil_init_align(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; diff --git a/libavcodec/sh4/dsputil_sh4.c b/libavcodec/sh4/dsputil_sh4.c index 51c1a53d7d..6accb27395 100644 --- a/libavcodec/sh4/dsputil_sh4.c +++ b/libavcodec/sh4/dsputil_sh4.c @@ -89,11 +89,11 @@ static void idct_add(uint8_t *dest, int line_size, DCTELEM *block) } } -void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx) { const int idct_algo= avctx->idct_algo; const int high_bit_depth = avctx->bits_per_raw_sample > 8; - dsputil_init_align(c,avctx); + ff_dsputil_init_align(c,avctx); if (!high_bit_depth) c->clear_blocks = clear_blocks_sh4; diff --git a/libavcodec/sh4/dsputil_sh4.h b/libavcodec/sh4/dsputil_sh4.h index 5abe34557b..c838c4d6d7 100644 --- a/libavcodec/sh4/dsputil_sh4.h +++ b/libavcodec/sh4/dsputil_sh4.h @@ -23,6 +23,6 @@ #include "libavcodec/dsputil.h" void idct_sh4(DCTELEM *block); -void dsputil_init_align(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx); #endif /* AVCODEC_SH4_DSPUTIL_SH4_H */ diff --git a/libavcodec/snow.c b/libavcodec/snow.c index d7f33b4eae..27c7e25189 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -390,7 +390,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ s->avctx= avctx; s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_dwt_init(&s->dwt); #define mcf(dx,dy)\ diff --git a/libavcodec/sparc/dsputil_vis.c b/libavcodec/sparc/dsputil_vis.c index 5a9fbc2648..5d8619d876 100644 --- a/libavcodec/sparc/dsputil_vis.c +++ b/libavcodec/sparc/dsputil_vis.c @@ -3949,7 +3949,7 @@ static int vis_level(void) } /* libavcodec initialization code */ -void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx) { /* VIS-specific optimizations */ int accel = vis_level (); diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index ef136b94f0..5710b25f31 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -472,7 +472,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) { SVQ1Context * const s = avctx->priv_data; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); avctx->coded_frame= (AVFrame*)&s->picture; s->frame_width = avctx->width; diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 60e19f1d5b..9e45045342 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -824,7 +824,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ l->pic.data[0]=NULL; avctx->pix_fmt = PIX_FMT_BGR24; - dsputil_init(&l->dsp, avctx); + ff_dsputil_init(&l->dsp, avctx); l->last = av_malloc(4 * sizeof(int) * (avctx->width >> 2)); l->clast = av_malloc(4 * sizeof(int) * (avctx->width >> 2)); diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c index 66ca461741..df35205ed9 100644 --- a/libavcodec/truespeech.c +++ b/libavcodec/truespeech.c @@ -68,7 +68,7 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx) avctx->sample_fmt = AV_SAMPLE_FMT_S16; - dsputil_init(&c->dsp, avctx); + ff_dsputil_init(&c->dsp, avctx); avcodec_get_frame_defaults(&c->frame); avctx->coded_frame = &c->frame; diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c index 22be07a5b5..1577d77be3 100644 --- a/libavcodec/twinvq.c +++ b/libavcodec/twinvq.c @@ -1153,7 +1153,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx) return -1; } - dsputil_init(&tctx->dsp, avctx); + ff_dsputil_init(&tctx->dsp, avctx); if ((ret = init_mdct_win(tctx))) { av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n"); twin_decode_close(avctx); diff --git a/libavcodec/utils.c b/libavcodec/utils.c index e1863199c1..255406ffdd 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -109,7 +109,7 @@ static void avcodec_init(void) return; initialized = 1; - dsputil_static_init(); + ff_dsputil_static_init(); } static av_always_inline int codec_is_encoder(AVCodec *codec) diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index 2419d4f845..884b16e9be 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -505,7 +505,7 @@ static av_cold int decode_init(AVCodecContext *avctx) c->avctx = avctx; - dsputil_init(&c->dsp, avctx); + ff_dsputil_init(&c->dsp, avctx); if (avctx->extradata_size < 16) { av_log(avctx, AV_LOG_ERROR, "Insufficient extradata size %d, should be at least 16\n", diff --git a/libavcodec/vble.c b/libavcodec/vble.c index 574582af7b..5e8543bec0 100644 --- a/libavcodec/vble.c +++ b/libavcodec/vble.c @@ -191,7 +191,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) /* Stash for later use */ ctx->avctx = avctx; - dsputil_init(&ctx->dsp, avctx); + ff_dsputil_init(&ctx->dsp, avctx); avctx->pix_fmt = PIX_FMT_YUV420P; avctx->bits_per_raw_sample = 8; diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 1f1df91330..158ee4db1b 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -978,7 +978,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext) int hdr_type, ret; vc->avccontext = avccontext; - dsputil_init(&vc->dsp, avccontext); + ff_dsputil_init(&vc->dsp, avccontext); ff_fmt_convert_init(&vc->fmt_conv, avccontext); if (avccontext->request_sample_fmt == AV_SAMPLE_FMT_FLT) { diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index da70e66ab9..42bc63e501 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1677,7 +1677,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; if(avctx->idct_algo==FF_IDCT_AUTO) avctx->idct_algo=FF_IDCT_VP3; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index 3b2ac95837..c6be75d5ee 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -668,7 +668,7 @@ av_cold void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha) if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_VP3; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_vp56dsp_init(&s->vp56dsp, avctx->codec->id); ff_init_scantable(s->dsp.idct_permutation, &s->scantable,ff_zigzag_direct); diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 7cf18c07cd..b5062e6696 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1787,7 +1787,7 @@ static av_cold int vp8_decode_init(AVCodecContext *avctx) s->avctx = avctx; avctx->pix_fmt = PIX_FMT_YUV420P; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8, 1); ff_vp8dsp_init(&s->vp8dsp); diff --git a/libavcodec/wma.c b/libavcodec/wma.c index 1746c73a79..371aad574d 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -126,7 +126,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2) s->bit_rate = avctx->bit_rate; s->block_align = avctx->block_align; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_fmt_convert_init(&s->fmt_conv, avctx); if (avctx->codec->id == CODEC_ID_WMAV1) { diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index a1b82db60a..2f2cbd6de5 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -281,7 +281,7 @@ static av_cold int decode_init(AVCodecContext *avctx) int num_possible_block_sizes; s->avctx = avctx; - dsputil_init(&s->dsp, avctx); + ff_dsputil_init(&s->dsp, avctx); ff_fmt_convert_init(&s->fmt_conv, avctx); init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE); diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index c40cab51f0..2a8cad15cf 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2336,7 +2336,7 @@ extern void ff_butterflies_float_interleave_sse(float *dst, const float *src0, extern void ff_butterflies_float_interleave_avx(float *dst, const float *src0, const float *src1, int len); -void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); const int high_bit_depth = avctx->bits_per_raw_sample > 8; @@ -2844,5 +2844,5 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) } if (CONFIG_ENCODERS) - dsputilenc_init_mmx(c, avctx); + ff_dsputilenc_init_mmx(c, avctx); } diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h index 7ab55e7c51..097739cf98 100644 --- a/libavcodec/x86/dsputil_mmx.h +++ b/libavcodec/x86/dsputil_mmx.h @@ -184,8 +184,8 @@ static inline void transpose4x4(uint8_t *dst, uint8_t *src, x86_reg dst_stride, "pcmpeqd %%" #regd ", %%" #regd " \n\t" \ "psrlw $15, %%" #regd ::) -void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx); -void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx); +void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx); void ff_add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index 7362234c86..2a403ba019 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -1095,7 +1095,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si #endif //HAVE_SSSE3 -void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) +void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); int bit_depth = avctx->bits_per_raw_sample; @@ -1192,5 +1192,5 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) } } - dsputil_init_pix_mmx(c, avctx); + ff_dsputil_init_pix_mmx(c, avctx); } diff --git a/libavcodec/x86/motion_est_mmx.c b/libavcodec/x86/motion_est_mmx.c index 948af98ffb..a522a5e7ff 100644 --- a/libavcodec/x86/motion_est_mmx.c +++ b/libavcodec/x86/motion_est_mmx.c @@ -422,7 +422,7 @@ static int sad16_xy2_ ## suf(void *v, uint8_t *blk2, uint8_t *blk1, int stride, PIX_SAD(mmx) PIX_SAD(mmx2) -void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) +void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); -- cgit v1.2.1 From 3e2efacdd8a3ffb5d1c9004f112492b946284f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:10:21 +0200 Subject: libavcodec: Prefix fdct_ifast, fdct_ifast248 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/dct-test.c | 2 +- libavcodec/dsputil.c | 4 ++-- libavcodec/dsputil.h | 4 ++-- libavcodec/jfdctfst.c | 4 ++-- libavcodec/mpegvideo_enc.c | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c index daa95bd0df..7aa2292987 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/dct-test.c @@ -87,7 +87,7 @@ static int cpu_flags; static const struct algo fdct_tab[] = { { "REF-DBL", ff_ref_fdct, NO_PERM }, { "FAAN", ff_faandct, FAAN_SCALE }, - { "IJG-AAN-INT", fdct_ifast, SCALE_PERM }, + { "IJG-AAN-INT", ff_fdct_ifast, SCALE_PERM }, { "IJG-LLM-INT", ff_jpeg_fdct_islow_8, NO_PERM }, #if HAVE_MMX diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index d91885327d..3a84cce750 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2796,8 +2796,8 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->fdct248 = ff_fdct248_islow_10; } else { if(avctx->dct_algo==FF_DCT_FASTINT) { - c->fdct = fdct_ifast; - c->fdct248 = fdct_ifast248; + c->fdct = ff_fdct_ifast; + c->fdct248 = ff_fdct_ifast248; } else if(avctx->dct_algo==FF_DCT_FAAN) { c->fdct = ff_faandct; diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index e915a82406..f79371295f 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -38,8 +38,8 @@ /* dct code */ typedef short DCTELEM; -void fdct_ifast (DCTELEM *data); -void fdct_ifast248 (DCTELEM *data); +void ff_fdct_ifast (DCTELEM *data); +void ff_fdct_ifast248 (DCTELEM *data); void ff_jpeg_fdct_islow_8(DCTELEM *data); void ff_jpeg_fdct_islow_10(DCTELEM *data); void ff_fdct248_islow_8(DCTELEM *data); diff --git a/libavcodec/jfdctfst.c b/libavcodec/jfdctfst.c index b8dc407f7b..3e30e5d535 100644 --- a/libavcodec/jfdctfst.c +++ b/libavcodec/jfdctfst.c @@ -205,7 +205,7 @@ static av_always_inline void row_fdct(DCTELEM * data){ */ GLOBAL(void) -fdct_ifast (DCTELEM * data) +ff_fdct_ifast (DCTELEM * data) { int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; int tmp10, tmp11, tmp12, tmp13; @@ -271,7 +271,7 @@ fdct_ifast (DCTELEM * data) */ GLOBAL(void) -fdct_ifast248 (DCTELEM * data) +ff_fdct_ifast248 (DCTELEM * data) { int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; int tmp10, tmp11, tmp12, tmp13; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 5890f8c92e..ae1f39f1f5 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -89,7 +89,7 @@ void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) / (qscale * quant_matrix[j])); } - } else if (dsp->fdct == fdct_ifast + } else if (dsp->fdct == ff_fdct_ifast #ifndef FAAN_POSTSCALE || dsp->fdct == ff_faandct #endif @@ -132,7 +132,7 @@ void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], for (i = intra; i < 64; i++) { int64_t max = 8191; - if (dsp->fdct == fdct_ifast + if (dsp->fdct == ff_fdct_ifast #ifndef FAAN_POSTSCALE || dsp->fdct == ff_faandct #endif @@ -3370,7 +3370,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s, int dct_coeff= FFABS(block[ scantable[i] ]); int best_score=256*256*256*120; - if ( s->dsp.fdct == fdct_ifast + if ( s->dsp.fdct == ff_fdct_ifast #ifndef FAAN_POSTSCALE || s->dsp.fdct == ff_faandct #endif -- cgit v1.2.1 From 873c89e2a6825150edf036fd9993d53f25a0c6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:26:15 +0200 Subject: dsputil: Add ff_ prefix to inv_zigzag_direct16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/dsputil.c | 4 ++-- libavcodec/x86/mpegvideo_mmx.c | 2 +- libavcodec/x86/mpegvideo_mmx_template.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 3a84cce750..f9d933fe2f 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -82,7 +82,7 @@ const uint8_t ff_zigzag248_direct[64] = { }; /* not permutated inverse zigzag_direct + 1 for MMX quantizer */ -DECLARE_ALIGNED(16, uint16_t, inv_zigzag_direct16)[64]; +DECLARE_ALIGNED(16, uint16_t, ff_inv_zigzag_direct16)[64]; const uint8_t ff_alternate_horizontal_scan[64] = { 0, 1, 2, 3, 8, 9, 16, 17, @@ -2761,7 +2761,7 @@ av_cold void ff_dsputil_static_init(void) ff_squareTbl[i] = (i - 256) * (i - 256); } - for(i=0; i<64; i++) inv_zigzag_direct16[ff_zigzag_direct[i]]= i+1; + for(i=0; i<64; i++) ff_inv_zigzag_direct16[ff_zigzag_direct[i]]= i+1; } int ff_check_alignment(void){ diff --git a/libavcodec/x86/mpegvideo_mmx.c b/libavcodec/x86/mpegvideo_mmx.c index 7dd9a66783..7181a66914 100644 --- a/libavcodec/x86/mpegvideo_mmx.c +++ b/libavcodec/x86/mpegvideo_mmx.c @@ -29,7 +29,7 @@ #include "libavcodec/mpegvideo.h" #include "dsputil_mmx.h" -extern uint16_t inv_zigzag_direct16[64]; +extern uint16_t ff_inv_zigzag_direct16[64]; static void dct_unquantize_h263_intra_mmx(MpegEncContext *s, diff --git a/libavcodec/x86/mpegvideo_mmx_template.c b/libavcodec/x86/mpegvideo_mmx_template.c index 0b6cff3540..13653c89b1 100644 --- a/libavcodec/x86/mpegvideo_mmx_template.c +++ b/libavcodec/x86/mpegvideo_mmx_template.c @@ -168,7 +168,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, "movzb %%al, %%"REG_a" \n\t" // last_non_zero_p1 : "+a" (last_non_zero_p1) : "r" (block+64), "r" (qmat), "r" (bias), - "r" (inv_zigzag_direct16+64), "r" (temp_block+64) + "r" (ff_inv_zigzag_direct16+64), "r" (temp_block+64) XMM_CLOBBERS_ONLY("%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7") ); @@ -202,7 +202,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, "movzb %%al, %%"REG_a" \n\t" // last_non_zero_p1 : "+a" (last_non_zero_p1) : "r" (block+64), "r" (qmat+64), "r" (bias+64), - "r" (inv_zigzag_direct16+64), "r" (temp_block+64) + "r" (ff_inv_zigzag_direct16+64), "r" (temp_block+64) XMM_CLOBBERS_ONLY("%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7") ); -- cgit v1.2.1 From c8e1b2fbc93eaf102994865d730691f5f16f4129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:29:24 +0200 Subject: libavcodec: Add ff_ prefix to j_rev_dct* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/dct-test.c | 2 +- libavcodec/dsputil.c | 20 ++++++++++---------- libavcodec/dsputil.h | 8 ++++---- libavcodec/jrevdct.c | 8 ++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c index 7aa2292987..133fdbf0d5 100644 --- a/libavcodec/dct-test.c +++ b/libavcodec/dct-test.c @@ -110,7 +110,7 @@ static const struct algo fdct_tab[] = { static const struct algo idct_tab[] = { { "FAANI", ff_faanidct, NO_PERM }, { "REF-DBL", ff_ref_idct, NO_PERM }, - { "INT", j_rev_dct, MMX_PERM }, + { "INT", ff_j_rev_dct, MMX_PERM }, { "SIMPLE-C", ff_simple_idct_8, NO_PERM }, #if HAVE_MMX diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index f9d933fe2f..74b8fd7466 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2700,34 +2700,34 @@ static void ff_wmv2_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block) } static void ff_jref_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { - j_rev_dct (block); + ff_j_rev_dct (block); ff_put_pixels_clamped_c(block, dest, line_size); } static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { - j_rev_dct (block); + ff_j_rev_dct (block); ff_add_pixels_clamped_c(block, dest, line_size); } static void ff_jref_idct4_put(uint8_t *dest, int line_size, DCTELEM *block) { - j_rev_dct4 (block); + ff_j_rev_dct4 (block); put_pixels_clamped4_c(block, dest, line_size); } static void ff_jref_idct4_add(uint8_t *dest, int line_size, DCTELEM *block) { - j_rev_dct4 (block); + ff_j_rev_dct4 (block); add_pixels_clamped4_c(block, dest, line_size); } static void ff_jref_idct2_put(uint8_t *dest, int line_size, DCTELEM *block) { - j_rev_dct2 (block); + ff_j_rev_dct2 (block); put_pixels_clamped2_c(block, dest, line_size); } static void ff_jref_idct2_add(uint8_t *dest, int line_size, DCTELEM *block) { - j_rev_dct2 (block); + ff_j_rev_dct2 (block); add_pixels_clamped2_c(block, dest, line_size); } @@ -2813,17 +2813,17 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) if(avctx->lowres==1){ c->idct_put= ff_jref_idct4_put; c->idct_add= ff_jref_idct4_add; - c->idct = j_rev_dct4; + c->idct = ff_j_rev_dct4; c->idct_permutation_type= FF_NO_IDCT_PERM; }else if(avctx->lowres==2){ c->idct_put= ff_jref_idct2_put; c->idct_add= ff_jref_idct2_add; - c->idct = j_rev_dct2; + c->idct = ff_j_rev_dct2; c->idct_permutation_type= FF_NO_IDCT_PERM; }else if(avctx->lowres==3){ c->idct_put= ff_jref_idct1_put; c->idct_add= ff_jref_idct1_add; - c->idct = j_rev_dct1; + c->idct = ff_j_rev_dct1; c->idct_permutation_type= FF_NO_IDCT_PERM; }else{ if (avctx->bits_per_raw_sample == 10) { @@ -2835,7 +2835,7 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) if(avctx->idct_algo==FF_IDCT_INT){ c->idct_put= ff_jref_idct_put; c->idct_add= ff_jref_idct_add; - c->idct = j_rev_dct; + c->idct = ff_j_rev_dct; c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER ) && avctx->idct_algo==FF_IDCT_VP3){ diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index f79371295f..0a6165685e 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -45,10 +45,10 @@ void ff_jpeg_fdct_islow_10(DCTELEM *data); void ff_fdct248_islow_8(DCTELEM *data); void ff_fdct248_islow_10(DCTELEM *data); -void j_rev_dct (DCTELEM *data); -void j_rev_dct4 (DCTELEM *data); -void j_rev_dct2 (DCTELEM *data); -void j_rev_dct1 (DCTELEM *data); +void ff_j_rev_dct (DCTELEM *data); +void ff_j_rev_dct4 (DCTELEM *data); +void ff_j_rev_dct2 (DCTELEM *data); +void ff_j_rev_dct1 (DCTELEM *data); void ff_wmv2_idct_c(DCTELEM *data); void ff_fdct_mmx(DCTELEM *block); diff --git a/libavcodec/jrevdct.c b/libavcodec/jrevdct.c index 5ed96da2ca..395eb8c638 100644 --- a/libavcodec/jrevdct.c +++ b/libavcodec/jrevdct.c @@ -207,7 +207,7 @@ ones here or successive P-frames will drift too much with Reference frame coding * Perform the inverse DCT on one block of coefficients. */ -void j_rev_dct(DCTBLOCK data) +void ff_j_rev_dct(DCTBLOCK data) { int32_t tmp0, tmp1, tmp2, tmp3; int32_t tmp10, tmp11, tmp12, tmp13; @@ -945,7 +945,7 @@ void j_rev_dct(DCTBLOCK data) #define DCTSIZE 4 #define DCTSTRIDE 8 -void j_rev_dct4(DCTBLOCK data) +void ff_j_rev_dct4(DCTBLOCK data) { int32_t tmp0, tmp1, tmp2, tmp3; int32_t tmp10, tmp11, tmp12, tmp13; @@ -1132,7 +1132,7 @@ void j_rev_dct4(DCTBLOCK data) } } -void j_rev_dct2(DCTBLOCK data){ +void ff_j_rev_dct2(DCTBLOCK data){ int d00, d01, d10, d11; data[0] += 4; @@ -1147,7 +1147,7 @@ void j_rev_dct2(DCTBLOCK data){ data[1+1*DCTSTRIDE]= (d01 - d11)>>3; } -void j_rev_dct1(DCTBLOCK data){ +void ff_j_rev_dct1(DCTBLOCK data){ data[0] = (data[0] + 4)>>3; } -- cgit v1.2.1 From e9ca85e714a0d7406732df39e177c5d28bc02937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:30:15 +0200 Subject: lagarith: Add ff_ prefix to lag_rac_init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/lagarith.c | 2 +- libavcodec/lagarithrac.c | 2 +- libavcodec/lagarithrac.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index 71b5bd950f..3a47f4c632 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -382,7 +382,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst, if (lag_read_prob_header(&rac, &gb) < 0) return -1; - lag_rac_init(&rac, &gb, length - stride); + ff_lag_rac_init(&rac, &gb, length - stride); for (i = 0; i < height; i++) read += lag_decode_line(l, &rac, dst + (i * stride), width, diff --git a/libavcodec/lagarithrac.c b/libavcodec/lagarithrac.c index ab7a60011d..33dc6e4bd4 100644 --- a/libavcodec/lagarithrac.c +++ b/libavcodec/lagarithrac.c @@ -30,7 +30,7 @@ #include "get_bits.h" #include "lagarithrac.h" -void lag_rac_init(lag_rac *l, GetBitContext *gb, int length) +void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length) { int i, j; diff --git a/libavcodec/lagarithrac.h b/libavcodec/lagarithrac.h index b9421993a4..aa36d38f85 100644 --- a/libavcodec/lagarithrac.h +++ b/libavcodec/lagarithrac.h @@ -51,7 +51,7 @@ typedef struct lag_rac { uint8_t range_hash[256]; /**< Hash table mapping upper byte to approximate symbol. */ } lag_rac; -void lag_rac_init(lag_rac *l, GetBitContext *gb, int length); +void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length); /* TODO: Optimize */ static inline void lag_rac_refill(lag_rac *l) -- cgit v1.2.1 From 6f13a371ec14571a095d6e74d5bc24185dfd197e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:36:50 +0200 Subject: mpeg4: Add ff_ prefixes to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/ituh263dec.c | 4 ++-- libavcodec/mpeg4data.h | 10 +++++----- libavcodec/mpeg4video.h | 24 ++++++++++++------------ libavcodec/mpeg4videodec.c | 36 ++++++++++++++++++------------------ libavcodec/mpeg4videoenc.c | 8 ++++---- libavcodec/mpegvideo_enc.c | 4 ++-- libavcodec/msmpeg4.c | 2 +- 7 files changed, 44 insertions(+), 44 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 5ff3c62a25..6e6e013314 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -238,7 +238,7 @@ int ff_h263_resync(MpegEncContext *s){ if(show_bits(&s->gb, 16)==0){ pos= get_bits_count(&s->gb); if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4) - ret= mpeg4_decode_video_packet_header(s); + ret= ff_mpeg4_decode_video_packet_header(s); else ret= h263_decode_gob_header(s); if(ret>=0) @@ -255,7 +255,7 @@ int ff_h263_resync(MpegEncContext *s){ pos= get_bits_count(&s->gb); if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4) - ret= mpeg4_decode_video_packet_header(s); + ret= ff_mpeg4_decode_video_packet_header(s); else ret= h263_decode_gob_header(s); if(ret>=0) diff --git a/libavcodec/mpeg4data.h b/libavcodec/mpeg4data.h index 07cbeee18a..87bb5391b1 100644 --- a/libavcodec/mpeg4data.h +++ b/libavcodec/mpeg4data.h @@ -211,7 +211,7 @@ static const int8_t inter_rvlc_level[169]={ 1, 1, }; -RLTable rvlc_rl_inter = { +RLTable ff_rvlc_rl_inter = { 169, 103, inter_rvlc, @@ -315,7 +315,7 @@ static const int8_t intra_rvlc_level[169]={ 1, 1, }; -RLTable rvlc_rl_intra = { +RLTable ff_rvlc_rl_intra = { 169, 103, intra_rvlc, @@ -323,13 +323,13 @@ RLTable rvlc_rl_intra = { intra_rvlc_level, }; -const uint16_t sprite_trajectory_tab[15][2] = { +const uint16_t ff_sprite_trajectory_tab[15][2] = { {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3}, {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8}, {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12}, }; -const uint8_t mb_type_b_tab[4][2] = { +const uint8_t ff_mb_type_b_tab[4][2] = { {1, 1}, {1, 2}, {1, 3}, {1, 4}, }; @@ -369,7 +369,7 @@ const uint16_t ff_mpeg4_resync_prefix[8]={ 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 }; -const uint8_t mpeg4_dc_threshold[8]={ +const uint8_t ff_mpeg4_dc_threshold[8]={ 99, 13, 15, 17, 19, 21, 23, 0 }; diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index ba67c218fc..64c0243785 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -66,11 +66,11 @@ extern const uint16_t ff_mpeg4_intra_vlc[103][2]; extern RLTable ff_mpeg4_rl_intra; /* Note this is identical to the intra rvlc except that it is reordered. */ -extern RLTable rvlc_rl_inter; -extern RLTable rvlc_rl_intra; +extern RLTable ff_rvlc_rl_inter; +extern RLTable ff_rvlc_rl_intra; -extern const uint16_t sprite_trajectory_tab[15][2]; -extern const uint8_t mb_type_b_tab[4][2]; +extern const uint16_t ff_sprite_trajectory_tab[15][2]; +extern const uint8_t ff_mb_type_b_tab[4][2]; /* these matrixes will be permuted for the idct */ extern const int16_t ff_mpeg4_default_intra_matrix[64]; @@ -80,15 +80,15 @@ extern const uint8_t ff_mpeg4_y_dc_scale_table[32]; extern const uint8_t ff_mpeg4_c_dc_scale_table[32]; extern const uint16_t ff_mpeg4_resync_prefix[8]; -extern const uint8_t mpeg4_dc_threshold[8]; +extern const uint8_t ff_mpeg4_dc_threshold[8]; -void mpeg4_encode_mb(MpegEncContext *s, - DCTELEM block[6][64], - int motion_x, int motion_y); -void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n, - int dir); +void ff_mpeg4_encode_mb(MpegEncContext *s, + DCTELEM block[6][64], + int motion_x, int motion_y); +void ff_mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n, + int dir); void ff_set_mpeg4_time(MpegEncContext * s); -void mpeg4_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number); int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb); void ff_mpeg4_encode_video_packet_header(MpegEncContext *s); @@ -99,7 +99,7 @@ void ff_mpeg4_merge_partitions(MpegEncContext *s); void ff_clean_mpeg4_qscales(MpegEncContext *s); int ff_mpeg4_decode_partitions(MpegEncContext *s); int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s); -int mpeg4_decode_video_packet_header(MpegEncContext *s); +int ff_mpeg4_decode_video_packet_header(MpegEncContext *s); void ff_mpeg4_init_direct_mv(MpegEncContext *s); /** diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b243a23be7..a3fc0348d4 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -50,8 +50,8 @@ static const int mb_type_b_map[4]= { * @param n block index (0-3 are luma, 4-5 are chroma) * @param dir the ac prediction direction */ -void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n, - int dir) +void ff_mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n, + int dir) { int i; int16_t *ac_val, *ac_val1; @@ -346,7 +346,7 @@ static void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb * Decode the next video packet. * @return <0 if something went wrong */ -int mpeg4_decode_video_packet_header(MpegEncContext *s) +int ff_mpeg4_decode_video_packet_header(MpegEncContext *s) { int mb_num_bits= av_log2(s->mb_num - 1) + 1; int header_extension=0, mb_num, len; @@ -875,8 +875,8 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, goto not_coded; if(rvlc){ - rl = &rvlc_rl_intra; - rl_vlc = rvlc_rl_intra.rl_vlc[0]; + rl = &ff_rvlc_rl_intra; + rl_vlc = ff_rvlc_rl_intra.rl_vlc[0]; }else{ rl = &ff_mpeg4_rl_intra; rl_vlc = ff_mpeg4_rl_intra.rl_vlc[0]; @@ -897,7 +897,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, s->block_last_index[n] = i; return 0; } - if(rvlc) rl = &rvlc_rl_inter; + if(rvlc) rl = &ff_rvlc_rl_inter; else rl = &ff_h263_rl_inter; scan_table = s->intra_scantable.permutated; @@ -906,7 +906,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, qmul=1; qadd=0; if(rvlc){ - rl_vlc = rvlc_rl_inter.rl_vlc[0]; + rl_vlc = ff_rvlc_rl_inter.rl_vlc[0]; }else{ rl_vlc = ff_h263_rl_inter.rl_vlc[0]; } @@ -914,7 +914,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, qmul = s->qscale << 1; qadd = (s->qscale - 1) | 1; if(rvlc){ - rl_vlc = rvlc_rl_inter.rl_vlc[s->qscale]; + rl_vlc = ff_rvlc_rl_inter.rl_vlc[s->qscale]; }else{ rl_vlc = ff_h263_rl_inter.rl_vlc[s->qscale]; } @@ -1051,7 +1051,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, i -= i>>31; //if(i == -1) i=0; } - mpeg4_pred_ac(s, block, n, dc_pred_dir); + ff_mpeg4_pred_ac(s, block, n, dc_pred_dir); if (s->ac_pred) { i = 63; /* XXX: not optimal */ } @@ -2004,7 +2004,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ if(s->pict_type == AV_PICTURE_TYPE_B) skip_bits_long(gb, s->cplx_estimation_trash_b); - s->intra_dc_threshold= mpeg4_dc_threshold[ get_bits(gb, 3) ]; + s->intra_dc_threshold= ff_mpeg4_dc_threshold[ get_bits(gb, 3) ]; if(!s->progressive_sequence){ s->top_field_first= get_bits1(gb); s->alternate_scan= get_bits1(gb); @@ -2206,11 +2206,11 @@ static av_cold int decode_init(AVCodecContext *avctx) done = 1; ff_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]); - ff_init_rl(&rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]); - ff_init_rl(&rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]); + ff_init_rl(&ff_rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]); + ff_init_rl(&ff_rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]); INIT_VLC_RL(ff_mpeg4_rl_intra, 554); - INIT_VLC_RL(rvlc_rl_inter, 1072); - INIT_VLC_RL(rvlc_rl_intra, 1072); + INIT_VLC_RL(ff_rvlc_rl_inter, 1072); + INIT_VLC_RL(ff_rvlc_rl_intra, 1072); INIT_VLC_STATIC(&dc_lum, DC_VLC_BITS, 10 /* 13 */, &ff_mpeg4_DCtab_lum[0][1], 2, 1, &ff_mpeg4_DCtab_lum[0][0], 2, 1, 512); @@ -2218,11 +2218,11 @@ static av_cold int decode_init(AVCodecContext *avctx) &ff_mpeg4_DCtab_chrom[0][1], 2, 1, &ff_mpeg4_DCtab_chrom[0][0], 2, 1, 512); INIT_VLC_STATIC(&sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15, - &sprite_trajectory_tab[0][1], 4, 2, - &sprite_trajectory_tab[0][0], 4, 2, 128); + &ff_sprite_trajectory_tab[0][1], 4, 2, + &ff_sprite_trajectory_tab[0][0], 4, 2, 128); INIT_VLC_STATIC(&mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4, - &mb_type_b_tab[0][1], 2, 1, - &mb_type_b_tab[0][0], 2, 1, 16); + &ff_mb_type_b_tab[0][1], 2, 1, + &ff_mb_type_b_tab[0][0], 2, 1, 16); } s->h263_pred = 1; diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index b7c2da7a69..22997f303c 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -468,9 +468,9 @@ static inline int get_b_cbp(MpegEncContext * s, DCTELEM block[6][64], //FIXME this is duplicated to h263.c static const int dquant_code[5]= {1,0,9,2,3}; -void mpeg4_encode_mb(MpegEncContext * s, - DCTELEM block[6][64], - int motion_x, int motion_y) +void ff_mpeg4_encode_mb(MpegEncContext * s, + DCTELEM block[6][64], + int motion_x, int motion_y) { int cbpc, cbpy, pred_x, pred_y; PutBitContext * const pb2 = s->data_partitioning ? &s->pb2 : &s->pb; @@ -1027,7 +1027,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n } /* write mpeg4 VOP header */ -void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number) +void ff_mpeg4_encode_picture_header(MpegEncContext * s, int picture_number) { int time_incr; int time_div, time_mod; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index ae1f39f1f5..36e136ac9e 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1998,7 +1998,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, break; case CODEC_ID_MPEG4: if (CONFIG_MPEG4_ENCODER) - mpeg4_encode_mb(s, s->block, motion_x, motion_y); + ff_mpeg4_encode_mb(s, s->block, motion_x, motion_y); break; case CODEC_ID_MSMPEG4V2: case CODEC_ID_MSMPEG4V3: @@ -3192,7 +3192,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) else if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version) msmpeg4_encode_picture_header(s, picture_number); else if (CONFIG_MPEG4_ENCODER && s->h263_pred) - mpeg4_encode_picture_header(s, picture_number); + ff_mpeg4_encode_picture_header(s, picture_number); else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10) rv10_encode_picture_header(s, picture_number); else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20) diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index a58d1357a4..f51878c008 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -1829,7 +1829,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, } not_coded: if (s->mb_intra) { - mpeg4_pred_ac(s, block, n, dc_pred_dir); + ff_mpeg4_pred_ac(s, block, n, dc_pred_dir); if (s->ac_pred) { i = 63; /* XXX: not optimal */ } -- cgit v1.2.1 From d6c8dcb8ac0b844f24a07168022dead5e5ff9b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:38:52 +0200 Subject: mpeg12: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/mpeg12enc.c | 4 ++-- libavcodec/mpegvideo.h | 8 ++++---- libavcodec/mpegvideo_enc.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 7ac8ce0e79..90da1ee34c 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -331,7 +331,7 @@ void ff_mpeg1_encode_slice_header(MpegEncContext *s){ put_bits(&s->pb, 1, 0); /* slice extra information */ } -void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) +void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) { mpeg1_encode_sequence_header(s); @@ -656,7 +656,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, } } -void mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y) +void ff_mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y) { if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6); else mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8); diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 3d3b237898..3f312a0fe7 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -788,10 +788,10 @@ int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index, extern const uint8_t ff_mpeg1_dc_scale_table[128]; extern const uint8_t * const ff_mpeg2_dc_scale_table[4]; -void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number); -void mpeg1_encode_mb(MpegEncContext *s, - DCTELEM block[6][64], - int motion_x, int motion_y); +void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_mpeg1_encode_mb(MpegEncContext *s, + DCTELEM block[6][64], + int motion_x, int motion_y); void ff_mpeg1_encode_init(MpegEncContext *s); void ff_mpeg1_encode_slice_header(MpegEncContext *s); void ff_mpeg1_clean_buffers(MpegEncContext *s); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 36e136ac9e..3a71d7b128 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1994,7 +1994,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, case CODEC_ID_MPEG1VIDEO: case CODEC_ID_MPEG2VIDEO: if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) - mpeg1_encode_mb(s, s->block, motion_x, motion_y); + ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y); break; case CODEC_ID_MPEG4: if (CONFIG_MPEG4_ENCODER) @@ -3204,7 +3204,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) break; case FMT_MPEG1: if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) - mpeg1_encode_picture_header(s, picture_number); + ff_mpeg1_encode_picture_header(s, picture_number); break; case FMT_H264: break; -- cgit v1.2.1 From 35e02a3d0e49522d2810df76dab8cdac76ef804f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:43:58 +0200 Subject: snow: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows getting rid of a hack for conflicting symbol/define names. Signed-off-by: Martin Storsjö --- libavcodec/snow.c | 4 ++-- libavcodec/snow.h | 18 +++++++----------- libavcodec/snowdata.h | 8 ++++---- libavcodec/snowdec.c | 6 +++--- libavcodec/snowenc.c | 14 +++++++------- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 27c7e25189..384cda82ac 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -99,7 +99,7 @@ static void init_qexp(void){ double v=128; for(i=0; iavctx->get_buffer(s->avctx, &s->mconly_picture); s->scratchbuf = av_malloc(s->mconly_picture.linesize[0]*7*MB_SIZE); diff --git a/libavcodec/snow.h b/libavcodec/snow.h index bd54994b5b..5edb8f8af6 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -165,13 +165,9 @@ typedef struct SnowContext{ }SnowContext; /* Tables */ -extern const uint8_t * const obmc_tab[4]; -#ifdef __sgi -// Avoid a name clash on SGI IRIX -#undef qexp -#endif -extern uint8_t qexp[QROOT]; -extern int scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; +extern const uint8_t * const ff_obmc_tab[4]; +extern uint8_t ff_qexp[QROOT]; +extern int ff_scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; /* C bits used by mmx/sse2/altivec */ @@ -256,7 +252,7 @@ static inline void pred_mv(SnowContext *s, int *mx, int *my, int ref, *mx = mid_pred(left->mx, top->mx, tr->mx); *my = mid_pred(left->my, top->my, tr->my); }else{ - const int *scale = scale_mv_ref[ref]; + const int *scale = ff_scale_mv_ref[ref]; *mx = mid_pred((left->mx * scale[left->ref] + 128) >>8, (top ->mx * scale[top ->ref] + 128) >>8, (tr ->mx * scale[tr ->ref] + 128) >>8); @@ -405,7 +401,7 @@ static av_always_inline void predict_slice(SnowContext *s, IDWTELEM *buf, int pl int x, y, mb_x; int block_size = MB_SIZE >> s->block_max_depth; int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const uint8_t *obmc = plane_index ? ff_obmc_tab[s->block_max_depth+1] : ff_obmc_tab[s->block_max_depth]; const int obmc_stride= plane_index ? block_size : 2*block_size; int ref_stride= s->current_picture.linesize[plane_index]; uint8_t *dst8= s->current_picture.data[plane_index]; @@ -496,7 +492,7 @@ static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3 /* bitstream functions */ -extern const int8_t quant3bA[256]; +extern const int8_t ff_quant3bA[256]; #define QEXPSHIFT (7-FRAC_BITS+8) //FIXME try to change this to 0 @@ -642,7 +638,7 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i v=get_rac(&s->c, &b->state[0][context]); if(v){ v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1); - v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l&0xFF] + 3*quant3bA[t&0xFF]]); + v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + ff_quant3bA[l&0xFF] + 3*ff_quant3bA[t&0xFF]]); xc->x=x; (xc++)->coeff= v; diff --git a/libavcodec/snowdata.h b/libavcodec/snowdata.h index ca2468c091..4a91858402 100644 --- a/libavcodec/snowdata.h +++ b/libavcodec/snowdata.h @@ -101,7 +101,7 @@ static const uint8_t obmc4[16]={ //error:0.000000 }; -const int8_t quant3bA[256]={ +const int8_t ff_quant3bA[256]={ 0, 0, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, @@ -120,13 +120,13 @@ const int8_t quant3bA[256]={ 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, }; -const uint8_t * const obmc_tab[4]= { +const uint8_t * const ff_obmc_tab[4]= { obmc32, obmc16, obmc8, obmc4 }; /* runtime generated tables */ -uint8_t qexp[QROOT]; -int scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; +uint8_t ff_qexp[QROOT]; +int ff_scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; #endif /* AVCODEC_SNOW_H */ diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 2b6f6e11c7..1dccc638d8 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -42,7 +42,7 @@ static av_always_inline void predict_slice_buffered(SnowContext *s, slice_buffer int x, y, mb_x; int block_size = MB_SIZE >> s->block_max_depth; int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const uint8_t *obmc = plane_index ? ff_obmc_tab[s->block_max_depth+1] : ff_obmc_tab[s->block_max_depth]; int obmc_stride= plane_index ? block_size : 2*block_size; int ref_stride= s->current_picture.linesize[plane_index]; uint8_t *dst8= s->current_picture.data[plane_index]; @@ -95,7 +95,7 @@ static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, sli const int w= b->width; int y; const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; int new_index = 0; @@ -184,7 +184,7 @@ static void decode_q_branch(SnowContext *s, int level, int x, int y){ static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int start_y, int end_y){ const int w= b->width; const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; int x,y; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 05b6f0fa86..270af12cb8 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -575,7 +575,7 @@ static int get_dc(SnowContext *s, int mb_x, int mb_y, int plane_index){ Plane *p= &s->plane[plane_index]; const int block_size = MB_SIZE >> s->block_max_depth; const int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const uint8_t *obmc = plane_index ? ff_obmc_tab[s->block_max_depth+1] : ff_obmc_tab[s->block_max_depth]; const int obmc_stride= plane_index ? block_size : 2*block_size; const int ref_stride= s->current_picture.linesize[plane_index]; uint8_t *src= s-> input_picture.data[plane_index]; @@ -766,7 +766,7 @@ static int get_4block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index){ Plane *p= &s->plane[plane_index]; const int block_size = MB_SIZE >> s->block_max_depth; const int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const uint8_t *obmc = plane_index ? ff_obmc_tab[s->block_max_depth+1] : ff_obmc_tab[s->block_max_depth]; const int obmc_stride= plane_index ? block_size : 2*block_size; const int ref_stride= s->current_picture.linesize[plane_index]; uint8_t *dst= s->current_picture.data[plane_index]; @@ -939,7 +939,7 @@ static int encode_subband_c0run(SnowContext *s, SubBand *b, IDWTELEM *src, IDWTE int t2= 2*FFABS(t) + (t<0); put_symbol2(&s->c, b->state[context + 2], FFABS(v)-1, context-4); - put_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l2&0xFF] + 3*quant3bA[t2&0xFF]], v<0); + put_rac(&s->c, &b->state[0][16 + 1 + 3 + ff_quant3bA[l2&0xFF] + 3*ff_quant3bA[t2&0xFF]], v<0); } } } @@ -1090,7 +1090,7 @@ static void iterative_me(SnowContext *s){ //FIXME precalculate { int x, y; - memcpy(obmc_edged, obmc_tab[s->block_max_depth], b_w*b_w*4); + memcpy(obmc_edged, ff_obmc_tab[s->block_max_depth], b_w*b_w*4); if(mb_x==0) for(y=0; ywidth; const int h= b->height; const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<((qlog>>QSHIFT) + ENCODER_EXTRA_BITS); + const int qmul= ff_qexp[qlog&(QROOT-1)]<<((qlog>>QSHIFT) + ENCODER_EXTRA_BITS); int x,y, thres1, thres2; if(s->qlog == LOSSLESS_QLOG){ @@ -1347,7 +1347,7 @@ static void dequantize(SnowContext *s, SubBand *b, IDWTELEM *src, int stride){ const int w= b->width; const int h= b->height; const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; int x,y; @@ -1538,7 +1538,7 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict) const int h= b->height; const int stride= b->stride; const int qlog= av_clip(2*QROOT + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); const int qdiv= (1<<16)/qmul; int x, y; //FIXME this is ugly -- cgit v1.2.1 From 1fec055066b576ecb29806a95a044f5590e287c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 12:56:41 +0200 Subject: msmpeg4: Add ff_ prefixes to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/intrax8.c | 6 +-- libavcodec/msmpeg4.c | 108 +++++++++++++++++++++++------------------------ libavcodec/msmpeg4data.c | 28 ++++++------ libavcodec/msmpeg4data.h | 26 ++++++------ libavcodec/vc1.c | 4 +- libavcodec/vc1dec.c | 10 ++--- libavcodec/wmv2.c | 4 +- libavcodec/wmv2enc.c | 10 ++--- 8 files changed, 98 insertions(+), 98 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index 0dc33e2596..c9551b4b30 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -696,9 +696,9 @@ av_cold void ff_intrax8_common_init(IntraX8Context * w, MpegEncContext * const s assert(s->mb_width>0); w->prediction_table=av_mallocz(s->mb_width*2*2);//two rows, 2 blocks per cannon mb - ff_init_scantable(s->dsp.idct_permutation, &w->scantable[0], wmv1_scantable[0]); - ff_init_scantable(s->dsp.idct_permutation, &w->scantable[1], wmv1_scantable[2]); - ff_init_scantable(s->dsp.idct_permutation, &w->scantable[2], wmv1_scantable[3]); + ff_init_scantable(s->dsp.idct_permutation, &w->scantable[0], ff_wmv1_scantable[0]); + ff_init_scantable(s->dsp.idct_permutation, &w->scantable[1], ff_wmv1_scantable[2]); + ff_init_scantable(s->dsp.idct_permutation, &w->scantable[2], ff_wmv1_scantable[3]); } /** diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index f51878c008..67c38d0716 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -138,8 +138,8 @@ static av_cold void common_init(MpegEncContext * s) break; case 3: if(s->workaround_bugs){ - s->y_dc_scale_table= old_ff_y_dc_scale_table; - s->c_dc_scale_table= wmv1_c_dc_scale_table; + s->y_dc_scale_table= ff_old_ff_y_dc_scale_table; + s->c_dc_scale_table= ff_wmv1_c_dc_scale_table; } else{ s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table; s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table; @@ -147,8 +147,8 @@ static av_cold void common_init(MpegEncContext * s) break; case 4: case 5: - s->y_dc_scale_table= wmv1_y_dc_scale_table; - s->c_dc_scale_table= wmv1_c_dc_scale_table; + s->y_dc_scale_table= ff_wmv1_y_dc_scale_table; + s->c_dc_scale_table= ff_wmv1_c_dc_scale_table; break; #if CONFIG_VC1_DECODER case 6: @@ -161,10 +161,10 @@ static av_cold void common_init(MpegEncContext * s) if(s->msmpeg4_version>=4){ - ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , wmv1_scantable[1]); - ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, wmv1_scantable[2]); - ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, wmv1_scantable[3]); - ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , wmv1_scantable[0]); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_wmv1_scantable[1]); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_wmv1_scantable[2]); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_wmv1_scantable[3]); + ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , ff_wmv1_scantable[0]); } //Note the default tables are set in common_init in mpegvideo.c @@ -259,10 +259,10 @@ av_cold void ff_msmpeg4_encode_init(MpegEncContext *s) if (!init_done) { /* init various encoding tables */ init_done = 1; - init_mv_table(&mv_tables[0]); - init_mv_table(&mv_tables[1]); + init_mv_table(&ff_mv_tables[0]); + init_mv_table(&ff_mv_tables[1]); for(i=0;i= 64) av_log(s->avctx, AV_LOG_ERROR, "error mx=%d my=%d\n", mx, my); #endif - mv = &mv_tables[s->mv_table_index]; + mv = &ff_mv_tables[s->mv_table_index]; code = mv->table_mv_index[(mx << 6) | my]; put_bits(&s->pb, @@ -564,8 +564,8 @@ void msmpeg4_encode_mb(MpegEncContext * s, if(s->msmpeg4_version<=2){ put_bits(&s->pb, - v2_mb_type[cbp&3][1], - v2_mb_type[cbp&3][0]); + ff_v2_mb_type[cbp&3][1], + ff_v2_mb_type[cbp&3][0]); if((cbp&3) != 3) coded_cbp= cbp ^ 0x3C; else coded_cbp= cbp; @@ -580,8 +580,8 @@ void msmpeg4_encode_mb(MpegEncContext * s, msmpeg4v2_encode_motion(s, motion_y - pred_y); }else{ put_bits(&s->pb, - table_mb_non_intra[cbp + 64][1], - table_mb_non_intra[cbp + 64][0]); + ff_table_mb_non_intra[cbp + 64][1], + ff_table_mb_non_intra[cbp + 64][0]); s->misc_bits += get_bits_diff(s); @@ -617,13 +617,13 @@ void msmpeg4_encode_mb(MpegEncContext * s, if(s->msmpeg4_version<=2){ if (s->pict_type == AV_PICTURE_TYPE_I) { put_bits(&s->pb, - v2_intra_cbpc[cbp&3][1], v2_intra_cbpc[cbp&3][0]); + ff_v2_intra_cbpc[cbp&3][1], ff_v2_intra_cbpc[cbp&3][0]); } else { if (s->use_skip_mb_code) put_bits(&s->pb, 1, 0); /* mb coded */ put_bits(&s->pb, - v2_mb_type[(cbp&3) + 4][1], - v2_mb_type[(cbp&3) + 4][0]); + ff_v2_mb_type[(cbp&3) + 4][1], + ff_v2_mb_type[(cbp&3) + 4][0]); } put_bits(&s->pb, 1, 0); /* no AC prediction yet */ put_bits(&s->pb, @@ -637,13 +637,13 @@ void msmpeg4_encode_mb(MpegEncContext * s, if (s->use_skip_mb_code) put_bits(&s->pb, 1, 0); /* mb coded */ put_bits(&s->pb, - table_mb_non_intra[cbp][1], - table_mb_non_intra[cbp][0]); + ff_table_mb_non_intra[cbp][1], + ff_table_mb_non_intra[cbp][0]); } put_bits(&s->pb, 1, 0); /* no AC prediction yet */ if(s->inter_intra_pred){ s->h263_aic_dir=0; - put_bits(&s->pb, table_inter_intra[s->h263_aic_dir][1], table_inter_intra[s->h263_aic_dir][0]); + put_bits(&s->pb, ff_table_inter_intra[s->h263_aic_dir][1], ff_table_inter_intra[s->h263_aic_dir][0]); } } s->misc_bits += get_bits_diff(s); @@ -927,15 +927,15 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) msmpeg4_encode_dc(s, block[0], n, &dc_pred_dir); i = 1; if (n < 4) { - rl = &rl_table[s->rl_table_index]; + rl = &ff_rl_table[s->rl_table_index]; } else { - rl = &rl_table[3 + s->rl_chroma_table_index]; + rl = &ff_rl_table[3 + s->rl_chroma_table_index]; } run_diff = s->msmpeg4_version>=4; scantable= s->intra_scantable.permutated; } else { i = 0; - rl = &rl_table[3 + s->rl_table_index]; + rl = &ff_rl_table[3 + s->rl_table_index]; if(s->msmpeg4_version<=2) run_diff = 0; else @@ -1271,20 +1271,20 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) done = 1; for(i=0;ivlc, MV_VLC_BITS, mv->n + 1, mv->table_mv_bits, 1, 1, mv->table_mv_code, 2, 2, 3714); - mv = &mv_tables[1]; + mv = &ff_mv_tables[1]; INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1, mv->table_mv_bits, 1, 1, mv->table_mv_code, 2, 2, 2694); @@ -1310,35 +1310,35 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) &v2_dc_chroma_table[0][0], 8, 4, 1506); INIT_VLC_STATIC(&v2_intra_cbpc_vlc, V2_INTRA_CBPC_VLC_BITS, 4, - &v2_intra_cbpc[0][1], 2, 1, - &v2_intra_cbpc[0][0], 2, 1, 8); + &ff_v2_intra_cbpc[0][1], 2, 1, + &ff_v2_intra_cbpc[0][0], 2, 1, 8); INIT_VLC_STATIC(&v2_mb_type_vlc, V2_MB_TYPE_VLC_BITS, 8, - &v2_mb_type[0][1], 2, 1, - &v2_mb_type[0][0], 2, 1, 128); + &ff_v2_mb_type[0][1], 2, 1, + &ff_v2_mb_type[0][0], 2, 1, 128); INIT_VLC_STATIC(&v2_mv_vlc, V2_MV_VLC_BITS, 33, &ff_mvtab[0][1], 2, 1, &ff_mvtab[0][0], 2, 1, 538); INIT_VLC_STATIC(&ff_mb_non_intra_vlc[0], MB_NON_INTRA_VLC_BITS, 128, - &wmv2_inter_table[0][0][1], 8, 4, - &wmv2_inter_table[0][0][0], 8, 4, 1636); + &ff_wmv2_inter_table[0][0][1], 8, 4, + &ff_wmv2_inter_table[0][0][0], 8, 4, 1636); INIT_VLC_STATIC(&ff_mb_non_intra_vlc[1], MB_NON_INTRA_VLC_BITS, 128, - &wmv2_inter_table[1][0][1], 8, 4, - &wmv2_inter_table[1][0][0], 8, 4, 2648); + &ff_wmv2_inter_table[1][0][1], 8, 4, + &ff_wmv2_inter_table[1][0][0], 8, 4, 2648); INIT_VLC_STATIC(&ff_mb_non_intra_vlc[2], MB_NON_INTRA_VLC_BITS, 128, - &wmv2_inter_table[2][0][1], 8, 4, - &wmv2_inter_table[2][0][0], 8, 4, 1532); + &ff_wmv2_inter_table[2][0][1], 8, 4, + &ff_wmv2_inter_table[2][0][0], 8, 4, 1532); INIT_VLC_STATIC(&ff_mb_non_intra_vlc[3], MB_NON_INTRA_VLC_BITS, 128, - &wmv2_inter_table[3][0][1], 8, 4, - &wmv2_inter_table[3][0][0], 8, 4, 2488); + &ff_wmv2_inter_table[3][0][1], 8, 4, + &ff_wmv2_inter_table[3][0][0], 8, 4, 2488); INIT_VLC_STATIC(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64, &ff_msmp4_mb_i_table[0][1], 4, 2, &ff_msmp4_mb_i_table[0][0], 4, 2, 536); INIT_VLC_STATIC(&ff_inter_intra_vlc, INTER_INTRA_VLC_BITS, 4, - &table_inter_intra[0][1], 2, 1, - &table_inter_intra[0][0], 2, 1, 8); + &ff_table_inter_intra[0][1], 2, 1, + &ff_table_inter_intra[0][0], 2, 1, 8); } switch(s->msmpeg4_version){ @@ -1627,13 +1627,13 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, else return -1; } if (n < 4) { - rl = &rl_table[s->rl_table_index]; + rl = &ff_rl_table[s->rl_table_index]; if(level > 256*s->y_dc_scale){ av_log(s->avctx, AV_LOG_ERROR, "dc overflow+ L qscale: %d//\n", s->qscale); if(!s->inter_intra_pred) return -1; } } else { - rl = &rl_table[3 + s->rl_chroma_table_index]; + rl = &ff_rl_table[3 + s->rl_chroma_table_index]; if(level > 256*s->c_dc_scale){ av_log(s->avctx, AV_LOG_ERROR, "dc overflow+ C qscale: %d//\n", s->qscale); if(!s->inter_intra_pred) return -1; @@ -1659,7 +1659,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, qmul = s->qscale << 1; qadd = (s->qscale - 1) | 1; i = -1; - rl = &rl_table[3 + s->rl_table_index]; + rl = &ff_rl_table[3 + s->rl_table_index]; if(s->msmpeg4_version==2) run_diff = 0; @@ -1846,7 +1846,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s, MVTable *mv; int code, mx, my; - mv = &mv_tables[s->mv_table_index]; + mv = &ff_mv_tables[s->mv_table_index]; code = get_vlc2(&s->gb, mv->vlc.table, MV_VLC_BITS, 2); if (code < 0){ diff --git a/libavcodec/msmpeg4data.c b/libavcodec/msmpeg4data.c index e51c72596f..b3dc45490f 100644 --- a/libavcodec/msmpeg4data.c +++ b/libavcodec/msmpeg4data.c @@ -54,7 +54,7 @@ const uint16_t ff_msmp4_mb_i_table[64][2] = { }; /* non intra picture macroblock coded block pattern + mb type */ -const uint32_t table_mb_non_intra[128][2] = { +const uint32_t ff_table_mb_non_intra[128][2] = { { 0x40, 7 },{ 0x13c9, 13 },{ 0x9fd, 12 },{ 0x1fc, 15 }, { 0x9fc, 12 },{ 0xa83, 18 },{ 0x12d34, 17 },{ 0x83bc, 16 }, { 0x83a, 12 },{ 0x7f8, 17 },{ 0x3fd, 16 },{ 0x3ff, 16 }, @@ -600,7 +600,7 @@ extern const uint16_t ff_mpeg4_intra_vlc[103][2]; extern const int8_t ff_mpeg4_intra_level[102]; extern const int8_t ff_mpeg4_intra_run[102]; -RLTable rl_table[NB_RL_TABLES] = { +RLTable ff_rl_table[NB_RL_TABLES] = { /* intra luminance tables */ /* low motion */ { @@ -1784,7 +1784,7 @@ static const uint8_t table1_mvy[1099] = { 34, 28, 21, }; -MVTable mv_tables[2] = { +MVTable ff_mv_tables[2] = { { 1099, table0_mv_code, @@ -1801,30 +1801,30 @@ MVTable mv_tables[2] = { } }; -const uint8_t v2_mb_type[8][2] = { +const uint8_t ff_v2_mb_type[8][2] = { {1, 1}, {0 , 2}, {3 , 3}, {9 , 5}, {5, 4}, {0x21, 7}, {0x20, 7}, {0x11, 6}, }; -const uint8_t v2_intra_cbpc[4][2] = { +const uint8_t ff_v2_intra_cbpc[4][2] = { {1, 1}, {0, 3}, {1, 3}, {1, 2}, }; -const uint8_t wmv1_y_dc_scale_table[32]={ +const uint8_t ff_wmv1_y_dc_scale_table[32]={ // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 0, 8, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21 }; -const uint8_t wmv1_c_dc_scale_table[32]={ +const uint8_t ff_wmv1_c_dc_scale_table[32]={ // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22 }; -const uint8_t old_ff_y_dc_scale_table[32]={ +const uint8_t ff_old_ff_y_dc_scale_table[32]={ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 }; -const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={ +const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={ { 0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11, 0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28, @@ -1867,7 +1867,7 @@ const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={ } }; -const uint8_t table_inter_intra[4][2]={ +const uint8_t ff_table_inter_intra[4][2]={ {0,1} /*Luma-Left Chroma-Left*/, {2,2} /*Luma-Top Chroma-Left*/, {6,3} /*luma-Left Chroma-Top */, @@ -1979,21 +1979,21 @@ static const uint32_t table_mb_non_intra4[128][2] = { {0x000011, 5}, {0x0001AC, 9}, {0x0000F3, 8}, {0x000439, 11}, }; -const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]={ +const uint32_t (* const ff_wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]={ table_mb_non_intra2, table_mb_non_intra3, table_mb_non_intra4, - table_mb_non_intra, + ff_table_mb_non_intra, }; -const uint8_t wmv2_scantableA[64]={ +const uint8_t ff_wmv2_scantableA[64]={ 0x00, 0x01, 0x02, 0x08, 0x03, 0x09, 0x0A, 0x10, 0x04, 0x0B, 0x11, 0x18, 0x12, 0x0C, 0x05, 0x13, 0x19, 0x0D, 0x14, 0x1A, 0x1B, 0x06, 0x15, 0x1C, 0x0E, 0x16, 0x1D, 0x07, 0x1E, 0x0F, 0x17, 0x1F, }; -const uint8_t wmv2_scantableB[64]={ +const uint8_t ff_wmv2_scantableB[64]={ 0x00, 0x08, 0x01, 0x10, 0x09, 0x18, 0x11, 0x02, 0x20, 0x0A, 0x19, 0x28, 0x12, 0x30, 0x21, 0x1A, 0x38, 0x29, 0x22, 0x03, 0x31, 0x39, 0x0B, 0x2A, diff --git a/libavcodec/msmpeg4data.h b/libavcodec/msmpeg4data.h index 0907c7a295..c37664fab1 100644 --- a/libavcodec/msmpeg4data.h +++ b/libavcodec/msmpeg4data.h @@ -54,23 +54,23 @@ extern const uint16_t ff_msmp4_mb_i_table[64][2]; #define WMV1_SCANTABLE_COUNT 4 -extern const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]; +extern const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]; #define NB_RL_TABLES 6 -extern RLTable rl_table[NB_RL_TABLES]; +extern RLTable ff_rl_table[NB_RL_TABLES]; -extern const uint8_t wmv1_y_dc_scale_table[32]; -extern const uint8_t wmv1_c_dc_scale_table[32]; -extern const uint8_t old_ff_y_dc_scale_table[32]; +extern const uint8_t ff_wmv1_y_dc_scale_table[32]; +extern const uint8_t ff_wmv1_c_dc_scale_table[32]; +extern const uint8_t ff_old_ff_y_dc_scale_table[32]; -extern MVTable mv_tables[2]; +extern MVTable ff_mv_tables[2]; -extern const uint8_t v2_mb_type[8][2]; -extern const uint8_t v2_intra_cbpc[4][2]; +extern const uint8_t ff_v2_mb_type[8][2]; +extern const uint8_t ff_v2_intra_cbpc[4][2]; -extern const uint32_t table_mb_non_intra[128][2]; -extern const uint8_t table_inter_intra[4][2]; +extern const uint32_t ff_table_mb_non_intra[128][2]; +extern const uint8_t ff_table_inter_intra[4][2]; extern const uint32_t ff_table0_dc_lum[120][2]; extern const uint32_t ff_table1_dc_lum[120][2]; @@ -78,9 +78,9 @@ extern const uint32_t ff_table0_dc_chroma[120][2]; extern const uint32_t ff_table1_dc_chroma[120][2]; #define WMV2_INTER_CBP_TABLE_COUNT 4 -extern const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]; +extern const uint32_t (* const ff_wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]; -extern const uint8_t wmv2_scantableA[64]; -extern const uint8_t wmv2_scantableB[64]; +extern const uint8_t ff_wmv2_scantableA[64]; +extern const uint8_t ff_wmv2_scantableB[64]; #endif /* AVCODEC_MSMPEG4DATA_H */ diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 1394f2cd4b..7bccaf4c7d 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -304,8 +304,8 @@ int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitConte v->zz_4x8 = ff_vc1_adv_progressive_4x8_zz; return decode_sequence_header_adv(v, gb); } else { - v->zz_8x4 = wmv2_scantableA; - v->zz_4x8 = wmv2_scantableB; + v->zz_8x4 = ff_wmv2_scantableA; + v->zz_4x8 = ff_wmv2_scantableB; v->res_y411 = get_bits1(gb); v->res_sprite = get_bits1(gb); if (v->res_y411) { diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 417bd046b7..b26c540e87 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5351,16 +5351,16 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) if (v->profile == PROFILE_ADVANCED || v->res_fasttx) { for (i = 0; i < 64; i++) { #define transpose(x) ((x >> 3) | ((x & 7) << 3)) - v->zz_8x8[0][i] = transpose(wmv1_scantable[0][i]); - v->zz_8x8[1][i] = transpose(wmv1_scantable[1][i]); - v->zz_8x8[2][i] = transpose(wmv1_scantable[2][i]); - v->zz_8x8[3][i] = transpose(wmv1_scantable[3][i]); + v->zz_8x8[0][i] = transpose(ff_wmv1_scantable[0][i]); + v->zz_8x8[1][i] = transpose(ff_wmv1_scantable[1][i]); + v->zz_8x8[2][i] = transpose(ff_wmv1_scantable[2][i]); + v->zz_8x8[3][i] = transpose(ff_wmv1_scantable[3][i]); v->zzi_8x8[i] = transpose(ff_vc1_adv_interlaced_8x8_zz[i]); } v->left_blk_sh = 0; v->top_blk_sh = 3; } else { - memcpy(v->zz_8x8, wmv1_scantable, 4*64); + memcpy(v->zz_8x8, ff_wmv1_scantable, 4*64); v->left_blk_sh = 3; v->top_blk_sh = 0; } diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 74389ef4db..f113790e7d 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -28,8 +28,8 @@ av_cold void ff_wmv2_common_init(Wmv2Context * w){ MpegEncContext * const s= &w->s; - ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], wmv2_scantableA); - ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], wmv2_scantableB); + ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], ff_wmv2_scantableA); + ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], ff_wmv2_scantableB); } static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){ diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index 78acad13b0..9bb14b766a 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -167,8 +167,8 @@ void ff_wmv2_encode_mb(MpegEncContext * s, } put_bits(&s->pb, - wmv2_inter_table[w->cbp_table_index][cbp + 64][1], - wmv2_inter_table[w->cbp_table_index][cbp + 64][0]); + ff_wmv2_inter_table[w->cbp_table_index][cbp + 64][1], + ff_wmv2_inter_table[w->cbp_table_index][cbp + 64][0]); /* motion vector */ ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y); @@ -196,13 +196,13 @@ void ff_wmv2_encode_mb(MpegEncContext * s, ff_msmp4_mb_i_table[coded_cbp][1], ff_msmp4_mb_i_table[coded_cbp][0]); } else { put_bits(&s->pb, - wmv2_inter_table[w->cbp_table_index][cbp][1], - wmv2_inter_table[w->cbp_table_index][cbp][0]); + ff_wmv2_inter_table[w->cbp_table_index][cbp][1], + ff_wmv2_inter_table[w->cbp_table_index][cbp][0]); } put_bits(&s->pb, 1, 0); /* no AC prediction yet */ if(s->inter_intra_pred){ s->h263_aic_dir=0; - put_bits(&s->pb, table_inter_intra[s->h263_aic_dir][1], table_inter_intra[s->h263_aic_dir][0]); + put_bits(&s->pb, ff_table_inter_intra[s->h263_aic_dir][1], ff_table_inter_intra[s->h263_aic_dir][0]); } } -- cgit v1.2.1 From 5f2c159c0faf406f19f7083137e6ea9d1133e360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 13:00:08 +0200 Subject: vc1: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/intrax8.c | 2 +- libavcodec/msmpeg4.c | 6 +++--- libavcodec/vc1.c | 8 ++++---- libavcodec/vc1.h | 8 ++++---- libavcodec/vc1_parser.c | 8 ++++---- libavcodec/vc1data.c | 6 +++--- libavcodec/vc1data.h | 6 +++--- libavcodec/vc1dec.c | 52 ++++++++++++++++++++++++------------------------- 8 files changed, 48 insertions(+), 48 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index c9551b4b30..3ec6e69435 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -721,7 +721,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context * w) * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1. * @param quant_offset offset away from zero */ -//FIXME extern uint8_t wmv3_dc_scale_table[32]; +//FIXME extern uint8_t ff_wmv3_dc_scale_table[32]; int ff_intrax8_decode_picture(IntraX8Context * const w, int dquant, int quant_offset){ MpegEncContext * const s= w->s; int mb_xy; diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 67c38d0716..2b5693aa2d 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -60,7 +60,7 @@ static uint32_t v2_dc_lum_table[512][2]; static uint32_t v2_dc_chroma_table[512][2]; /* vc1 externs */ -extern const uint8_t wmv3_dc_scale_table[32]; +extern const uint8_t ff_wmv3_dc_scale_table[32]; #include "msmpeg4data.h" @@ -152,8 +152,8 @@ static av_cold void common_init(MpegEncContext * s) break; #if CONFIG_VC1_DECODER case 6: - s->y_dc_scale_table= wmv3_dc_scale_table; - s->c_dc_scale_table= wmv3_dc_scale_table; + s->y_dc_scale_table= ff_wmv3_dc_scale_table; + s->c_dc_scale_table= ff_wmv3_dc_scale_table; break; #endif diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 7bccaf4c7d..9552b9f93c 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -291,7 +291,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb); * @param gb GetBit context initialized from Codec context extra_data * @return Status */ -int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb) +int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb) { av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32)); v->profile = get_bits(gb, 2); @@ -524,7 +524,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) return 0; } -int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb) +int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb) { int i; @@ -572,7 +572,7 @@ int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext * return 0; } -int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) +int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) { int pqindex, lowquant, status; @@ -815,7 +815,7 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \ } -int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) +int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) { int pqindex, lowquant; int status; diff --git a/libavcodec/vc1.h b/libavcodec/vc1.h index 6096077660..f895aad204 100644 --- a/libavcodec/vc1.h +++ b/libavcodec/vc1.h @@ -441,11 +441,11 @@ static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, ui * @param gb GetBit context initialized from Codec context extra_data * @return Status */ -int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb); +int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb); -int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb); +int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb); -int vc1_parse_frame_header (VC1Context *v, GetBitContext *gb); -int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb); +int ff_vc1_parse_frame_header (VC1Context *v, GetBitContext *gb); +int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb); #endif /* AVCODEC_VC1_H */ diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 55f97e1eef..dfbb1f5119 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -57,16 +57,16 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx, if(size <= 0) continue; switch(AV_RB32(start)){ case VC1_CODE_SEQHDR: - vc1_decode_sequence_header(avctx, &vpc->v, &gb); + ff_vc1_decode_sequence_header(avctx, &vpc->v, &gb); break; case VC1_CODE_ENTRYPOINT: - vc1_decode_entry_point(avctx, &vpc->v, &gb); + ff_vc1_decode_entry_point(avctx, &vpc->v, &gb); break; case VC1_CODE_FRAME: if(vpc->v.profile < PROFILE_ADVANCED) - vc1_parse_frame_header (&vpc->v, &gb); + ff_vc1_parse_frame_header (&vpc->v, &gb); else - vc1_parse_frame_header_adv(&vpc->v, &gb); + ff_vc1_parse_frame_header_adv(&vpc->v, &gb); /* keep AV_PICTURE_TYPE_BI internal to VC1 */ if (vpc->v.s.pict_type == AV_PICTURE_TYPE_BI) diff --git a/libavcodec/vc1data.c b/libavcodec/vc1data.c index 69d71ad954..1bb4c8a4d8 100644 --- a/libavcodec/vc1data.c +++ b/libavcodec/vc1data.c @@ -645,7 +645,7 @@ const uint8_t ff_vc1_2ref_mvdata_bits[8][126] = { } }; -const uint8_t wmv3_dc_scale_table[32] = { +const uint8_t ff_wmv3_dc_scale_table[32] = { 0, 2, 4, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21 }; @@ -1094,7 +1094,7 @@ const int32_t ff_vc1_dqscale[63] = { }; /* P Interlaced field picture MV predictor scaling values (Table 114) */ -const uint16_t vc1_field_mvpred_scales[2][7][4] = { +const uint16_t ff_vc1_field_mvpred_scales[2][7][4] = { // Refdist: // 0 1 2 3 or greater { // current field is first @@ -1118,7 +1118,7 @@ const uint16_t vc1_field_mvpred_scales[2][7][4] = { }; /* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */ -const uint16_t vc1_b_field_mvpred_scales[7][4] = { +const uint16_t ff_vc1_b_field_mvpred_scales[7][4] = { // BRFD: // 0 1 2 3 or greater { 171, 205, 219, 228 }, // SCALESAME diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h index da8f0a1f40..63ec6d7c1b 100644 --- a/libavcodec/vc1data.h +++ b/libavcodec/vc1data.h @@ -126,7 +126,7 @@ extern const uint8_t ff_vc1_4mv_block_pattern_bits[4][16]; extern const uint8_t ff_vc1_2mv_block_pattern_codes[4][4]; extern const uint8_t ff_vc1_2mv_block_pattern_bits[4][4]; -extern const uint8_t wmv3_dc_scale_table[32]; +extern const uint8_t ff_wmv3_dc_scale_table[32]; /* P-Picture CBPCY VLC tables */ extern const uint16_t ff_vc1_cbpcy_p_codes[4][64]; @@ -197,7 +197,7 @@ extern const int8_t ff_vc1_intra_vert_8x8_zz [64]; extern const int32_t ff_vc1_dqscale[63]; /* P Interlaced field picture MV predictor scaling values (Table 114) */ -extern const uint16_t vc1_field_mvpred_scales[2][7][4]; +extern const uint16_t ff_vc1_field_mvpred_scales[2][7][4]; /* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */ -extern const uint16_t vc1_b_field_mvpred_scales[7][4]; +extern const uint16_t ff_vc1_b_field_mvpred_scales[7][4]; #endif /* AVCODEC_VC1DATA_H */ diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b26c540e87..a8e8340211 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1308,10 +1308,10 @@ static av_always_inline int scaleforsame_x(VC1Context *v, int n /* MV */, int di refdist = dir ? v->brfd : v->frfd; if (refdist > 3) refdist = 3; - scalesame1 = vc1_field_mvpred_scales[table_index][1][refdist]; - scalesame2 = vc1_field_mvpred_scales[table_index][2][refdist]; - scalezone1_x = vc1_field_mvpred_scales[table_index][3][refdist]; - zone1offset_x = vc1_field_mvpred_scales[table_index][5][refdist]; + scalesame1 = ff_vc1_field_mvpred_scales[table_index][1][refdist]; + scalesame2 = ff_vc1_field_mvpred_scales[table_index][2][refdist]; + scalezone1_x = ff_vc1_field_mvpred_scales[table_index][3][refdist]; + zone1offset_x = ff_vc1_field_mvpred_scales[table_index][5][refdist]; if (FFABS(n) > 255) scaledvalue = n; @@ -1341,10 +1341,10 @@ static av_always_inline int scaleforsame_y(VC1Context *v, int i, int n /* MV */, refdist = dir ? v->brfd : v->frfd; if (refdist > 3) refdist = 3; - scalesame1 = vc1_field_mvpred_scales[table_index][1][refdist]; - scalesame2 = vc1_field_mvpred_scales[table_index][2][refdist]; - scalezone1_y = vc1_field_mvpred_scales[table_index][4][refdist]; - zone1offset_y = vc1_field_mvpred_scales[table_index][6][refdist]; + scalesame1 = ff_vc1_field_mvpred_scales[table_index][1][refdist]; + scalesame2 = ff_vc1_field_mvpred_scales[table_index][2][refdist]; + scalezone1_y = ff_vc1_field_mvpred_scales[table_index][4][refdist]; + zone1offset_y = ff_vc1_field_mvpred_scales[table_index][6][refdist]; if (FFABS(n) > 63) scaledvalue = n; @@ -1372,10 +1372,10 @@ static av_always_inline int scaleforopp_x(VC1Context *v, int n /* MV */) int scaledvalue; brfd = FFMIN(v->brfd, 3); - scalezone1_x = vc1_b_field_mvpred_scales[3][brfd]; - zone1offset_x = vc1_b_field_mvpred_scales[5][brfd]; - scaleopp1 = vc1_b_field_mvpred_scales[1][brfd]; - scaleopp2 = vc1_b_field_mvpred_scales[2][brfd]; + scalezone1_x = ff_vc1_b_field_mvpred_scales[3][brfd]; + zone1offset_x = ff_vc1_b_field_mvpred_scales[5][brfd]; + scaleopp1 = ff_vc1_b_field_mvpred_scales[1][brfd]; + scaleopp2 = ff_vc1_b_field_mvpred_scales[2][brfd]; if (FFABS(n) > 255) scaledvalue = n; @@ -1399,10 +1399,10 @@ static av_always_inline int scaleforopp_y(VC1Context *v, int n /* MV */, int dir int scaledvalue; brfd = FFMIN(v->brfd, 3); - scalezone1_y = vc1_b_field_mvpred_scales[4][brfd]; - zone1offset_y = vc1_b_field_mvpred_scales[6][brfd]; - scaleopp1 = vc1_b_field_mvpred_scales[1][brfd]; - scaleopp2 = vc1_b_field_mvpred_scales[2][brfd]; + scalezone1_y = ff_vc1_b_field_mvpred_scales[4][brfd]; + zone1offset_y = ff_vc1_b_field_mvpred_scales[6][brfd]; + scaleopp1 = ff_vc1_b_field_mvpred_scales[1][brfd]; + scaleopp2 = ff_vc1_b_field_mvpred_scales[2][brfd]; if (FFABS(n) > 63) scaledvalue = n; @@ -1438,7 +1438,7 @@ static av_always_inline int scaleforsame(VC1Context *v, int i, int n /* MV */, return n; } brfd = FFMIN(v->brfd, 3); - scalesame = vc1_b_field_mvpred_scales[0][brfd]; + scalesame = ff_vc1_b_field_mvpred_scales[0][brfd]; n = (n * scalesame >> 8) << hpel; return n; @@ -1462,7 +1462,7 @@ static av_always_inline int scaleforopp(VC1Context *v, int n /* MV */, refdist = FFMIN(v->refdist, 3); else refdist = dir ? v->brfd : v->frfd; - scaleopp = vc1_field_mvpred_scales[dir ^ v->second_field][0][refdist]; + scaleopp = ff_vc1_field_mvpred_scales[dir ^ v->second_field][0][refdist]; n = (n * scaleopp >> 8) << hpel; return n; @@ -5281,7 +5281,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) init_get_bits(&gb, avctx->extradata, avctx->extradata_size*8); - if (vc1_decode_sequence_header(avctx, v, &gb) < 0) + if (ff_vc1_decode_sequence_header(avctx, v, &gb) < 0) return -1; count = avctx->extradata_size*8 - get_bits_count(&gb); @@ -5316,14 +5316,14 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) init_get_bits(&gb, buf2, buf2_size * 8); switch (AV_RB32(start)) { case VC1_CODE_SEQHDR: - if (vc1_decode_sequence_header(avctx, v, &gb) < 0) { + if (ff_vc1_decode_sequence_header(avctx, v, &gb) < 0) { av_free(buf2); return -1; } seq_initialized = 1; break; case VC1_CODE_ENTRYPOINT: - if (vc1_decode_entry_point(avctx, v, &gb) < 0) { + if (ff_vc1_decode_entry_point(avctx, v, &gb) < 0) { av_free(buf2); return -1; } @@ -5501,7 +5501,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, case VC1_CODE_ENTRYPOINT: /* it should be before frame data */ buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); init_get_bits(&s->gb, buf2, buf_size2 * 8); - vc1_decode_entry_point(avctx, v, &s->gb); + ff_vc1_decode_entry_point(avctx, v, &s->gb); break; case VC1_CODE_SLICE: { int buf_size3; @@ -5600,11 +5600,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, // do parse frame header v->pic_header_flag = 0; if (v->profile < PROFILE_ADVANCED) { - if (vc1_parse_frame_header(v, &s->gb) == -1) { + if (ff_vc1_parse_frame_header(v, &s->gb) == -1) { goto err; } } else { - if (vc1_parse_frame_header_adv(v, &s->gb) == -1) { + if (ff_vc1_parse_frame_header_adv(v, &s->gb) == -1) { goto err; } } @@ -5699,10 +5699,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, if (i) { v->pic_header_flag = 0; if (v->field_mode && i == n_slices1 + 2) - vc1_parse_frame_header_adv(v, &s->gb); + ff_vc1_parse_frame_header_adv(v, &s->gb); else if (get_bits1(&s->gb)) { v->pic_header_flag = 1; - vc1_parse_frame_header_adv(v, &s->gb); + ff_vc1_parse_frame_header_adv(v, &s->gb); } } s->start_mb_y = (i == 0) ? 0 : FFMAX(0, slices[i-1].mby_start % mb_height); -- cgit v1.2.1 From 04d382252456c6a03ddbabbf1abcd274f761e6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 13:05:06 +0200 Subject: msmpeg4: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/h263dec.c | 4 ++-- libavcodec/mpegvideo.h | 14 +++++++------- libavcodec/mpegvideo_enc.c | 6 +++--- libavcodec/msmpeg4.c | 18 +++++++++--------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 401596717b..a3d00bc142 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -407,7 +407,7 @@ retry: if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5) { ret= ff_wmv2_decode_picture_header(s); } else if (CONFIG_MSMPEG4_DECODER && s->msmpeg4_version) { - ret = msmpeg4_decode_picture_header(s); + ret = ff_msmpeg4_decode_picture_header(s); } else if (CONFIG_MPEG4_DECODER && s->h263_pred) { if(s->avctx->extradata_size && s->picture_number==0){ GetBitContext gb; @@ -662,7 +662,7 @@ retry: } if (s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type==AV_PICTURE_TYPE_I) - if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){ + if(!CONFIG_MSMPEG4_DECODER || ff_msmpeg4_decode_ext_header(s, buf_size) < 0){ s->error_status_table[s->mb_num-1]= ER_MB_ERROR; } diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 3f312a0fe7..864762d2eb 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -819,13 +819,13 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number); /* msmpeg4.c */ -void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number); -void msmpeg4_encode_ext_header(MpegEncContext * s); -void msmpeg4_encode_mb(MpegEncContext * s, - DCTELEM block[6][64], - int motion_x, int motion_y); -int msmpeg4_decode_picture_header(MpegEncContext * s); -int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size); +void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number); +void ff_msmpeg4_encode_ext_header(MpegEncContext * s); +void ff_msmpeg4_encode_mb(MpegEncContext * s, + DCTELEM block[6][64], + int motion_x, int motion_y); +int ff_msmpeg4_decode_picture_header(MpegEncContext * s); +int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size); int ff_msmpeg4_decode_init(AVCodecContext *avctx); void ff_msmpeg4_encode_init(MpegEncContext *s); int ff_wmv2_decode_picture_header(MpegEncContext * s); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 3a71d7b128..45dc2d07a7 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2004,7 +2004,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, case CODEC_ID_MSMPEG4V3: case CODEC_ID_WMV1: if (CONFIG_MSMPEG4_ENCODER) - msmpeg4_encode_mb(s, s->block, motion_x, motion_y); + ff_msmpeg4_encode_mb(s, s->block, motion_x, motion_y); break; case CODEC_ID_WMV2: if (CONFIG_WMV2_ENCODER) @@ -2899,7 +2899,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ //not beautiful here but we must write it before flushing so it has to be here if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == AV_PICTURE_TYPE_I) - msmpeg4_encode_ext_header(s); + ff_msmpeg4_encode_ext_header(s); write_slice_end(s); @@ -3190,7 +3190,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) if (CONFIG_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2) ff_wmv2_encode_picture_header(s, picture_number); else if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version) - msmpeg4_encode_picture_header(s, picture_number); + ff_msmpeg4_encode_picture_header(s, picture_number); else if (CONFIG_MPEG4_ENCODER && s->h263_pred) ff_mpeg4_encode_picture_header(s, picture_number); else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10) diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 2b5693aa2d..7aeb0bedce 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -347,7 +347,7 @@ static void find_best_tables(MpegEncContext * s) } /* write MSMPEG4 compatible frame header */ -void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) +void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) { find_best_tables(s); @@ -373,7 +373,7 @@ void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) put_bits(&s->pb, 5, 0x16 + s->mb_height/s->slice_height); if(s->msmpeg4_version==4){ - msmpeg4_encode_ext_header(s); + ff_msmpeg4_encode_ext_header(s); if(s->bit_rate>MBAC_BITRATE) put_bits(&s->pb, 1, s->per_mb_rl_table); } @@ -406,7 +406,7 @@ void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) s->esc3_run_length= 0; } -void msmpeg4_encode_ext_header(MpegEncContext * s) +void ff_msmpeg4_encode_ext_header(MpegEncContext * s) { put_bits(&s->pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); //yes 29.97 -> 29 @@ -533,9 +533,9 @@ static void msmpeg4v2_encode_motion(MpegEncContext * s, int val) } } -void msmpeg4_encode_mb(MpegEncContext * s, - DCTELEM block[6][64], - int motion_x, int motion_y) +void ff_msmpeg4_encode_mb(MpegEncContext * s, + DCTELEM block[6][64], + int motion_x, int motion_y) { int cbp, coded_cbp, i; int pred_x, pred_y; @@ -1363,7 +1363,7 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) return 0; } -int msmpeg4_decode_picture_header(MpegEncContext * s) +int ff_msmpeg4_decode_picture_header(MpegEncContext * s) { int code; @@ -1430,7 +1430,7 @@ int msmpeg4_decode_picture_header(MpegEncContext * s) s->dc_table_index = get_bits1(&s->gb); break; case 4: - msmpeg4_decode_ext_header(s, (2+5+5+17+7)/8); + ff_msmpeg4_decode_ext_header(s, (2+5+5+17+7)/8); if(s->bit_rate > MBAC_BITRATE) s->per_mb_rl_table= get_bits1(&s->gb); else s->per_mb_rl_table= 0; @@ -1517,7 +1517,7 @@ int msmpeg4_decode_picture_header(MpegEncContext * s) return 0; } -int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size) +int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size) { int left= buf_size*8 - get_bits_count(&s->gb); int length= s->msmpeg4_version>=3 ? 17 : 16; -- cgit v1.2.1 From 27cfdc3e4fcf0ab490cce6bf961af9180b21ac6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 13:46:40 +0200 Subject: vorbis: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/dsputil.c | 2 +- libavcodec/vorbis.h | 2 +- libavcodec/vorbisdec.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 74b8fd7466..bd10054234 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3016,7 +3016,7 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->add_8x8basis= add_8x8basis_c; #if CONFIG_VORBIS_DECODER - c->vorbis_inverse_coupling = vorbis_inverse_coupling; + c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling; #endif #if CONFIG_AC3_DECODER c->ac3_downmix = ff_ac3_downmix_c; diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h index a55523f17e..924ca800b2 100644 --- a/libavcodec/vorbis.h +++ b/libavcodec/vorbis.h @@ -42,7 +42,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num); void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values, uint16_t *y_list, int *flag, int multiplier, float * out, int samples); -void vorbis_inverse_coupling(float *mag, float *ang, int blocksize); +void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize); #define ilog(i) av_log2(2*(i)) diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 158ee4db1b..11d6d76235 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1447,7 +1447,7 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, } } -void vorbis_inverse_coupling(float *mag, float *ang, int blocksize) +void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize) { int i; for (i = 0; i < blocksize; i++) { -- cgit v1.2.1 From d1b357d78b62e8560da1cd52326f6f5031a2cc69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 13:51:57 +0200 Subject: vp56: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/vp5.c | 34 +++++++++++++++++----------------- libavcodec/vp56.c | 12 ++++++------ libavcodec/vp56data.c | 16 ++++++++-------- libavcodec/vp56data.h | 16 ++++++++-------- libavcodec/vp6.c | 18 +++++++++--------- 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index 56f667cb63..999b183c7f 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -83,7 +83,7 @@ static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect) int sign = vp56_rac_get_prob(c, model->vector_sig[comp]); di = vp56_rac_get_prob(c, model->vector_pdi[comp][0]); di |= vp56_rac_get_prob(c, model->vector_pdi[comp][1]) << 1; - delta = vp56_rac_get_tree(c, vp56_pva_tree, + delta = vp56_rac_get_tree(c, ff_vp56_pva_tree, model->vector_pdv[comp]); delta = di | (delta << 2); delta = (delta ^ -sign) + sign; @@ -180,7 +180,7 @@ static void vp5_parse_coeff(VP56Context *s) if (b > 3) pt = 1; - ctx = 6*s->coeff_ctx[vp56_b6to4[b]][0] + ctx = 6*s->coeff_ctx[ff_vp56_b6to4[b]][0] + s->above_blocks[s->above_block_idx[b]].not_null_dc; model1 = model->coeff_dccv[pt]; model2 = model->coeff_dcct[pt][ctx]; @@ -190,26 +190,26 @@ static void vp5_parse_coeff(VP56Context *s) if (vp56_rac_get_prob(c, model2[0])) { if (vp56_rac_get_prob(c, model2[2])) { if (vp56_rac_get_prob(c, model2[3])) { - s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 4; - idx = vp56_rac_get_tree(c, vp56_pc_tree, model1); + s->coeff_ctx[ff_vp56_b6to4[b]][coeff_idx] = 4; + idx = vp56_rac_get_tree(c, ff_vp56_pc_tree, model1); sign = vp56_rac_get(c); - coeff = vp56_coeff_bias[idx+5]; - for (i=vp56_coeff_bit_length[idx]; i>=0; i--) - coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i; + coeff = ff_vp56_coeff_bias[idx+5]; + for (i=ff_vp56_coeff_bit_length[idx]; i>=0; i--) + coeff += vp56_rac_get_prob(c, ff_vp56_coeff_parse_table[idx][i]) << i; } else { if (vp56_rac_get_prob(c, model2[4])) { coeff = 3 + vp56_rac_get_prob(c, model1[5]); - s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 3; + s->coeff_ctx[ff_vp56_b6to4[b]][coeff_idx] = 3; } else { coeff = 2; - s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 2; + s->coeff_ctx[ff_vp56_b6to4[b]][coeff_idx] = 2; } sign = vp56_rac_get(c); } ct = 2; } else { ct = 1; - s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 1; + s->coeff_ctx[ff_vp56_b6to4[b]][coeff_idx] = 1; sign = vp56_rac_get(c); coeff = 1; } @@ -221,24 +221,24 @@ static void vp5_parse_coeff(VP56Context *s) if (ct && !vp56_rac_get_prob(c, model2[1])) break; ct = 0; - s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 0; + s->coeff_ctx[ff_vp56_b6to4[b]][coeff_idx] = 0; } coeff_idx++; if (coeff_idx >= 64) break; cg = vp5_coeff_groups[coeff_idx]; - ctx = s->coeff_ctx[vp56_b6to4[b]][coeff_idx]; + ctx = s->coeff_ctx[ff_vp56_b6to4[b]][coeff_idx]; model1 = model->coeff_ract[pt][ct][cg]; model2 = cg > 2 ? model1 : model->coeff_acct[pt][ct][cg][ctx]; } - ctx_last = FFMIN(s->coeff_ctx_last[vp56_b6to4[b]], 24); - s->coeff_ctx_last[vp56_b6to4[b]] = coeff_idx; + ctx_last = FFMIN(s->coeff_ctx_last[ff_vp56_b6to4[b]], 24); + s->coeff_ctx_last[ff_vp56_b6to4[b]] = coeff_idx; if (coeff_idx < ctx_last) for (i=coeff_idx; i<=ctx_last; i++) - s->coeff_ctx[vp56_b6to4[b]][i] = 5; - s->above_blocks[s->above_block_idx[b]].not_null_dc = s->coeff_ctx[vp56_b6to4[b]][0]; + s->coeff_ctx[ff_vp56_b6to4[b]][i] = 5; + s->above_blocks[s->above_block_idx[b]].not_null_dc = s->coeff_ctx[ff_vp56_b6to4[b]][0]; } } @@ -253,7 +253,7 @@ static void vp5_default_models_init(VP56Context *s) model->vector_pdi[i][0] = 0x55; model->vector_pdi[i][1] = 0x80; } - memcpy(model->mb_types_stats, vp56_def_mb_types_stats, sizeof(model->mb_types_stats)); + memcpy(model->mb_types_stats, ff_vp56_def_mb_types_stats, sizeof(model->mb_types_stats)); memset(model->vector_pdv, 0x80, sizeof(model->vector_pdv)); } diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index c6be75d5ee..ed5576310b 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -268,7 +268,7 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) for (b=0; b<6; b++) { VP56RefDc *ab = &s->above_blocks[s->above_block_idx[b]]; - VP56RefDc *lb = &s->left_block[vp56_b6to4[b]]; + VP56RefDc *lb = &s->left_block[ff_vp56_b6to4[b]]; int count = 0; int dc = 0; int i; @@ -288,12 +288,12 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) count++; } if (count == 0) - dc = s->prev_dc[vp56_b2p[b]][ref_frame]; + dc = s->prev_dc[ff_vp56_b2p[b]][ref_frame]; else if (count == 2) dc /= 2; s->block_coeff[b][idx] += dc; - s->prev_dc[vp56_b2p[b]][ref_frame] = s->block_coeff[b][idx]; + s->prev_dc[ff_vp56_b2p[b]][ref_frame] = s->block_coeff[b][idx]; ab->dc_coeff = s->block_coeff[b][idx]; ab->ref_frame = ref_frame; lb->dc_coeff = s->block_coeff[b][idx]; @@ -410,7 +410,7 @@ static void vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha) switch (mb_type) { case VP56_MB_INTRA: for (b=0; bdsp.idct_put(frame_current->data[plane] + s->block_offset[b], s->stride[plane], s->block_coeff[b]); } @@ -419,7 +419,7 @@ static void vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha) case VP56_MB_INTER_NOVEC_PF: case VP56_MB_INTER_NOVEC_GF: for (b=0; bblock_offset[b]; s->dsp.put_pixels_tab[1][0](frame_current->data[plane] + off, frame_ref->data[plane] + off, @@ -439,7 +439,7 @@ static void vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha) for (b=0; bdata[plane], s->stride[plane], 16*col+x_off, 16*row+y_off); s->dsp.idct_add(frame_current->data[plane] + s->block_offset[b], diff --git a/libavcodec/vp56data.c b/libavcodec/vp56data.c index aa1dcefece..90e2f366ef 100644 --- a/libavcodec/vp56data.c +++ b/libavcodec/vp56data.c @@ -25,10 +25,10 @@ #include "vp56data.h" -const uint8_t vp56_b2p[] = { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3 }; -const uint8_t vp56_b6to4[] = { 0, 0, 1, 1, 2, 3 }; +const uint8_t ff_vp56_b2p[] = { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3 }; +const uint8_t ff_vp56_b6to4[] = { 0, 0, 1, 1, 2, 3 }; -const uint8_t vp56_coeff_parse_table[6][11] = { +const uint8_t ff_vp56_coeff_parse_table[6][11] = { { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -37,7 +37,7 @@ const uint8_t vp56_coeff_parse_table[6][11] = { { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254 }, }; -const uint8_t vp56_def_mb_types_stats[3][10][2] = { +const uint8_t ff_vp56_def_mb_types_stats[3][10][2] = { { { 69, 42 }, { 1, 2 }, { 1, 7 }, { 44, 42 }, { 6, 22 }, { 1, 3 }, { 0, 2 }, { 1, 5 }, { 0, 1 }, { 0, 0 }, }, { { 229, 8 }, { 1, 1 }, { 0, 8 }, { 0, 0 }, { 0, 0 }, @@ -46,7 +46,7 @@ const uint8_t vp56_def_mb_types_stats[3][10][2] = { { 1, 2 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, }; -const VP56Tree vp56_pva_tree[] = { +const VP56Tree ff_vp56_pva_tree[] = { { 8, 0}, { 4, 1}, { 2, 2}, {-0}, {-1}, @@ -56,7 +56,7 @@ const VP56Tree vp56_pva_tree[] = { { 2, 6}, {-6}, {-7}, }; -const VP56Tree vp56_pc_tree[] = { +const VP56Tree ff_vp56_pc_tree[] = { { 4, 6}, { 2, 7}, {-0}, {-1}, { 4, 8}, @@ -64,5 +64,5 @@ const VP56Tree vp56_pc_tree[] = { { 2,10}, {-4}, {-5}, }; -const uint8_t vp56_coeff_bias[] = { 0, 1, 2, 3, 4, 5, 7, 11, 19, 35, 67 }; -const uint8_t vp56_coeff_bit_length[] = { 0, 1, 2, 3, 4, 10 }; +const uint8_t ff_vp56_coeff_bias[] = { 0, 1, 2, 3, 4, 5, 7, 11, 19, 35, 67 }; +const uint8_t ff_vp56_coeff_bit_length[] = { 0, 1, 2, 3, 4, 10 }; diff --git a/libavcodec/vp56data.h b/libavcodec/vp56data.h index b1f27102ae..39bb36d3eb 100644 --- a/libavcodec/vp56data.h +++ b/libavcodec/vp56data.h @@ -56,14 +56,14 @@ typedef struct { int8_t prob_idx; } VP56Tree; -extern const uint8_t vp56_b2p[]; -extern const uint8_t vp56_b6to4[]; -extern const uint8_t vp56_coeff_parse_table[6][11]; -extern const uint8_t vp56_def_mb_types_stats[3][10][2]; -extern const VP56Tree vp56_pva_tree[]; -extern const VP56Tree vp56_pc_tree[]; -extern const uint8_t vp56_coeff_bias[]; -extern const uint8_t vp56_coeff_bit_length[]; +extern const uint8_t ff_vp56_b2p[]; +extern const uint8_t ff_vp56_b6to4[]; +extern const uint8_t ff_vp56_coeff_parse_table[6][11]; +extern const uint8_t ff_vp56_def_mb_types_stats[3][10][2]; +extern const VP56Tree ff_vp56_pva_tree[]; +extern const VP56Tree ff_vp56_pc_tree[]; +extern const uint8_t ff_vp56_coeff_bias[]; +extern const uint8_t ff_vp56_coeff_bit_length[]; static const VP56Frame vp56_reference_frame[] = { VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_NOVEC_PF */ diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c index 59bbca79bd..75863a9b67 100644 --- a/libavcodec/vp6.c +++ b/libavcodec/vp6.c @@ -178,7 +178,7 @@ static void vp6_default_models_init(VP56Context *s) model->vector_sig[0] = 0x80; model->vector_sig[1] = 0x80; - memcpy(model->mb_types_stats, vp56_def_mb_types_stats, sizeof(model->mb_types_stats)); + memcpy(model->mb_types_stats, ff_vp56_def_mb_types_stats, sizeof(model->mb_types_stats)); memcpy(model->vector_fdv, vp6_def_fdv_vector_model, sizeof(model->vector_fdv)); memcpy(model->vector_pdv, vp6_def_pdv_vector_model, sizeof(model->vector_pdv)); memcpy(model->coeff_runv, vp6_def_runv_coeff_model, sizeof(model->coeff_runv)); @@ -332,7 +332,7 @@ static void vp6_parse_vector_adjustment(VP56Context *s, VP56mv *vect) else delta |= 8; } else { - delta = vp56_rac_get_tree(c, vp56_pva_tree, + delta = vp56_rac_get_tree(c, ff_vp56_pva_tree, model->vector_pdv[comp]); } @@ -400,7 +400,7 @@ static void vp6_parse_coeff_huffman(VP56Context *s) s->nb_null[1][pt] = vp6_get_nb_null(s); break; } else { - int coeff2 = vp56_coeff_bias[coeff]; + int coeff2 = ff_vp56_coeff_bias[coeff]; if (coeff > 4) coeff2 += get_bits(&s->gb, coeff <= 9 ? coeff - 4 : 11); ct = 1 + (coeff2 > 1); @@ -437,7 +437,7 @@ static void vp6_parse_coeff(VP56Context *s) if (b > 3) pt = 1; - ctx = s->left_block[vp56_b6to4[b]].not_null_dc + ctx = s->left_block[ff_vp56_b6to4[b]].not_null_dc + s->above_blocks[s->above_block_idx[b]].not_null_dc; model1 = model->coeff_dccv[pt]; model2 = model->coeff_dcct[pt][ctx]; @@ -448,10 +448,10 @@ static void vp6_parse_coeff(VP56Context *s) /* parse a coeff */ if (vp56_rac_get_prob(c, model2[2])) { if (vp56_rac_get_prob(c, model2[3])) { - idx = vp56_rac_get_tree(c, vp56_pc_tree, model1); - coeff = vp56_coeff_bias[idx+5]; - for (i=vp56_coeff_bit_length[idx]; i>=0; i--) - coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i; + idx = vp56_rac_get_tree(c, ff_vp56_pc_tree, model1); + coeff = ff_vp56_coeff_bias[idx+5]; + for (i=ff_vp56_coeff_bit_length[idx]; i>=0; i--) + coeff += vp56_rac_get_prob(c, ff_vp56_coeff_parse_table[idx][i]) << i; } else { if (vp56_rac_get_prob(c, model2[4])) coeff = 3 + vp56_rac_get_prob(c, model1[5]); @@ -491,7 +491,7 @@ static void vp6_parse_coeff(VP56Context *s) model1 = model2 = model->coeff_ract[pt][ct][cg]; } - s->left_block[vp56_b6to4[b]].not_null_dc = + s->left_block[ff_vp56_b6to4[b]].not_null_dc = s->above_blocks[s->above_block_idx[b]].not_null_dc = !!s->block_coeff[b][0]; } } -- cgit v1.2.1 From 6c28d657548ae6f3289c664700eeadabc537b869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 13:54:05 +0200 Subject: rv: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/ituh263dec.c | 2 +- libavcodec/mpegvideo.h | 6 +++--- libavcodec/mpegvideo_enc.c | 4 ++-- libavcodec/rv10.c | 2 +- libavcodec/rv10enc.c | 2 +- libavcodec/rv20enc.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 6e6e013314..20c2d7c23f 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -465,7 +465,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, component = (n <= 3 ? 0 : n - 4 + 1); level = s->last_dc[component]; if (s->rv10_first_dc_coded[component]) { - diff = rv_decode_dc(s, n); + diff = ff_rv_decode_dc(s, n); if (diff == 0xffff) return -1; level += diff; diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 864762d2eb..26213f1de1 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -813,9 +813,9 @@ int ff_h261_get_picture_format(int width, int height); /* rv10.c */ -void rv10_encode_picture_header(MpegEncContext *s, int picture_number); -int rv_decode_dc(MpegEncContext *s, int n); -void rv20_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); +int ff_rv_decode_dc(MpegEncContext *s, int n); +void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number); /* msmpeg4.c */ diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 45dc2d07a7..a674d6315a 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -3194,9 +3194,9 @@ static int encode_picture(MpegEncContext *s, int picture_number) else if (CONFIG_MPEG4_ENCODER && s->h263_pred) ff_mpeg4_encode_picture_header(s, picture_number); else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10) - rv10_encode_picture_header(s, picture_number); + ff_rv10_encode_picture_header(s, picture_number); else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20) - rv20_encode_picture_header(s, picture_number); + ff_rv20_encode_picture_header(s, picture_number); else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1) ff_flv_encode_picture_header(s, picture_number); else if (CONFIG_H263_ENCODER) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index e2dc8e1712..a282ba7724 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -186,7 +186,7 @@ static const uint8_t rv_chrom_bits[256] = static VLC rv_dc_lum, rv_dc_chrom; -int rv_decode_dc(MpegEncContext *s, int n) +int ff_rv_decode_dc(MpegEncContext *s, int n) { int code; diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index e96e473c20..b8d5bdfd46 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -28,7 +28,7 @@ #include "mpegvideo.h" #include "put_bits.h" -void rv10_encode_picture_header(MpegEncContext *s, int picture_number) +void ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) { int full_frame= 0; diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c index bf09d8ada4..78ebb46c2a 100644 --- a/libavcodec/rv20enc.c +++ b/libavcodec/rv20enc.c @@ -29,7 +29,7 @@ #include "h263.h" #include "put_bits.h" -void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ +void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number){ put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ? put_bits(&s->pb, 1, 0); /* unknown bit */ put_bits(&s->pb, 5, s->qscale); -- cgit v1.2.1 From 0ca1bdb37d3597f67b8547c262aaa5b82d4e563e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 13:55:19 +0200 Subject: rtjpeg: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/nuv.c | 8 ++++---- libavcodec/rtjpeg.c | 12 ++++++------ libavcodec/rtjpeg.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 631b2edf4b..84935b6ad4 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -121,9 +121,9 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); return 0; } - rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); + ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); } else if (quality != c->quality) - rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); + ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); return 1; } @@ -154,7 +154,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, ret = get_quant(avctx, c, buf, buf_size); if (ret < 0) return ret; - rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); + ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); return orig_size; } @@ -224,7 +224,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, } case NUV_RTJPEG_IN_LZO: case NUV_RTJPEG: { - rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size); + ff_rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size); break; } case NUV_BLACK: { diff --git a/libavcodec/rtjpeg.c b/libavcodec/rtjpeg.c index 2c5ef0a8dd..360458540b 100644 --- a/libavcodec/rtjpeg.c +++ b/libavcodec/rtjpeg.c @@ -97,15 +97,15 @@ static inline int get_block(GetBitContext *gb, DCTELEM *block, const uint8_t *sc /** * @brief decode one rtjpeg YUV420 frame - * @param c context, must be initialized via rtjpeg_decode_init + * @param c context, must be initialized via ff_rtjpeg_decode_init * @param f AVFrame to place decoded frame into. If parts of the frame * are not coded they are left unchanged, so consider initializing it * @param buf buffer containing input data * @param buf_size length of input data in bytes * @return number of bytes consumed from the input buffer */ -int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, - const uint8_t *buf, int buf_size) { +int ff_rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, + const uint8_t *buf, int buf_size) { GetBitContext gb; int w = c->w / 16, h = c->h / 16; int x, y; @@ -154,9 +154,9 @@ int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, * @param lquant luma quantization table to use * @param cquant chroma quantization table to use */ -void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, - int width, int height, - const uint32_t *lquant, const uint32_t *cquant) { +void ff_rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, + int width, int height, + const uint32_t *lquant, const uint32_t *cquant) { int i; c->dsp = dsp; for (i = 0; i < 64; i++) { diff --git a/libavcodec/rtjpeg.h b/libavcodec/rtjpeg.h index d537c93ff4..95b59e9c75 100644 --- a/libavcodec/rtjpeg.h +++ b/libavcodec/rtjpeg.h @@ -34,10 +34,10 @@ typedef struct { DECLARE_ALIGNED(16, DCTELEM, block)[64]; } RTJpegContext; -void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, +void ff_rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, int width, int height, const uint32_t *lquant, const uint32_t *cquant); -int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, +int ff_rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, const uint8_t *buf, int buf_size); #endif /* AVCODEC_RTJPEG_H */ -- cgit v1.2.1 From efd29844eb84ca5e1b05292300054ea12b02d1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 14:10:33 +0200 Subject: mpegvideo: Add ff_ prefix to nonstatic functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/alpha/mpegvideo_alpha.c | 2 +- libavcodec/arm/mpegvideo_arm.c | 6 ++--- libavcodec/arm/mpegvideo_arm.h | 4 +-- libavcodec/arm/mpegvideo_armv5te.c | 2 +- libavcodec/arm/mpegvideo_iwmmxt.c | 2 +- libavcodec/bfin/mpegvideo_bfin.c | 2 +- libavcodec/cavs.c | 2 +- libavcodec/cavsdec.c | 2 +- libavcodec/error_resilience.c | 2 +- libavcodec/flvenc.c | 6 ++--- libavcodec/h261dec.c | 16 +++++------ libavcodec/h261enc.c | 6 ++--- libavcodec/h263dec.c | 24 ++++++++--------- libavcodec/h264.c | 20 +++++++------- libavcodec/ljpegenc.c | 4 +-- libavcodec/mips/mpegvideo_mmi.c | 2 +- libavcodec/mjpegenc.c | 6 ++--- libavcodec/mpeg12.c | 20 +++++++------- libavcodec/mpeg12enc.c | 10 +++---- libavcodec/mpeg4videoenc.c | 6 ++--- libavcodec/mpegvideo.c | 42 ++++++++++++++--------------- libavcodec/mpegvideo.h | 34 ++++++++++++------------ libavcodec/mpegvideo_common.h | 2 +- libavcodec/mpegvideo_enc.c | 54 +++++++++++++++++++------------------- libavcodec/ppc/mpegvideo_altivec.c | 2 +- libavcodec/rv10.c | 18 ++++++------- libavcodec/rv10enc.c | 6 ++--- libavcodec/rv20enc.c | 6 ++--- libavcodec/rv34.c | 22 ++++++++-------- libavcodec/svq1dec.c | 10 +++---- libavcodec/svq3.c | 6 ++--- libavcodec/vc1dec.c | 6 ++--- libavcodec/wmv2enc.c | 6 ++--- libavcodec/x86/mpegvideo_mmx.c | 2 +- 34 files changed, 180 insertions(+), 180 deletions(-) diff --git a/libavcodec/alpha/mpegvideo_alpha.c b/libavcodec/alpha/mpegvideo_alpha.c index add57364a3..a1a8a27ac1 100644 --- a/libavcodec/alpha/mpegvideo_alpha.c +++ b/libavcodec/alpha/mpegvideo_alpha.c @@ -103,7 +103,7 @@ static void dct_unquantize_h263_inter_axp(MpegEncContext *s, DCTELEM *block, dct_unquantize_h263_axp(block, n_coeffs, qscale, (qscale - 1) | 1); } -void MPV_common_init_axp(MpegEncContext *s) +void ff_MPV_common_init_axp(MpegEncContext *s) { s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_axp; s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_axp; diff --git a/libavcodec/arm/mpegvideo_arm.c b/libavcodec/arm/mpegvideo_arm.c index b1d1312943..0a66f2a981 100644 --- a/libavcodec/arm/mpegvideo_arm.c +++ b/libavcodec/arm/mpegvideo_arm.c @@ -38,17 +38,17 @@ void ff_dct_unquantize_h263_inter_neon(MpegEncContext *s, DCTELEM *block, void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, DCTELEM *block, int n, int qscale); -void MPV_common_init_arm(MpegEncContext *s) +void ff_MPV_common_init_arm(MpegEncContext *s) { /* IWMMXT support is a superset of armv5te, so * allow optimized functions for armv5te unless * a better iwmmxt function exists */ #if HAVE_ARMV5TE - MPV_common_init_armv5te(s); + ff_MPV_common_init_armv5te(s); #endif #if HAVE_IWMMXT - MPV_common_init_iwmmxt(s); + ff_MPV_common_init_iwmmxt(s); #endif if (HAVE_NEON) { diff --git a/libavcodec/arm/mpegvideo_arm.h b/libavcodec/arm/mpegvideo_arm.h index a36da6112b..57a228881c 100644 --- a/libavcodec/arm/mpegvideo_arm.h +++ b/libavcodec/arm/mpegvideo_arm.h @@ -21,7 +21,7 @@ #include "libavcodec/mpegvideo.h" -void MPV_common_init_iwmmxt(MpegEncContext *s); -void MPV_common_init_armv5te(MpegEncContext *s); +void ff_MPV_common_init_iwmmxt(MpegEncContext *s); +void ff_MPV_common_init_armv5te(MpegEncContext *s); #endif /* AVCODEC_ARM_MPEGVIDEO_H */ diff --git a/libavcodec/arm/mpegvideo_armv5te.c b/libavcodec/arm/mpegvideo_armv5te.c index 30197d8bc1..f6839dda0e 100644 --- a/libavcodec/arm/mpegvideo_armv5te.c +++ b/libavcodec/arm/mpegvideo_armv5te.c @@ -94,7 +94,7 @@ static void dct_unquantize_h263_inter_armv5te(MpegEncContext *s, ff_dct_unquantize_h263_armv5te(block, qmul, qadd, nCoeffs + 1); } -void MPV_common_init_armv5te(MpegEncContext *s) +void ff_MPV_common_init_armv5te(MpegEncContext *s) { s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_armv5te; s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_armv5te; diff --git a/libavcodec/arm/mpegvideo_iwmmxt.c b/libavcodec/arm/mpegvideo_iwmmxt.c index 6edc4c2ea6..a10ca17114 100644 --- a/libavcodec/arm/mpegvideo_iwmmxt.c +++ b/libavcodec/arm/mpegvideo_iwmmxt.c @@ -93,7 +93,7 @@ static void dct_unquantize_h263_intra_iwmmxt(MpegEncContext *s, block_orig[0] = level; } -void MPV_common_init_iwmmxt(MpegEncContext *s) +void ff_MPV_common_init_iwmmxt(MpegEncContext *s) { if (!(mm_flags & AV_CPU_FLAG_IWMMXT)) return; diff --git a/libavcodec/bfin/mpegvideo_bfin.c b/libavcodec/bfin/mpegvideo_bfin.c index 4697a5d893..8e88d88c5d 100644 --- a/libavcodec/bfin/mpegvideo_bfin.c +++ b/libavcodec/bfin/mpegvideo_bfin.c @@ -141,7 +141,7 @@ static int dct_quantize_bfin (MpegEncContext *s, return last_non_zero; } -void MPV_common_init_bfin (MpegEncContext *s) +void ff_MPV_common_init_bfin (MpegEncContext *s) { /* s->dct_quantize= dct_quantize_bfin; */ } diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c index 9ff0e5165b..96ff2e87a8 100644 --- a/libavcodec/cavs.c +++ b/libavcodec/cavs.c @@ -671,7 +671,7 @@ av_cold int ff_cavs_init(AVCodecContext *avctx) { AVSContext *h = avctx->priv_data; MpegEncContext * const s = &h->s; - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); ff_cavsdsp_init(&h->cdsp, avctx); s->avctx = avctx; diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 2f4b6e3b14..12564e8eac 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -469,7 +469,7 @@ static int decode_pic(AVSContext *h) { if (!s->context_initialized) { s->avctx->idct_algo = FF_IDCT_CAVS; - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; ff_init_scantable(s->dsp.idct_permutation,&h->scantable,ff_zigzag_direct); } diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index bf59efad1a..e28cc35928 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -66,7 +66,7 @@ static void decode_mb(MpegEncContext *s, int ref) ff_h264_hl_decode_mb(h); } else { assert(ref == 0); - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); } } diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c index c0d9a04f62..822dba9082 100644 --- a/libavcodec/flvenc.c +++ b/libavcodec/flvenc.c @@ -89,9 +89,9 @@ AVCodec ff_flv_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_FLV1, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"), }; diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index a71a202258..38d5e2efc3 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -76,7 +76,7 @@ static av_cold int h261_decode_init(AVCodecContext *avctx){ MpegEncContext * const s = &h->s; // set defaults - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); s->avctx = avctx; s->width = s->avctx->coded_width; @@ -221,7 +221,7 @@ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 ) s->mb_skipped = 1; h->mtype &= ~MB_TYPE_H261_FIL; - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); } return 0; @@ -349,7 +349,7 @@ intra: s->block_last_index[i]= -1; } - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); return SLICE_OK; } @@ -565,7 +565,7 @@ retry: init_get_bits(&s->gb, buf, buf_size*8); if(!s->context_initialized){ - if (MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix + if (ff_MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix return -1; } @@ -588,7 +588,7 @@ retry: if (s->width != avctx->coded_width || s->height != avctx->coded_height){ ParseContext pc= s->parse_context; //FIXME move this demuxing hack to libavformat s->parse_context.buffer=0; - MPV_common_end(s); + ff_MPV_common_end(s); s->parse_context= pc; } if (!s->context_initialized) { @@ -606,7 +606,7 @@ retry: || avctx->skip_frame >= AVDISCARD_ALL) return get_consumed_bytes(s, buf_size); - if(MPV_frame_start(s, avctx) < 0) + if(ff_MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); @@ -620,7 +620,7 @@ retry: break; h261_decode_gob(h); } - MPV_frame_end(s); + ff_MPV_frame_end(s); assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type); assert(s->current_picture.f.pict_type == s->pict_type); @@ -637,7 +637,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) H261Context *h= avctx->priv_data; MpegEncContext *s = &h->s; - MPV_common_end(s); + ff_MPV_common_end(s); return 0; } diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index 43bc85cc59..d33c72423c 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -326,9 +326,9 @@ AVCodec ff_h261_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H261, .priv_data_size = sizeof(H261Context), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("H.261"), }; diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index a3d00bc142..4f0e4563da 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -54,7 +54,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) s->workaround_bugs= avctx->workaround_bugs; // set defaults - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); s->quant_precision=5; s->decode_mb= ff_h263_decode_mb; s->low_delay= 1; @@ -110,7 +110,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) /* for h263, we allocate the images after having read the header */ if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4) - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; ff_h263_decode_init_vlc(s); @@ -122,7 +122,7 @@ av_cold int ff_h263_decode_end(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; - MPV_common_end(s); + ff_MPV_common_end(s); return 0; } @@ -220,7 +220,7 @@ static int decode_slice(MpegEncContext *s){ if(ret<0){ const int xy= s->mb_x + s->mb_y*s->mb_stride; if(ret==SLICE_END){ - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); if(s->loop_filter) ff_h263_loop_filter(s); @@ -232,7 +232,7 @@ static int decode_slice(MpegEncContext *s){ if(++s->mb_x >= s->mb_width){ s->mb_x=0; ff_draw_horiz_band(s, s->mb_y*mb_size, mb_size); - MPV_report_decode_progress(s); + ff_MPV_report_decode_progress(s); s->mb_y++; } return 0; @@ -247,13 +247,13 @@ static int decode_slice(MpegEncContext *s){ return -1; } - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); if(s->loop_filter) ff_h263_loop_filter(s); } ff_draw_horiz_band(s, s->mb_y*mb_size, mb_size); - MPV_report_decode_progress(s); + ff_MPV_report_decode_progress(s); s->mb_x= 0; } @@ -390,7 +390,7 @@ retry: s->bitstream_buffer_size=0; if (!s->context_initialized) { - if (MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix + if (ff_MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix return -1; } @@ -572,7 +572,7 @@ retry: /* H.263 could change picture size any time */ ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat s->parse_context.buffer=0; - MPV_common_end(s); + ff_MPV_common_end(s); s->parse_context= pc; } if (!s->context_initialized) { @@ -613,7 +613,7 @@ retry: s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab; } - if(MPV_frame_start(s, avctx) < 0) + if(ff_MPV_frame_start(s, avctx) < 0) return -1; if (!s->divx_packed) ff_thread_finish_setup(avctx); @@ -631,7 +631,7 @@ retry: ff_er_frame_start(s); //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type - //which is not available before MPV_frame_start() + //which is not available before ff_MPV_frame_start() if (CONFIG_WMV2_DECODER && s->msmpeg4_version==5){ ret = ff_wmv2_decode_secondary_picture_header(s); if(ret<0) return ret; @@ -707,7 +707,7 @@ intrax8_decoded: return -1; } - MPV_frame_end(s); + ff_MPV_frame_end(s); assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type); assert(s->current_picture.f.pict_type == s->pict_type); diff --git a/libavcodec/h264.c b/libavcodec/h264.c index a22fd46188..6eb24560b8 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1100,7 +1100,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx){ MpegEncContext * const s = &h->s; int i; - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); s->avctx = avctx; common_init(h); @@ -1281,11 +1281,11 @@ int ff_h264_frame_start(H264Context *h){ int i; const int pixel_shift = h->pixel_shift; - if(MPV_frame_start(s, s->avctx) < 0) + if(ff_MPV_frame_start(s, s->avctx) < 0) return -1; ff_er_frame_start(s); /* - * MPV_frame_start uses pict_type to derive key_frame. + * ff_MPV_frame_start uses pict_type to derive key_frame. * This is incorrect for H.264; IDR markings must be used. * Zero here; IDR markings per slice in frame or fields are ORed in later. * See decode_nal_units(). @@ -1319,7 +1319,7 @@ int ff_h264_frame_start(H264Context *h){ // We mark the current picture as non-reference after allocating it, so // that if we break out due to an error it can be released automatically - // in the next MPV_frame_start(). + // in the next ff_MPV_frame_start(). // SVQ3 as well as most other codecs have only last/next/current and thus // get released even with set reference, besides SVQ3 and others do not // mark frames as reference later "naturally". @@ -2562,7 +2562,7 @@ static int field_end(H264Context *h, int in_setup){ if (!FIELD_PICTURE) ff_er_frame_end(s); - MPV_frame_end(s); + ff_MPV_frame_end(s); h->current_slice=0; @@ -2625,7 +2625,7 @@ int ff_h264_get_profile(SPS *sps) /** * Decode a slice header. - * This will also call MPV_common_init() and frame_start() as needed. + * This will also call ff_MPV_common_init() and frame_start() as needed. * * @param h h264context * @param h0 h264 master context (differs from 'h' when doing sliced based parallel decoding) @@ -2734,7 +2734,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ } free_tables(h, 0); flush_dpb(s->avctx); - MPV_common_end(s); + ff_MPV_common_end(s); } if (!s->context_initialized) { if (h != h0) { @@ -2806,8 +2806,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ s->avctx->hwaccel = ff_find_hwaccel(s->avctx->codec->id, s->avctx->pix_fmt); - if (MPV_common_init(s) < 0) { - av_log(h->s.avctx, AV_LOG_ERROR, "MPV_common_init() failed.\n"); + if (ff_MPV_common_init(s) < 0) { + av_log(h->s.avctx, AV_LOG_ERROR, "ff_MPV_common_init() failed.\n"); return -1; } s->first_field = 0; @@ -4119,7 +4119,7 @@ av_cold int ff_h264_decode_end(AVCodecContext *avctx) ff_h264_free_context(h); - MPV_common_end(s); + ff_MPV_common_end(s); // memset(h, 0, sizeof(H264Context)); diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 6a90338eb9..ac5c716496 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -191,8 +191,8 @@ AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need t .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_LJPEG, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, + .init = ff_MPV_encode_init, .encode = encode_picture_lossless, - .close = MPV_encode_end, + .close = ff_MPV_encode_end, .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"), }; diff --git a/libavcodec/mips/mpegvideo_mmi.c b/libavcodec/mips/mpegvideo_mmi.c index 623e35af33..46239f7ba5 100644 --- a/libavcodec/mips/mpegvideo_mmi.c +++ b/libavcodec/mips/mpegvideo_mmi.c @@ -80,7 +80,7 @@ static void dct_unquantize_h263_mmi(MpegEncContext *s, } -void MPV_common_init_mmi(MpegEncContext *s) +void ff_MPV_common_init_mmi(MpegEncContext *s) { s->dct_unquantize_h263_intra = s->dct_unquantize_h263_inter = dct_unquantize_h263_mmi; diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index d1005c8ab1..ef47ceaf1d 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -450,9 +450,9 @@ AVCodec ff_mjpeg_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MJPEG, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), }; diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index da4dd2c170..4b526eb6ef 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1117,7 +1117,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) for (i = 0; i < 64; i++) s2->dsp.idct_permutation[i]=i; - MPV_decode_defaults(s2); + ff_MPV_decode_defaults(s2); s->mpeg_enc_ctx.avctx = avctx; s->mpeg_enc_ctx.flags = avctx->flags; @@ -1219,7 +1219,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) if (s1->mpeg_enc_ctx_allocated) { ParseContext pc = s->parse_context; s->parse_context.buffer = 0; - MPV_common_end(s); + ff_MPV_common_end(s); s->parse_context = pc; } @@ -1298,7 +1298,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) * if DCT permutation is changed. */ memcpy(old_permutation, s->dsp.idct_permutation, 64 * sizeof(uint8_t)); - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -2; quant_matrix_rebuild(s->intra_matrix, old_permutation, s->dsp.idct_permutation); @@ -1563,7 +1563,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) /* start frame decoding */ if (s->first_field || s->picture_structure == PICT_FRAME) { - if (MPV_frame_start(s, avctx) < 0) + if (ff_MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); @@ -1753,13 +1753,13 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, s->dest[1] +=(16 >> lowres) >> s->chroma_x_shift; s->dest[2] +=(16 >> lowres) >> s->chroma_x_shift; - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); if (++s->mb_x >= s->mb_width) { const int mb_size = 16 >> s->avctx->lowres; ff_draw_horiz_band(s, mb_size*(s->mb_y >> field_pic), mb_size); - MPV_report_decode_progress(s); + ff_MPV_report_decode_progress(s); s->mb_x = 0; s->mb_y += 1 << field_pic; @@ -1912,7 +1912,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) ff_er_frame_end(s); - MPV_frame_end(s); + ff_MPV_frame_end(s); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { *pict = *(AVFrame*)s->current_picture_ptr; @@ -2022,7 +2022,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) /* start new MPEG-1 context decoding */ s->out_format = FMT_MPEG1; if (s1->mpeg_enc_ctx_allocated) { - MPV_common_end(s); + ff_MPV_common_end(s); } s->width = avctx->coded_width; s->height = avctx->coded_height; @@ -2037,7 +2037,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_SIMPLE; - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; exchange_uv(s); // common init reset pblocks, so we swap them here s->swap_uv = 1; // in case of xvmc we need to swap uv for each MB @@ -2478,7 +2478,7 @@ static int mpeg_decode_end(AVCodecContext *avctx) Mpeg1Context *s = avctx->priv_data; if (s->mpeg_enc_ctx_allocated) - MPV_common_end(&s->mpeg_enc_ctx); + ff_MPV_common_end(&s->mpeg_enc_ctx); return 0; } diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 90da1ee34c..be2f1e9002 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -131,7 +131,7 @@ static av_cold int encode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; - if(MPV_encode_init(avctx) < 0) + if(ff_MPV_encode_init(avctx) < 0) return -1; if(find_frame_rate_index(s) < 0){ @@ -954,8 +954,8 @@ AVCodec ff_mpeg1video_encoder = { .id = CODEC_ID_MPEG1VIDEO, .priv_data_size = sizeof(MpegEncContext), .init = encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .supported_framerates= avpriv_frame_rate_tab+1, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, @@ -969,8 +969,8 @@ AVCodec ff_mpeg2video_encoder = { .id = CODEC_ID_MPEG2VIDEO, .priv_data_size = sizeof(MpegEncContext), .init = encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .supported_framerates= avpriv_frame_rate_tab+1, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 22997f303c..633c8d24c5 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1222,7 +1222,7 @@ static av_cold int encode_init(AVCodecContext *avctx) int ret; static int done = 0; - if((ret=MPV_encode_init(avctx)) < 0) + if((ret=ff_MPV_encode_init(avctx)) < 0) return ret; if (!done) { @@ -1336,8 +1336,8 @@ AVCodec ff_mpeg4_encoder = { .id = CODEC_ID_MPEG4, .priv_data_size = sizeof(MpegEncContext), .init = encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 7ab79c3217..d894ee4748 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -188,17 +188,17 @@ av_cold int ff_dct_common_init(MpegEncContext *s) s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c; #if HAVE_MMX - MPV_common_init_mmx(s); + ff_MPV_common_init_mmx(s); #elif ARCH_ALPHA - MPV_common_init_axp(s); + ff_MPV_common_init_axp(s); #elif HAVE_MMI - MPV_common_init_mmi(s); + ff_MPV_common_init_mmi(s); #elif ARCH_ARM - MPV_common_init_arm(s); + ff_MPV_common_init_arm(s); #elif HAVE_ALTIVEC - MPV_common_init_altivec(s); + ff_MPV_common_init_altivec(s); #elif ARCH_BFIN - MPV_common_init_bfin(s); + ff_MPV_common_init_bfin(s); #endif /* load & permutate scantables @@ -458,7 +458,7 @@ static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base) return 0; fail: - return -1; // free() through MPV_common_end() + return -1; // free() through ff_MPV_common_end() } static void free_duplicate_context(MpegEncContext *s) @@ -543,7 +543,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, s->bitstream_buffer = NULL; s->bitstream_buffer_size = s->allocated_bitstream_buffer_size = 0; - MPV_common_init(s); + ff_MPV_common_init(s); } s->avctx->coded_height = s1->avctx->coded_height; @@ -615,7 +615,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, * The changed fields will not depend upon the * prior state of the MpegEncContext. */ -void MPV_common_defaults(MpegEncContext *s) +void ff_MPV_common_defaults(MpegEncContext *s) { s->y_dc_scale_table = s->c_dc_scale_table = ff_mpeg1_dc_scale_table; @@ -644,16 +644,16 @@ void MPV_common_defaults(MpegEncContext *s) * the changed fields will not depend upon * the prior state of the MpegEncContext. */ -void MPV_decode_defaults(MpegEncContext *s) +void ff_MPV_decode_defaults(MpegEncContext *s) { - MPV_common_defaults(s); + ff_MPV_common_defaults(s); } /** * init common structure for both encoder and decoder. * this assumes that some variables like width/height are already set */ -av_cold int MPV_common_init(MpegEncContext *s) +av_cold int ff_MPV_common_init(MpegEncContext *s) { int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; int nb_slices = (HAVE_THREADS && @@ -913,12 +913,12 @@ av_cold int MPV_common_init(MpegEncContext *s) return 0; fail: - MPV_common_end(s); + ff_MPV_common_end(s); return -1; } /* init common structure for both encoder and decoder */ -void MPV_common_end(MpegEncContext *s) +void ff_MPV_common_end(MpegEncContext *s) { int i, j, k; @@ -1158,7 +1158,7 @@ static void update_noise_reduction(MpegEncContext *s) * generic function for encode/decode called after coding/decoding * the header and before a frame is coded/decoded. */ -int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) +int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) { int i; Picture *pic; @@ -1347,7 +1347,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) /* generic function for encode/decode called after a * frame has been coded/decoded. */ -void MPV_frame_end(MpegEncContext *s) +void ff_MPV_frame_end(MpegEncContext *s) { int i; /* redraw edges for the frame if decoding didn't complete */ @@ -2175,7 +2175,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s, /** * find the lowest MB row referenced in the MVs */ -int MPV_lowest_referenced_row(MpegEncContext *s, int dir) +int ff_MPV_lowest_referenced_row(MpegEncContext *s, int dir) { int my_max = INT_MIN, my_min = INT_MAX, qpel_shift = !s->quarter_sample; int my, off, i, mvs; @@ -2365,10 +2365,10 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], if(HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_FRAME) { if (s->mv_dir & MV_DIR_FORWARD) { - ff_thread_await_progress((AVFrame*)s->last_picture_ptr, MPV_lowest_referenced_row(s, 0), 0); + ff_thread_await_progress((AVFrame*)s->last_picture_ptr, ff_MPV_lowest_referenced_row(s, 0), 0); } if (s->mv_dir & MV_DIR_BACKWARD) { - ff_thread_await_progress((AVFrame*)s->next_picture_ptr, MPV_lowest_referenced_row(s, 1), 0); + ff_thread_await_progress((AVFrame*)s->next_picture_ptr, ff_MPV_lowest_referenced_row(s, 1), 0); } } @@ -2519,7 +2519,7 @@ skip_idct: } } -void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){ +void ff_MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){ #if !CONFIG_SMALL if(s->out_format == FMT_MPEG1) { if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 1); @@ -2893,7 +2893,7 @@ void ff_set_qscale(MpegEncContext * s, int qscale) s->c_dc_scale= s->c_dc_scale_table[ s->chroma_qscale ]; } -void MPV_report_decode_progress(MpegEncContext *s) +void ff_MPV_report_decode_progress(MpegEncContext *s) { if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame && !s->error_occurred) ff_thread_report_progress((AVFrame*)s->current_picture_ptr, s->mb_y, 0); diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 26213f1de1..e542369292 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -686,21 +686,21 @@ typedef struct MpegEncContext { &new_ctx->picture[pic - old_ctx->picture] : pic - (Picture*)old_ctx + (Picture*)new_ctx)\ : NULL) -void MPV_decode_defaults(MpegEncContext *s); -int MPV_common_init(MpegEncContext *s); -void MPV_common_end(MpegEncContext *s); -void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]); -int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx); -void MPV_frame_end(MpegEncContext *s); -int MPV_encode_init(AVCodecContext *avctx); -int MPV_encode_end(AVCodecContext *avctx); -int MPV_encode_picture(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data); -void MPV_common_init_mmx(MpegEncContext *s); -void MPV_common_init_axp(MpegEncContext *s); -void MPV_common_init_mmi(MpegEncContext *s); -void MPV_common_init_arm(MpegEncContext *s); -void MPV_common_init_altivec(MpegEncContext *s); -void MPV_common_init_bfin(MpegEncContext *s); +void ff_MPV_decode_defaults(MpegEncContext *s); +int ff_MPV_common_init(MpegEncContext *s); +void ff_MPV_common_end(MpegEncContext *s); +void ff_MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]); +int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx); +void ff_MPV_frame_end(MpegEncContext *s); +int ff_MPV_encode_init(AVCodecContext *avctx); +int ff_MPV_encode_end(AVCodecContext *avctx); +int ff_MPV_encode_picture(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data); +void ff_MPV_common_init_mmx(MpegEncContext *s); +void ff_MPV_common_init_axp(MpegEncContext *s); +void ff_MPV_common_init_mmi(MpegEncContext *s); +void ff_MPV_common_init_arm(MpegEncContext *s); +void ff_MPV_common_init_altivec(MpegEncContext *s); +void ff_MPV_common_init_bfin(MpegEncContext *s); void ff_clean_intra_table_entries(MpegEncContext *s); void ff_draw_horiz_band(MpegEncContext *s, int y, int h); void ff_mpeg_flush(AVCodecContext *avctx); @@ -710,8 +710,8 @@ void ff_release_unused_pictures(MpegEncContext *s, int remove_current); int ff_find_unused_picture(MpegEncContext *s, int shared); void ff_denoise_dct(MpegEncContext *s, DCTELEM *block); void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src); -int MPV_lowest_referenced_row(MpegEncContext *s, int dir); -void MPV_report_decode_progress(MpegEncContext *s); +int ff_MPV_lowest_referenced_row(MpegEncContext *s, int dir); +void ff_MPV_report_decode_progress(MpegEncContext *s); int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); const uint8_t *avpriv_mpv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state); void ff_set_qscale(MpegEncContext * s, int qscale); diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index 5612d4e025..ebf9c7d619 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -45,7 +45,7 @@ int ff_dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int * Set the given MpegEncContext to common defaults (same for encoding and decoding). * The changed fields will not depend upon the prior state of the MpegEncContext. */ -void MPV_common_defaults(MpegEncContext *s); +void ff_MPV_common_defaults(MpegEncContext *s); static inline void gmc1_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index a674d6315a..10323fc8c0 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -264,7 +264,7 @@ static void update_duplicate_context_after_me(MpegEncContext *dst, static void MPV_encode_defaults(MpegEncContext *s) { int i; - MPV_common_defaults(s); + ff_MPV_common_defaults(s); for (i = -16; i < 16; i++) { default_fcode_tab[i + MAX_MV] = 1; @@ -274,7 +274,7 @@ static void MPV_encode_defaults(MpegEncContext *s) } /* init video encoder */ -av_cold int MPV_encode_init(AVCodecContext *avctx) +av_cold int ff_MPV_encode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; int i; @@ -764,7 +764,7 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) s->alternate_scan); /* init */ - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; if (!s->dct_quantize) @@ -831,13 +831,13 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) return 0; } -av_cold int MPV_encode_end(AVCodecContext *avctx) +av_cold int ff_MPV_encode_end(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; ff_rate_control_uninit(s); - MPV_common_end(s); + ff_MPV_common_end(s); if ((CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) && s->out_format == FMT_MJPEG) ff_mjpeg_encode_close(s); @@ -1373,8 +1373,8 @@ no_output_pic: return 0; } -int MPV_encode_picture(AVCodecContext *avctx, - unsigned char *buf, int buf_size, void *data) +int ff_MPV_encode_picture(AVCodecContext *avctx, + unsigned char *buf, int buf_size, void *data) { MpegEncContext *s = avctx->priv_data; AVFrame *pic_arg = data; @@ -1406,7 +1406,7 @@ int MPV_encode_picture(AVCodecContext *avctx, //emms_c(); //printf("qs:%f %f %d\n", s->new_picture.quality, // s->current_picture.quality, s->qscale); - MPV_frame_start(s, avctx); + ff_MPV_frame_start(s, avctx); vbv_retry: if (encode_picture(s, s->picture_number) < 0) return -1; @@ -1421,7 +1421,7 @@ vbv_retry: avctx->p_count = s->mb_num - s->i_count - s->skip_count; avctx->skip_count = s->skip_count; - MPV_frame_end(s); + ff_MPV_frame_end(s); if (CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG) ff_mjpeg_encode_picture_trailer(s); @@ -2137,7 +2137,7 @@ static inline void encode_mb_hq(MpegEncContext *s, MpegEncContext *backup, MpegE } if(s->avctx->mb_decision == FF_MB_DECISION_RD){ - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); score *= s->lambda2; score += sse_mb(s) << FF_LAMBDA_SHIFT; @@ -2743,7 +2743,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ } if(s->avctx->mb_decision == FF_MB_DECISION_BITS) - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); } else { int motion_x = 0, motion_y = 0; s->mv_type=MV_TYPE_16X16; @@ -2863,7 +2863,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ s->out_format == FMT_H263 && s->pict_type!=AV_PICTURE_TYPE_B) ff_h263_update_motion_val(s); - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); } /* clean the MV table in IPS frames for direct mode in B frames */ @@ -4040,9 +4040,9 @@ AVCodec ff_h263_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H263, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"), .priv_class = &h263_class, @@ -4067,9 +4067,9 @@ AVCodec ff_h263p_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H263P, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .capabilities = CODEC_CAP_SLICE_THREADS, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), @@ -4081,9 +4081,9 @@ AVCodec ff_msmpeg4v2_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MSMPEG4V2, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), }; @@ -4093,9 +4093,9 @@ AVCodec ff_msmpeg4v3_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MSMPEG4V3, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), }; @@ -4105,9 +4105,9 @@ AVCodec ff_wmv1_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_WMV1, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"), }; diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c index a033cd7372..0eb63bc947 100644 --- a/libavcodec/ppc/mpegvideo_altivec.c +++ b/libavcodec/ppc/mpegvideo_altivec.c @@ -554,7 +554,7 @@ static void dct_unquantize_h263_altivec(MpegEncContext *s, } -void MPV_common_init_altivec(MpegEncContext *s) +void ff_MPV_common_init_altivec(MpegEncContext *s) { if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index a282ba7724..75d529f42d 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -351,11 +351,11 @@ static int rv20_decode_picture_header(MpegEncContext *s) av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h); if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0) return -1; - MPV_common_end(s); + ff_MPV_common_end(s); avcodec_set_dimensions(s->avctx, new_w, new_h); s->width = new_w; s->height = new_h; - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; } @@ -427,7 +427,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) return -1; } - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); s->avctx= avctx; s->out_format = FMT_H263; @@ -468,7 +468,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) avctx->pix_fmt = PIX_FMT_YUV420P; - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; ff_h263_decode_init_vlc(s); @@ -491,7 +491,7 @@ static av_cold int rv10_decode_end(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; - MPV_common_end(s); + ff_MPV_common_end(s); return 0; } @@ -526,10 +526,10 @@ static int rv10_decode_packet(AVCodecContext *avctx, if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) { if(s->current_picture_ptr){ //FIXME write parser so we always have complete frames? ff_er_frame_end(s); - MPV_frame_end(s); + ff_MPV_frame_end(s); s->mb_x= s->mb_y = s->resync_mb_x = s->resync_mb_y= 0; } - if(MPV_frame_start(s, avctx) < 0) + if(ff_MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); } else { @@ -596,7 +596,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, } if(s->pict_type != AV_PICTURE_TYPE_B) ff_h263_update_motion_val(s); - MPV_decode_mb(s, s->block); + ff_MPV_decode_mb(s, s->block); if(s->loop_filter) ff_h263_loop_filter(s); @@ -674,7 +674,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, if(s->current_picture_ptr != NULL && s->mb_y>=s->mb_height){ ff_er_frame_end(s); - MPV_frame_end(s); + ff_MPV_frame_end(s); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { *pict= *(AVFrame*)s->current_picture_ptr; diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index b8d5bdfd46..0591cec479 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -61,9 +61,9 @@ AVCodec ff_rv10_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_RV10, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("RealVideo 1.0"), }; diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c index 78ebb46c2a..bd80c155e6 100644 --- a/libavcodec/rv20enc.c +++ b/libavcodec/rv20enc.c @@ -62,9 +62,9 @@ AVCodec ff_rv20_encoder = { .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_RV20, .priv_data_size = sizeof(MpegEncContext), - .init = MPV_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .init = ff_MPV_encode_init, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("RealVideo 2.0"), }; diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index da8e79e04c..e15affeb8d 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1427,17 +1427,17 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n", r->si.width, r->si.height); - MPV_common_end(s); + ff_MPV_common_end(s); s->width = r->si.width; s->height = r->si.height; avcodec_set_dimensions(s->avctx, s->width, s->height); - if ((err = MPV_common_init(s)) < 0) + if ((err = ff_MPV_common_init(s)) < 0) return err; if ((err = rv34_decoder_realloc(r)) < 0) return err; } s->pict_type = r->si.type ? r->si.type : AV_PICTURE_TYPE_I; - if(MPV_frame_start(s, s->avctx) < 0) + if(ff_MPV_frame_start(s, s->avctx) < 0) return -1; ff_er_frame_start(s); if (!r->tmp_b_block_base) { @@ -1541,7 +1541,7 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx) MpegEncContext *s = &r->s; int ret; - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); s->avctx = avctx; s->out_format = FMT_H263; s->codec_id = avctx->codec_id; @@ -1556,7 +1556,7 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx) avctx->has_b_frames = 1; s->low_delay = 0; - if ((ret = MPV_common_init(s)) < 0) + if ((ret = ff_MPV_common_init(s)) < 0) return ret; ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8, 1); @@ -1588,7 +1588,7 @@ int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx) if (avctx->internal->is_copy) { r->tmp_b_block_base = NULL; - if ((err = MPV_common_init(&r->s)) < 0) + if ((err = ff_MPV_common_init(&r->s)) < 0) return err; if ((err = rv34_decoder_alloc(r)) < 0) return err; @@ -1606,10 +1606,10 @@ int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecConte return 0; if (s->height != s1->height || s->width != s1->width) { - MPV_common_end(s); + ff_MPV_common_end(s); s->height = s1->height; s->width = s1->width; - if ((err = MPV_common_init(s)) < 0) + if ((err = ff_MPV_common_init(s)) < 0) return err; if ((err = rv34_decoder_realloc(r)) < 0) return err; @@ -1625,7 +1625,7 @@ int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecConte memset(&r->si, 0, sizeof(r->si)); /* necessary since it is it the condition checked for in decode_slice - * to call MPV_frame_start. cmp. comment at the end of decode_frame */ + * to call ff_MPV_frame_start. cmp. comment at the end of decode_frame */ s->current_picture_ptr = NULL; return 0; @@ -1737,7 +1737,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, if(r->loop_filter) r->loop_filter(r, s->mb_height - 1); ff_er_frame_end(s); - MPV_frame_end(s); + ff_MPV_frame_end(s); if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0); @@ -1761,7 +1761,7 @@ av_cold int ff_rv34_decode_end(AVCodecContext *avctx) { RV34DecContext *r = avctx->priv_data; - MPV_common_end(&r->s); + ff_MPV_common_end(&r->s); rv34_decoder_free(r); return 0; diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 1cbf1f51c9..80f96c8cc6 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -670,7 +670,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, || avctx->skip_frame >= AVDISCARD_ALL) return buf_size; - if(MPV_frame_start(s, avctx) < 0) + if(ff_MPV_frame_start(s, avctx) < 0) return -1; pmv = av_malloc((FFALIGN(s->width, 16)/8 + 3) * sizeof(*pmv)); @@ -738,7 +738,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, *pict = *(AVFrame*)&s->current_picture; - MPV_frame_end(s); + ff_MPV_frame_end(s); *data_size=sizeof(AVFrame); result = buf_size; @@ -753,7 +753,7 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx) int i; int offset = 0; - MPV_decode_defaults(s); + ff_MPV_decode_defaults(s); s->avctx = avctx; s->width = (avctx->width+3)&~3; @@ -762,7 +762,7 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx) avctx->pix_fmt = PIX_FMT_YUV410P; avctx->has_b_frames= 1; // not true, but DP frames and these behave like unidirectional b frames s->flags= avctx->flags; - if (MPV_common_init(s) < 0) return -1; + if (ff_MPV_common_init(s) < 0) return -1; INIT_VLC_STATIC(&svq1_block_type, 2, 4, &ff_svq1_block_type_vlc[0][1], 2, 1, @@ -804,7 +804,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; - MPV_common_end(s); + ff_MPV_common_end(s); return 0; } diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index eeb8ed7051..73de55a457 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -928,7 +928,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx) s->width = avctx->width; s->height = avctx->height; - if (MPV_common_init(s) < 0) + if (ff_MPV_common_init(s) < 0) return -1; h->b_stride = 4*s->mb_width; @@ -1073,7 +1073,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, ff_draw_horiz_band(s, 16*s->mb_y, 16); } - MPV_frame_end(s); + ff_MPV_frame_end(s); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { *(AVFrame *) data = *(AVFrame *) &s->current_picture; @@ -1097,7 +1097,7 @@ static int svq3_decode_end(AVCodecContext *avctx) ff_h264_free_context(h); - MPV_common_end(s); + ff_MPV_common_end(s); return 0; } diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index a8e8340211..c66260996f 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5396,7 +5396,7 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx) av_freep(&v->sr_rows[i >> 1][i & 1]); av_freep(&v->hrd_rate); av_freep(&v->hrd_buffer); - MPV_common_end(&v->s); + ff_MPV_common_end(&v->s); av_freep(&v->mv_type_mb_plane); av_freep(&v->direct_mb_plane); av_freep(&v->forward_mb_plane); @@ -5648,7 +5648,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, s->next_p_frame_damaged = 0; } - if (MPV_frame_start(s, avctx) < 0) { + if (ff_MPV_frame_start(s, avctx) < 0) { goto err; } @@ -5732,7 +5732,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, ff_er_frame_end(s); } - MPV_frame_end(s); + ff_MPV_frame_end(s); if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { image: diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index 9bb14b766a..5ef8d8c48f 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -55,7 +55,7 @@ static int encode_ext_header(Wmv2Context *w){ static av_cold int wmv2_encode_init(AVCodecContext *avctx){ Wmv2Context * const w= avctx->priv_data; - if(MPV_encode_init(avctx) < 0) + if(ff_MPV_encode_init(avctx) < 0) return -1; ff_wmv2_common_init(w); @@ -217,8 +217,8 @@ AVCodec ff_wmv2_encoder = { .id = CODEC_ID_WMV2, .priv_data_size = sizeof(Wmv2Context), .init = wmv2_encode_init, - .encode = MPV_encode_picture, - .close = MPV_encode_end, + .encode = ff_MPV_encode_picture, + .close = ff_MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 8"), }; diff --git a/libavcodec/x86/mpegvideo_mmx.c b/libavcodec/x86/mpegvideo_mmx.c index 7181a66914..dcce48638b 100644 --- a/libavcodec/x86/mpegvideo_mmx.c +++ b/libavcodec/x86/mpegvideo_mmx.c @@ -626,7 +626,7 @@ static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){ #include "mpegvideo_mmx_template.c" #endif -void MPV_common_init_mmx(MpegEncContext *s) +void ff_MPV_common_init_mmx(MpegEncContext *s) { int mm_flags = av_get_cpu_flags(); -- cgit v1.2.1 From f73673a770215f2f601ebb6e75d264533f738cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 14:15:40 +0200 Subject: sh4: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/sh4/dsputil_sh4.c | 6 +++--- libavcodec/sh4/dsputil_sh4.h | 2 +- libavcodec/sh4/idct_sh4.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/sh4/dsputil_sh4.c b/libavcodec/sh4/dsputil_sh4.c index 6accb27395..74c8670c7d 100644 --- a/libavcodec/sh4/dsputil_sh4.c +++ b/libavcodec/sh4/dsputil_sh4.c @@ -56,7 +56,7 @@ static void idct_put(uint8_t *dest, int line_size, DCTELEM *block) { int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; - idct_sh4(block); + ff_idct_sh4(block); for(i=0;i<8;i++) { dest[0] = cm[block[0]]; dest[1] = cm[block[1]]; @@ -74,7 +74,7 @@ static void idct_add(uint8_t *dest, int line_size, DCTELEM *block) { int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; - idct_sh4(block); + ff_idct_sh4(block); for(i=0;i<8;i++) { dest[0] = cm[dest[0]+block[0]]; dest[1] = cm[dest[1]+block[1]]; @@ -101,7 +101,7 @@ void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx) (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4)) { c->idct_put = idct_put; c->idct_add = idct_add; - c->idct = idct_sh4; + c->idct = ff_idct_sh4; c->idct_permutation_type= FF_NO_IDCT_PERM; } } diff --git a/libavcodec/sh4/dsputil_sh4.h b/libavcodec/sh4/dsputil_sh4.h index c838c4d6d7..7e8ebbc68e 100644 --- a/libavcodec/sh4/dsputil_sh4.h +++ b/libavcodec/sh4/dsputil_sh4.h @@ -22,7 +22,7 @@ #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" -void idct_sh4(DCTELEM *block); +void ff_idct_sh4(DCTELEM *block); void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx); #endif /* AVCODEC_SH4_DSPUTIL_SH4_H */ diff --git a/libavcodec/sh4/idct_sh4.c b/libavcodec/sh4/idct_sh4.c index 0baff396e0..9da6ffcf65 100644 --- a/libavcodec/sh4/idct_sh4.c +++ b/libavcodec/sh4/idct_sh4.c @@ -89,7 +89,7 @@ static const float odd_table[] __attribute__ ((aligned(8))) = { //optimized -void idct_sh4(DCTELEM *block) +void ff_idct_sh4(DCTELEM *block) { DEFREG; -- cgit v1.2.1 From 210f72845c11fbab7b913a4f18ffd67e99d2dd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Feb 2012 14:42:56 +0200 Subject: ppc: Add ff_ prefix to nonstatic symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/ppc/dsputil_altivec.c | 10 +++++----- libavcodec/ppc/dsputil_altivec.h | 18 +++++++++--------- libavcodec/ppc/dsputil_ppc.c | 12 ++++++------ libavcodec/ppc/fdct_altivec.c | 2 +- libavcodec/ppc/float_altivec.c | 2 +- libavcodec/ppc/gmc_altivec.c | 2 +- libavcodec/ppc/h264_altivec.c | 2 +- libavcodec/ppc/idct_altivec.c | 4 ++-- libavcodec/ppc/int_altivec.c | 2 +- libavcodec/ppc/vp8dsp_altivec.c | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c index 20bff45c9c..d27a2bc836 100644 --- a/libavcodec/ppc/dsputil_altivec.c +++ b/libavcodec/ppc/dsputil_altivec.c @@ -609,7 +609,7 @@ static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w) { } /* next one assumes that ((line_size % 16) == 0) */ -void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h) +void ff_put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h) { register vector unsigned char pixelsv1, pixelsv2; register vector unsigned char pixelsv1B, pixelsv2B; @@ -651,7 +651,7 @@ void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, /* next one assumes that ((line_size % 16) == 0) */ #define op_avg(a,b) a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEUL)>>1) ) -void avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h) +void ff_avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h) { register vector unsigned char pixelsv1, pixelsv2, pixelsv, blockv; register vector unsigned char perm = vec_lvsl(0, pixels); @@ -1391,10 +1391,10 @@ void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx) if (!high_bit_depth) { c->get_pixels = get_pixels_altivec; c->clear_block = clear_block_altivec; - c->put_pixels_tab[0][0] = put_pixels16_altivec; + c->put_pixels_tab[0][0] = ff_put_pixels16_altivec; /* the two functions do the same thing, so use the same code */ - c->put_no_rnd_pixels_tab[0][0] = put_pixels16_altivec; - c->avg_pixels_tab[0][0] = avg_pixels16_altivec; + c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_altivec; + c->avg_pixels_tab[0][0] = ff_avg_pixels16_altivec; c->avg_pixels_tab[1][0] = avg_pixels8_altivec; c->avg_pixels_tab[1][3] = avg_pixels8_xy2_altivec; c->put_pixels_tab[1][3] = put_pixels8_xy2_altivec; diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h index 6040be1c17..63bb7602f8 100644 --- a/libavcodec/ppc/dsputil_altivec.h +++ b/libavcodec/ppc/dsputil_altivec.h @@ -26,15 +26,15 @@ #include #include "libavcodec/dsputil.h" -void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h); +void ff_put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h); -void avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h); +void ff_avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h); -void fdct_altivec(int16_t *block); -void gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h, - int x16, int y16, int rounder); -void idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); -void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); +void ff_fdct_altivec(int16_t *block); +void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h, + int x16, int y16, int rounder); +void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); +void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); void ff_vp3_idct_altivec(DCTELEM *block); void ff_vp3_idct_put_altivec(uint8_t *dest, int line_size, DCTELEM *block); @@ -43,7 +43,7 @@ void ff_vp3_idct_add_altivec(uint8_t *dest, int line_size, DCTELEM *block); void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx); -void float_init_altivec(DSPContext* c, AVCodecContext *avctx); -void int_init_altivec(DSPContext* c, AVCodecContext *avctx); +void ff_float_init_altivec(DSPContext* c, AVCodecContext *avctx); +void ff_int_init_altivec(DSPContext* c, AVCodecContext *avctx); #endif /* AVCODEC_PPC_DSPUTIL_ALTIVEC_H */ diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index b64c1dc03b..ab8f7aef48 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -167,23 +167,23 @@ void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { ff_dsputil_init_altivec(c, avctx); - float_init_altivec(c, avctx); - int_init_altivec(c, avctx); - c->gmc1 = gmc1_altivec; + ff_float_init_altivec(c, avctx); + ff_int_init_altivec(c, avctx); + c->gmc1 = ff_gmc1_altivec; #if CONFIG_ENCODERS if (avctx->bits_per_raw_sample <= 8 && (avctx->dct_algo == FF_DCT_AUTO || avctx->dct_algo == FF_DCT_ALTIVEC)) { - c->fdct = fdct_altivec; + c->fdct = ff_fdct_altivec; } #endif //CONFIG_ENCODERS if (avctx->lowres == 0 && avctx->bits_per_raw_sample <= 8) { if ((avctx->idct_algo == FF_IDCT_AUTO) || (avctx->idct_algo == FF_IDCT_ALTIVEC)) { - c->idct_put = idct_put_altivec; - c->idct_add = idct_add_altivec; + c->idct_put = ff_idct_put_altivec; + c->idct_add = ff_idct_add_altivec; c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER) && avctx->idct_algo==FF_IDCT_VP3){ diff --git a/libavcodec/ppc/fdct_altivec.c b/libavcodec/ppc/fdct_altivec.c index 2644c96789..0e3658dd2f 100644 --- a/libavcodec/ppc/fdct_altivec.c +++ b/libavcodec/ppc/fdct_altivec.c @@ -195,7 +195,7 @@ static vector float fdctconsts[3] = { /* two dimensional discrete cosine transform */ -void fdct_altivec(int16_t *block) +void ff_fdct_altivec(int16_t *block) { vector signed short *bp; vector float *cp; diff --git a/libavcodec/ppc/float_altivec.c b/libavcodec/ppc/float_altivec.c index e4010694a2..8253716caa 100644 --- a/libavcodec/ppc/float_altivec.c +++ b/libavcodec/ppc/float_altivec.c @@ -122,7 +122,7 @@ static void vector_fmul_window_altivec(float *dst, const float *src0, const floa } } -void float_init_altivec(DSPContext* c, AVCodecContext *avctx) +void ff_float_init_altivec(DSPContext* c, AVCodecContext *avctx) { c->vector_fmul = vector_fmul_altivec; c->vector_fmul_reverse = vector_fmul_reverse_altivec; diff --git a/libavcodec/ppc/gmc_altivec.c b/libavcodec/ppc/gmc_altivec.c index 0ed70ab83b..965921ab7f 100644 --- a/libavcodec/ppc/gmc_altivec.c +++ b/libavcodec/ppc/gmc_altivec.c @@ -29,7 +29,7 @@ altivec-enhanced gmc1. ATM this code assume stride is a multiple of 8, to preserve proper dst alignment. */ -void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) +void ff_gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) { const DECLARE_ALIGNED(16, unsigned short, rounder_a) = rounder; const DECLARE_ALIGNED(16, unsigned short, ABCD)[8] = diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c index 6013712bdd..79e1714f4e 100644 --- a/libavcodec/ppc/h264_altivec.c +++ b/libavcodec/ppc/h264_altivec.c @@ -72,7 +72,7 @@ #define H264_MC(OPNAME, SIZE, CODETYPE) \ static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## CODETYPE (uint8_t *dst, uint8_t *src, int stride){\ - OPNAME ## pixels ## SIZE ## _ ## CODETYPE(dst, src, stride, SIZE);\ + ff_ ## OPNAME ## pixels ## SIZE ## _ ## CODETYPE(dst, src, stride, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, uint8_t *src, int stride){ \ diff --git a/libavcodec/ppc/idct_altivec.c b/libavcodec/ppc/idct_altivec.c index 068cf42396..d2e9017da4 100644 --- a/libavcodec/ppc/idct_altivec.c +++ b/libavcodec/ppc/idct_altivec.c @@ -158,7 +158,7 @@ static const vec_s16 constants[5] = { {19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722} }; -void idct_put_altivec(uint8_t* dest, int stride, int16_t *blk) +void ff_idct_put_altivec(uint8_t* dest, int stride, int16_t *blk) { vec_s16 *block = (vec_s16*)blk; vec_u8 tmp; @@ -180,7 +180,7 @@ void idct_put_altivec(uint8_t* dest, int stride, int16_t *blk) COPY (dest, vx7) } -void idct_add_altivec(uint8_t* dest, int stride, int16_t *blk) +void ff_idct_add_altivec(uint8_t* dest, int stride, int16_t *blk) { vec_s16 *block = (vec_s16*)blk; vec_u8 tmp; diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c index 25cbb8f771..ce996fa68a 100644 --- a/libavcodec/ppc/int_altivec.c +++ b/libavcodec/ppc/int_altivec.c @@ -144,7 +144,7 @@ static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1, const int16_t * return ires; } -void int_init_altivec(DSPContext* c, AVCodecContext *avctx) +void ff_int_init_altivec(DSPContext* c, AVCodecContext *avctx) { c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec; c->scalarproduct_int16 = scalarproduct_int16_altivec; diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index bdda7df505..9c0f663a71 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -268,7 +268,7 @@ EPEL_HV(4, 4,4) static void put_vp8_pixels16_altivec(uint8_t *dst, int stride, uint8_t *src, int s, int h, int mx, int my) { - put_pixels16_altivec(dst, src, stride, h); + ff_put_pixels16_altivec(dst, src, stride, h); } av_cold void ff_vp8dsp_init_altivec(VP8DSPContext *c) -- cgit v1.2.1