[FFmpeg-devel] [PATCH 07/14] avcodec/ffv1dec: Don't copy fields unnecessarily

Michael Niedermayer michael at niedermayer.cc
Sun Apr 25 15:27:44 EEST 2021


On Sat, Apr 24, 2021 at 01:14:39PM +0200, Andreas Rheinhardt wrote:
> Copy slice-only fields only for the slicecontexts and not for the main
> contexts in update_thread_context(). The converse is true for e.g.
> key_frame_ok which is only used with the main context; when not doing
> frame-threaded decoding it is actually only ever set for the main
> context, so not setting it for the slice contexts when doing frame
> threading is more consistent.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---

> I wonder whether one should use different structures for the main context
> and the slice contexts.

i think either we should have seperate structs or we should make sure
all fields for which it makes sense are sensibly set. droping all code
for "unused" fields but leaving the fields there is a bit feeling like
placing mines one could step on.

That said, spliting the struct seems a reasonable choice assuming this
ends up looking nice and clean

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued
-------------- 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/20210425/399df502/attachment.sig>


More information about the ffmpeg-devel mailing list