[FFmpeg-devel] [PATCH v2 01/12] lavc/videotoolboxenc: Use shared pixel buffer pool
Richard Kern
kernrj at gmail.com
Mon Apr 25 19:07:14 CEST 2016
> On Apr 23, 2016, at 12:23 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>
> Rick Kern <kernrj <at> gmail.com> writes:
>
>> + if(!*refPtr) return;
>
> Is this needed (I don't know)?
> If yes, please make it two lines.
>
>> + CFRelease(*refPtr);
>> + *refPtr = NULL;
>> + switch (fmt) {
>> + case AV_PIX_FMT_NV12:
>> + switch (range) {
>> + case AVCOL_RANGE_MPEG:
>> + *av_pixel_format =
>> kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
>> + break;
>> +
>> + case AVCOL_RANGE_JPEG:
>> + *av_pixel_format =
>> kCVPixelFormatType_420YpCbCr8BiPlanarFullRange;
>> + break;
>> +
>> + default:
>> + if (range_guessed) *range_guessed = 1;
>> + *av_pixel_format =
>> kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
>
> You can rearrange this to make the patch smaller (and
> the default case easier to read).
> Same below.
>
>> static const enum AVPixelFormat pix_fmts[] = {
>> AV_PIX_FMT_NV12,
>> -#if !TARGET_OS_IPHONE
>> AV_PIX_FMT_YUV420P,
>> -#endif
>> AV_PIX_FMT_NONE
>
> Sorry: How is this related?
Using a shared pixel buffer pool also sets up an internal color converter when needed.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list