[FFmpeg-devel] Re: [POLL] [VOTE] code.ffmpeg.org vs. ML

2025-09-19 Thread Peter Ross via ffmpeg-devel
On Tue, Sep 16, 2025 at 10:49:00AM +0200, Michael Niedermayer via ffmpeg-devel 
wrote:
> Hi all
> 
> 2 months ago we voted on testing Forgejo vs Gitlab, we picked and tested
> Forgejo. And as said in that vote, (and surprisingly, i have not forgotten it)
> heres the "after testing" discussion and vote
> 
> do we want to keep Forgejo or switch back to the ML workflow
> (or something else)
> 
> F. keep Forgejo as primary forge for patch/git workflow
> M. switch back to the ML for patch/git workflow

F.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]


[FFmpeg-devel] [PATCH] .forgejo/CODEOWNERS: add myself for various files (PR #20302)

2025-08-21 Thread Peter Ross via ffmpeg-devel
PR #20302 opened by Peter Ross (pross)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20302
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20302.patch


>From 628d38aca7987a08586101c4f79c1a075b06353d Mon Sep 17 00:00:00 2001
From: Peter Ross 
Date: Thu, 21 Aug 2025 19:58:03 +1000
Subject: [PATCH] .forgejo/CODEOWNERS: add myself for various files

---
 .forgejo/CODEOWNERS | 57 ++---
 1 file changed, 54 insertions(+), 3 deletions(-)

diff --git a/.forgejo/CODEOWNERS b/.forgejo/CODEOWNERS
index 348bae580c..39abd7a832 100644
--- a/.forgejo/CODEOWNERS
+++ b/.forgejo/CODEOWNERS
@@ -12,30 +12,59 @@
 # ===
 libavcodec/.*aac.* @lynne
 libavcodec/.*ac3.* @lynne
-libavcodec/.*adpcm.* @zane
+libavcodec/.*adpcm.* @zane @pross
+libavcodec/anm.* @pross
+libavcodec/ansi.* @pross
 libavcodec/.*atrac9.* @lynne
+libavcodec/bink.* @pross
+libavcodec/bintext.* @pross
 libavcodec/.*bitpacked.* @lynne
 libavcodec/.*d3d12va.* @jianhuaw
 libavcodec/.*dirac.* @lynne
+libavcodec/dpx.* @pross
+libavcodec/dsd.* @pross
+libavcodec/eacmv.* @pross
+libavcodec/eaidct.* @pross
+libavcodec/eamad.* @pross
+libavcodec/eat.* @pross
 libavcodec/.*ffv1.* @lynne @michaelni
+libavcodec/g728.* @pross
+libavcodec/gem.* @pross
 libavcodec/golomb.* @michaelni
 libavcodec/.*h266.* @frankplow @NuoMi @jianhuaw
 libavcodec/h26x/.* @frankplow @NuoMi @jianhuaw
+libavcodec/iff.* @pross
 libavcodec/.*jpegxl.* @lynne @Traneptora
+libavcodec/jv.* @pross
 libavcodec/.*jxl.* @lynne @Traneptora
+libavcodec/lead.* @pross
+libavcodec/mmvideo.* @pross
+libavcodec/msp2.* @pross
+libavcodec/mvc.* @pross
 libavcodec/.*opus.* @lynne
+libavcodec/pictor.* @pross
 libavcodec/.*png.* @Traneptora
 libavcodec/.*prores.* @lynne
 libavcodec/rangecoder.* @michaelni
 libavcodec/ratecontrol.* @michaelni
+libavcodec/rv60.* @pross
+libavcodec/sgirle.* @pross
 libavcodec/.*siren.* @lynne
 libavcodec/smpte_436m.* @programmerjake
+libavcodec/svq1.* @pross
+libavcodec/svq3.* @pross
 libavcodec/.*vc2.* @lynne
-libavcodec/vp8.* @rbultje
+libavcodec/vp3.* @pross
+libavcodec/vp4.* @pross
+libavcodec/vp5.* @pross
+libavcodec/vp6.* @pross
+libavcodec/vp8.* @rbultje @pross
 libavcodec/vp9.* @rbultje
-libavcodec/vpx.* @rbultje
+libavcodec/vpx.* @rbultje @pross
+libavcodec/vqc.* @pross
 libavcodec/.*vvc.* @frankplow @NuoMi @jianhuaw
 libavcodec/wmavoice.* @rbultje
+libavcodec/wbmp.* @pross
 
 # bitstream filters
 libavcodec/bsf/eia608_to_smpte436m.* @programmerjake
@@ -65,16 +94,38 @@ libavfilter/x86/colorspace.* @rbultje
 # ===
 libavformat/alp.* @zane
 libavformat/amv.* @zane
+libavformat/anm.* @pross
 libavformat/apm.* @zane
 libavformat/argo_.* @zane
+libavformat/bink.* @pross
+libavformat/bintext.* @pross
+libavformat/caf.* @pross
+libavformat/cine.* @pross
+libavformat/dsf.* @pross
+libavformat/eacdata.* @pross
+libavformat/electronicarts.* @pross
+libavformat/filmstrip.* @pross
+libavformat/frm.* @pross
 libavformat/iamf.* @jamrial
+libavformat/ico.* @pross
+libavformat/iff.* @pross
 libavformat/.*jpegxl.* @Traneptora
+libavformat/jv.* @pross
 libavformat/.*jxl.* @Traneptora
 libavformat/kvag.* @zane
 libavformat/mccdec.* @programmerjake
 libavformat/mccenc.* @programmerjake
+libavformat/mlv.* @pross
+libavformat/mm.* @pross
+libavformat/msp.* @pross
+libavformat/mv.* @pross
 libavformat/pp_bnk.* @zane
+libavformat/rm.* @pross
+libavformat/sauce.* @pross
 libavformat/scd.* @zane
+libavformat/tty.* @pross
+libavformat/wsd.* @pross
+libavformat/wtv.* @pross
 
 # avutil
 # ==
-- 
2.49.1

___
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".


[FFmpeg-devel] Re: Can a GetByteContext have a "sub" context?

2025-09-02 Thread Peter Ross via ffmpeg-devel
On Tue, Sep 02, 2025 at 08:03:14AM +0200, Manuel Lauss via ffmpeg-devel wrote:
> Hello,
> 
> Is it possible to have a "sub" context with a limited byte range for a
> super-context?
> i.e. I read 4 bytes from context c1, these are a length, c2 =
> GetByteContext_from(c1, len) ?  Or is "GetByteContext(&c2, c1.buffer,
> len);" enough?

second one is what I do:
bytestream2_init(&c2, c1.buffer, len)

also need to check that that len does not exceed c1 bytes remaining. use 
bytestream2_get_bytes_left(c1).

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]


[FFmpeg-devel] [PATCH] dpxenc: map AVCodecContext color transfer and color primaries fields (PR #20365)

2025-08-29 Thread Peter Ross via ffmpeg-devel
PR #20365 opened by Peter Ross (pross)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20365
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20365.patch

Fixes issue #20341


>From cbac28e3292bc8240a8b3aca371ffc611b8cdcf7 Mon Sep 17 00:00:00 2001
From: Peter Ross 
Date: Fri, 29 Aug 2025 17:51:06 +1000
Subject: [PATCH 1/2] avcodec/dpx: move enum DPX_TRC and DPX_COL_SPEC to dpx.h

---
 libavcodec/dpx.c | 33 +---
 libavcodec/dpx.h | 57 
 2 files changed, 58 insertions(+), 32 deletions(-)
 create mode 100644 libavcodec/dpx.h

diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 80616d98a2..1b1ada316a 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -27,38 +27,7 @@
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "decode.h"
-
-enum DPX_TRC {
-DPX_TRC_USER_DEFINED   = 0,
-DPX_TRC_PRINTING_DENSITY   = 1,
-DPX_TRC_LINEAR = 2,
-DPX_TRC_LOGARITHMIC= 3,
-DPX_TRC_UNSPECIFIED_VIDEO  = 4,
-DPX_TRC_SMPTE_274  = 5,
-DPX_TRC_ITU_R_709_4= 6,
-DPX_TRC_ITU_R_601_625  = 7,
-DPX_TRC_ITU_R_601_525  = 8,
-DPX_TRC_SMPTE_170  = 9,
-DPX_TRC_ITU_R_624_4_PAL= 10,
-DPX_TRC_Z_LINEAR   = 11,
-DPX_TRC_Z_HOMOGENEOUS  = 12,
-};
-
-enum DPX_COL_SPEC {
-DPX_COL_SPEC_USER_DEFINED   = 0,
-DPX_COL_SPEC_PRINTING_DENSITY   = 1,
-/* 2 = N/A */
-/* 3 = N/A */
-DPX_COL_SPEC_UNSPECIFIED_VIDEO  = 4,
-DPX_COL_SPEC_SMPTE_274  = 5,
-DPX_COL_SPEC_ITU_R_709_4= 6,
-DPX_COL_SPEC_ITU_R_601_625  = 7,
-DPX_COL_SPEC_ITU_R_601_525  = 8,
-DPX_COL_SPEC_SMPTE_170  = 9,
-DPX_COL_SPEC_ITU_R_624_4_PAL= 10,
-/* 11 = N/A */
-/* 12 = N/A */
-};
+#include "dpx.h"
 
 static unsigned int read16(const uint8_t **ptr, int is_big)
 {
diff --git a/libavcodec/dpx.h b/libavcodec/dpx.h
new file mode 100644
index 00..800c651e5a
--- /dev/null
+++ b/libavcodec/dpx.h
@@ -0,0 +1,57 @@
+/*
+ * DPX (.dpx) image decoder
+ * Copyright (c) 2009 Jimmy Christensen
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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 FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_DPX_H
+#define AVCODEC_DPX_H
+
+enum DPX_TRC {
+DPX_TRC_USER_DEFINED   = 0,
+DPX_TRC_PRINTING_DENSITY   = 1,
+DPX_TRC_LINEAR = 2,
+DPX_TRC_LOGARITHMIC= 3,
+DPX_TRC_UNSPECIFIED_VIDEO  = 4,
+DPX_TRC_SMPTE_274  = 5,
+DPX_TRC_ITU_R_709_4= 6,
+DPX_TRC_ITU_R_601_625  = 7,
+DPX_TRC_ITU_R_601_525  = 8,
+DPX_TRC_SMPTE_170  = 9,
+DPX_TRC_ITU_R_624_4_PAL= 10,
+DPX_TRC_Z_LINEAR   = 11,
+DPX_TRC_Z_HOMOGENEOUS  = 12,
+};
+
+enum DPX_COL_SPEC {
+DPX_COL_SPEC_USER_DEFINED   = 0,
+DPX_COL_SPEC_PRINTING_DENSITY   = 1,
+/* 2 = N/A */
+/* 3 = N/A */
+DPX_COL_SPEC_UNSPECIFIED_VIDEO  = 4,
+DPX_COL_SPEC_SMPTE_274  = 5,
+DPX_COL_SPEC_ITU_R_709_4= 6,
+DPX_COL_SPEC_ITU_R_601_625  = 7,
+DPX_COL_SPEC_ITU_R_601_525  = 8,
+DPX_COL_SPEC_SMPTE_170  = 9,
+DPX_COL_SPEC_ITU_R_624_4_PAL= 10,
+/* 11 = N/A */
+/* 12 = N/A */
+};
+
+#endif /* AVCODEC_DPX_H */
-- 
2.49.1


>From f10e4902c9c64119ca3f030c44ad3b97c6db1e70 Mon Sep 17 00:00:00 2001
From: Peter Ross 
Date: Fri, 29 Aug 2025 17:51:46 +1000
Subject: [PATCH 2/2] libavcodec/dpxenc: map AVCodecContext color transfer and
 color primaries fields

---
 libavcodec/dpxenc.c   | 44 +--
 tests/ref/lavf/dpx|  2 +-
 tests/ref/lavf/gbrp10le.dpx   |  2 +-
 tests/ref/lavf/gbrp12le.dpx   |  2 +-
 tests/ref/lavf/rgb48le.dpx|  2 +-
 tests/ref/lavf/rgb48le_10.dpx |  2 +-
 tests/ref/lavf/rgba64le.dpx   |  2 +-
 7 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 400ff98395..e136c7a249 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -26,6 +26,7 @@
 #include "codec_internal.h"
 #include "encode.h"
 #include "version.h"
+#include "dpx.h"
 
 typedef struct DPXContext {
 int big_endian;
@@ -178,6 +179,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 DPXContext *s = avctx->

[FFmpeg-devel] [PATCH] Bink 2 Audio decoder and demuxer (PR #20359)

2025-08-28 Thread Peter Ross via ffmpeg-devel
PR #20359 opened by Peter Ross (pross)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20359
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20359.patch

Sample: https://github.com/vgmstream/vgmstream/files/11607386/Jumbo_Josh_1.zip

This was a contribution I made to librempeg last year.


>From d16f2ec99ec83472d039e5b32012fd1f90cb612d Mon Sep 17 00:00:00 2001
From: Peter Ross 
Date: Tue, 10 Dec 2024 23:16:08 +1100
Subject: [PATCH 1/4] avcodec/binkaudio: Bink Audio 2 decoder

(cherry picked from librempeg commit fd1dcfe5f4fb6e2ff4332d161a23c6786084ddd1)
---
 libavcodec/binkaudio.c | 23 +--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 265f93a822..c77f2bf828 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -50,6 +50,7 @@
 typedef struct BinkAudioContext {
 GetBitContext gb;
 int version_b;  ///< Bink version 'b'
+int version_2;  ///< Bink Audio 2
 int first;
 int channels;
 int ch_offset;
@@ -94,6 +95,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
 av_channel_layout_default(&avctx->ch_layout, channels);
 
 s->version_b = avctx->extradata_size >= 4 && avctx->extradata[3] == 'b';
+s->version_2 = avctx->extradata_size >= 1 && avctx->extradata[0] == '2';
 
 if (avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) {
 // audio is already interleaved for the RDFT format variant
@@ -176,6 +178,7 @@ static int decode_block(BinkAudioContext *s, float **out, 
int use_dct,
 int ch, i, j, k;
 float q, quant[25];
 int width, coeff;
+int quant_idx_size = s->version_2 ? 7 : 8;
 GetBitContext *gb = &s->gb;
 LOCAL_ALIGNED_32(float, coeffs, [4098]);
 
@@ -195,10 +198,10 @@ static int decode_block(BinkAudioContext *s, float **out, 
int use_dct,
 coeffs[1] = get_float(gb) * s->root;
 }
 
-if (get_bits_left(gb) < s->num_bands * 8)
+if (get_bits_left(gb) < s->num_bands * quant_idx_size)
 return AVERROR_INVALIDDATA;
 for (i = 0; i < s->num_bands; i++) {
-int value = get_bits(gb, 8);
+int value = get_bits(gb, quant_idx_size);
 quant[i]  = s->quant_table[FFMIN(value, 95)];
 }
 
@@ -229,6 +232,21 @@ static int decode_block(BinkAudioContext *s, float **out, 
int use_dct,
 while (s->bands[k] < i)
 q = quant[k++];
 } else {
+if (s->version_2) {
+for (int m = i; m < j; m++)
+coeffs[m] = get_bits(gb, width);
+while (i < j) {
+if (s->bands[k] == i)
+q = quant[k++];
+if (coeffs[i] > 0) {
+if (get_bits1(gb))
+coeffs[i] *= -q;
+else
+coeffs[i] *= q;
+}
+i++;
+}
+} else {
 while (i < j) {
 if (s->bands[k] == i)
 q = quant[k++];
@@ -245,6 +263,7 @@ static int decode_block(BinkAudioContext *s, float **out, 
int use_dct,
 }
 i++;
 }
+}
 }
 }
 
-- 
2.49.1


>From 964ad792bb8315717a615e27cbb2f6ec9aa544e4 Mon Sep 17 00:00:00 2001
From: Peter Ross 
Date: Tue, 10 Dec 2024 23:25:49 +1100
Subject: [PATCH 2/4] avcodec/binkaudio: reindent

(cherry picked from librempeg commit 262ef722056fd654acae83eaba0765c47ce2cbe1)
---
 libavcodec/binkaudio.c | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index c77f2bf828..d791dba00b 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -247,22 +247,22 @@ static int decode_block(BinkAudioContext *s, float **out, 
int use_dct,
 i++;
 }
 } else {
-while (i < j) {
-if (s->bands[k] == i)
-q = quant[k++];
-coeff = get_bits(gb, width);
-if (coeff) {
-int v;
-v = get_bits1(gb);
-if (v)
-coeffs[i] = -q * coeff;
-else
-coeffs[i] =  q * coeff;
-} else {
-coeffs[i] = 0.0f;
+while (i < j) {
+if (s->bands[k] == i)
+q = quant[k++];
+coeff = get_bits(gb, width);
+if (coeff) {
+int v;
+v = get_bits1(gb);
+if (v)
+