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

Clément Bœsch u at pkh.me
Mon Feb 29 20:15:05 CET 2016


On Mon, Feb 29, 2016 at 08:14:10PM +0100, Nicolas George wrote:
> 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.
> 

Ah, my bad. OK

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160229/a6ceb6bd/attachment.sig>


More information about the ffmpeg-devel mailing list