* Re: [FFmpeg-devel] [PATCH v2 3/2] avcodec/sanm: codec37 buffers are private
[not found] <20250113210024.105135-1-manuel.lauss@gmail.com>
@ 2025-01-21 16:40 ` Manuel Lauss
2025-01-24 0:13 ` Michael Niedermayer
0 siblings, 1 reply; 4+ messages in thread
From: Manuel Lauss @ 2025-01-21 16:40 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Ping?
Manuel Lauss <manuel.lauss@gmail.com> schrieb am Mo., 13. Jan. 2025, 22:00:
> codec37 operates on 2 buffers, which must be considered private to
> the codec and must therefore not be changed by subsequent FOBJs.
>
> Let codec37 therefore operate on frm1/2 instead of frm0/2, but copy
> the decoded image to frm0 where other codecs operate on.
>
> Fixes artifacts encountered in Full Throttle "dazed.san" and also
> in a lot of Rebel Assault II gameplay videos: these videos consist of
> frames with an initial codec37 FOBJ image to set the stage, and
> optional codec1-23 FOBJs overlaid on top of that image.
>
> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
> ---
> v2: use FFSWAP() to swap the 2 buffers instead of open-coding that.
>
> Applies on top of my previous patch "avcodec/sanm: simplify codec37
> subcodec 3/4 path"
>
> libavcodec/sanm.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
> index 51b8a2f54c..c30095ed32 100644
> --- a/libavcodec/sanm.c
> +++ b/libavcodec/sanm.c
> @@ -645,10 +645,11 @@ static int old_codec37(SANMVideoContext *ctx, int
> top,
>
> ctx->rotate_code = 0;
>
> - if (((seq & 1) || !(flags & 1)) && (compr && compr != 2))
> - rotate_bufs(ctx, 1);
> + if (((seq & 1) || !(flags & 1)) && (compr && compr != 2)) {
> + FFSWAP(uint16_t*, ctx->frm1, ctx->frm2);
> + }
>
> - dst = ((uint8_t*)ctx->frm0) + left + top * stride;
> + dst = ((uint8_t*)ctx->frm1) + left + top * stride;
> prev = ((uint8_t*)ctx->frm2) + left + top * stride;
>
> if (mvoff > 2) {
> @@ -662,7 +663,6 @@ static int old_codec37(SANMVideoContext *ctx, int top,
> bytestream2_get_buffer(&ctx->gb, dst, width);
> dst += stride;
> }
> - memset(ctx->frm1, 0, ctx->height * stride);
> memset(ctx->frm2, 0, ctx->height * stride);
> break;
> case 1:
> @@ -729,7 +729,6 @@ static int old_codec37(SANMVideoContext *ctx, int top,
> case 2:
> if (rle_decode(ctx, dst, decoded_size))
> return AVERROR_INVALIDDATA;
> - memset(ctx->frm1, 0, ctx->frm1_size);
> memset(ctx->frm2, 0, ctx->frm2_size);
> break;
> case 3:
> @@ -783,6 +782,7 @@ static int old_codec37(SANMVideoContext *ctx, int top,
> return AVERROR_PATCHWELCOME;
> }
>
> + memcpy(ctx->frm0, ctx->frm1, ctx->buf_size);
> return 0;
> }
>
> --
> 2.47.1
>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 3/2] avcodec/sanm: codec37 buffers are private
2025-01-21 16:40 ` [FFmpeg-devel] [PATCH v2 3/2] avcodec/sanm: codec37 buffers are private Manuel Lauss
@ 2025-01-24 0:13 ` Michael Niedermayer
2025-01-24 10:58 ` Manuel Lauss
0 siblings, 1 reply; 4+ messages in thread
From: Michael Niedermayer @ 2025-01-24 0:13 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 479 bytes --]
Hi Manuel
On Tue, Jan 21, 2025 at 05:40:25PM +0100, Manuel Lauss wrote:
> Ping?
I see you are quite active on the sanm code, maybe you want to
send a patch to add yourself to MAINTAINERS for sanm ?
This would give you git write access and simplify your work with sanm
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 3/2] avcodec/sanm: codec37 buffers are private
2025-01-24 0:13 ` Michael Niedermayer
@ 2025-01-24 10:58 ` Manuel Lauss
2025-01-26 0:08 ` Michael Niedermayer
0 siblings, 1 reply; 4+ messages in thread
From: Manuel Lauss @ 2025-01-24 10:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Thanks for the offer, but I know not nearly enough about the codec or
ffmpeg to be a maintainer, and this is also the last of my patches for
sanm for the foreseeable future.
MfG,
Manuel
On Fri, Jan 24, 2025 at 1:13 AM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> Hi Manuel
>
> On Tue, Jan 21, 2025 at 05:40:25PM +0100, Manuel Lauss wrote:
> > Ping?
>
> I see you are quite active on the sanm code, maybe you want to
> send a patch to add yourself to MAINTAINERS for sanm ?
>
> This would give you git write access and simplify your work with sanm
>
> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Asymptotically faster algorithms should always be preferred if you have
> asymptotical amounts of data
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 3/2] avcodec/sanm: codec37 buffers are private
2025-01-24 10:58 ` Manuel Lauss
@ 2025-01-26 0:08 ` Michael Niedermayer
0 siblings, 0 replies; 4+ messages in thread
From: Michael Niedermayer @ 2025-01-26 0:08 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]
Hi Manuel
On Fri, Jan 24, 2025 at 11:58:00AM +0100, Manuel Lauss wrote:
> Thanks for the offer, but I know not nearly enough about the codec or
> ffmpeg to be a maintainer,
well, theres nothing you need to know about ffmpeg.
and about sanm you are the one working on it
> and this is also the last of my patches for
> sanm for the foreseeable future.
ok, will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
What is money laundering? Its paying someone and not telling the government.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-26 0:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20250113210024.105135-1-manuel.lauss@gmail.com>
2025-01-21 16:40 ` [FFmpeg-devel] [PATCH v2 3/2] avcodec/sanm: codec37 buffers are private Manuel Lauss
2025-01-24 0:13 ` Michael Niedermayer
2025-01-24 10:58 ` Manuel Lauss
2025-01-26 0:08 ` Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git