On 07/19/2013 02:16 PM, Hendrik Leppkes wrote:
> On Fri, Jul 19, 2013 at 2:11 PM, Luca Barbato <[email protected]> wrote:
>> On 07/17/2013 05:42 PM, Vittorio Giovara wrote:
>>> ---
>>> I'm not so sure about the anaglyph information, maybe it's better to remove
>>> it altogether?
>>> ---
>>> libavcodec/avcodec.h | 35 +++++++++++++++++++++++++++++++
>>> libavutil/Makefile | 1 +
>>> libavutil/frame.h | 4 ++++
>>> libavutil/stereoscopy.h | 52
>>> +++++++++++++++++++++++++++++++++++++++++++++++
>>> 4 files changed, 92 insertions(+)
>>> create mode 100644 libavutil/stereoscopy.h
>>>
>>
>> The whole information could be made fit a bitfield.
>>
>
> You would seriously limit future extensibility by limiting this into a
> odd bitfield now just to save a few bytes per frame.
You'd have more than 64 items at hand?
> Also, such bitfields really are no fun to handle by calling code.
Compare
deserialize_stereo_info(AVStereoInfo *info, const char *side_data) {
info->foo = AV_RL32(side_data);
info->bar = AV_RL32(side_data + 4);
info->baz = AV_RL32(side_data + 8);
info->rem = AV_RL32(side_data + 12);
}
if (info->blah == MACRO)
else
...
to
uint64_t info = AV_RL64(side_data);
if (info & MACRO)
else
...
I'm not so sure the first option is better/simpler than the latter.
Currently we have information that would fit 18bits. Even using a 4
bytes would leave us with space to a 2/3 expansion and we can use 64bit
to be safe...
I guess you assumed you could shove a struct as is in the side data and
just steal the pointer from one side to another. Till we do not decide
otherwise side-data has to be a wire format, thus bytes-only.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel