[FFmpeg-devel] [PATCH v8] VideoToolbox H.264 Encoder

Nicolas George george at nsup.org
Mon Feb 29 20:14:10 CET 2016


Le primidi 11 ventôse, an CCXXIV, Clement Boesch a écrit :
> > > +        case H264_PROF_BASELINE:
> > > +            switch (vtctx->level) {
> > > +                case  0: *profile_level_val = kVTProfileLevel_H264_Baseline_AutoLevel; break;
                                                                          ^^^^^^^^

> > > +        case H264_PROF_MAIN:
> > > +            switch (vtctx->level) {
> > > +                case  0: *profile_level_val = kVTProfileLevel_H264_Main_AutoLevel; break;
                                                                          ^^^^

> I don't understand: why don't you put the kVTProfileLevel_H264_* as const
> values? You won't have to do this mapping anymore.

I wondered too, but I found an explanation. Apparently, the wrapped API
combines the profile and level setting into a single constant. We could
replicate that in FFmpeg, but the other codecs use separate profile and
level options.

It could probably be done with an array instead of a switch; I do not know
what results in the most compact code.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160229/45206105/attachment.sig>


More information about the ffmpeg-devel mailing list