From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B76854F163 for ; Sun, 15 Jun 2025 16:58:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id BCE6068D79F; Sun, 15 Jun 2025 19:56:43 +0300 (EEST) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id DBB0568D79F for ; Sun, 15 Jun 2025 19:56:41 +0300 (EEST) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-3116db72bd7so4061217a91.2 for ; Sun, 15 Jun 2025 09:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750006600; x=1750611400; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=pX2zBLqbgbLUmQhJkUSj23hbzf63jSjxe914bmpChUQ=; b=mVn1euaXT5yAcWWa3GtgNMnsFfWMAzdiTqJ1kwZXfvQJOny8ohADsEaJJJ5T9C6oYH 888kWEBpxwk4JrVjAr1z8uxAmJ3hFOOu39AdTKkV3Ph8nHYS+ospasPx2oYX9MQvIB0g Hj8aFKhMkveeaQ5wW1+M82neuuonaqNP33muJ0FggkNInJWN/6mkcwuuTicZ1WK3AZZq OBn0rvnAeAt3qnCii/WX4prlObRTK3RD4XvX38a82LBK475J8JXxD3sxF2pu8yCT1Y5s jy4uB/fTZ/0MF8bDycjmtJzXzX17BZyTSCQywoA6tiA4pHbmzhsBazqWOXO6JD514l58 JUrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750006600; x=1750611400; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pX2zBLqbgbLUmQhJkUSj23hbzf63jSjxe914bmpChUQ=; b=PiDispV5/OT7GJhT4qSJDK+4Nc3JTvXjFHYjJIfYJpl3WOgSM1pEKLov5i3h/s1f8X xS487FKbpqw5sqDK5CNm1aNw/l1tLoJFOEYWxxFt1t9q0e8y3sa0raxMF2PsxcBRqlwy J3aQKrSx/Q2cExpReWWDCi9pIs/x69y/JStAhE4EX4r8CG816o9iq/Qd98zHO58NPDCV 6wvVSq9LWdMwo6fgZ9EcnMiojB0dxqmgBzN223engEom/BuVok9tujst12QUADk82E+F 5SLBDzeocLZEAIwdEoz1J8N4RKLIzSc9irGA/KYqSirOB7zKBizKLjQljOS3Fp1cMDdI qzEw== X-Gm-Message-State: AOJu0YyfG5URnNqoJ/0hK7nWNfA5LUvHEC1R+Qo288x14XoG1gGRhHK6 48Yp/5E5nIgfXABwzEDNrNtCOsSvBi/vot3HF5XDS57UxC4MTn1PgeNVdcC/9w== X-Gm-Gg: ASbGncv9VAdqm1ySaXCGB56m5DbQVIv4yuqZnDJ8OTcJsAlp+ZL3YT1R+cL5Eb3OhSg +JS9bSh6bImGCagzYMqxM2oWIYRUmvLAqUuRkcAdmnqGKwhnv2DyNhFfI6SKIyhhPhuSZOgy1qp ASvVxs/nYpmtZnn7jse8i8arbRf1j8lrm29sUROqsEoJKP4+bpNhJtCmkH0t08Pi0hA0aQ2HBVl fh/UZlmcfKC4YeIldIglCR8k1sGRV4WzQ0SwjKWA7vlfHZpZfDsmcm8zqDitJasLyNz/sjAp8Jf lxF5acldNswTIOukTRL8VwqP/gXEdQyP/1I+lP9VNK6cDTKa5KBAkHLvfM2juXw6VPpMdHlXtqr DSyanGKKHmOKidqtz X-Google-Smtp-Source: AGHT+IEqKLTaGceKEJnBTUrGTDwAdIOgw868m0fYKnYZ5z5TtC1tZywy+miCpu198/bE/Vm9V/60Vg== X-Received: by 2002:a17:90b:51ca:b0:311:cc4e:516f with SMTP id 98e67ed59e1d1-313f1e47bc3mr10605311a91.31.1750006599713; Sun, 15 Jun 2025 09:56:39 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-313c1b5129asm6866394a91.28.2025.06.15.09.56.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jun 2025 09:56:39 -0700 (PDT) From: Andreas Rheinhardt X-Google-Original-From: Andreas Rheinhardt Message-Id: In-Reply-To: References: Date: Sun, 15 Jun 2025 16:54:11 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 20/47] configure: Relax svq1enc->mpegvideoenc dependency X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Andreas Rheinhardt It only needs mpegvideoencdsp, motion_est.o and some H.263 specific parts. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/Makefile | 2 +- libavcodec/h263.c | 5 ++++- libavcodec/ituh263enc.c | 41 ++++++++++++++++++++++------------------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/configure b/configure index a32bbc3f90..2a1961b61a 100755 --- a/configure +++ b/configure @@ -3113,7 +3113,7 @@ speedhq_decoder_select="blockdsp idctdsp" speedhq_encoder_select="mpegvideoenc" srgc_decoder_select="inflate_wrapper" 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_suggest="zlib" tak_decoder_select="audiodsp" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index faffed1c34..8aa0309e09 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -721,7 +721,7 @@ OBJS-$(CONFIG_SBC_DECODER) += sbcdec.o sbc.o OBJS-$(CONFIG_SBC_ENCODER) += sbcenc.o sbc.o sbcdsp.o OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.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_TEXT_DECODER) += textdec.o ass.o OBJS-$(CONFIG_TEXT_ENCODER) += srtenc.o ass_split.o diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 19eb3ba52f..6d2de715ab 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -27,17 +27,19 @@ * H.263/MPEG-4 codec. */ +#include "config.h" + #include "libavutil/thread.h" #include "mpegvideo.h" #include "h263.h" #include "h263data.h" #include "h263dsp.h" -#include "idctdsp.h" #include "mathops.h" #include "mpegpicture.h" #include "mpegutils.h" #include "rl.h" +#if CONFIG_MPEGVIDEO static av_cold void h263_init_rl_inter(void) { 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; ff_thread_once(&init_static_once, h263_init_rl_inter); } +#endif void ff_h263_update_motion_val(MpegEncContext * s){ const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index ab6edafd4d..ae67907722 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -53,21 +53,7 @@ */ static uint8_t mv_penalty[MAX_FCODE+1][MAX_DMV*2+1]; -/** - * 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) +static av_cold void init_mv_penalty(void) { for (int f_code = 1; f_code <= MAX_FCODE; f_code++) { 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; } } - - 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) { 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) { +#if CONFIG_H263_ENCODER static uint8_t rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3]; - ff_rl_init(&ff_rl_intra_aic, rl_intra_table); 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_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] -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".