[FFmpeg-cvslog] avcodec/proresenc_kostya: remove an unnecessary parenthesis level in MAKE_CODE() macro

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sun Dec 10 01:12:52 
2023 +0100| [2ac88c136294c31784a847eb130313b4fe0a05c8] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: remove an unnecessary parenthesis level in 
MAKE_CODE() macro

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ac88c136294c31784a847eb130313b4fe0a05c8
---

 libavcodec/proresenc_kostya.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 8d45e42d1a..77e68fe38a 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -429,7 +429,7 @@ static inline void encode_vlc_codeword(PutBitContext *pb, 
unsigned codebook, int
 }
 
 #define GET_SIGN(x)  ((x) >> 31)
-#define MAKE_CODE(x) x)) * 2) ^ GET_SIGN(x))
+#define MAKE_CODE(x) (((x) * 2) ^ GET_SIGN(x))
 
 static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int scale)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: remove unused plane factor variables

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sun Dec 10 01:46:33 
2023 +0100| [e453efcfbcdc4296e24837557dbe8576143e7f4a] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: remove unused plane factor variables

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e453efcfbcdc4296e24837557dbe8576143e7f4a
---

 libavcodec/proresenc_kostya.c | 36 
 1 file changed, 12 insertions(+), 24 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 77e68fe38a..ad82c9c355 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -459,7 +459,6 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 
 static void encode_acs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice,
-   int plane_size_factor,
const uint8_t *scan, const int16_t *qmat)
 {
 int idx, i;
@@ -494,14 +493,13 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
 static void encode_slice_plane(ProresContext *ctx, PutBitContext *pb,
   const uint16_t *src, ptrdiff_t linesize,
   int mbs_per_slice, int16_t *blocks,
-  int blocks_per_mb, int plane_size_factor,
+  int blocks_per_mb,
   const int16_t *qmat)
 {
 int blocks_per_slice = mbs_per_slice * blocks_per_mb;
 
 encode_dcs(pb, blocks, blocks_per_slice, qmat[0]);
-encode_acs(pb, blocks, blocks_per_slice, plane_size_factor,
-   ctx->scantable, qmat);
+encode_acs(pb, blocks, blocks_per_slice, ctx->scantable, qmat);
 }
 
 static void put_alpha_diff(PutBitContext *pb, int cur, int prev, int abits)
@@ -574,10 +572,9 @@ static int encode_slice(AVCodecContext *avctx, const 
AVFrame *pic,
 int i, xp, yp;
 int total_size = 0;
 const uint16_t *src;
-int slice_width_factor = av_log2(mbs_per_slice);
 int num_cblocks, pwidth, line_add;
 ptrdiff_t linesize;
-int plane_factor, is_chroma;
+int is_chroma;
 uint16_t *qmat;
 uint16_t *qmat_chroma;
 
@@ -603,9 +600,6 @@ static int encode_slice(AVCodecContext *avctx, const 
AVFrame *pic,
 
 for (i = 0; i < ctx->num_planes; i++) {
 is_chroma= (i == 1 || i == 2);
-plane_factor = slice_width_factor + 2;
-if (is_chroma)
-plane_factor += ctx->chroma_factor - 3;
 if (!is_chroma || ctx->chroma_factor == CFACTOR_Y444) {
 xp  = x << 4;
 yp  = y << 4;
@@ -630,11 +624,11 @@ static int encode_slice(AVCodecContext *avctx, const 
AVFrame *pic,
 if (!is_chroma) {/* luma quant */
 encode_slice_plane(ctx, pb, src, linesize,
mbs_per_slice, ctx->blocks[0],
-   num_cblocks, plane_factor, qmat);
+   num_cblocks, qmat);
 } else { /* chroma plane */
 encode_slice_plane(ctx, pb, src, linesize,
mbs_per_slice, ctx->blocks[0],
-   num_cblocks, plane_factor, qmat_chroma);
+   num_cblocks, qmat_chroma);
 }
 } else {
 get_alpha_data(ctx, src, linesize, xp, yp,
@@ -703,7 +697,6 @@ static int estimate_dcs(int *error, int16_t *blocks, int 
blocks_per_slice,
 }
 
 static int estimate_acs(int *error, int16_t *blocks, int blocks_per_slice,
-int plane_size_factor,
 const uint8_t *scan, const int16_t *qmat)
 {
 int idx, i;
@@ -741,7 +734,7 @@ static int estimate_acs(int *error, int16_t *blocks, int 
blocks_per_slice,
 static int estimate_slice_plane(ProresContext *ctx, int *error, int plane,
 const uint16_t *src, ptrdiff_t linesize,
 int mbs_per_slice,
-int blocks_per_mb, int plane_size_factor,
+int blocks_per_mb,
 const int16_t *qmat, ProresThreadData *td)
 {
 int blocks_per_slice;
@@ -750,8 +743,7 @@ static int estimate_slice_plane(ProresContext *ctx, int 
*error, int plane,
 blocks_per_slice = mbs_per_slice * blocks_per_mb;
 
 bits  = estimate_dcs(error, td->blocks[plane], blocks_per_slice, qmat[0]);
-bits += estimate_acs(error, td->blocks[plane], blocks_per_slice,
- plane_size_factor, ctx->scantable, qmat);
+bits += estimate_acs(error, td->blocks[plane], blocks_per_slice, 
ctx->scantable, qmat);
 
 return FFALIGN(bits, 8);
 }
@@ -820,9 +812,8 @@ static int find_slice_quant(AVCodecContext *avctx,
 ProresContext *ctx = avctx->priv_data;
 int i, q, pq, xp, yp;
 const uint16_t *src;
-int slice_width_factor = av_log2(mbs_per_slice);
 int num_cblocks[MAX_PLANES], pwi

[FFmpeg-cvslog] avcodec/proresenc_kostya: remove redundant codebook assignments

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:04:30 
2023 +0100| [e940baa65bcbdf86466fd5a8c7504caa7c1a9ec1] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: remove redundant codebook assignments

This is already assigned at declaration.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e940baa65bcbdf86466fd5a8c7504caa7c1a9ec1
---

 libavcodec/proresenc_kostya.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index ad82c9c355..2d5dee05e6 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -440,7 +440,6 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 prev_dc = (blocks[0] - 0x4000) / scale;
 encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc));
 sign = 0;
-codebook = 3;
 blocks  += 64;
 
 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
@@ -675,7 +674,6 @@ static int estimate_dcs(int *error, int16_t *blocks, int 
blocks_per_slice,
 prev_dc  = (blocks[0] - 0x4000) / scale;
 bits = estimate_vlc(FIRST_DC_CB, MAKE_CODE(prev_dc));
 sign = 0;
-codebook = 3;
 blocks  += 64;
 *error  += FFABS(blocks[0] - 0x4000) % scale;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: move run/lev to codebook LUT to shared proresdata

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:07:16 
2023 +0100| [3ba52f18e4ec7755cf5866a90bb944bcba4d824b] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: move run/lev to codebook LUT to shared proresdata

This is going to be shared with proresenc_kostya in the upcoming commit.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ba52f18e4ec7755cf5866a90bb944bcba4d824b
---

 libavcodec/proresdata.c | 6 ++
 libavcodec/proresdata.h | 2 ++
 libavcodec/proresenc_anatoliy.c | 9 ++---
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/libavcodec/proresdata.c b/libavcodec/proresdata.c
index 4787907c71..167bedf794 100644
--- a/libavcodec/proresdata.c
+++ b/libavcodec/proresdata.c
@@ -43,3 +43,9 @@ const uint8_t ff_prores_interlaced_scan[64] = {
 30, 23, 31, 38, 45, 52, 60, 53,
 46, 39, 47, 54, 61, 62, 55, 63
 };
+
+const uint8_t ff_prores_run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29,
+0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C };
+
+const uint8_t ff_prores_level_to_cb[10] = { 0x04, 0x0A, 0x05, 0x06, 0x04, 0x28,
+0x28, 0x28, 0x28, 0x4C };
diff --git a/libavcodec/proresdata.h b/libavcodec/proresdata.h
index d8c8786689..28eb3256b6 100644
--- a/libavcodec/proresdata.h
+++ b/libavcodec/proresdata.h
@@ -29,6 +29,8 @@
 
 extern const uint8_t ff_prores_progressive_scan[64];
 extern const uint8_t ff_prores_interlaced_scan[64];
+extern const uint8_t ff_prores_run_to_cb[16];
+extern const uint8_t ff_prores_level_to_cb[10];
 
 #define FIRST_DC_CB 0xB8 // rice_order = 5, exp_golomb_order = 6, switch_bits 
= 0
 
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 9b9ffa03be..9064d4266c 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -296,11 +296,6 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t 
*in,
 }
 }
 
-static const uint8_t run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29,
-0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C };
-static const uint8_t lev_to_cb[10] = { 0x04, 0x0A, 0x05, 0x06, 0x04, 0x28,
-0x28, 0x28, 0x28, 0x4C };
-
 static void encode_ac_coeffs(PutBitContext *pb,
 int16_t *in, int blocks_per_slice, int *qmat, const uint8_t 
ff_prores_scan[64])
 {
@@ -313,14 +308,14 @@ static void encode_ac_coeffs(PutBitContext *pb,
 for (j = 0; j < blocks_per_slice; j++) {
 int val = QSCALE(qmat, indp, in[(j << 6) + indp]);
 if (val) {
-encode_codeword(pb, run, run_to_cb[FFMIN(prev_run, 15)]);
+encode_codeword(pb, run, ff_prores_run_to_cb[FFMIN(prev_run, 
15)]);
 
 prev_run   = run;
 run= 0;
 level  = get_level(val);
 code   = level - 1;
 
-encode_codeword(pb, code, lev_to_cb[FFMIN(prev_level, 9)]);
+encode_codeword(pb, code, 
ff_prores_level_to_cb[FFMIN(prev_level, 9)]);
 
 prev_level = level;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: remove duplicated define

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:15:54 
2023 +0100| [9f547e2f15174357a484c51024f9dd09c7c037cf] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: remove duplicated define

This is already defined in proresdata.h

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f547e2f15174357a484c51024f9dd09c7c037cf
---

 libavcodec/proresenc_anatoliy.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 9064d4266c..25768b6c08 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -266,8 +266,6 @@ static av_always_inline int get_level(int val)
 return (val ^ sign) - sign;
 }
 
-#define FIRST_DC_CB 0xB8
-
 static const uint8_t dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 
0x70};
 
 static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: fix chroma quantisation matrix in frame header

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:23:12 
2023 +0100| [cbee015867f26eea4aed8a23eba47f515ae329c0] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: fix chroma quantisation matrix in frame header

Most of the time the quantisation matrices are the same, it only matters
with the proxy profile.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbee015867f26eea4aed8a23eba47f515ae329c0
---

 libavcodec/proresenc_kostya.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index cf49614c84..ae697bb55f 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1018,7 +1018,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 bytestream_put_byte(&buf, ctx->quant_mat[i]);
 // chroma quantisation matrix
 for (i = 0; i < 64; i++)
-bytestream_put_byte(&buf, ctx->quant_mat[i]);
+bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]);
 } else {
 bytestream_put_byte  (&buf, 0x00);  // matrix flags - default 
matrices are used
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: remove one LUT indirection for run/level to codebook mapping

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:14:06 
2023 +0100| [c35733006ac55702b306bee529cf0d38a477bbfc] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: remove one LUT indirection for run/level to codebook 
mapping

This is following the same logic as proresenc_anatoliy.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c35733006ac55702b306bee529cf0d38a477bbfc
---

 libavcodec/proresenc_kostya.c | 47 +--
 1 file changed, 14 insertions(+), 33 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 2d5dee05e6..cc53d142bc 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -142,25 +142,6 @@ static const uint8_t prores_dc_codebook[4] = {
 0x70  // rice_order = 3, exp_golomb_order = 4, switch_bits = 0
 };
 
-static const uint8_t prores_ac_codebook[7] = {
-0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0
-0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0
-0x4C, // rice_order = 2, exp_golomb_order = 3, switch_bits = 0
-0x05, // rice_order = 0, exp_golomb_order = 1, switch_bits = 1
-0x29, // rice_order = 1, exp_golomb_order = 2, switch_bits = 1
-0x06, // rice_order = 0, exp_golomb_order = 1, switch_bits = 2
-0x0A, // rice_order = 0, exp_golomb_order = 2, switch_bits = 2
-};
-
-/**
- * Lookup tables for adaptive switching between codebooks
- * according with previous run/level value.
- */
-static const uint8_t prores_run_to_cb_index[16] =
-{ 5, 5, 3, 3, 0, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 2 };
-
-static const uint8_t prores_lev_to_cb_index[10] = { 0, 6, 3, 5, 0, 1, 1, 1, 1, 
2 };
-
 #define NUM_MB_LIMITS 4
 static const int prores_mb_limits[NUM_MB_LIMITS] = {
 1620, // up to 720x576
@@ -461,12 +442,12 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
const uint8_t *scan, const int16_t *qmat)
 {
 int idx, i;
-int run, level, run_cb, lev_cb;
+int prev_run = 4;
+int prev_level = 2;
+int run, level;
 int max_coeffs, abs_level;
 
 max_coeffs = blocks_per_slice << 6;
-run_cb = prores_run_to_cb_index[4];
-lev_cb = prores_lev_to_cb_index[2];
 run= 0;
 
 for (i = 1; i < 64; i++) {
@@ -474,13 +455,13 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
 level = blocks[idx] / qmat[scan[i]];
 if (level) {
 abs_level = FFABS(level);
-encode_vlc_codeword(pb, prores_ac_codebook[run_cb], run);
-encode_vlc_codeword(pb, prores_ac_codebook[lev_cb],
+encode_vlc_codeword(pb, ff_prores_run_to_cb[prev_run], run);
+encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level],
 abs_level - 1);
 put_sbits(pb, 1, GET_SIGN(level));
 
-run_cb = prores_run_to_cb_index[FFMIN(run, 15)];
-lev_cb = prores_lev_to_cb_index[FFMIN(abs_level, 9)];
+prev_run   = FFMIN(run, 15);
+prev_level = FFMIN(abs_level, 9);
 run= 0;
 } else {
 run++;
@@ -698,13 +679,13 @@ static int estimate_acs(int *error, int16_t *blocks, int 
blocks_per_slice,
 const uint8_t *scan, const int16_t *qmat)
 {
 int idx, i;
-int run, level, run_cb, lev_cb;
+int prev_run = 4;
+int prev_level = 2;
+int run, level;
 int max_coeffs, abs_level;
 int bits = 0;
 
 max_coeffs = blocks_per_slice << 6;
-run_cb = prores_run_to_cb_index[4];
-lev_cb = prores_lev_to_cb_index[2];
 run= 0;
 
 for (i = 1; i < 64; i++) {
@@ -713,12 +694,12 @@ static int estimate_acs(int *error, int16_t *blocks, int 
blocks_per_slice,
 *error += FFABS(blocks[idx]) % qmat[scan[i]];
 if (level) {
 abs_level = FFABS(level);
-bits += estimate_vlc(prores_ac_codebook[run_cb], run);
-bits += estimate_vlc(prores_ac_codebook[lev_cb],
+bits += estimate_vlc(ff_prores_run_to_cb[prev_run], run);
+bits += estimate_vlc(ff_prores_level_to_cb[prev_level],
  abs_level - 1) + 1;
 
-run_cb = prores_run_to_cb_index[FFMIN(run, 15)];
-lev_cb = prores_lev_to_cb_index[FFMIN(abs_level, 9)];
+prev_run   = FFMIN(run, 15);
+prev_level = FFMIN(abs_level, 9);
 run= 0;
 } else {
 run++;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: simplify quantization matrix bytestream writing

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:24:58 
2023 +0100| [d6e0fb7c928cf818d67a0b2af571c0b89d6f6704] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: simplify quantization matrix bytestream writing

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6e0fb7c928cf818d67a0b2af571c0b89d6f6704
---

 libavcodec/proresenc_kostya.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index ae697bb55f..d29faa0fe3 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1013,12 +1013,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 bytestream_put_byte  (&buf, 0); // reserved
 if (ctx->quant_sel != QUANT_MAT_DEFAULT) {
 bytestream_put_byte  (&buf, 0x03);  // matrix flags - both 
matrices are present
-// luma quantisation matrix
-for (i = 0; i < 64; i++)
-bytestream_put_byte(&buf, ctx->quant_mat[i]);
-// chroma quantisation matrix
-for (i = 0; i < 64; i++)
-bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]);
+bytestream_put_buffer(&buf, ctx->quant_mat, 64);// luma 
quantisation matrix
+bytestream_put_buffer(&buf, ctx->quant_chroma_mat, 64); // chroma 
quantisation matrix
 } else {
 bytestream_put_byte  (&buf, 0x00);  // matrix flags - default 
matrices are used
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: save a few operations in DC encoding

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:19:56 
2023 +0100| [631fa19ee0d6fbbe8e82516345090f433cea6532] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: save a few operations in DC encoding

This matches the logic from proresenc_anatoliy.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=631fa19ee0d6fbbe8e82516345090f433cea6532
---

 libavcodec/proresenc_kostya.c | 21 ++---
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index cc53d142bc..cf49614c84 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -135,13 +135,6 @@ static const uint8_t prores_quant_matrices[][64] = {
 },
 };
 
-static const uint8_t prores_dc_codebook[4] = {
-0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0
-0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0
-0x4D, // rice_order = 2, exp_golomb_order = 3, switch_bits = 1
-0x70  // rice_order = 3, exp_golomb_order = 4, switch_bits = 0
-};
-
 #define NUM_MB_LIMITS 4
 static const int prores_mb_limits[NUM_MB_LIMITS] = {
 1620, // up to 720x576
@@ -416,7 +409,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int scale)
 {
 int i;
-int codebook = 3, code, dc, prev_dc, delta, sign, new_sign;
+int codebook = 5, code, dc, prev_dc, delta, sign, new_sign;
 
 prev_dc = (blocks[0] - 0x4000) / scale;
 encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc));
@@ -429,9 +422,8 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 new_sign = GET_SIGN(delta);
 delta= (delta ^ sign) - sign;
 code = MAKE_CODE(delta);
-encode_vlc_codeword(pb, prores_dc_codebook[codebook], code);
-codebook = (code + (code & 1)) >> 1;
-codebook = FFMIN(codebook, 3);
+encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code);
+codebook = FFMIN(code, 6);
 sign = new_sign;
 prev_dc  = dc;
 }
@@ -649,7 +641,7 @@ static int estimate_dcs(int *error, int16_t *blocks, int 
blocks_per_slice,
 int scale)
 {
 int i;
-int codebook = 3, code, dc, prev_dc, delta, sign, new_sign;
+int codebook = 5, code, dc, prev_dc, delta, sign, new_sign;
 int bits;
 
 prev_dc  = (blocks[0] - 0x4000) / scale;
@@ -665,9 +657,8 @@ static int estimate_dcs(int *error, int16_t *blocks, int 
blocks_per_slice,
 new_sign = GET_SIGN(delta);
 delta= (delta ^ sign) - sign;
 code = MAKE_CODE(delta);
-bits+= estimate_vlc(prores_dc_codebook[codebook], code);
-codebook = (code + (code & 1)) >> 1;
-codebook = FFMIN(codebook, 3);
+bits+= estimate_vlc(ff_prores_dc_codebook[codebook], code);
+codebook = FFMIN(code, 6);
 sign = new_sign;
 prev_dc  = dc;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: use FRAME_ID defined in proresdata.h

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:27:27 
2023 +0100| [3885d2493d283b9e368fa7d4fdd3e626874a7a61] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: use FRAME_ID defined in proresdata.h

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3885d2493d283b9e368fa7d4fdd3e626874a7a61
---

 libavcodec/proresenc_anatoliy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 88be49af3e..f40e455e65 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -754,7 +754,7 @@ static int prores_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 compress_frame_size = 8 + header_size;
 
 bytestream_put_be32(&buf, compress_frame_size);/* frame size will be 
update after picture(s) encoding */
-bytestream_put_buffer(&buf, "icpf", 4);
+bytestream_put_be32(&buf, FRAME_ID);
 
 bytestream_put_be16(&buf, header_size);
 bytestream_put_be16(&buf, 0); /* version */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: move DC codebook LUT to shared proresdata

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:17:18 
2023 +0100| [f06f2cf16a47d7fad60dd0fa30db6e99445ad89f] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: move DC codebook LUT to shared proresdata

This is going to be shared with proresenc_kostya in the upcoming commit.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f06f2cf16a47d7fad60dd0fa30db6e99445ad89f
---

 libavcodec/proresdata.c | 2 ++
 libavcodec/proresdata.h | 1 +
 libavcodec/proresenc_anatoliy.c | 3 +--
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/proresdata.c b/libavcodec/proresdata.c
index 167bedf794..00af97d4f1 100644
--- a/libavcodec/proresdata.c
+++ b/libavcodec/proresdata.c
@@ -44,6 +44,8 @@ const uint8_t ff_prores_interlaced_scan[64] = {
 46, 39, 47, 54, 61, 62, 55, 63
 };
 
+const uint8_t ff_prores_dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 
0x70 };
+
 const uint8_t ff_prores_run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29,
 0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C };
 
diff --git a/libavcodec/proresdata.h b/libavcodec/proresdata.h
index 28eb3256b6..d859e93e88 100644
--- a/libavcodec/proresdata.h
+++ b/libavcodec/proresdata.h
@@ -29,6 +29,7 @@
 
 extern const uint8_t ff_prores_progressive_scan[64];
 extern const uint8_t ff_prores_interlaced_scan[64];
+extern const uint8_t ff_prores_dc_codebook[7];
 extern const uint8_t ff_prores_run_to_cb[16];
 extern const uint8_t ff_prores_level_to_cb[10];
 
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 25768b6c08..88be49af3e 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -266,7 +266,6 @@ static av_always_inline int get_level(int val)
 return (val ^ sign) - sign;
 }
 
-static const uint8_t dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 
0x70};
 
 static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
 int blocks_per_slice, int *qmat)
@@ -286,7 +285,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
 diff_sign = DIFF_SIGN(delta, sign);
 new_code  = TO_GOLOMB2(get_level(delta), diff_sign);
 
-encode_codeword(pb, new_code, dc_codebook[FFMIN(code, 6)]);
+encode_codeword(pb, new_code, ff_prores_dc_codebook[FFMIN(code, 6)]);
 
 code  = new_code;
 sign  = delta >> 31;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rework encode_codeword() prototype

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:40:03 
2023 +0100| [1574475033cfbdafc508bf2fd2b2b8d4b422ad10] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: rework encode_codeword() prototype

This matches the function of the same name in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1574475033cfbdafc508bf2fd2b2b8d4b422ad10
---

 libavcodec/proresenc_anatoliy.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 04f3ce8eff..71d5ad2771 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -226,7 +226,7 @@ static int int_from_list_or_default(void *ctx, const char 
*val_name, int val,
 return default_value;
 }
 
-static void encode_codeword(PutBitContext *pb, int val, unsigned codebook)
+static void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val)
 {
 unsigned int rice_order, exp_order, switch_bits, switch_val;
 int exponent;
@@ -277,7 +277,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
 
 prev_dc = QSCALE(qmat, 0, in[0] - 16384);
 code = TO_GOLOMB(prev_dc);
-encode_codeword(pb, code, FIRST_DC_CB);
+encode_vlc_codeword(pb, FIRST_DC_CB, code);
 
 code = 5; sign = 0; idx = 64;
 for (i = 1; i < blocks_per_slice; i++, idx += 64) {
@@ -286,7 +286,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
 diff_sign = DIFF_SIGN(delta, sign);
 new_code  = TO_GOLOMB2(get_level(delta), diff_sign);
 
-encode_codeword(pb, new_code, ff_prores_dc_codebook[FFMIN(code, 6)]);
+encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(code, 6)], 
new_code);
 
 code  = new_code;
 sign  = delta >> 31;
@@ -306,14 +306,14 @@ static void encode_ac_coeffs(PutBitContext *pb,
 for (j = 0; j < blocks_per_slice; j++) {
 int val = QSCALE(qmat, indp, in[(j << 6) + indp]);
 if (val) {
-encode_codeword(pb, run, ff_prores_run_to_cb[FFMIN(prev_run, 
15)]);
+encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 
15)], run);
 
 prev_run   = run;
 run= 0;
 level  = get_level(val);
 code   = level - 1;
 
-encode_codeword(pb, code, 
ff_prores_level_to_cb[FFMIN(prev_level, 9)]);
+encode_vlc_codeword(pb, 
ff_prores_level_to_cb[FFMIN(prev_level, 9)], code);
 
 prev_level = level;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: shuffle encode_codeword() code to match Kostya encoder

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:32:58 
2023 +0100| [1832bd7838f7062201eacdbdda53821789d59c72] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: shuffle encode_codeword() code to match Kostya 
encoder

Code is functionally identical, it's just rename of variables, cosmetics
and branch logic shuffling.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1832bd7838f7062201eacdbdda53821789d59c72
---

 libavcodec/proresenc_anatoliy.c | 45 +
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index f40e455e65..04f3ce8eff 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -226,31 +226,32 @@ static int int_from_list_or_default(void *ctx, const char 
*val_name, int val,
 return default_value;
 }
 
-static void encode_codeword(PutBitContext *pb, int val, int codebook)
+static void encode_codeword(PutBitContext *pb, int val, unsigned codebook)
 {
-unsigned int rice_order, exp_order, switch_bits, first_exp, exp, zeros;
-
-/* number of bits to switch between rice and exp golomb */
-switch_bits = codebook & 3;
-rice_order  = codebook >> 5;
-exp_order   = (codebook >> 2) & 7;
-
-first_exp = ((switch_bits + 1) << rice_order);
-
-if (val >= first_exp) { /* exp golomb */
-val -= first_exp;
-val += (1 << exp_order);
-exp = av_log2(val);
-zeros = exp - exp_order + switch_bits + 1;
-put_bits(pb, zeros, 0);
-put_bits(pb, exp + 1, val);
-} else if (rice_order) {
-put_bits(pb, (val >> rice_order), 0);
-put_bits(pb, 1, 1);
-put_sbits(pb, rice_order, val);
+unsigned int rice_order, exp_order, switch_bits, switch_val;
+int exponent;
+
+/* number of prefix bits to switch between Rice and expGolomb */
+switch_bits = (codebook & 3) + 1;
+rice_order  =  codebook >> 5;   /* rice code order */
+exp_order   = (codebook >> 2) & 7;  /* exp golomb code order */
+
+switch_val  = switch_bits << rice_order;
+
+if (val >= switch_val) {
+val -= switch_val - (1 << exp_order);
+exponent = av_log2(val);
+
+put_bits(pb, exponent - exp_order + switch_bits, 0);
+put_bits(pb, exponent + 1, val);
 } else {
-put_bits(pb, val, 0);
+exponent = val >> rice_order;
+
+if (exponent)
+put_bits(pb, exponent, 0);
 put_bits(pb, 1, 1);
+if (rice_order)
+put_sbits(pb, rice_order, val);
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rename new_code/code to code/codebook

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:47:01 
2023 +0100| [43baba4647fa6bb23d67c6c0c00da762dbac4075] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: rename new_code/code to code/codebook

This makes the function closer to encode_dcs() in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=43baba4647fa6bb23d67c6c0c00da762dbac4075
---

 libavcodec/proresenc_anatoliy.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index d037efd837..691fc614c7 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -270,24 +270,24 @@ static av_always_inline int get_level(int val)
 static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
 int blocks_per_slice, int *qmat)
 {
-int prev_dc, code;
+int prev_dc, codebook;
 int i, sign, idx;
-int new_dc, delta, diff_sign, new_code;
+int new_dc, delta, diff_sign, code;
 
 prev_dc = (in[0] - 0x4000) / qmat[0];
-code = TO_GOLOMB(prev_dc);
-encode_vlc_codeword(pb, FIRST_DC_CB, code);
+codebook = TO_GOLOMB(prev_dc);
+encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
 
-code = 5; sign = 0; idx = 64;
+codebook = 5; sign = 0; idx = 64;
 for (i = 1; i < blocks_per_slice; i++, idx += 64) {
 new_dc= (in[idx] - 0x4000) / qmat[0];
 delta = new_dc - prev_dc;
 diff_sign = DIFF_SIGN(delta, sign);
-new_code  = TO_GOLOMB2(get_level(delta), diff_sign);
+code  = TO_GOLOMB2(get_level(delta), diff_sign);
 
-encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(code, 6)], 
new_code);
+encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(codebook, 6)], 
code);
 
-code  = new_code;
+codebook  = code;
 sign  = delta >> 31;
 prev_dc   = new_dc;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: execute codebook FFMIN() at assignment

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:48:46 
2023 +0100| [8e42d3aba01e901bd99a95197714fe5b96d2fea8] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: execute codebook FFMIN() at assignment

This makes the function closer to encode_dcs() in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e42d3aba01e901bd99a95197714fe5b96d2fea8
---

 libavcodec/proresenc_anatoliy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 691fc614c7..733b119e5f 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -285,9 +285,9 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
 diff_sign = DIFF_SIGN(delta, sign);
 code  = TO_GOLOMB2(get_level(delta), diff_sign);
 
-encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(codebook, 6)], 
code);
+encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code);
 
-codebook  = code;
+codebook  = FFMIN(code, 6);
 sign  = delta >> 31;
 prev_dc   = new_dc;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: inline QSCALE()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:43:33 
2023 +0100| [c44cd371ca8269065876874326c6c5c7ef1c8e5f] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: inline QSCALE()

Also replaces 16384 with 0x4000.

This makes the function slightly closer to same function in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c44cd371ca8269065876874326c6c5c7ef1c8e5f
---

 libavcodec/proresenc_anatoliy.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 71d5ad2771..d037efd837 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -255,7 +255,6 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned 
codebook, int val)
 }
 }
 
-#define QSCALE(qmat,ind,val) ((val) / ((qmat)[ind]))
 #define TO_GOLOMB(val) (((val) * 2) ^ ((val) >> 31))
 #define DIFF_SIGN(val, sign) (((val) >> 31) ^ (sign))
 #define IS_NEGATIVE(val) val) >> 31) ^ -1) + 1)
@@ -275,13 +274,13 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t 
*in,
 int i, sign, idx;
 int new_dc, delta, diff_sign, new_code;
 
-prev_dc = QSCALE(qmat, 0, in[0] - 16384);
+prev_dc = (in[0] - 0x4000) / qmat[0];
 code = TO_GOLOMB(prev_dc);
 encode_vlc_codeword(pb, FIRST_DC_CB, code);
 
 code = 5; sign = 0; idx = 64;
 for (i = 1; i < blocks_per_slice; i++, idx += 64) {
-new_dc= QSCALE(qmat, 0, in[idx] - 16384);
+new_dc= (in[idx] - 0x4000) / qmat[0];
 delta = new_dc - prev_dc;
 diff_sign = DIFF_SIGN(delta, sign);
 new_code  = TO_GOLOMB2(get_level(delta), diff_sign);
@@ -304,7 +303,7 @@ static void encode_ac_coeffs(PutBitContext *pb,
 for (i = 1; i < 64; i++) {
 int indp = ff_prores_scan[i];
 for (j = 0; j < blocks_per_slice; j++) {
-int val = QSCALE(qmat, indp, in[(j << 6) + indp]);
+int val = (in[(j << 6) + indp]) / qmat[indp];
 if (val) {
 encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 
15)], run);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: directly work with blocks in encode_dcs()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:52:23 
2023 +0100| [273f591a3d1cc19f7d6621c9a214c69475f06b04] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: directly work with blocks in encode_dcs()

This makes the function closer to encode_dcs() in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=273f591a3d1cc19f7d6621c9a214c69475f06b04
---

 libavcodec/proresenc_anatoliy.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index d9c6bfe917..94610d5bc2 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -271,16 +271,17 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int *qmat)
 {
 int prev_dc, codebook;
-int i, sign, idx;
+int i, sign;
 int new_dc, delta, diff_sign, code;
 
 prev_dc = (blocks[0] - 0x4000) / qmat[0];
 codebook = TO_GOLOMB(prev_dc);
 encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
+blocks  += 64;
 
-codebook = 5; sign = 0; idx = 64;
-for (i = 1; i < blocks_per_slice; i++, idx += 64) {
-new_dc= (blocks[idx] - 0x4000) / qmat[0];
+codebook = 5; sign = 0;
+for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
+new_dc= (blocks[0] - 0x4000) / qmat[0];
 delta = new_dc - prev_dc;
 diff_sign = DIFF_SIGN(delta, sign);
 code  = TO_GOLOMB2(get_level(delta), diff_sign);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: import GET_SIGN() macro from Kostya encoder and use it

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:54:37 
2023 +0100| [17392ca84fb411d13a2663bbd3e4fad397efb017] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: import GET_SIGN() macro from Kostya encoder and use 
it

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17392ca84fb411d13a2663bbd3e4fad397efb017
---

 libavcodec/proresenc_anatoliy.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 94610d5bc2..fe7b3e9ef3 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -255,9 +255,10 @@ static void encode_vlc_codeword(PutBitContext *pb, 
unsigned codebook, int val)
 }
 }
 
-#define TO_GOLOMB(val) (((val) * 2) ^ ((val) >> 31))
-#define DIFF_SIGN(val, sign) (((val) >> 31) ^ (sign))
-#define IS_NEGATIVE(val) val) >> 31) ^ -1) + 1)
+#define GET_SIGN(x)  ((x) >> 31)
+#define TO_GOLOMB(val) (((val) * 2) ^ GET_SIGN(val))
+#define DIFF_SIGN(val, sign) (GET_SIGN(val) ^ (sign))
+#define IS_NEGATIVE(val) ((GET_SIGN(val) ^ -1) + 1)
 #define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))
 
 static av_always_inline int get_level(int val)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: compute sign only once

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:57:06 
2023 +0100| [9258f4eaf9e8d8afbd98ae1e0c34a3bee8bec067] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: compute sign only once

This makes the function closer to encode_dcs() in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9258f4eaf9e8d8afbd98ae1e0c34a3bee8bec067
---

 libavcodec/proresenc_anatoliy.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index fe7b3e9ef3..0d1b84face 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -257,7 +257,6 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned 
codebook, int val)
 
 #define GET_SIGN(x)  ((x) >> 31)
 #define TO_GOLOMB(val) (((val) * 2) ^ GET_SIGN(val))
-#define DIFF_SIGN(val, sign) (GET_SIGN(val) ^ (sign))
 #define IS_NEGATIVE(val) ((GET_SIGN(val) ^ -1) + 1)
 #define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))
 
@@ -272,7 +271,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int *qmat)
 {
 int prev_dc, codebook;
-int i, sign;
+int i, sign, new_sign;
 int new_dc, delta, diff_sign, code;
 
 prev_dc = (blocks[0] - 0x4000) / qmat[0];
@@ -284,13 +283,14 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
 new_dc= (blocks[0] - 0x4000) / qmat[0];
 delta = new_dc - prev_dc;
-diff_sign = DIFF_SIGN(delta, sign);
+new_sign  = GET_SIGN(delta);
+diff_sign = new_sign ^ sign;
 code  = TO_GOLOMB2(get_level(delta), diff_sign);
 
 encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code);
 
 codebook  = FFMIN(code, 6);
-sign  = delta >> 31;
+sign  = new_sign;
 prev_dc   = new_dc;
 }
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: reduce DC encoding function prototype differences with Kostya encoder

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:50:02 
2023 +0100| [dadc5ac24aae78e89c37d5d65c5f30cff28eb577] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: reduce DC encoding function prototype differences 
with Kostya encoder

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dadc5ac24aae78e89c37d5d65c5f30cff28eb577
---

 libavcodec/proresenc_anatoliy.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 733b119e5f..d9c6bfe917 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -267,20 +267,20 @@ static av_always_inline int get_level(int val)
 }
 
 
-static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
-int blocks_per_slice, int *qmat)
+static void encode_dcs(PutBitContext *pb, int16_t *blocks,
+   int blocks_per_slice, int *qmat)
 {
 int prev_dc, codebook;
 int i, sign, idx;
 int new_dc, delta, diff_sign, code;
 
-prev_dc = (in[0] - 0x4000) / qmat[0];
+prev_dc = (blocks[0] - 0x4000) / qmat[0];
 codebook = TO_GOLOMB(prev_dc);
 encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
 
 codebook = 5; sign = 0; idx = 64;
 for (i = 1; i < blocks_per_slice; i++, idx += 64) {
-new_dc= (in[idx] - 0x4000) / qmat[0];
+new_dc= (blocks[idx] - 0x4000) / qmat[0];
 delta = new_dc - prev_dc;
 diff_sign = DIFF_SIGN(delta, sign);
 code  = TO_GOLOMB2(get_level(delta), diff_sign);
@@ -388,7 +388,7 @@ static int encode_slice_plane(int16_t *blocks, int 
mb_count, uint8_t *buf, unsig
 blocks_per_slice = mb_count << (2 - sub_sample_chroma);
 init_put_bits(&pb, buf, buf_size);
 
-encode_dc_coeffs(&pb, blocks, blocks_per_slice, qmat);
+encode_dcs(&pb, blocks, blocks_per_slice, qmat);
 encode_ac_coeffs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
 
 flush_put_bits(&pb);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rename new_dc to dc

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:57:37 
2023 +0100| [9c7f6d89fdff7f9fc6f36f6f86b657092dafff92] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: rename new_dc to dc

This makes the function closer to encode_dcs() in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c7f6d89fdff7f9fc6f36f6f86b657092dafff92
---

 libavcodec/proresenc_anatoliy.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 0d1b84face..5a63620b18 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -272,7 +272,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 {
 int prev_dc, codebook;
 int i, sign, new_sign;
-int new_dc, delta, diff_sign, code;
+int dc, delta, diff_sign, code;
 
 prev_dc = (blocks[0] - 0x4000) / qmat[0];
 codebook = TO_GOLOMB(prev_dc);
@@ -281,8 +281,8 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 
 codebook = 5; sign = 0;
 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
-new_dc= (blocks[0] - 0x4000) / qmat[0];
-delta = new_dc - prev_dc;
+dc= (blocks[0] - 0x4000) / qmat[0];
+delta = dc - prev_dc;
 new_sign  = GET_SIGN(delta);
 diff_sign = new_sign ^ sign;
 code  = TO_GOLOMB2(get_level(delta), diff_sign);
@@ -291,7 +291,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 
 codebook  = FFMIN(code, 6);
 sign  = new_sign;
-prev_dc   = new_dc;
+prev_dc   = dc;
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: remove IS_NEGATIVE() macro

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:59:18 
2023 +0100| [d269f841995b9ecc5d169090841c7541c18a9bb4] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: remove IS_NEGATIVE() macro

This makes the function closer to encode_acs() in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d269f841995b9ecc5d169090841c7541c18a9bb4
---

 libavcodec/proresenc_anatoliy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 5a63620b18..ea7046ae71 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -257,7 +257,6 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned 
codebook, int val)
 
 #define GET_SIGN(x)  ((x) >> 31)
 #define TO_GOLOMB(val) (((val) * 2) ^ GET_SIGN(val))
-#define IS_NEGATIVE(val) ((GET_SIGN(val) ^ -1) + 1)
 #define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))
 
 static av_always_inline int get_level(int val)
@@ -318,7 +317,7 @@ static void encode_ac_coeffs(PutBitContext *pb,
 
 prev_level = level;
 
-put_bits(pb, 1, IS_NEGATIVE(val));
+put_sbits(pb, 1, GET_SIGN(val));
 } else {
 ++run;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: shuffle declarations around in encode_dcs()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:07:48 
2023 +0100| [1aa7d504ecd90c37687a06480c5915b99970ccb6] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: shuffle declarations around in encode_dcs()

This makes the function closer to the same function in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1aa7d504ecd90c37687a06480c5915b99970ccb6
---

 libavcodec/proresenc_anatoliy.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 5a0e8234f0..203136e574 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -269,16 +269,15 @@ static av_always_inline int get_level(int val)
 static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int *qmat)
 {
-int prev_dc, codebook;
-int i, sign, new_sign;
-int dc, delta, diff_sign, code;
+int i;
+int codebook = 5, code, dc, prev_dc, delta, sign, new_sign;
+int diff_sign;
 
 prev_dc = (blocks[0] - 0x4000) / qmat[0];
-codebook = MAKE_CODE(prev_dc);
-encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
+encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc));
+sign = 0;
 blocks  += 64;
 
-codebook = 5; sign = 0;
 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
 dc= (blocks[0] - 0x4000) / qmat[0];
 delta = dc - prev_dc;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: add Anatoliy copyright

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 01:37:04 
2023 +0100| [7af42088d78b2646638b0bea9def8e2cc49c27e9] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: add Anatoliy copyright

Both encoders share a lot of code from both authors.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7af42088d78b2646638b0bea9def8e2cc49c27e9
---

 libavcodec/proresenc_kostya.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index d29faa0fe3..c32b734d53 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1,6 +1,7 @@
 /*
  * Apple ProRes encoder
  *
+ * Copyright (c) 2011 Anatoliy Wasserman
  * Copyright (c) 2012 Konstantin Shishkov
  *
  * This encoder appears to be based on Anatoliy Wassermans considering

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: only pass down the first scale to encode_dcs()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:10:15 
2023 +0100| [a026f98f292e7669b51436a6db0a5ccf90b15be4] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: only pass down the first scale to encode_dcs()

This matches encode_dcs() prototype from proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a026f98f292e7669b51436a6db0a5ccf90b15be4
---

 libavcodec/proresenc_anatoliy.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 203136e574..b193ff5cf8 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -267,19 +267,19 @@ static av_always_inline int get_level(int val)
 
 
 static void encode_dcs(PutBitContext *pb, int16_t *blocks,
-   int blocks_per_slice, int *qmat)
+   int blocks_per_slice, int scale)
 {
 int i;
 int codebook = 5, code, dc, prev_dc, delta, sign, new_sign;
 int diff_sign;
 
-prev_dc = (blocks[0] - 0x4000) / qmat[0];
+prev_dc = (blocks[0] - 0x4000) / scale;
 encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc));
 sign = 0;
 blocks  += 64;
 
 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
-dc= (blocks[0] - 0x4000) / qmat[0];
+dc= (blocks[0] - 0x4000) / scale;
 delta = dc - prev_dc;
 new_sign  = GET_SIGN(delta);
 diff_sign = new_sign ^ sign;
@@ -388,7 +388,7 @@ static int encode_slice_plane(int16_t *blocks, int 
mb_count, uint8_t *buf, unsig
 blocks_per_slice = mb_count << (2 - sub_sample_chroma);
 init_put_bits(&pb, buf, buf_size);
 
-encode_dcs(&pb, blocks, blocks_per_slice, qmat);
+encode_dcs(&pb, blocks, blocks_per_slice, qmat[0]);
 encode_ac_coeffs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
 
 flush_put_bits(&pb);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rename TO_GOLOMB() to MAKE_CODE()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:05:56 
2023 +0100| [87ba89281c4e13ef9618821f27f2c642dfd1b41b] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: rename TO_GOLOMB() to MAKE_CODE()

This matches the name in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87ba89281c4e13ef9618821f27f2c642dfd1b41b
---

 libavcodec/proresenc_anatoliy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index ea7046ae71..5a0e8234f0 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -256,7 +256,7 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned 
codebook, int val)
 }
 
 #define GET_SIGN(x)  ((x) >> 31)
-#define TO_GOLOMB(val) (((val) * 2) ^ GET_SIGN(val))
+#define MAKE_CODE(x) (((x) * 2) ^ GET_SIGN(x))
 #define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))
 
 static av_always_inline int get_level(int val)
@@ -274,7 +274,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 int dc, delta, diff_sign, code;
 
 prev_dc = (blocks[0] - 0x4000) / qmat[0];
-codebook = TO_GOLOMB(prev_dc);
+codebook = MAKE_CODE(prev_dc);
 encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
 blocks  += 64;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: replace get_level() with FFABS()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:14:51 
2023 +0100| [3543100a059fa146f501705a2c4c6dd2aff88831] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: replace get_level() with FFABS()

This matches the code from proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3543100a059fa146f501705a2c4c6dd2aff88831
---

 libavcodec/proresenc_anatoliy.c | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 7c63d872fc..9ea7a90d00 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -258,13 +258,6 @@ static void encode_vlc_codeword(PutBitContext *pb, 
unsigned codebook, int val)
 #define GET_SIGN(x)  ((x) >> 31)
 #define MAKE_CODE(x) (((x) * 2) ^ GET_SIGN(x))
 
-static av_always_inline int get_level(int val)
-{
-int sign = (val >> 31);
-return (val ^ sign) - sign;
-}
-
-
 static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int scale)
 {
@@ -305,7 +298,7 @@ static void encode_ac_coeffs(PutBitContext *pb,
 
 prev_run   = run;
 run= 0;
-level  = get_level(val);
+level  = FFABS(val);
 code   = level - 1;
 
 encode_vlc_codeword(pb, 
ff_prores_level_to_cb[FFMIN(prev_level, 9)], code);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: cosmetics to make encode_dcs() identical to the one in Kostya encoder

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:13:37 
2023 +0100| [ed8692446c7f66f2e68cd298d21a061854ec8429] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: cosmetics to make encode_dcs() identical to the one 
in Kostya encoder

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed8692446c7f66f2e68cd298d21a061854ec8429
---

 libavcodec/proresenc_anatoliy.c | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 993fa9831b..7c63d872fc 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -277,17 +277,15 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 blocks  += 64;
 
 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
-dc= (blocks[0] - 0x4000) / scale;
-delta = dc - prev_dc;
-new_sign  = GET_SIGN(delta);
-delta = (delta ^ sign) - sign;
-code  = MAKE_CODE(delta);
-
+dc   = (blocks[0] - 0x4000) / scale;
+delta= dc - prev_dc;
+new_sign = GET_SIGN(delta);
+delta= (delta ^ sign) - sign;
+code = MAKE_CODE(delta);
 encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code);
-
-codebook  = FFMIN(code, 6);
-sign  = new_sign;
-prev_dc   = dc;
+codebook = FFMIN(code, 6);
+sign = new_sign;
+prev_dc  = dc;
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: remove TO_GOLOMB2()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:11:00 
2023 +0100| [e87bc5641ce64df6bd00871ba7ada8a94db90c68] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: remove TO_GOLOMB2()

A few cosmetics aside, this makes the function identical to the one with
the same name in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e87bc5641ce64df6bd00871ba7ada8a94db90c68
---

 libavcodec/proresenc_anatoliy.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index b193ff5cf8..993fa9831b 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -257,7 +257,6 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned 
codebook, int val)
 
 #define GET_SIGN(x)  ((x) >> 31)
 #define MAKE_CODE(x) (((x) * 2) ^ GET_SIGN(x))
-#define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))
 
 static av_always_inline int get_level(int val)
 {
@@ -271,7 +270,6 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 {
 int i;
 int codebook = 5, code, dc, prev_dc, delta, sign, new_sign;
-int diff_sign;
 
 prev_dc = (blocks[0] - 0x4000) / scale;
 encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc));
@@ -282,8 +280,8 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 dc= (blocks[0] - 0x4000) / scale;
 delta = dc - prev_dc;
 new_sign  = GET_SIGN(delta);
-diff_sign = new_sign ^ sign;
-code  = TO_GOLOMB2(get_level(delta), diff_sign);
+delta = (delta ^ sign) - sign;
+code  = MAKE_CODE(delta);
 
 encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rework encode_ac_coeffs() prototype

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:16:13 
2023 +0100| [29fd3f75feddae08ef1d73d6edfcbaf0c4c8aba0] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: rework encode_ac_coeffs() prototype

This makes the prototype closer to the function of the same name in
proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29fd3f75feddae08ef1d73d6edfcbaf0c4c8aba0
---

 libavcodec/proresenc_anatoliy.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 9ea7a90d00..ad154cf356 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -282,8 +282,9 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 }
 }
 
-static void encode_ac_coeffs(PutBitContext *pb,
-int16_t *in, int blocks_per_slice, int *qmat, const uint8_t 
ff_prores_scan[64])
+static void encode_acs(PutBitContext *pb, int16_t *blocks,
+   int blocks_per_slice,
+   int *qmat, const uint8_t ff_prores_scan[64])
 {
 int prev_run = 4;
 int prev_level = 2;
@@ -292,7 +293,7 @@ static void encode_ac_coeffs(PutBitContext *pb,
 for (i = 1; i < 64; i++) {
 int indp = ff_prores_scan[i];
 for (j = 0; j < blocks_per_slice; j++) {
-int val = (in[(j << 6) + indp]) / qmat[indp];
+int val = (blocks[(j << 6) + indp]) / qmat[indp];
 if (val) {
 encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 
15)], run);
 
@@ -378,7 +379,7 @@ static int encode_slice_plane(int16_t *blocks, int 
mb_count, uint8_t *buf, unsig
 init_put_bits(&pb, buf, buf_size);
 
 encode_dcs(&pb, blocks, blocks_per_slice, qmat[0]);
-encode_ac_coeffs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
+encode_acs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
 
 flush_put_bits(&pb);
 return put_bits_ptr(&pb) - pb.buf;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: avoid using ff_ prefix in function arguments

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:18:51 
2023 +0100| [25f28b9308e03a61e2bc2d70135bee0eb4c499b5] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: avoid using ff_ prefix in function arguments

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25f28b9308e03a61e2bc2d70135bee0eb4c499b5
---

 libavcodec/proresenc_anatoliy.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index ad154cf356..442910c46d 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -284,14 +284,14 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 
 static void encode_acs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice,
-   int *qmat, const uint8_t ff_prores_scan[64])
+   int *qmat, const uint8_t *scan)
 {
 int prev_run = 4;
 int prev_level = 2;
 
 int run = 0, level, code, i, j;
 for (i = 1; i < 64; i++) {
-int indp = ff_prores_scan[i];
+int indp = scan[i];
 for (j = 0; j < blocks_per_slice; j++) {
 int val = (blocks[(j << 6) + indp]) / qmat[indp];
 if (val) {
@@ -370,7 +370,7 @@ static void calc_plane_dct(FDCTDSPContext *fdsp, const 
uint8_t *src, int16_t * b
 }
 
 static int encode_slice_plane(int16_t *blocks, int mb_count, uint8_t *buf, 
unsigned buf_size, int *qmat, int sub_sample_chroma,
-  const uint8_t ff_prores_scan[64])
+  const uint8_t *scan)
 {
 int blocks_per_slice;
 PutBitContext pb;
@@ -379,7 +379,7 @@ static int encode_slice_plane(int16_t *blocks, int 
mb_count, uint8_t *buf, unsig
 init_put_bits(&pb, buf, buf_size);
 
 encode_dcs(&pb, blocks, blocks_per_slice, qmat[0]);
-encode_acs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
+encode_acs(&pb, blocks, blocks_per_slice, qmat, scan);
 
 flush_put_bits(&pb);
 return put_bits_ptr(&pb) - pb.buf;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: execute AC run/level FFMIN() at assignment

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:26:10 
2023 +0100| [8fb2e96d7e61891b415b63dcbaaa77f6fdc00f4b] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: execute AC run/level FFMIN() at assignment

This matches the logic from the function of the same name in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8fb2e96d7e61891b415b63dcbaaa77f6fdc00f4b
---

 libavcodec/proresenc_anatoliy.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index bc25b96965..c0e8e69cf7 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -298,18 +298,18 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
 for (idx = scan[i]; idx < max_coeffs; idx += 64) {
 int val = blocks[idx] / qmat[scan[i]];
 if (val) {
-encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 
15)], run);
+encode_vlc_codeword(pb, ff_prores_run_to_cb[prev_run], run);
 
-prev_run   = run;
-run= 0;
 level  = FFABS(val);
 code   = level - 1;
 
-encode_vlc_codeword(pb, 
ff_prores_level_to_cb[FFMIN(prev_level, 9)], code);
-
-prev_level = level;
+encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], 
code);
 
 put_sbits(pb, 1, GET_SIGN(val));
+
+prev_run   = FFMIN(run, 15);
+prev_level = FFMIN(level, 9);
+run= 0;
 } else {
 ++run;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: make a few cosmetics in encode_acs()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:29:36 
2023 +0100| [cc2206d1422d2cc9cdac90461075b320f90c5217] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: make a few cosmetics in encode_acs()

This makes the function pretty much identical to the function of the
same name in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc2206d1422d2cc9cdac90461075b320f90c5217
---

 libavcodec/proresenc_anatoliy.c | 24 ++--
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index c0e8e69cf7..6be6a98089 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -286,32 +286,28 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice,
int *qmat, const uint8_t *scan)
 {
-int idx;
+int idx, i;
 int prev_run = 4;
 int prev_level = 2;
-int max_coeffs;
-int run = 0, level, code, i;
+int run = 0, level;
+int max_coeffs, abs_level;
 
 max_coeffs = blocks_per_slice << 6;
 
 for (i = 1; i < 64; i++) {
 for (idx = scan[i]; idx < max_coeffs; idx += 64) {
-int val = blocks[idx] / qmat[scan[i]];
-if (val) {
+level = blocks[idx] / qmat[scan[i]];
+if (level) {
+abs_level = FFABS(level);
 encode_vlc_codeword(pb, ff_prores_run_to_cb[prev_run], run);
-
-level  = FFABS(val);
-code   = level - 1;
-
-encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], 
code);
-
-put_sbits(pb, 1, GET_SIGN(val));
+encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], 
abs_level - 1);
+put_sbits(pb, 1, GET_SIGN(level));
 
 prev_run   = FFMIN(run, 15);
-prev_level = FFMIN(level, 9);
+prev_level = FFMIN(abs_level, 9);
 run= 0;
 } else {
-++run;
+run++;
 }
 }
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rework inner loop in encode_acs()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:21:46 
2023 +0100| [096a69ad43a6bd1602c90cb7d6009d5158e32726] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: rework inner loop in encode_acs()

This matches the logic from the function of the same name in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=096a69ad43a6bd1602c90cb7d6009d5158e32726
---

 libavcodec/proresenc_anatoliy.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 442910c46d..bc25b96965 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -286,14 +286,17 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice,
int *qmat, const uint8_t *scan)
 {
+int idx;
 int prev_run = 4;
 int prev_level = 2;
+int max_coeffs;
+int run = 0, level, code, i;
+
+max_coeffs = blocks_per_slice << 6;
 
-int run = 0, level, code, i, j;
 for (i = 1; i < 64; i++) {
-int indp = scan[i];
-for (j = 0; j < blocks_per_slice; j++) {
-int val = (blocks[(j << 6) + indp]) / qmat[indp];
+for (idx = scan[i]; idx < max_coeffs; idx += 64) {
+int val = blocks[idx] / qmat[scan[i]];
 if (val) {
 encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 
15)], run);
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_kostya: make a few cosmetics in encode_acs()

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 02:30:27 
2023 +0100| [1081bae94d793e6be0b2542e57a1d5ab4ccb816b] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: make a few cosmetics in encode_acs()

Unify cosmetics with encode_acs() from proresenc_anatoliy.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1081bae94d793e6be0b2542e57a1d5ab4ccb816b
---

 libavcodec/proresenc_kostya.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index c32b734d53..f4674280fd 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -437,11 +437,10 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
 int idx, i;
 int prev_run = 4;
 int prev_level = 2;
-int run, level;
+int run = 0, level;
 int max_coeffs, abs_level;
 
 max_coeffs = blocks_per_slice << 6;
-run= 0;
 
 for (i = 1; i < 64; i++) {
 for (idx = scan[i]; idx < max_coeffs; idx += 64) {
@@ -449,13 +448,12 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
 if (level) {
 abs_level = FFABS(level);
 encode_vlc_codeword(pb, ff_prores_run_to_cb[prev_run], run);
-encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level],
-abs_level - 1);
+encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], 
abs_level - 1);
 put_sbits(pb, 1, GET_SIGN(level));
 
 prev_run   = FFMIN(run, 15);
 prev_level = FFMIN(abs_level, 9);
-run= 0;
+run= 0;
 } else {
 run++;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/faq: use texi's @tie instead of 0xA0 for non-breaking space

2024-01-10 Thread Marth64
ffmpeg | branch: master | Marth64  | Sun Jan  7 09:29:24 
2024 -0600| [468e0a0d8b64dd342faf75b469ec7c7b77f2131d] | committer: Stefano 
Sabatini

doc/faq: use texi's @tie instead of 0xA0 for non-breaking space

Signed-off-by: Marth64 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=468e0a0d8b64dd342faf75b469ec7c7b77f2131d
---

 doc/faq.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/faq.texi b/doc/faq.texi
index 5998e0d000..477cc60533 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -450,7 +450,7 @@ work with streams that were detected during the initial 
scan; streams that
 are detected later are ignored.
 
 The size of the initial scan is controlled by two options: @code{probesize}
-(default ~5 Mo) and @code{analyzeduration} (default 5,000,000 µs = 5 s). For
+(default ~5@tie{}Mo) and @code{analyzeduration} (default 5,000,000@tie{}µs = 
5@tie{}s). For
 the subtitle stream to be detected, both values must be large enough.
 
 @section Why was the @command{ffmpeg} @option{-sameq} option removed? What to 
use instead?

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] lavf/movenc: sort options by name

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
17:52:11 2024 +0100| [14a1ece3aa74f7a140fcf4ede2984b196020abf2] | committer: 
Stefano Sabatini

lavf/movenc: sort options by name

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14a1ece3aa74f7a140fcf4ede2984b196020abf2
---

 libavformat/movenc.c | 86 ++--
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 6b1ff408c7..c95410f5c1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -70,56 +70,56 @@
 #include "vpcc.h"
 
 static const AVOption options[] = {
-{ "movflags", "MOV muxer flags", offsetof(MOVMuxContext, flags), 
AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "rtphint", "Add RTP hint tracks", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_MOV_FLAG_RTP_HINT}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" 
},
-{ "moov_size", "maximum moov size so it can be placed at the begin", 
offsetof(MOVMuxContext, reserved_moov_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 
INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 0 },
-{ "empty_moov", "Make the initial moov atom empty", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_MOV_FLAG_EMPTY_MOOV}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "frag_keyframe", "Fragment at video keyframes", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_MOV_FLAG_FRAG_KEYFRAME}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "frag_every_frame", "Fragment at every frame", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_MOV_FLAG_FRAG_EVERY_FRAME}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "separate_moof", "Write separate moof/mdat atoms for each track", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_SEPARATE_MOOF}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "frag_custom", "Flush fragments on caller requests", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FRAG_CUSTOM}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "isml", "Create a live smooth streaming feed (for pushing to a 
publishing point)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_ISML}, INT_MIN, 
INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "faststart", "Run a second pass to put the index (moov atom) at the 
beginning of the file", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FASTSTART}, 
INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "omit_tfhd_offset", "Omit the base data offset in tfhd atoms", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_OMIT_TFHD_OFFSET}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "disable_chpl", "Disable Nero chapter atom", 0, AV_OPT_TYPE_CONST, {.i64 
= FF_MOV_FLAG_DISABLE_CHPL}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "default_base_moof", "Set the default-base-is-moof flag in tfhd atoms", 
0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_DEFAULT_BASE_MOOF}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "dash", "Write DASH compatible fragmented MP4", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_MOV_FLAG_DASH}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "cmaf", "Write CMAF compatible fragmented MP4", 0, AV_OPT_TYPE_CONST, 
{.i64 = FF_MOV_FLAG_CMAF}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "frag_discont", "Signal that the next fragment is discontinuous from 
earlier ones", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FRAG_DISCONT}, 
INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "delay_moov", "Delay writing the initial moov until the first fragment 
is cut, or until the first fragment flush", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_MOV_FLAG_DELAY_MOOV}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "global_sidx", "Write a global sidx index at the start of the file", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_GLOBAL_SIDX}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "skip_sidx", "Skip writing of sidx atom", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_MOV_FLAG_SKIP_SIDX}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "write_colr", "Write colr atom even if the color info is unspecified 
(Experimental, may be renamed or changed, do not use from scripts)", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_WRITE_COLR}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
-{ "prefer_icc", "If writing colr atom prioritise usage of ICC profile if 
it exists in stream packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = 
FF_MOV_FLAG_PREFER_ICC}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "write_gama", "Write deprecated gama atom", 0, AV_OPT_TYPE_CONST, {.i64 
= FF_MOV_FLAG_WRITE_GAMA}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 
"movflags" },
-{ "use_metadata_tags", "Use mdta atom for metadata.", 0, 
AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_USE_MDTA}, INT_MIN, INT_MAX, 
AV_OPT_FLAG_EN

[FFmpeg-cvslog] doc/muxers: review rawvideo muxers section

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:07:36 2024 +0100| [c7e26d192a39e262e5e2f6c307a64ba1b080e7ae] | committer: 
Stefano Sabatini

doc/muxers: review rawvideo muxers section

Move section to the top of the file, use table in place of subsection
to list the comprising muxers, and show media type information and
extensions in the item entry names.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7e26d192a39e262e5e2f6c307a64ba1b080e7ae
---

 doc/muxers.texi | 340 ++--
 1 file changed, 158 insertions(+), 182 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index ee6edd6f43..e0fddc0ecd 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -19,6 +19,164 @@ enabled demuxers and muxers.
 
 A description of some of the currently available muxers follows.
 
+@anchor{raw muxers}
+@section Raw muxers
+
+This section covers raw muxers. They accept a single stream matching
+the designated codec. They do not store timestamps or metadata. The
+recognized extension is the same as the muxer name unless indicated
+otherwise.
+
+It comprises the following muxers. The media type and the eventual
+extensions used to automatically selects the muxer from the output
+extensions are also shown.
+
+@table @samp
+@item ac3 @emph{audio}
+Dolby Digital, also known as AC-3.
+
+@item adx @emph{audio}
+CRI Middleware ADX audio.
+
+This muxer will write out the total sample count near the start of the
+first packet when the output is seekable and the count can be stored
+in 32 bits.
+
+@item aptx @emph{audio}
+aptX (Audio Processing Technology for Bluetooth)
+
+@item aptx_hd @emph{audio} (aptxdh)
+aptX HD (Audio Processing Technology for Bluetooth) audio
+
+@item avs2 @emph{video} (avs, avs2)
+AVS2-P2/IEEE1857.4 video.
+
+@item cavsvideo @emph{video} (cavs)
+Chinese AVS (Audio Video Standard)
+
+@item codec2raw @emph{audio}
+Codec 2 audio.
+
+No extension is registered so format name has to be supplied e.g. with
+the ffmpeg CLI tool @code{-f codec2raw}.
+
+@item data @emph{any}
+Generic data muxer.
+
+This muxer accepts a single stream with any codec of any type. The
+input stream has to be selected using the @code{-map} option with the
+@command{ffmpeg} CLI tool.
+
+No extension is registered so format name has to be supplied e.g. with
+the @command{ffmpeg} CLI tool @code{-f data}.
+
+@item dirac @emph{video} (drc, vc2)
+BBC Dirac video.
+
+The Dirac Pro codec is a subset and is standardized as SMPTE VC-2.
+
+@item dnxhd @emph{video} (dnxhd, dnxhr)
+Avid DNxHD video.
+
+It is standardized as SMPTE VC-3. Accepts DNxHR streams.
+
+@item dts @emph{audio}
+DTS Coherent Acoustics (DCA) audio
+
+@item  eac3 @emph{audio}
+Dolby Digital Plus, also known as Enhanced AC-3
+
+@item evc @emph{video} (evc)
+MPEG-5 Essential Video Coding (EVC) / EVC / MPEG-5 Part 1 EVC video
+
+@item g722 @emph{audio}
+ITU-T G.722 audio
+
+@item g723_1 @emph{audio} (tco, rco)
+ITU-T G.723.1 audio
+
+@item g726 @emph{audio}
+ITU-T G.726 big-endian ("left-justified") audio.
+
+No extension is registered so format name has to be supplied e.g. with
+the @command{ffmpeg} CLI tool @code{-f g726}.
+
+@item g726le @emph{audio}
+ITU-T G.726 little-endian ("right-justified") audio.
+
+No extension is registered so format name has to be supplied e.g. with
+the @command{ffmpeg} CLI tool @code{-f g726le}.
+
+@item gsm @emph{audio}
+Global System for Mobile Communications audio
+
+@item h261 @emph{video}
+ITU-T H.261 video
+
+@item h263 @emph{video}
+ITU-T H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 video
+
+@item h264 @emph{video} (h264, 264)
+ITU-T H.264 / MPEG-4 Part 10 AVC video. Bitstream shall be converted
+to Annex B syntax if it's in length-prefixed mode.
+
+@item hevc @emph{video} (hevc, h265, 265)
+ITU-T H.265 / MPEG-H Part 2 HEVC video. Bitstream shall be converted
+to Annex B syntax if it's in length-prefixed mode.
+
+@item m4v @emph{video}
+MPEG-4 Part 2 video
+
+@item mjpeg @emph{video} (mjpg, mjpeg)
+Motion JPEG video
+
+@item mlp @emph{audio}
+Meridian Lossless Packing, also known as Packed PCM
+
+@item mp2 @emph{audio} (mp2, m2a, mpa)
+MPEG-1 Audio Layer II audio
+
+@item mpeg1video @emph{video} (mpg, mpeg, m1v)
+MPEG-1 Part 2 video.
+
+@item mpeg2video @emph{video} (m2v)
+ITU-T H.262 / MPEG-2 Part 2 video
+
+@item obu @emph{video}
+AV1 low overhead Open Bitstream Units muxer.
+
+Temporal delimiter OBUs will be inserted in all temporal units of the
+stream.
+
+@item rawvideo @emph{video} (yuv, rgb)
+Raw uncompressed video.
+
+@item sbc @emph{audio} (sbc, msbc)
+Bluetooth SIG low-complexity subband codec audio
+
+@item truehd @emph{audio} (thd)
+Dolby TrueHD audio
+
+@item vc1 @emph{video}
+SMPTE 421M / VC-1 video
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+Store raw video frames with the @samp{rawvideo} muxer using @command{ffmpeg}:
+@example
+ffmpeg -f lavfi -i testsrc -t 10 -s hd1080p testsrc.yuv
+@end example
+
+Since the rawvideo muxer do

[FFmpeg-cvslog] doc/muxers: extend documentation for MOV muxers

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
17:45:35 2024 +0100| [f038cd7945cac6066583f983c71fc8d2eff4f3ef] | committer: 
Stefano Sabatini

doc/muxers: extend documentation for MOV muxers

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f038cd7945cac6066583f983c71fc8d2eff4f3ef
---

 doc/muxers.texi | 464 ++--
 1 file changed, 317 insertions(+), 147 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 7b705b6a9e..ee6edd6f43 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -19,6 +19,323 @@ enabled demuxers and muxers.
 
 A description of some of the currently available muxers follows.
 
+@section MOV/MPEG-4/ISOMBFF muxers
+
+This section covers formats belonging to the QuickTime / MOV family,
+including the MPEG-4 Part 14 format and ISO base media file format
+(ISOBMFF). These formats share a common structure based on the ISO
+base media file format (ISOBMFF).
+
+The MOV format was originally developed for use with Apple QuickTime.
+It was later used as the basis for the MPEG-4 Part 1 (later Part 14)
+format, also known as ISO/IEC 14496-1. That format was then
+generalized into ISOBMFF, also named MPEG-4 Part 12 format, ISO/IEC
+14496-12, or ISO/IEC 15444-12.
+
+It comprises the following muxers.
+
+@table @samp
+@item 3gp
+Third Generation Partnership Project (3GPP) format for 3G UMTS
+multimedia services
+
+@item 3g2
+Third Generation Partnership Project 2 (3GP2 or 3GPP2) format for 3G
+CDMA2000 multimedia services, similar to @samp{3gp} with extensions
+and limitations
+
+@item f4v
+Adobe Flash Video format
+
+@item ipod
+MPEG-4 audio file format, as MOV/MP4 but limited to contain only audio
+streams, typically played with the Apple ipod device
+
+@item ismv
+Microsoft IIS (Internet Information Services) Smooth Streaming
+Audio/Video (ISMV or ISMA) format. This is based on MPEG-4 Part 14
+format with a few incompatible variants, used to stream media files
+for the Microsoft IIS server.
+
+@item mov
+QuickTime player format identified by the @code{.mov} extension
+
+@item mp4
+MP4 or MPEG-4 Part 14 format
+
+@item psp
+PlayStation Portable MP4/MPEG-4 Part 14 format variant. This is based
+on MPEG-4 Part 14 format with a few incompatible variants, used to
+play files on PlayStation devices.
+@end table
+
+@subsection Fragmentation
+
+The @samp{mov}, @samp{mp4}, and @samp{ismv} muxers support
+fragmentation. Normally, a MOV/MP4 file has all the metadata about all
+packets stored in one location.
+
+This data is usually written at the end of the file, but it can be
+moved to the start for better playback by adding @code{+faststart} to
+the @code{-movflags}, or using the @command{qt-faststart} tool).
+
+A fragmented file consists of a number of fragments, where packets and
+metadata about these packets are stored together. Writing a fragmented
+file has the advantage that the file is decodable even if the writing
+is interrupted (while a normal MOV/MP4 is undecodable if it is not
+properly finished), and it requires less memory when writing very long
+files (since writing normal MOV/MP4 files stores info about every
+single packet in memory until the file is closed). The downside is
+that it is less compatible with other applications.
+
+Fragmentation is enabled by setting one of the options that define
+how to cut the file into fragments:
+@table @option
+@item frag_duration
+@item frag_size
+@item min_frag_duration
+@item movflags +frag_keyframe
+@item movflags +frag_custom
+@end table
+
+If more than one condition is specified, fragments are cut when one of
+the specified conditions is fulfilled. The exception to this is the
+option @option{min_frag_duration}, which has to be fulfilled for any
+of the other conditions to apply.
+
+@subsection Options
+
+@table @option
+
+@item brand @var{brand_string}
+Override major brand.
+
+@item empty_hdlr_name @var{bool}
+Enable to skip writing the name inside a @code{hdlr} box.
+Default is @code{false}.
+
+@item encryption_key @var{key}
+set the media encryption key in hexadecimal format
+
+@item encryption_kid @var{kid}
+set the media encryption key identifier in hexadecimal format
+
+@item encryption_scheme @var{scheme}
+configure the encryption scheme, allowed values are @samp{none}, and
+@samp{cenc-aes-ctr}
+
+@item frag_duration @var{duration}
+Create fragments that are @var{duration} microseconds long.
+
+@item frag_interleave  @var{number}
+Interleave samples within fragments (max number of consecutive
+samples, lower is tighter interleaving, but with more overhead. It is
+set to @code{0} by default.
+
+@item frag_size @var{size}
+create fragments that contain up to @var{size} bytes of payload data
+
+@item iods_audio_profile @var{profile}
+specify iods number for the audio profile atom (from -1 to 255),
+default is @code{-1}
+
+@item iods_video_profile @var{profile}
+specify iods number for the video profile atom (from -1 to 255),
+default is @code{-1}
+
+@item ism

[FFmpeg-cvslog] doc/muxers/a64: re-format description

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:16:57 2024 +0100| [14aa4b08febba87a8776458f1740df02b5fba5d6] | committer: 
Stefano Sabatini

doc/muxers/a64: re-format description

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14aa4b08febba87a8776458f1740df02b5fba5d6
---

 doc/muxers.texi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index e0fddc0ecd..2b64fd1a77 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -496,8 +496,10 @@ ffmpeg -re @var{} 
-movflags isml+frag_keyframe
 
 @anchor{a64}
 @section a64
+A64 Commodore 64 video muxer.
 
-A64 muxer for Commodore 64 video. Accepts a single @code{a64_multi} or 
@code{a64_multi5} codec video stream.
+This muxer accepts a single @code{a64_multi} or @code{a64_multi5}
+codec video stream.
 
 @anchor{adts}
 @section adts

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add section for audio PCM muxers

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:52:22 2024 +0100| [b894cb45c46f33b292a271728faa37e5acdb9c92] | committer: 
Stefano Sabatini

doc/muxers: add section for audio PCM muxers

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b894cb45c46f33b292a271728faa37e5acdb9c92
---

 doc/muxers.texi | 76 +
 1 file changed, 76 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index de356af177..55ca292566 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -177,6 +177,82 @@ ffplay -video_size 1920x1080 -pixel_format rgb24 -f 
rawvideo testsrc.rgb
 @end example
 @end itemize
 
+@section RAW PCM muxers
+This section covers raw PCM (Pulse-Code Modulation) audio muxers.
+
+They accept a single stream matching the designated codec. They do not
+store timestamps or metadata. The recognized extension is the same as
+the muxer name.
+
+It comprises the following muxers. The optional additional extension
+used to automatically select the muxer from the output extension is
+also shown in parentheses.
+
+@table @samp
+@item alaw (al)
+PCM A-law
+
+@item f32be
+PCM 32-bit floating-point big-endian
+
+@item f32le
+PCM 32-bit floating-point little-endian
+
+@item f64be
+PCM 64-bit floating-point big-endian
+
+@item f64le
+PCM 64-bit floating-point little-endian
+
+@item mulaw (ul)
+PCM mu-law
+
+@item s16be
+PCM signed 16-bit big-endian
+
+@item s16le
+PCM signed 16-bit little-endian
+
+@item s24be
+PCM signed 24-bit big-endian
+
+@item s24le
+PCM signed 24-bit little-endian
+
+@item s32be
+PCM signed 32-bit big-endian
+
+@item s32le
+PCM signed 32-bit little-endian
+
+@item s8 (sb)
+PCM signed 8-bit
+
+@item u16be
+PCM unsigned 16-bit big-endian
+
+@item u16le
+PCM unsigned 16-bit little-endian
+
+@item u24be
+PCM unsigned 24-bit big-endian
+
+@item u24le
+PCM unsigned 24-bit little-endian
+
+@item u32be
+PCM unsigned 32-bit big-endian
+
+@item u32le
+PCM unsigned 32-bit little-endian
+
+@item u8 (ub)
+PCM unsigned 8-bit
+
+@item vidc
+PCM Archimedes VIDC
+@end table
+
 @section MOV/MPEG-4/ISOMBFF muxers
 
 This section covers formats belonging to the QuickTime / MOV family,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers/alp: apply consistency formatting fixes

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:54:28 2024 +0100| [92a5c93ee9d4525ba62990d0564a4164446bd635] | committer: 
Stefano Sabatini

doc/muxers/alp: apply consistency formatting fixes

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92a5c93ee9d4525ba62990d0564a4164446bd635
---

 doc/muxers.texi | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 55ca292566..070efff78c 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -626,21 +626,19 @@ ID3v2.3 and ID3v2.4) are supported. The default is 
version 4.
 
 @anchor{alp}
 @section alp
+High Voltage Software's Lego Racers game audio muxer.
 
-Muxer for audio of High Voltage Software's Lego Racers game. It accepts a 
single ADPCM_IMA_ALP stream
-with no more than 2 channels nor a sample rate greater than 44100 Hz.
+It accepts a single ADPCM_IMA_ALP stream with no more than 2 channels
+and a sample rate not greater than 44100 Hz.
 
-Extensions: tun, pcm
+Extensions: @code{tun}, @code{pcm}
 
 @subsection Options
-
-It accepts the following options:
-
 @table @option
-
 @item type @var{type}
 Set file type.
 
+@var{type} accepts the following values:
 @table @samp
 @item tun
 Set file type as music. Must have a sample rate of 22050 Hz.
@@ -649,10 +647,9 @@ Set file type as music. Must have a sample rate of 22050 
Hz.
 Set file type as sfx.
 
 @item auto
-Set file type as per output file extension. @code{.pcm} results in type 
@code{pcm} else type @code{tun} is set. @var{(default)}
-
+Set file type as per output file extension. @code{.pcm} results in
+type @code{pcm} else type @code{tun} is set. @var{(default)}
 @end table
-
 @end table
 
 @anchor{asf}

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers/aiff: apply formatting fixes

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:31:55 2024 +0100| [1daf10e51d51d8f072c4b61cf90f58e869a75868] | committer: 
Stefano Sabatini

doc/muxers/aiff: apply formatting fixes

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1daf10e51d51d8f072c4b61cf90f58e869a75868
---

 doc/muxers.texi | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 7b31aa38b4..de356af177 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -536,21 +536,16 @@ indicates MPEG-2. Default is 0, which indicates MPEG-4.
 
 @anchor{aiff}
 @section aiff
-
 Audio Interchange File Format muxer.
 
 @subsection Options
-
-It accepts the following options:
-
 @table @option
-@item write_id3v2
+@item write_id3v2 @var{bool}
 Enable ID3v2 tags writing when set to 1. Default is 0 (disabled).
 
-@item id3v2_version
+@item id3v2_version @var{bool}
 Select ID3v2 version to write. Currently only version 3 and 4 (aka.
 ID3v2.3 and ID3v2.4) are supported. The default is version 4.
-
 @end table
 
 @anchor{alp}

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add amr

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
20:25:40 2024 +0100| [afcd9d89918d3036a2d8a1bdda5b67ddda9aa397] | committer: 
Stefano Sabatini

doc/muxers: add amr

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=afcd9d89918d3036a2d8a1bdda5b67ddda9aa397
---

 doc/muxers.texi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 070efff78c..f1774432f4 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -652,6 +652,11 @@ type @code{pcm} else type @code{tun} is set. 
@var{(default)}
 @end table
 @end table
 
+@section amr
+3GPP AMR (Adaptive Multi-Rate) audio muxer.
+
+It accepts a single audio stream containing an AMR NB stream.
+
 @anchor{asf}
 @section asf
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add ac4

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:17:18 2024 +0100| [bdb1738cda4b4085c08150327b68bd44057cb36f] | committer: 
Stefano Sabatini

doc/muxers: add ac4

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bdb1738cda4b4085c08150327b68bd44057cb36f
---

 doc/muxers.texi | 12 
 1 file changed, 12 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 2b64fd1a77..5bfbc33ea9 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -501,6 +501,18 @@ A64 Commodore 64 video muxer.
 This muxer accepts a single @code{a64_multi} or @code{a64_multi5}
 codec video stream.
 
+@section ac4
+Raw AC-4 audio muxer.
+
+This muxer accepts a single @code{ac4} audio stream.
+
+@subsection Options
+@table @option
+@item write_crc @var{bool}
+when enabled, write a CRC checksum for each packet to the output,
+default is @code{false}
+@end table
+
 @anchor{adts}
 @section adts
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add amv

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
20:37:47 2024 +0100| [05d92850ecdb1e3391359b7e38d5ed9ebcb63536] | committer: 
Stefano Sabatini

doc/muxers: add amv

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05d92850ecdb1e3391359b7e38d5ed9ebcb63536
---

 doc/muxers.texi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index f1774432f4..2e0e3d8132 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -657,6 +657,9 @@ type @code{pcm} else type @code{tun} is set. @var{(default)}
 
 It accepts a single audio stream containing an AMR NB stream.
 
+@section amv
+AMV (Actions Media Video) format muxer.
+
 @anchor{asf}
 @section asf
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxer/adts: apply consistency fixes

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
19:28:55 2024 +0100| [4d54f022b3b1aea2d809e7f015579c2d5021c919] | committer: 
Stefano Sabatini

doc/muxer/adts: apply consistency fixes

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d54f022b3b1aea2d809e7f015579c2d5021c919
---

 doc/muxers.texi | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 5bfbc33ea9..7b31aa38b4 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -515,24 +515,23 @@ default is @code{false}
 
 @anchor{adts}
 @section adts
+Audio Data Transport Stream muxer.
 
-Audio Data Transport Stream muxer. It accepts a single AAC stream.
+It accepts a single AAC stream.
 
 @subsection Options
-
-It accepts the following options:
-
 @table @option
-
 @item write_id3v2 @var{bool}
-Enable to write ID3v2.4 tags at the start of the stream. Default is disabled.
+Enable to write ID3v2.4 tags at the start of the stream. Default is
+disabled.
 
 @item write_apetag @var{bool}
-Enable to write APE tags at the end of the stream. Default is disabled.
+Enable to write APE tags at the end of the stream. Default is
+disabled.
 
 @item write_mpeg2 @var{bool}
-Enable to set MPEG version bit in the ADTS frame header to 1 which indicates 
MPEG-2. Default is 0, which indicates MPEG-4.
-
+Enable to set MPEG version bit in the ADTS frame header to 1 which
+indicates MPEG-2. Default is 0, which indicates MPEG-4.
 @end table
 
 @anchor{aiff}

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add apng

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
21:16:45 2024 +0100| [e2b1988c194beaa3b67f337f5a93699d6c78d2df] | committer: 
Stefano Sabatini

doc/muxers: add apng

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2b1988c194beaa3b67f337f5a93699d6c78d2df
---

 doc/muxers.texi | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 304df4f5d2..5e34f5a39a 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -665,6 +665,32 @@ Ubisoft Rayman 2 APM audio muxer.
 
 It accepts a single ADPCM IMA APM audio stream.
 
+@section apng
+Animated Portable Network Graphics muxer.
+
+It accepts a single APNG video stream.
+
+@subsection Options
+@table @option
+@item final_delay @var{delay}
+Force a delay expressed in seconds after the last frame of each
+repetition. Default value is @code{0.0}.
+
+@item plays @var{repetitions}
+specify how many times to play the content, @code{0} causes an infinte
+loop, with @code{1} there is no loop
+@end table
+
+@subsection Examples
+@itemize
+@item
+Use @command{ffmpeg} to generate an APNG output with 2 repetitions,
+and with a delay of half a second after the first repetition:
+@example
+ffmpeg -i INPUT -final_delay 0.5 -plays 2 out.apng
+@end example
+@end itemize
+
 @anchor{asf}
 @section asf
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add argo_asf

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sun Jan  7 
16:21:08 2024 +0100| [2a0abf06e45184dbb90951bd9ed064c26e643915] | committer: 
Stefano Sabatini

doc/muxers: add argo_asf

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a0abf06e45184dbb90951bd9ed064c26e643915
---

 doc/muxers.texi | 20 
 1 file changed, 20 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 5e34f5a39a..76441af9ef 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -691,6 +691,26 @@ ffmpeg -i INPUT -final_delay 0.5 -plays 2 out.apng
 @end example
 @end itemize
 
+@section argo_asf
+Argonaut Games ASF audio muxer.
+
+It accepts a single ADPCM audio stream.
+
+@subsection Options
+@table @option
+@item version_major @var{version}
+override file major version, specified as an integer, default value is
+@code{2}
+
+@item version_minor @var{version}
+override file minor version, specified as an integer, default value is
+@code{1}
+
+@item name @var{name}
+Embed file name into file, if not specified use the output file
+name. The name is truncated to 8 characters.
+@end table
+
 @anchor{asf}
 @section asf
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add apm

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Sat Jan  6 
20:40:35 2024 +0100| [d9480cebd915d4b70933f317f7c7616616a3abc0] | committer: 
Stefano Sabatini

doc/muxers: add apm

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9480cebd915d4b70933f317f7c7616616a3abc0
---

 doc/muxers.texi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 2e0e3d8132..304df4f5d2 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -660,6 +660,11 @@ It accepts a single audio stream containing an AMR NB 
stream.
 @section amv
 AMV (Actions Media Video) format muxer.
 
+@section apm
+Ubisoft Rayman 2 APM audio muxer.
+
+It accepts a single ADPCM IMA APM audio stream.
+
 @anchor{asf}
 @section asf
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add argo_cvg

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Mon Jan  8 
20:00:26 2024 +0100| [d311e46284cc2abf8d50c989462343dd763ab3d4] | committer: 
Stefano Sabatini

doc/muxers: add argo_cvg

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d311e46284cc2abf8d50c989462343dd763ab3d4
---

 doc/muxers.texi | 21 +
 1 file changed, 21 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 76441af9ef..7abaeec0fd 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -711,6 +711,27 @@ Embed file name into file, if not specified use the output 
file
 name. The name is truncated to 8 characters.
 @end table
 
+@section argo_cvg
+Argonaut Games CVG audio muxer.
+
+It accepts a single one-channel ADPCM 22050Hz audio stream.
+
+The @option{loop} and @option{reverb} options set the corresponding
+flags in the header which can be later retrieved to process the audio
+stream accordingly.
+
+@subsection Options
+@table @option
+@item skip_rate_check @var{bool}
+skip sample rate check (default is @code{false})
+
+@item loop @var{bool}
+set loop flag (default is @code{false})
+
+@item reverb @var{boolean}
+set reverb flag (default is @code{true})
+@end table
+
 @anchor{asf}
 @section asf
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers/asf: extend and apply consistency fixes

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Mon Jan  8 
20:19:04 2024 +0100| [81960c09d66f67e31692a047f9833a05fc08de69] | committer: 
Stefano Sabatini

doc/muxers/asf: extend and apply consistency fixes

Mention asf_stream variant, and clarify the unit used for the packet_size 
option.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81960c09d66f67e31692a047f9833a05fc08de69
---

 doc/muxers.texi | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 7abaeec0fd..3ef09949aa 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -733,23 +733,21 @@ set reverb flag (default is @code{true})
 @end table
 
 @anchor{asf}
-@section asf
+@section asf, asf_stream
+Advanced / Active Systems (or Streaming) Format audio muxer.
 
-Advanced Systems Format muxer.
+The @samp{asf_stream} variant should be selected for streaming.
 
 Note that Windows Media Audio (wma) and Windows Media Video (wmv) use this
 muxer too.
 
 @subsection Options
-
-It accepts the following options:
-
 @table @option
-@item packet_size
-Set the muxer packet size. By tuning this setting you may reduce data
-fragmentation or muxer overhead depending on your source. Default value is
-3200, minimum is 100, maximum is 64k.
-
+@item packet_size @var{size}
+Set the muxer packet size as a number of bytes. By tuning this setting
+you may reduce data fragmentation or muxer overhead depending on your
+source. Default value is @code{3200}, minimum is @code{100}, maximum
+is @code{64Ki}.
 @end table
 
 @anchor{avi}

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/muxers: add ass

2024-01-10 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Mon Jan  8 
20:45:03 2024 +0100| [82ad55f5ffa775c4bf5f062500f264a5ceda9297] | committer: 
Stefano Sabatini

doc/muxers: add ass

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82ad55f5ffa775c4bf5f062500f264a5ceda9297
---

 doc/muxers.texi | 13 +
 1 file changed, 13 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 3ef09949aa..c8b2bcdea6 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -750,6 +750,19 @@ source. Default value is @code{3200}, minimum is 
@code{100}, maximum
 is @code{64Ki}.
 @end table
 
+@section ass
+ASS/SSA (SubStation Alpha) subtitles muxer.
+
+It accepts a single ASS subtitles stream.
+
+@subsection Options
+@table @option
+@item ignore_readorder @var{bool}
+Write dialogue events immediately, even if they are out-of-order,
+default is @code{false}, otherwise they are cached until the expected
+time event is found.
+@end table
+
 @anchor{avi}
 @section avi
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avformat/mov: rename avif fields to heif

2024-01-10 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Jan  9 16:02:23 
2024 -0300| [0405f71e19a4c02fd2be7c2cae262bba27b25bac] | committer: James Almer

avformat/mov: rename avif fields to heif

They are no longer avif specific.

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0405f71e19a4c02fd2be7c2cae262bba27b25bac
---

 libavformat/isom.h |  4 ++--
 libavformat/mov.c  | 28 ++--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/libavformat/isom.h b/libavformat/isom.h
index b30b9da65e..90c4fb5530 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -325,8 +325,8 @@ typedef struct MOVContext {
 int item_id;
 int extent_length;
 int64_t extent_offset;
-} *avif_info;
-int avif_info_size;
+} *heif_info;
+int heif_info_size;
 int64_t hvcC_offset;
 int hvcC_size;
 int interleaved_read;
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c6398d6d81..12e82c66a9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4916,15 +4916,15 @@ static int mov_read_custom(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 return ret;
 }
 
-static int avif_add_stream(MOVContext *c, int item_id)
+static int heif_add_stream(MOVContext *c, int item_id)
 {
 MOVStreamContext *sc;
 AVStream *st;
 int item_index = -1;
 if (c->fc->nb_streams)
 return AVERROR_INVALIDDATA;
-for (int i = 0; i < c->avif_info_size; i++)
-if (c->avif_info[i].item_id == item_id) {
+for (int i = 0; i < c->heif_info_size; i++)
+if (c->heif_info[i].item_id == item_id) {
 item_index = i;
 break;
 }
@@ -4987,8 +4987,8 @@ static int avif_add_stream(MOVContext *c, int item_id)
 sc->stts_data[0].count = 1;
 // Not used for still images. But needed by mov_build_index.
 sc->stts_data[0].duration = 0;
-sc->sample_sizes[0] = c->avif_info[item_index].extent_length;
-sc->chunk_offsets[0] = c->avif_info[item_index].extent_offset;
+sc->sample_sizes[0] = c->heif_info[item_index].extent_length;
+sc->chunk_offsets[0] = c->heif_info[item_index].extent_offset;
 
 mov_build_index(c, st);
 return 0;
@@ -5013,7 +5013,7 @@ static int mov_read_meta(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 if (c->is_still_picture_avif) {
 int ret;
 // Add a stream for the YUV planes (primary item).
-if ((ret = avif_add_stream(c, c->primary_item_id)) < 0)
+if ((ret = heif_add_stream(c, c->primary_item_id)) < 0)
 return ret;
 // For still AVIF images, the meta box contains all the
 // necessary information that would generally be provided by 
the
@@ -7820,7 +7820,7 @@ static int mov_read_iloc(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 return 0;
 }
 
-if (c->avif_info) {
+if (c->heif_info) {
 av_log(c->fc, AV_LOG_INFO, "Duplicate iloc box found\n");
 return 0;
 }
@@ -7841,16 +7841,16 @@ static int mov_read_iloc(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 }
 item_count = (version < 2) ? avio_rb16(pb) : avio_rb32(pb);
 
-c->avif_info = av_malloc_array(item_count, sizeof(*c->avif_info));
-if (!c->avif_info)
+c->heif_info = av_malloc_array(item_count, sizeof(*c->heif_info));
+if (!c->heif_info)
 return AVERROR(ENOMEM);
-c->avif_info_size = item_count;
+c->heif_info_size = item_count;
 
 for (int i = 0; i < item_count; i++) {
 int item_id = (version < 2) ? avio_rb16(pb) : avio_rb32(pb);
 if (avio_feof(pb))
 return AVERROR_INVALIDDATA;
-c->avif_info[i].item_id = item_id;
+c->heif_info[i].item_id = item_id;
 
 if (version > 0)
 avio_rb16(pb);  // construction_method.
@@ -7867,8 +7867,8 @@ static int mov_read_iloc(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 if (rb_size(pb, &extent_offset, offset_size) < 0 ||
 rb_size(pb, &extent_length, length_size) < 0)
 return AVERROR_INVALIDDATA;
-c->avif_info[i].extent_length = extent_length;
-c->avif_info[i].extent_offset = base_offset + extent_offset;
+c->heif_info[i].extent_length = extent_length;
+c->heif_info[i].extent_offset = base_offset + extent_offset;
 }
 }
 
@@ -8502,7 +8502,7 @@ static int mov_read_close(AVFormatContext *s)
 
 av_freep(&mov->aes_decrypt);
 av_freep(&mov->chapter_tracks);
-av_freep(&mov->avif_info);
+av_freep(&mov->heif_info);
 
 return 0;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: use a compatible bitstream version

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 19:45:08 
2023 +0100| [85cb1b9b203e04b7961983f85755d45fafadf189] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: use a compatible bitstream version

Quoting SMPTE RDD 36:2015:
  A decoder shall abort if it encounters a bitstream with an unsupported
  bitstream_version value. If 0, the value of the chroma_format syntax
  element shall be 2 (4:2:2 sampling) and the value of the
  alpha_channel_type element shall be 0 (no encoded alpha); if 1, any
  permissible value may be used for those syntax elements.

So if we're not in 4:2:2 or if there is alpha, we are not allowed to use
version 0.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85cb1b9b203e04b7961983f85755d45fafadf189
---

 libavcodec/proresenc_anatoliy.c | 2 +-
 tests/ref/vsynth/vsynth1-prores_444 | 2 +-
 tests/ref/vsynth/vsynth1-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth2-prores_444 | 2 +-
 tests/ref/vsynth/vsynth2-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth3-prores_444 | 2 +-
 tests/ref/vsynth/vsynth3-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth_lena-prores_444 | 2 +-
 tests/ref/vsynth/vsynth_lena-prores_444_int | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 6be6a98089..91e0e21f13 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -746,7 +746,7 @@ static int prores_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 bytestream_put_be32(&buf, FRAME_ID);
 
 bytestream_put_be16(&buf, header_size);
-bytestream_put_be16(&buf, 0); /* version */
+bytestream_put_be16(&buf, avctx->pix_fmt != AV_PIX_FMT_YUV422P10 || 
ctx->need_alpha ? 1 : 0); /* version */
 bytestream_put_buffer(&buf, ctx->vendor, 4);
 bytestream_put_be16(&buf, avctx->width);
 bytestream_put_be16(&buf, avctx->height);
diff --git a/tests/ref/vsynth/vsynth1-prores_444 
b/tests/ref/vsynth/vsynth1-prores_444
index f7f8e9033d..54a63348ad 100644
--- a/tests/ref/vsynth/vsynth1-prores_444
+++ b/tests/ref/vsynth/vsynth1-prores_444
@@ -1,4 +1,4 @@
-509e0407dff118c775dcaa4f509a4aae *tests/data/fate/vsynth1-prores_444.mov
+17c5652215ee8213319f58bc6bbcc505 *tests/data/fate/vsynth1-prores_444.mov
 7778954 tests/data/fate/vsynth1-prores_444.mov
 e0da52b5d58171294d1b299539801ae0 
*tests/data/fate/vsynth1-prores_444.out.rawvideo
 stddev:2.80 PSNR: 39.17 MAXDIFF:   44 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_444_int 
b/tests/ref/vsynth/vsynth1-prores_444_int
index 9515887212..9268099c7b 100644
--- a/tests/ref/vsynth/vsynth1-prores_444_int
+++ b/tests/ref/vsynth/vsynth1-prores_444_int
@@ -1,4 +1,4 @@
-1d5e484fa8ca08781ef2ed8428963d12 *tests/data/fate/vsynth1-prores_444_int.mov
+41cc25faabf5545b84983d43cc46aded *tests/data/fate/vsynth1-prores_444_int.mov
 9940947 tests/data/fate/vsynth1-prores_444_int.mov
 732ceeb6887524e0aee98762fe50578b 
*tests/data/fate/vsynth1-prores_444_int.out.rawvideo
 stddev:2.83 PSNR: 39.08 MAXDIFF:   45 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-prores_444 
b/tests/ref/vsynth/vsynth2-prores_444
index c6084f5908..c1e8109cc8 100644
--- a/tests/ref/vsynth/vsynth2-prores_444
+++ b/tests/ref/vsynth/vsynth2-prores_444
@@ -1,4 +1,4 @@
-21f973c4c6076ea21f82d5fe486c0c98 *tests/data/fate/vsynth2-prores_444.mov
+9b2e73b60b1809754390f3d6bcd65218 *tests/data/fate/vsynth2-prores_444.mov
 5219722 tests/data/fate/vsynth2-prores_444.mov
 e425b6af7afa51b5e64fc529528b3691 
*tests/data/fate/vsynth2-prores_444.out.rawvideo
 stddev:0.88 PSNR: 49.18 MAXDIFF:   14 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-prores_444_int 
b/tests/ref/vsynth/vsynth2-prores_444_int
index a727bb2d23..968a4ed7e1 100644
--- a/tests/ref/vsynth/vsynth2-prores_444_int
+++ b/tests/ref/vsynth/vsynth2-prores_444_int
@@ -1,4 +1,4 @@
-500a8249bc63ec6bb79f816bce5b6db1 *tests/data/fate/vsynth2-prores_444_int.mov
+dbb3038d8fc88d7261a7aad315196600 *tests/data/fate/vsynth2-prores_444_int.mov
 6420787 tests/data/fate/vsynth2-prores_444_int.mov
 33a5db4f0423168d4ae4f1db3610928e 
*tests/data/fate/vsynth2-prores_444_int.out.rawvideo
 stddev:0.93 PSNR: 48.73 MAXDIFF:   14 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth3-prores_444 
b/tests/ref/vsynth/vsynth3-prores_444
index f05894b33e..5a1614ef5a 100644
--- a/tests/ref/vsynth/vsynth3-prores_444
+++ b/tests/ref/vsynth/vsynth3-prores_444
@@ -1,4 +1,4 @@
-3070da65c30c1a9905ee31c7ede1cf57 *tests/data/fate/vsynth3-prores_444.mov
+07d2ba443bd0a2ae090dd85cc8d9423e *tests/data/fate/vsynth3-prores_444.mov
 159127 tests/data/fate/vsynth3-prores_444.mov
 025b48feb3d9a9652983ef71e6cb7e7c 
*tests/data/fate/vsynth3-prores_444.out.rawvideo
 stddev:3.21 PSNR: 37.98 MAXDIFF:   41 bytes:86700/86700
diff --git a/tests/ref/vsynth/vsynth3-prores_444_int 
b/tests/ref/vsynth/vsynth3-prores_444_int
index f6ba6bc282.

[FFmpeg-cvslog] avcodec/proresenc_kostya: use a compatible bitstream version

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 19:47:14 
2023 +0100| [aa7ccd0ce902450c865c62ac160dd08a7b003eb3] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: use a compatible bitstream version

Quoting SMPTE RDD 36:2015:
  A decoder shall abort if it encounters a bitstream with an unsupported
  bitstream_version value. If 0, the value of the chroma_format syntax
  element shall be 2 (4:2:2 sampling) and the value of the
  alpha_channel_type element shall be 0 (no encoded alpha); if 1, any
  permissible value may be used for those syntax elements.

So if we're not in 4:2:2 or if there is alpha, we are not allowed to use
version 0.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa7ccd0ce902450c865c62ac160dd08a7b003eb3
---

 libavcodec/proresenc_kostya.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index f4674280fd..49bef5cf2f 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -994,7 +994,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 // frame header
 tmp = buf;
 buf += 2;   // frame header size will be 
stored here
-bytestream_put_be16  (&buf, 0); // version 1
+bytestream_put_be16  (&buf, ctx->chroma_factor != CFACTOR_Y422 || 
ctx->alpha_bits ? 1 : 0);
 bytestream_put_buffer(&buf, ctx->vendor, 4);
 bytestream_put_be16  (&buf, avctx->width);
 bytestream_put_be16  (&buf, avctx->height);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Sun Jan  7 18:44:12 
2024 +0100| [af509f995786e72e2f6438b61c004bfcc37515da] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields

The layout for the frame flags is as follow:

   chroma_format  u(2)
   reserved   u(2)
   interlace_mode u(2)
   reserved   u(2)

chroma_format has 2 allowed values:
   0: reserved
   1: reserved
   2: 4:2:2
   3: 4:4:4

interlace_mode has 3 allowed values:
   0: progressive
   1: tff
   2: bff
   3: reserved

0x80 is what we expect for "422 not interlaced", and the extra 0x2 from
0x82 is actually writing into the reserved bits.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af509f995786e72e2f6438b61c004bfcc37515da
---

 libavcodec/proresenc_anatoliy.c | 2 +-
 tests/ref/vsynth/vsynth1-prores | 2 +-
 tests/ref/vsynth/vsynth1-prores_444 | 2 +-
 tests/ref/vsynth/vsynth1-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth1-prores_int | 2 +-
 tests/ref/vsynth/vsynth2-prores | 2 +-
 tests/ref/vsynth/vsynth2-prores_444 | 2 +-
 tests/ref/vsynth/vsynth2-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth2-prores_int | 2 +-
 tests/ref/vsynth/vsynth3-prores | 2 +-
 tests/ref/vsynth/vsynth3-prores_444 | 2 +-
 tests/ref/vsynth/vsynth3-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth3-prores_int | 2 +-
 tests/ref/vsynth/vsynth_lena-prores | 2 +-
 tests/ref/vsynth/vsynth_lena-prores_444 | 2 +-
 tests/ref/vsynth/vsynth_lena-prores_444_int | 2 +-
 tests/ref/vsynth/vsynth_lena-prores_int | 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 0dde661aed..a348b7622a 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -750,7 +750,7 @@ static int prores_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 bytestream_put_buffer(&buf, ctx->vendor, 4);
 bytestream_put_be16(&buf, avctx->width);
 bytestream_put_be16(&buf, avctx->height);
-frame_flags = 0x82; /* 422 not interlaced */
+frame_flags = 0x80; /* 422 not interlaced */
 if (avctx->profile >= AV_PROFILE_PRORES_) /*  or  Xq */
 frame_flags |= 0x40; /* 444 chroma */
 if (ctx->is_interlaced) {
diff --git a/tests/ref/vsynth/vsynth1-prores b/tests/ref/vsynth/vsynth1-prores
index 52ac4e250a..f143611c35 100644
--- a/tests/ref/vsynth/vsynth1-prores
+++ b/tests/ref/vsynth/vsynth1-prores
@@ -1,4 +1,4 @@
-816d6e42260509681c49398cd4aa38a4 *tests/data/fate/vsynth1-prores.mov
+e7c8db829626fdcf30eb9d78cd26b188 *tests/data/fate/vsynth1-prores.mov
 5022821 tests/data/fate/vsynth1-prores.mov
 fb4a9e025d12afc0dbbca8d82831858f *tests/data/fate/vsynth1-prores.out.rawvideo
 stddev:2.47 PSNR: 40.27 MAXDIFF:   31 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_444 
b/tests/ref/vsynth/vsynth1-prores_444
index d4a8c4d33d..38ca52b7f7 100644
--- a/tests/ref/vsynth/vsynth1-prores_444
+++ b/tests/ref/vsynth/vsynth1-prores_444
@@ -1,4 +1,4 @@
-722dde50fce82923b81748ad8c64ca8d *tests/data/fate/vsynth1-prores_444.mov
+61238212a797d14763431c346e896277 *tests/data/fate/vsynth1-prores_444.mov
 7778954 tests/data/fate/vsynth1-prores_444.mov
 e0da52b5d58171294d1b299539801ae0 
*tests/data/fate/vsynth1-prores_444.out.rawvideo
 stddev:2.80 PSNR: 39.17 MAXDIFF:   44 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_444_int 
b/tests/ref/vsynth/vsynth1-prores_444_int
index 9443e5e5a7..76db62d4e9 100644
--- a/tests/ref/vsynth/vsynth1-prores_444_int
+++ b/tests/ref/vsynth/vsynth1-prores_444_int
@@ -1,4 +1,4 @@
-c7e7c65147f68893d735b650efec9ed3 *tests/data/fate/vsynth1-prores_444_int.mov
+fd2a2f49c61817c2338f39d5736d5fd2 *tests/data/fate/vsynth1-prores_444_int.mov
 9940947 tests/data/fate/vsynth1-prores_444_int.mov
 732ceeb6887524e0aee98762fe50578b 
*tests/data/fate/vsynth1-prores_444_int.out.rawvideo
 stddev:2.83 PSNR: 39.08 MAXDIFF:   45 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_int 
b/tests/ref/vsynth/vsynth1-prores_int
index 46c9b2ff4e..3e2bbeff2a 100644
--- a/tests/ref/vsynth/vsynth1-prores_int
+++ b/tests/ref/vsynth/vsynth1-prores_int
@@ -1,4 +1,4 @@
-3ffa73e7ecd5c2f9a2bd2098499e22a5 *tests/data/fate/vsynth1-prores_int.mov
+1f1b246dfabe028f04c78887e5da51ed *tests/data/fate/vsynth1-prores_int.mov
 6308688 tests/data/fate/vsynth1-prores_int.mov
 164a4ca890695cf594293d1acec9463c 
*tests/data/fate/vsynth1-prores_int.out.rawvideo
 stddev:2.66 PSNR: 39.62 MAXDIFF:   34 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-prores b/tests/ref/vsynth/vsynth2-prores
index 37d0bd923d..f170d0 100644
--- a/tests/ref/vsynth/vsynth2-prores
+++ b/tests/ref/vsynth/vsynth2-prores
@@ -1,4 +1,4 @@
-a3815327670b2c893045d0bf1b1da9b5 *tests/data/fate/vsynth2-prores.mov
+eb1e43e2f323ef3577f43d415a7ede28 *tests/data/fat

[FFmpeg-cvslog] avcodec/proresenc_kostya: do not write into alpha reserved bitfields

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 19:51:09 
2023 +0100| [6d3591166786aa2404798331554472a125c96dc1] | committer: Clément 
Bœsch

avcodec/proresenc_kostya: do not write into alpha reserved bitfields

This byte represents 4 reserved bits followed by 4 alpha_channel_type bits.

alpha_channel_type currently has 3 differents defined values: 0 (no
alpha), 1 (8b alpha), and 2 (16b alpha), all the other values are
reserved. This part is correctly written (alpha_bits>>3 does the correct
thing), but the 4 initial bits are reserved.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d3591166786aa2404798331554472a125c96dc1
---

 libavcodec/proresenc_kostya.c  | 2 +-
 tests/ref/vsynth/vsynth1-prores_ks | 2 +-
 tests/ref/vsynth/vsynth2-prores_ks | 2 +-
 tests/ref/vsynth/vsynth3-prores_ks | 2 +-
 tests/ref/vsynth/vsynth_lena-prores_ks | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 49bef5cf2f..61231b8cfb 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1008,7 +1008,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 bytestream_put_byte  (&buf, pic->color_primaries);
 bytestream_put_byte  (&buf, pic->color_trc);
 bytestream_put_byte  (&buf, pic->colorspace);
-bytestream_put_byte  (&buf, 0x40 | (ctx->alpha_bits >> 3));
+bytestream_put_byte  (&buf, ctx->alpha_bits >> 3);
 bytestream_put_byte  (&buf, 0); // reserved
 if (ctx->quant_sel != QUANT_MAT_DEFAULT) {
 bytestream_put_byte  (&buf, 0x03);  // matrix flags - both 
matrices are present
diff --git a/tests/ref/vsynth/vsynth1-prores_ks 
b/tests/ref/vsynth/vsynth1-prores_ks
index 22c248909c..a9aa6e41ba 100644
--- a/tests/ref/vsynth/vsynth1-prores_ks
+++ b/tests/ref/vsynth/vsynth1-prores_ks
@@ -1,4 +1,4 @@
-5b0970bacd4b03d70f7648fee2f0c85f *tests/data/fate/vsynth1-prores_ks.mov
+fad50b4a0fb706fb2e282678ed962281 *tests/data/fate/vsynth1-prores_ks.mov
 3858911 tests/data/fate/vsynth1-prores_ks.mov
 100eb002413fe7a632d440dfbdf7e3ff 
*tests/data/fate/vsynth1-prores_ks.out.rawvideo
 stddev:3.17 PSNR: 38.09 MAXDIFF:   39 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-prores_ks 
b/tests/ref/vsynth/vsynth2-prores_ks
index 5186f55b4f..75289491ed 100644
--- a/tests/ref/vsynth/vsynth2-prores_ks
+++ b/tests/ref/vsynth/vsynth2-prores_ks
@@ -1,4 +1,4 @@
-abde4f84a5e4060492e3d8fcb56f2467 *tests/data/fate/vsynth2-prores_ks.mov
+2f909bf4f1262da79dd2fa502cb41853 *tests/data/fate/vsynth2-prores_ks.mov
 3868162 tests/data/fate/vsynth2-prores_ks.mov
 fe7ad707205c6100e9a3956d4e1c300e 
*tests/data/fate/vsynth2-prores_ks.out.rawvideo
 stddev:1.17 PSNR: 46.72 MAXDIFF:   14 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth3-prores_ks 
b/tests/ref/vsynth/vsynth3-prores_ks
index 561ee48dee..f859c9e5f8 100644
--- a/tests/ref/vsynth/vsynth3-prores_ks
+++ b/tests/ref/vsynth/vsynth3-prores_ks
@@ -1,4 +1,4 @@
-f6ce1e8e2272cea0592d3f969d48c1de *tests/data/fate/vsynth3-prores_ks.mov
+3703ae6dea89c9d8b5a8872d8167ca42 *tests/data/fate/vsynth3-prores_ks.mov
 95053 tests/data/fate/vsynth3-prores_ks.mov
 9ab6d3e3cc7749796cd9fa984c60d890 
*tests/data/fate/vsynth3-prores_ks.out.rawvideo
 stddev:4.09 PSNR: 35.88 MAXDIFF:   35 bytes:86700/86700
diff --git a/tests/ref/vsynth/vsynth_lena-prores_ks 
b/tests/ref/vsynth/vsynth_lena-prores_ks
index 333578bc1e..c3f91de2c0 100644
--- a/tests/ref/vsynth/vsynth_lena-prores_ks
+++ b/tests/ref/vsynth/vsynth_lena-prores_ks
@@ -1,4 +1,4 @@
-86b9932d5f78d0b5836533e972a37a65 *tests/data/fate/vsynth_lena-prores_ks.mov
+e0822c5ba6ce8825052dfb8dbf98d939 *tests/data/fate/vsynth_lena-prores_ks.mov
 3884596 tests/data/fate/vsynth_lena-prores_ks.mov
 6cfe987de99cf8ac9d43bdc5cd150838 
*tests/data/fate/vsynth_lena-prores_ks.out.rawvideo
 stddev:0.92 PSNR: 48.78 MAXDIFF:   10 bytes:  7603200/  7603200

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] avcodec/proresenc_anatoliy: do not write into alpha reserved bitfields

2024-01-10 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Mon Dec 11 19:51:48 
2023 +0100| [21f7a814ea6403a504e40f358cc24f97ebdf3193] | committer: Clément 
Bœsch

avcodec/proresenc_anatoliy: do not write into alpha reserved bitfields

This byte represents 4 reserved bits followed by 4 alpha_channel_type bits.

alpha_channel_type currently has 3 differents defined values: 0 (no
alpha), 1 (8b alpha), and 2 (16b alpha), all the other values are
reserved. The 4 initial reserved bits are expected to be 0.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21f7a814ea6403a504e40f358cc24f97ebdf3193
---

 libavcodec/proresenc_anatoliy.c | 10 +-
 tests/ref/vsynth/vsynth1-prores |  2 +-
 tests/ref/vsynth/vsynth1-prores_444 |  2 +-
 tests/ref/vsynth/vsynth1-prores_444_int |  2 +-
 tests/ref/vsynth/vsynth1-prores_int |  2 +-
 tests/ref/vsynth/vsynth2-prores |  2 +-
 tests/ref/vsynth/vsynth2-prores_444 |  2 +-
 tests/ref/vsynth/vsynth2-prores_444_int |  2 +-
 tests/ref/vsynth/vsynth2-prores_int |  2 +-
 tests/ref/vsynth/vsynth3-prores |  2 +-
 tests/ref/vsynth/vsynth3-prores_444 |  2 +-
 tests/ref/vsynth/vsynth3-prores_444_int |  2 +-
 tests/ref/vsynth/vsynth3-prores_int |  2 +-
 tests/ref/vsynth/vsynth_lena-prores |  2 +-
 tests/ref/vsynth/vsynth_lena-prores_444 |  2 +-
 tests/ref/vsynth/vsynth_lena-prores_444_int |  2 +-
 tests/ref/vsynth/vsynth_lena-prores_int |  2 +-
 17 files changed, 17 insertions(+), 25 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 91e0e21f13..0dde661aed 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -775,15 +775,7 @@ static int prores_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
   pict->color_trc, valid_trc, 0);
 *buf++ = int_from_list_or_default(avctx, "frame colorspace",
   pict->colorspace, valid_colorspace, 0);
-if (avctx->profile >= AV_PROFILE_PRORES_) {
-if (avctx->pix_fmt == AV_PIX_FMT_YUV444P10) {
-*buf++ = 0xA0;/* src b64a and no alpha */
-} else {
-*buf++ = 0xA2;/* src b64a and 16b alpha */
-}
-} else {
-*buf++ = 32;/* src v210 and no alpha */
-}
+*buf++ = ctx->need_alpha ? 0x2 /* 16-bit alpha */ : 0;
 *buf++ = 0; /* reserved */
 *buf++ = 3; /* luma and chroma matrix present */
 
diff --git a/tests/ref/vsynth/vsynth1-prores b/tests/ref/vsynth/vsynth1-prores
index 3c59eb71a8..52ac4e250a 100644
--- a/tests/ref/vsynth/vsynth1-prores
+++ b/tests/ref/vsynth/vsynth1-prores
@@ -1,4 +1,4 @@
-460f69344752e6af2dc46b00169b78a3 *tests/data/fate/vsynth1-prores.mov
+816d6e42260509681c49398cd4aa38a4 *tests/data/fate/vsynth1-prores.mov
 5022821 tests/data/fate/vsynth1-prores.mov
 fb4a9e025d12afc0dbbca8d82831858f *tests/data/fate/vsynth1-prores.out.rawvideo
 stddev:2.47 PSNR: 40.27 MAXDIFF:   31 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_444 
b/tests/ref/vsynth/vsynth1-prores_444
index 54a63348ad..d4a8c4d33d 100644
--- a/tests/ref/vsynth/vsynth1-prores_444
+++ b/tests/ref/vsynth/vsynth1-prores_444
@@ -1,4 +1,4 @@
-17c5652215ee8213319f58bc6bbcc505 *tests/data/fate/vsynth1-prores_444.mov
+722dde50fce82923b81748ad8c64ca8d *tests/data/fate/vsynth1-prores_444.mov
 7778954 tests/data/fate/vsynth1-prores_444.mov
 e0da52b5d58171294d1b299539801ae0 
*tests/data/fate/vsynth1-prores_444.out.rawvideo
 stddev:2.80 PSNR: 39.17 MAXDIFF:   44 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_444_int 
b/tests/ref/vsynth/vsynth1-prores_444_int
index 9268099c7b..9443e5e5a7 100644
--- a/tests/ref/vsynth/vsynth1-prores_444_int
+++ b/tests/ref/vsynth/vsynth1-prores_444_int
@@ -1,4 +1,4 @@
-41cc25faabf5545b84983d43cc46aded *tests/data/fate/vsynth1-prores_444_int.mov
+c7e7c65147f68893d735b650efec9ed3 *tests/data/fate/vsynth1-prores_444_int.mov
 9940947 tests/data/fate/vsynth1-prores_444_int.mov
 732ceeb6887524e0aee98762fe50578b 
*tests/data/fate/vsynth1-prores_444_int.out.rawvideo
 stddev:2.83 PSNR: 39.08 MAXDIFF:   45 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-prores_int 
b/tests/ref/vsynth/vsynth1-prores_int
index 16a66874af..46c9b2ff4e 100644
--- a/tests/ref/vsynth/vsynth1-prores_int
+++ b/tests/ref/vsynth/vsynth1-prores_int
@@ -1,4 +1,4 @@
-3711e22aa5052f39dabfcb9ee3a42045 *tests/data/fate/vsynth1-prores_int.mov
+3ffa73e7ecd5c2f9a2bd2098499e22a5 *tests/data/fate/vsynth1-prores_int.mov
 6308688 tests/data/fate/vsynth1-prores_int.mov
 164a4ca890695cf594293d1acec9463c 
*tests/data/fate/vsynth1-prores_int.out.rawvideo
 stddev:2.66 PSNR: 39.62 MAXDIFF:   34 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-prores b/tests/ref/vsynth/vsynth2-prores
index 8e48cb041c..37d0bd923d 100644
--- a/tests/ref/vsynth/vsynth2-prores
+++ b/tests/ref/vsynth/vsynth2-

[FFmpeg-cvslog] MAINTAINERS: add my new PGP key

2024-01-10 Thread Leo Izen
ffmpeg | branch: master | Leo Izen  | Mon Jan  8 14:01:59 
2024 -0500| [40bd65a72aa3c5b5794caba082f1a852a31cd391] | committer: Leo Izen

MAINTAINERS: add my new PGP key

Adding my new gpg key that I will be using from now on.
This key is ed25519, which is more secure than the old rsa4096.

Signed-off-by: Leo Izen 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40bd65a72aa3c5b5794caba082f1a852a31cd391
---

 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 3f7098acf8..4677931211 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -619,6 +619,7 @@ Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 
25DC 8831 AF70 D368
 James Almer   7751 2E8C FD94 A169 57E6 9A7A 1463 01AD 7376 59E0
 Jean Delvare  7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A
 Leo Izen (Traneptora) B6FD 3CFC 7ACF 83FC 9137 6945 5A71 C331 FD2F A19A
+Leo Izen (Traneptora) 1D83 0A0B CE46 709E 203B 26FC 764E 48EA 4822 1833
 Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
 Lynne FE50 139C 6805 72CA FD52 1F8D A2FE A5F0 3F03 4464
 Michael Niedermayer   9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/APIchanges: fix wrong version number

2024-01-10 Thread Niklas Haas
ffmpeg | branch: master | Niklas Haas  | Thu Jan 11 07:02:21 
2024 +0100| [3a061facff610e3be296a8b95d75648ca291a9ec] | committer: Niklas Haas

doc/APIchanges: fix wrong version number

Major version was incorrectly copied.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a061facff610e3be296a8b95d75648ca291a9ec
---

 doc/APIchanges | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index c944155cd7..59e469ae75 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,10 +2,10 @@ The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
-2023-11-xx - xx - lavfi 58.16.100 - buffersink.h
+2023-11-xx - xx - lavfi 9.16.100 - buffersink.h
   Add av_buffersink_get_colorspace and av_buffersink_get_color_range.
 
-2023-11-xx - xx - lavfi 58.15.100 - avfilter.h
+2023-11-xx - xx - lavfi 9.15.100 - avfilter.h
   Add AVFilterLink.colorspace, AVFilterLink.color_range
 
 2023-12-xx - xx - lavu 58.36.100 - pixfmt.h hwcontext.h 
hwcontext_d3d12va.h

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-cvslog] doc/APIchanges: document newly added buffersrc field

2024-01-10 Thread Niklas Haas
ffmpeg | branch: master | Niklas Haas  | Thu Jan 11 07:03:56 
2024 +0100| [5e751dabc5d5e53c80e32e56f154ee5944e8f263] | committer: Niklas Haas

doc/APIchanges: document newly added buffersrc field

This was accidentally removed in a prior revision of the series,
alongside the corresponding (separate) version bump. Instead coalesce it
into the follow-up commit's entry, since that's the lowest version
actually supporting the new fields.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e751dabc5d5e53c80e32e56f154ee5944e8f263
---

 doc/APIchanges | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 59e469ae75..e477ed78e0 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,8 +2,9 @@ The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
-2023-11-xx - xx - lavfi 9.16.100 - buffersink.h
+2023-11-xx - xx - lavfi 9.16.100 - buffersink.h buffersrc.h
   Add av_buffersink_get_colorspace and av_buffersink_get_color_range.
+  Add AVBufferSrcParameters.color_space and AVBufferSrcParameters.color_range.
 
 2023-11-xx - xx - lavfi 9.15.100 - avfilter.h
   Add AVFilterLink.colorspace, AVFilterLink.color_range

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".