You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
configure: Relax svq1enc->mpegvideoenc dependency
It only needs mpegvideoencdsp, motion_est.o and some H.263 specific parts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
2
configure
vendored
2
configure
vendored
@ -3116,7 +3116,7 @@ speedhq_decoder_select="blockdsp idctdsp"
|
|||||||
speedhq_encoder_select="mpegvideoenc"
|
speedhq_encoder_select="mpegvideoenc"
|
||||||
srgc_decoder_select="inflate_wrapper"
|
srgc_decoder_select="inflate_wrapper"
|
||||||
svq1_decoder_select="hpeldsp"
|
svq1_decoder_select="hpeldsp"
|
||||||
svq1_encoder_select="hpeldsp me_cmp mpegvideoenc"
|
svq1_encoder_select="hpeldsp me_cmp mpegvideoencdsp"
|
||||||
svq3_decoder_select="golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp"
|
svq3_decoder_select="golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp"
|
||||||
svq3_decoder_suggest="zlib"
|
svq3_decoder_suggest="zlib"
|
||||||
tak_decoder_select="audiodsp"
|
tak_decoder_select="audiodsp"
|
||||||
|
@ -722,7 +722,7 @@ OBJS-$(CONFIG_SBC_DECODER) += sbcdec.o sbc.o
|
|||||||
OBJS-$(CONFIG_SBC_ENCODER) += sbcenc.o sbc.o sbcdsp.o
|
OBJS-$(CONFIG_SBC_ENCODER) += sbcenc.o sbc.o sbcdsp.o
|
||||||
OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263data.o
|
OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263data.o
|
||||||
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o h263data.o \
|
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o h263data.o \
|
||||||
h263.o ituh263enc.o
|
h263.o ituh263enc.o motion_est.o
|
||||||
OBJS-$(CONFIG_SVQ3_DECODER) += svq3.o mpegutils.o h264data.o
|
OBJS-$(CONFIG_SVQ3_DECODER) += svq3.o mpegutils.o h264data.o
|
||||||
OBJS-$(CONFIG_TEXT_DECODER) += textdec.o ass.o
|
OBJS-$(CONFIG_TEXT_DECODER) += textdec.o ass.o
|
||||||
OBJS-$(CONFIG_TEXT_ENCODER) += srtenc.o ass_split.o
|
OBJS-$(CONFIG_TEXT_ENCODER) += srtenc.o ass_split.o
|
||||||
|
@ -27,17 +27,19 @@
|
|||||||
* H.263/MPEG-4 codec.
|
* H.263/MPEG-4 codec.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include "libavutil/thread.h"
|
#include "libavutil/thread.h"
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
#include "h263.h"
|
#include "h263.h"
|
||||||
#include "h263data.h"
|
#include "h263data.h"
|
||||||
#include "h263dsp.h"
|
#include "h263dsp.h"
|
||||||
#include "idctdsp.h"
|
|
||||||
#include "mathops.h"
|
#include "mathops.h"
|
||||||
#include "mpegpicture.h"
|
#include "mpegpicture.h"
|
||||||
#include "mpegutils.h"
|
#include "mpegutils.h"
|
||||||
#include "rl.h"
|
#include "rl.h"
|
||||||
|
|
||||||
|
#if CONFIG_MPEGVIDEO
|
||||||
static av_cold void h263_init_rl_inter(void)
|
static av_cold void h263_init_rl_inter(void)
|
||||||
{
|
{
|
||||||
static uint8_t h263_rl_inter_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
|
static uint8_t h263_rl_inter_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
|
||||||
@ -49,6 +51,7 @@ av_cold void ff_h263_init_rl_inter(void)
|
|||||||
static AVOnce init_static_once = AV_ONCE_INIT;
|
static AVOnce init_static_once = AV_ONCE_INIT;
|
||||||
ff_thread_once(&init_static_once, h263_init_rl_inter);
|
ff_thread_once(&init_static_once, h263_init_rl_inter);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void ff_h263_update_motion_val(MpegEncContext * s){
|
void ff_h263_update_motion_val(MpegEncContext * s){
|
||||||
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
|
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
|
||||||
|
@ -53,21 +53,7 @@
|
|||||||
*/
|
*/
|
||||||
static uint8_t mv_penalty[MAX_FCODE+1][MAX_DMV*2+1];
|
static uint8_t mv_penalty[MAX_FCODE+1][MAX_DMV*2+1];
|
||||||
|
|
||||||
/**
|
static av_cold void init_mv_penalty(void)
|
||||||
* Minimal fcode that a motion vector component would need in umv.
|
|
||||||
* All entries in this table are 1.
|
|
||||||
*/
|
|
||||||
static uint8_t umv_fcode_tab[MAX_MV*2+1];
|
|
||||||
|
|
||||||
//unified encoding tables for run length encoding of coefficients
|
|
||||||
//unified in the sense that the specification specifies the encoding in several steps.
|
|
||||||
static uint8_t uni_h263_intra_aic_rl_len [64*64*2*2];
|
|
||||||
static uint8_t uni_h263_inter_rl_len [64*64*2*2];
|
|
||||||
//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level))
|
|
||||||
//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run) + (level)*64)
|
|
||||||
#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run)*128 + (level))
|
|
||||||
|
|
||||||
static av_cold void init_mv_penalty_and_fcode(void)
|
|
||||||
{
|
{
|
||||||
for (int f_code = 1; f_code <= MAX_FCODE; f_code++) {
|
for (int f_code = 1; f_code <= MAX_FCODE; f_code++) {
|
||||||
for (int mv = -MAX_DMV; mv <= MAX_DMV; mv++) {
|
for (int mv = -MAX_DMV; mv <= MAX_DMV; mv++) {
|
||||||
@ -94,10 +80,23 @@ static av_cold void init_mv_penalty_and_fcode(void)
|
|||||||
mv_penalty[f_code][mv + MAX_DMV] = len;
|
mv_penalty[f_code][mv + MAX_DMV] = len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(umv_fcode_tab, 1, sizeof(umv_fcode_tab));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_H263_ENCODER
|
||||||
|
/**
|
||||||
|
* Minimal fcode that a motion vector component would need in umv.
|
||||||
|
* All entries in this table are 1.
|
||||||
|
*/
|
||||||
|
static uint8_t umv_fcode_tab[MAX_MV*2+1];
|
||||||
|
|
||||||
|
//unified encoding tables for run length encoding of coefficients
|
||||||
|
//unified in the sense that the specification specifies the encoding in several steps.
|
||||||
|
static uint8_t uni_h263_intra_aic_rl_len [64*64*2*2];
|
||||||
|
static uint8_t uni_h263_inter_rl_len [64*64*2*2];
|
||||||
|
//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level))
|
||||||
|
//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run) + (level)*64)
|
||||||
|
#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run)*128 + (level))
|
||||||
|
|
||||||
static av_cold void init_uni_h263_rl_tab(const RLTable *rl, uint8_t *len_tab)
|
static av_cold void init_uni_h263_rl_tab(const RLTable *rl, uint8_t *len_tab)
|
||||||
{
|
{
|
||||||
av_assert0(MAX_LEVEL >= 64);
|
av_assert0(MAX_LEVEL >= 64);
|
||||||
@ -137,18 +136,22 @@ static av_cold void init_uni_h263_rl_tab(const RLTable *rl, uint8_t *len_tab)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static av_cold void h263_encode_init_static(void)
|
static av_cold void h263_encode_init_static(void)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_H263_ENCODER
|
||||||
static uint8_t rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
|
static uint8_t rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
|
||||||
|
|
||||||
ff_rl_init(&ff_rl_intra_aic, rl_intra_table);
|
ff_rl_init(&ff_rl_intra_aic, rl_intra_table);
|
||||||
ff_h263_init_rl_inter();
|
ff_h263_init_rl_inter();
|
||||||
|
|
||||||
init_uni_h263_rl_tab(&ff_rl_intra_aic, uni_h263_intra_aic_rl_len);
|
init_uni_h263_rl_tab(&ff_rl_intra_aic, uni_h263_intra_aic_rl_len);
|
||||||
init_uni_h263_rl_tab(&ff_h263_rl_inter, uni_h263_inter_rl_len);
|
init_uni_h263_rl_tab(&ff_h263_rl_inter, uni_h263_inter_rl_len);
|
||||||
|
|
||||||
init_mv_penalty_and_fcode();
|
memset(umv_fcode_tab, 1, sizeof(umv_fcode_tab));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
init_mv_penalty();
|
||||||
}
|
}
|
||||||
|
|
||||||
av_cold const uint8_t (*ff_h263_get_mv_penalty(void))[MAX_DMV*2+1]
|
av_cold const uint8_t (*ff_h263_get_mv_penalty(void))[MAX_DMV*2+1]
|
||||||
|
Reference in New Issue
Block a user