[FFmpeg-devel] [PATCH 10/12] avcodec/rv10: Replace switch by LUT
Michael Niedermayer
michael at niedermayer.cc
Sat Oct 7 19:44:37 EEST 2023
On Fri, Oct 06, 2023 at 04:03:40AM +0200, Andreas Rheinhardt wrote:
> Vittorio Giovara:
> > On Tue, Oct 3, 2023 at 12:03 PM Andreas Rheinhardt <
> > andreas.rheinhardt at outlook.com> wrote:
> >
> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> >> ---
> >> libavcodec/rv10.c | 21 +++++----------------
> >> 1 file changed, 5 insertions(+), 16 deletions(-)
> >>
> >> diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
> >> index 3f9d5ff242..216328ffe7 100644
> >> --- a/libavcodec/rv10.c
> >> +++ b/libavcodec/rv10.c
> >> @@ -158,25 +158,14 @@ static int rv10_decode_picture_header(MpegEncContext
> >> *s)
> >>
> >> static int rv20_decode_picture_header(RVDecContext *rv, int whole_size)
> >> {
> >> + static const enum AVPictureType pict_types[] =
> >> + { AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_I /* hmm ... */,
> >>
> >
> > Any chance we could replace this comment with something more detailed (or
> > remove it if not needed)?
>
> The comment has been added when the mapping for 1 was added in
> 248a1aa54c0 (which made the default case dead code). I simply preserved
> it, Michael probably added it to show that he was not completely sure. I
> don't know whether there are different semantics for the two values.
> I do not object to the removal of this comment.
Its a bit odd when 2 values mean the same thing in a reverse engeneered
format. One kind of thinks, that there is likely some difference that we
just dont know about. maybe teh comment could elaborate in this direction
and or someone could recheck if this is still the current best knowledge ...
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231007/682f041b/attachment.sig>
More information about the ffmpeg-devel
mailing list