On 8/11/2020 6:48 AM, Nicolas George wrote:
> Andreas Rheinhardt (12020-08-11):
>> Imagine the context to only contain elements that require a alignment of
>> 4 and the internal structure to require an alignment of eight. Then it
>> is perfectly possible for &ctx[1] to only have an alignment of fou
> On Aug 11, 2020, at 5:48 PM, Nicolas George wrote:
>
> Andreas Rheinhardt (12020-08-11):
>> Imagine the context to only contain elements that require a alignment of
>> 4 and the internal structure to require an alignment of eight. Then it
>> is perfectly possible for &ctx[1] to only have an a
Andreas Rheinhardt (12020-08-11):
> Imagine the context to only contain elements that require a alignment of
> 4 and the internal structure to require an alignment of eight. Then it
> is perfectly possible for &ctx[1] to only have an alignment of four and
> not of eight as internal requires it.
Wi
> On Aug 11, 2020, at 8:14 AM, Andreas Rheinhardt
> wrote:
>
> James Almer:
>> On 8/10/2020 8:12 PM, Andreas Rheinhardt wrote:
>>> James Almer:
On 8/10/2020 7:11 PM, Nicolas George wrote:
> James Almer (12020-08-10):
>> Personally, i don't like it. It's extra complexity to save a
On 8/10/2020 9:14 PM, Andreas Rheinhardt wrote:
> James Almer:
>> On 8/10/2020 8:12 PM, Andreas Rheinhardt wrote:
>>> James Almer:
On 8/10/2020 7:11 PM, Nicolas George wrote:
> James Almer (12020-08-10):
>> Personally, i don't like it. It's extra complexity to save a single 8 or
>>
James Almer:
> On 8/10/2020 8:12 PM, Andreas Rheinhardt wrote:
>> James Almer:
>>> On 8/10/2020 7:11 PM, Nicolas George wrote:
James Almer (12020-08-10):
> Personally, i don't like it. It's extra complexity to save a single 8 or
> 12 byte allocation that happens once during bsf alloc.
On 8/10/2020 8:12 PM, Andreas Rheinhardt wrote:
> James Almer:
>> On 8/10/2020 7:11 PM, Nicolas George wrote:
>>> James Almer (12020-08-10):
Personally, i don't like it. It's extra complexity to save a single 8 or
12 byte allocation that happens once during bsf alloc. It's kind of a
Andreas Rheinhardt:
> James Almer:
>> On 8/10/2020 7:11 PM, Nicolas George wrote:
>>> James Almer (12020-08-10):
Personally, i don't like it. It's extra complexity to save a single 8 or
12 byte allocation that happens once during bsf alloc. It's kind of a
pointless micro-optimization
James Almer:
> On 8/10/2020 7:11 PM, Nicolas George wrote:
>> James Almer (12020-08-10):
>>> Personally, i don't like it. It's extra complexity to save a single 8 or
>>> 12 byte allocation that happens once during bsf alloc. It's kind of a
>>> pointless micro-optimization.
>>
>> I do not agree at a
On 8/10/2020 7:34 PM, Nicolas George wrote:
> James Almer (12020-08-10):
>> It adds an extra struct and makes the code harder to read. Might as well
>> just do
>>
>> ctx = av_mallocz(sizeof(*ctx) + sizeof(AVBSFInternal));
>> ctx->internal = &ctx[1];
>
> This is exactly what the code does
I know,
James Almer (12020-08-10):
> It adds an extra struct and makes the code harder to read. Might as well
> just do
>
> ctx = av_mallocz(sizeof(*ctx) + sizeof(AVBSFInternal));
> ctx->internal = &ctx[1];
This is exactly what the code does, except without the undefined
behaviors, because what you just
On 8/10/2020 7:11 PM, Nicolas George wrote:
> James Almer (12020-08-10):
>> Personally, i don't like it. It's extra complexity to save a single 8 or
>> 12 byte allocation that happens once during bsf alloc. It's kind of a
>> pointless micro-optimization.
>
> I do not agree at all.
>
> First, it i
Andreas Rheinhardt (12020-08-10):
> by allocating it together with the AVBSFContext.
>
> Signed-off-by: Andreas Rheinhardt
> ---
> Similar things can of course be done with other structures. I did only
> this one to see whether everyone is ok with this.
I wholeheartedly approve.
> libavcodec/
James Almer (12020-08-10):
> Personally, i don't like it. It's extra complexity to save a single 8 or
> 12 byte allocation that happens once during bsf alloc. It's kind of a
> pointless micro-optimization.
I do not agree at all.
First, it is not extra complexity, it actually makes the code simple
On 8/10/2020 10:55 AM, Andreas Rheinhardt wrote:
> by allocating it together with the AVBSFContext.
>
> Signed-off-by: Andreas Rheinhardt
> ---
> Similar things can of course be done with other structures. I did only
> this one to see whether everyone is ok with this.
Personally, i don't like it
by allocating it together with the AVBSFContext.
Signed-off-by: Andreas Rheinhardt
---
Similar things can of course be done with other structures. I did only
this one to see whether everyone is ok with this.
libavcodec/bsf.c | 25 +
1 file changed, 13 insertions(+), 12 d
16 matches
Mail list logo