Lynne (12019-08-10):
> >> +typedef struct AVEncodeInfoBlock{
> >> + /**
> >> + * Distance in luma pixels from the top-left corner of the visible
> >> frame
> >> + * to the top-left corner of the block.
> >> + * Can be negative if top/right padding is present on the coded frame.
> >> + */
> >> + int src_x, src_y;
> >> + /**
> >> + * Width and height of the block in luma pixels
> >> + */
> >> + int w, h;
> >> + /**
> >> + * Delta quantization index for the block
> >> + */
> >> + int delta_q;
> >> +
> >>
> >> + uint8_t reserved[128];
> >>
> > What are these (this one and the one below) reserved fields for?
>
> For future extensions without breaking the API. Things like block type,
> prediction type, motion vectors, references, etc.
I suspected as much. But remember that setting the size of reserved
after fields are added will be very tricky: it requires taking into
account alignment and padding in the structure.
I think something like that might be easier to manage (and also use less
memory right now):
typedef struct AVEncodeInfoFrame {
...
size_t blocks_offset;
size_t block_size;
}
static inline AVEncodeInfoBlock *
av_encode_info_block(AVEncodeInfoFrame *info, unsigned idx)
{
return (AVEncodeInfoBlock *)
((char *)info + info->blocks_offset +
idx * info->block_size);
}
static inline AVEncodeInfoBlock *
av_encode_info_block_next(AVEncodeInfoFrame *info, AVEncodeInfoBlock *block)
{
return (AVEncodeInfoBlock *)
((char *)block + info->block_size);
}
Regards,
--
Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
