[vlc-devel] [PATCH] videotoolbox: set kCVPixelBufferBytesPerRowAlignmentKey to 16

Steve Lhomme robux4 at gmail.com
Mon Jul 10 08:21:35 CEST 2017


On Mon, Jul 10, 2017 at 5:05 AM, Zhao Zhili <wantlamy at gmail.com> wrote:
> Hi Jean-Baptisteļ¼Œ
>
> On Mon, Jul 10, 2017 at 1:39 AM, Jean-Baptiste Kempf <jb at videolan.org>
> wrote:
>>
>> Why?
>>
>> I'm sorry, but this means a bit more justification, in the commit log, and
>> probably in the code.
>>
>
> 1. Set  kCVPixelBufferBytesPerRowAlignmentKey to 16 makes memory usage
> smaller on iOS devices.

Why 16 ?

> 2. I didn't find any side effect of this setting.
> 3. I asked on IRC and cannot figure out why set align to i_video_width * 2.
>
>
>>
>>
>> On Sun, 9 Jul 2017, at 03:19, Zhao Zhili wrote:
>>
>>
>> ---
>>  modules/codec/videotoolbox.m | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
>> index 7806bd7843..9443bbe256 100644
>> --- a/modules/codec/videotoolbox.m
>> +++ b/modules/codec/videotoolbox.m
>> @@ -692,8 +692,7 @@ static int StartVideoToolbox(decoder_t *p_dec)
>>      cfdict_set_int32(p_sys->destinationPixelBufferAttributes,
>>                       kCVPixelBufferHeightKey, i_video_height);
>>      cfdict_set_int32(p_sys->destinationPixelBufferAttributes,
>> -                     kCVPixelBufferBytesPerRowAlignmentKey,
>> -                     i_video_width * 2);
>> +                     kCVPixelBufferBytesPerRowAlignmentKey, 16);
>>
>>      /* setup decoder callback record */
>>      VTDecompressionOutputCallbackRecord decoderCallbackRecord;
>> --
>> 2.11.0 (Apple Git-81)
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>>
>>
>> --
>> Jean-Baptiste Kempf -  President
>> +33 672 704 734
>>
>>
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list