From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mdec: DC reading for STRv1 is like STRv2 Date: Wed, 10 Jan 2024 03:37:41 +0100 Message-ID: <20240110023741.GP6420@pb2> (raw) In-Reply-To: <PAVPR08MB9795F65579D514D9E32A4C949A61A@PAVPR08MB9795.eurprd08.prod.outlook.com> [-- Attachment #1.1: Type: text/plain, Size: 2063 bytes --] On Tue, Jan 02, 2024 at 02:49:26AM +0000, aybe aybe wrote: > Hi, > > As I understand, support for .STR files is broken for almost 10 years now (since 161442ff2c4b0dd8a5072c6bbe6bf55303fffccf it seems). > > Currently, ffmpeg fails with tons of errors like this on version 1 STRs, e.g. Wipeout 1: > [mdec @ 00000000027c72c0] ac-tex damaged at 1 9 > > What happens is that only the audio is present in the video file. > > Anyway, that one character patch fixes the problem, video is now rendered. > > Signed-off-by: aybe <aybe@users.noreply.github.com> > --- > libavcodec/mdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c > index 44b12471a9..c4904216b8 100644 > --- a/libavcodec/mdec.c > +++ b/libavcodec/mdec.c > @@ -68,7 +68,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) > const int qscale = a->qscale; > > /* DC coefficient */ > - if (a->version == 2) { > + if (a->version <= 2) { > block[0] = 2 * get_sbits(&a->gb, 10) + 1024; > } else { > component = (n <= 3 ? 0 : n - 4 + 1); > -- > 2.41.0.windows.1 This is how the patch should look: (there are differencs in the whitespace which git seems to have problems with in above) not sure where these differences came from thx diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index 44b12471a9e..c4904216b81 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -68,7 +68,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) const int qscale = a->qscale; /* DC coefficient */ - if (a->version == 2) { + if (a->version <= 2) { block[0] = 2 * get_sbits(&a->gb, 10) + 1024; } else { component = (n <= 3 ? 0 : n - 4 + 1); [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. [-- 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".
next prev parent reply other threads:[~2024-01-10 2:37 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-02 2:49 aybe aybe 2024-01-05 20:53 ` Michael Niedermayer 2024-01-06 12:31 ` aybe aybe 2024-01-10 2:37 ` Michael Niedermayer [this message] 2024-01-13 2:32 ` aybe aybe 2024-01-10 2:46 ` Michael Niedermayer 2024-01-13 2:28 ` aybe aybe 2024-01-14 20:38 ` Michael Niedermayer via ffmpeg-devel 2024-01-15 16:14 ` aybe aybe 2024-01-15 23:42 ` Michael Niedermayer 2024-01-16 14:27 ` aybe aybe 2024-01-16 14:32 ` aybe aybe [not found] ` <emd5d779f2-9283-4be7-82e5-afaf16ca635e@a51bcb19.com> 2024-01-16 14:39 ` aybe aybe 2024-01-16 14:56 ` aybe aybe
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240110023741.GP6420@pb2 \ --to=michael@niedermayer.cc \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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