[FFmpeg-devel] /libavcodec/h264_slice.c: selectively discard MB to be decoded

Mehdi Hosseini mehdi.hoseini at gmail.com
Thu Feb 11 10:20:52 CET 2016


Hi all,

I want to discard some MBs of a B-FRAME from decoding. In fact, I want to
avoid some special MBs to be decoded and instead copying MBs of one of its
parents. Note that no B-Frame is encoded as a reference frame. The best
function for me to discard a list of MB is:

(/libavcodec/h264_slice.c) static int decode_slice(struct AVCodecContext
*avctx, void *arg)

FRAME_MBAFF(h) is false and the clip entropy is cabac.

1)How can I disable ret = ff_h264_decode_mb_cabac(h, sl); and
ff_h264_hl_decode_mb(h,
sl)
for a macro block where (sl->mb_x==my_x_id && sl->mb_y==my_y_id) with no
effect on decoding the rest of MBs in a B-Frame?

2) If not possible, is it possible to call ret = ff_h264_decode_mb_cabac(h,
sl);  but don't execute   ff_h264_hl_decode_mb(h, sl)  for some specific
MBs (again with not effects on other MBs)

Thank you.

On Thu, Feb 11, 2016 at 1:08 AM, Mehdi Hosseini <mehdi.hoseini at gmail.com>
wrote:

> Hi all,
>
> I want to discard some MBs of a B-FRAME from decoding. In fact, I want to
> avoid some special MB to be decoded and instead copy the MB of one of its
> parents. Note that no B-Frame is reference. The best function for me to
> discard a list of MB is:
>
> (/libavcodec/h264_slice.c) static int decode_slice(struct AVCodecContext
> *avctx, void *arg)
>
>  FRAME_MBAFF(h)
>
>


More information about the ffmpeg-devel mailing list