From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 17 Nov 2026 07:14:55 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xTCT0-000KT5-1J for lore@lore.pengutronix.de; Tue, 17 Nov 2026 07:14:55 +0100 Received: from [127.0.0.1] (helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1xTCSz-0007DV-M5; Tue, 17 Nov 2026 07:14:53 +0100 Received: from mx1.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::107]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1xTCSe-0006cw-Re for ptxdist@pengutronix.de; Tue, 17 Nov 2026 07:14:32 +0100 Received: from dude05.red.stw.pengutronix.de (dude05.red.stw.pengutronix.de [IPv6:2a0a:edc0:0:1101:1d::54]) (Authenticated sender: relay-from-dude05.red.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id C5ED6205A2F; Tue, 17 Nov 2026 07:14:32 +0100 (CET) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1794896072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qdl6dc5KlwZXwBB9iLPohJqdtYqYi9FQ5JL9UtIE+5M=; b=JDsRPpuopfm7RFfa5BOwPQpyFrnpcMKkhhuWB+7G9L/TSs2Bp99IEyyWtbiWmLtPvZK2bd EkWXd87fKcr54hUg3VPbUhqcVvw0jOk5lM2o969x1wRsPNIFlkA/HVha6m0Axf5KaBBO8g ObeWaycZ22Rd6THIGKuX/51tqBeFtjWhpneH/Pex2kAvr4enJFzNq4Psld0GH/bo+uqgTL C9+Ek033ZFFMRfFFincmOBZRNWfkxlvl5DLsHqAzQlWx3jXaSKqmsnB8UhbmB0GKxBSNhc 6+N6xHfSVCaQ8X+ZSUA/t43JrFlJWk3qD8oP3lkLwt69S/s7F17CDg2wy+E3Ag== ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1794896072; a=rsa-sha256; cv=none; b=YoS4i4HB32+8VJnnBU03WRS03mdmlAridhTmChgbdUsQgVP62BicMBOI/CdedtM08Dv2Zc zK62lnF/LAXP4jwWSfUe5qAGaa+rQ5/xmVmmCbb5CqSrQTGFcsWqgm6fyoeOCJGvbZhuX3 35E5bukw8UyOZe5Kw1bpHe0QuSqwX73uoiA4JjrN312+ar1qkKNGFxAEf+1BUDsHBBLdvR jcsrDhYEDx14weN8Ca8tEYM8e9pQQ1sc+NZHsqgTyT1Ky7tKeW2f+9T7nd3moDXhwOZcY6 HTrikA703Lzn/H8Ai/X2NhVWtPGXvU9xRH5g3hNpfCmnOKD6DDyq/7ZEQOPlgg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=relay-from-dude05.red.stw.pengutronix.de smtp.mailfrom=mol@pengutronix.de Received: by dude05.red.stw.pengutronix.de (Postfix, from userid 1014) id B6F24741AD6; Tue, 17 Nov 2026 07:14:32 +0100 (CET) From: Michael Olbrich To: ptxdist@pengutronix.de Date: Tue, 17 Nov 2026 07:14:32 +0100 Message-ID: <20261117061432.3091034-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261104093811.2019171-1-s.pueschel@pengutronix.de> References: <20261104093811.2019171-1-s.pueschel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] ffmpeg: fix missing symbol in libswscale.so.10 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: =?UTF-8?q?Sven=20P=C3=BCschel?= Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as e39019ce25dc7e62133b08f2c5aa75039ad8556d. Michael [sent from post-receive hook] On Tue, 17 Nov 2026 07:14:32 +0100, Sven Püschel wrote: > Backport a patch to fix the missing symbol in libswscale.so.10 . Without > it the libswscale.so.10 file cannot be used at runtime due to a missing > ff_sws_chroma_pos symbol. This is cased by the implementation of this > function being guarded behind a CONFIG_UNSTABLE macro guard, but the > definition and usage don't use this guard. Therefore the implementation > is missing when building without CONFIG_UNSTABLE resulting in the > library not being able to be loaded. > > Fixes: 0624017a6b57 ("ffmpeg: version bump 8.0 -> 9.0.2") > Signed-off-by: Sven Püschel > Message-Id: <20261104093811.2019171-1-s.pueschel@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/patches/ffmpeg-9.0.2/0001-swscale-format-Build-ff_sws_chroma_pos-even-without-.patch b/patches/ffmpeg-9.0.2/0001-swscale-format-Build-ff_sws_chroma_pos-even-without-.patch > new file mode 100644 > index 000000000000..7c2daca407ae > --- /dev/null > +++ b/patches/ffmpeg-9.0.2/0001-swscale-format-Build-ff_sws_chroma_pos-even-without-.patch > @@ -0,0 +1,113 @@ > +From: Andreas Rheinhardt > +Date: Tue, 30 Jun 2026 21:44:27 +0200 > +Subject: [PATCH] swscale/format: Build ff_sws_chroma_pos() even without > + CONFIG_UNSTABLE > + > +It is used in add_legacy_sws_pass() in graph.c. > + > +Signed-off-by: Andreas Rheinhardt > +Upstream-Status: Backport [fad1db043d45d4d3cc482934ac6cd579f556a6e8] > +--- > + libswscale/format.c | 82 ++++++++++++++++++++++++++--------------------------- > + 1 file changed, 41 insertions(+), 41 deletions(-) > + > +diff --git a/libswscale/format.c b/libswscale/format.c > +index b03cfff44aa7..70cc813dd767 100644 > +--- a/libswscale/format.c > ++++ b/libswscale/format.c > +@@ -551,6 +551,47 @@ bool ff_infer_colors(SwsColor *src, SwsColor *dst) > + return incomplete; > + } > + > ++void ff_sws_chroma_pos(const SwsFormat *fmt, bool *incomplete, > ++ int *out_x_pos, int *out_y_pos) > ++{ > ++ enum AVChromaLocation chroma_loc = fmt->loc; > ++ const int sub_x = fmt->desc->log2_chroma_w; > ++ const int sub_y = fmt->desc->log2_chroma_h; > ++ int x_pos, y_pos; > ++ > ++ /* Explicitly default to center siting for compatibility with swscale */ > ++ if (chroma_loc == AVCHROMA_LOC_UNSPECIFIED) { > ++ chroma_loc = AVCHROMA_LOC_CENTER; > ++ *incomplete |= sub_x || sub_y; > ++ } > ++ > ++ /* av_chroma_location_enum_to_pos() always gives us values in the range from > ++ * 0 to 256, but we need to adjust this to the true value range of the > ++ * subsampling grid, which may be larger for h/v_sub > 1 */ > ++ av_chroma_location_enum_to_pos(&x_pos, &y_pos, chroma_loc); > ++ x_pos *= (1 << sub_x) - 1; > ++ y_pos *= (1 << sub_y) - 1; > ++ > ++ /* Fix vertical chroma position for interlaced frames */ > ++ if (sub_y && fmt->interlaced) { > ++ /* When vertically subsampling, chroma samples are effectively only > ++ * placed next to even rows. To access them from the odd field, we need > ++ * to account for this shift by offsetting the distance of one luma row. > ++ * > ++ * For 4x vertical subsampling (v_sub == 2), they are only placed > ++ * next to every *other* even row, so we need to shift by three luma > ++ * rows to get to the chroma sample. */ > ++ if (fmt->field == FIELD_BOTTOM) > ++ y_pos += (256 << sub_y) - 256; > ++ > ++ /* Luma row distance is doubled for fields, so halve offsets */ > ++ y_pos >>= 1; > ++ } > ++ > ++ *out_x_pos = x_pos; > ++ *out_y_pos = y_pos; > ++} > ++ > + /* Variant of sws_test_format() for the ops-based code */ > + static int test_format_ops(enum AVPixelFormat format, int output); > + static int test_format_legacy(enum AVPixelFormat format, int output) > +@@ -1434,47 +1475,6 @@ linear_mat3(const AVRational m00, const AVRational m01, const AVRational m02, > + return c; > + } > + > +-void ff_sws_chroma_pos(const SwsFormat *fmt, bool *incomplete, > +- int *out_x_pos, int *out_y_pos) > +-{ > +- enum AVChromaLocation chroma_loc = fmt->loc; > +- const int sub_x = fmt->desc->log2_chroma_w; > +- const int sub_y = fmt->desc->log2_chroma_h; > +- int x_pos, y_pos; > +- > +- /* Explicitly default to center siting for compatibility with swscale */ > +- if (chroma_loc == AVCHROMA_LOC_UNSPECIFIED) { > +- chroma_loc = AVCHROMA_LOC_CENTER; > +- *incomplete |= sub_x || sub_y; > +- } > +- > +- /* av_chroma_location_enum_to_pos() always gives us values in the range from > +- * 0 to 256, but we need to adjust this to the true value range of the > +- * subsampling grid, which may be larger for h/v_sub > 1 */ > +- av_chroma_location_enum_to_pos(&x_pos, &y_pos, chroma_loc); > +- x_pos *= (1 << sub_x) - 1; > +- y_pos *= (1 << sub_y) - 1; > +- > +- /* Fix vertical chroma position for interlaced frames */ > +- if (sub_y && fmt->interlaced) { > +- /* When vertically subsampling, chroma samples are effectively only > +- * placed next to even rows. To access them from the odd field, we need > +- * to account for this shift by offsetting the distance of one luma row. > +- * > +- * For 4x vertical subsampling (v_sub == 2), they are only placed > +- * next to every *other* even row, so we need to shift by three luma > +- * rows to get to the chroma sample. */ > +- if (fmt->field == FIELD_BOTTOM) > +- y_pos += (256 << sub_y) - 256; > +- > +- /* Luma row distance is doubled for fields, so halve offsets */ > +- y_pos >>= 1; > +- } > +- > +- *out_x_pos = x_pos; > +- *out_y_pos = y_pos; > +-} > +- > + int ff_sws_decode_colors(SwsContext *ctx, SwsPixelType type, > + SwsOpList *ops, const SwsFormat *fmt, bool *incomplete) > + { > diff --git a/patches/ffmpeg-9.0.2/series b/patches/ffmpeg-9.0.2/series > new file mode 100644 > index 000000000000..ff268ecd1362 > --- /dev/null > +++ b/patches/ffmpeg-9.0.2/series > @@ -0,0 +1,4 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-swscale-format-Build-ff_sws_chroma_pos-even-without-.patch > +# 3d2e6d30725921cf2abc010a75daa5a7 - git-ptx-patches magic