<div dir="ltr">Hi all<div>I have recently joined the effort to bring a good hardware acceleration for transcoding to TVHeadend on Raspberry PI hardware.</div><div>TVHeadend use libavcodec as transcoding subsystem</div><div>With the recent OMX IL support for encoding, we got some progress, but still the CPU is overkilled during the process. Rpi works ok with command line transconding using ffmpeg utils</div><div>I have looked at the code and I thing that the problem is with the pickup of the decoder</div><div>First of all: I know that MPEG2 HW decoder need the license, but I want to focus more on the AVCodec * pickup</div><div>The transcoding engine setup the decoder and the encoder based on</div><div><br></div><div>1) For the decoder: there is a helper function that check the input video format and pickup the best decoder using the libavcodec function: </div><div><br></div>AVCodec* avcodec_find_decoder(enum AVCodecID id)<div><br></div><div>2) For the encoder, the user provides a plain text video codec string that is passed to the function:</div><div><br></div><div>AVCodec * avcodec_find_encoder_by_name (const char *name)</div><div><br></div><div>the encoder part is ok, but the decoding part puzzle me. The enum AVCodecID doesn't list any codec that explicitly point to some hw acceleration. So I suspect that the decoding is done just in software, causing CPU overkill.</div><div>Is my assumption correct? How is possible to specify an hardware acceleration? Or is the case that, when the application wants to use hardware acceleration for decoding, shall use instead the function:</div><br>AVCodec * avcodec_find_decoder_by_name (const char *name)<div></div><div></div><div><br></div><div>passing the correct decoder name, that on raspberry pi shall be mpeg2_mmal or h264_mmal according to the source?</div><div>Bye</div></div>