aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-10-08 09:14:46 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-10-08 09:14:46 +0000
commit69cea75f6bef7f3d5a088a4d4d8e2fdc25fc8d41 (patch)
tree00913f480ad894706761f0ac26ea1031da819e3b /libavcodec
parent6180ade790f16b2095ef8338dcd5fcc1deda7bcb (diff)
downloadffmpeg-69cea75f6bef7f3d5a088a4d4d8e2fdc25fc8d41.tar.gz
export convert_matrix and add ff_ prefix
Originally committed as revision 10681 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.h2
-rw-r--r--libavcodec/mpegvideo_enc.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index c957441667..d3d8f6f334 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -724,6 +724,8 @@ void ff_er_frame_end(MpegEncContext *s);
void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int endy, int status);
int ff_dct_common_init(MpegEncContext *s);
+void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[2][64],
+ const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra);
extern enum PixelFormat ff_yuv420p_list[2];
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index cd0ab9b39d..661a756daa 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -66,7 +66,7 @@ static uint8_t default_fcode_tab[MAX_MV*2+1];
enum PixelFormat ff_yuv420p_list[2]= {PIX_FMT_YUV420P, -1};
-static void convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[2][64],
+void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[2][64],
const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra)
{
int qscale;
@@ -716,9 +716,9 @@ int MPV_encode_init(AVCodecContext *avctx)
/* precompute matrix */
/* for mjpeg, we do include qscale in the matrix */
if (s->out_format != FMT_MJPEG) {
- convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16,
+ ff_convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16,
s->intra_matrix, s->intra_quant_bias, avctx->qmin, 31, 1);
- convert_matrix(&s->dsp, s->q_inter_matrix, s->q_inter_matrix16,
+ ff_convert_matrix(&s->dsp, s->q_inter_matrix, s->q_inter_matrix16,
s->inter_matrix, s->inter_quant_bias, avctx->qmin, 31, 0);
}
@@ -2861,7 +2861,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
s->intra_matrix[j] = av_clip_uint8((ff_mpeg1_default_intra_matrix[i] * s->qscale) >> 3);
}
- convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16,
+ ff_convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16,
s->intra_matrix, s->intra_quant_bias, 8, 8, 1);
s->qscale= 8;
}