MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_h264_pred_init

Function ff_h264_pred_init

libavcodec/h264pred.c:437–602  ·  view source on GitHub ↗

* Set the intra prediction function pointers. */

Source from the content-addressed store, hash-verified

435 * Set the intra prediction function pointers.
436 */
437av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id,
438 const int bit_depth,
439 int chroma_format_idc)
440{
441#undef FUNC
442#undef FUNCC
443#define FUNC(a, depth) a ## _ ## depth
444#define FUNCC(a, depth) a ## _ ## depth ## _c
445#define FUNCD(a) a ## _c
446
447#define H264_PRED(depth) \
448 h->pred4x4[VERT_PRED ] = FUNCC(pred4x4_vertical, depth);\
449 h->pred4x4[HOR_PRED ] = FUNCC(pred4x4_horizontal, depth);\
450 h->pred4x4[DC_PRED ] = FUNCC(pred4x4_dc, depth);\
451 h->pred4x4[DIAG_DOWN_LEFT_PRED ] = FUNCC(pred4x4_down_left, depth);\
452 h->pred4x4[DIAG_DOWN_RIGHT_PRED] = FUNCC(pred4x4_down_right, depth);\
453 h->pred4x4[VERT_RIGHT_PRED ] = FUNCC(pred4x4_vertical_right, depth);\
454 h->pred4x4[HOR_DOWN_PRED ] = FUNCC(pred4x4_horizontal_down, depth);\
455 h->pred4x4[VERT_LEFT_PRED ] = FUNCC(pred4x4_vertical_left, depth);\
456 h->pred4x4[HOR_UP_PRED ] = FUNCC(pred4x4_horizontal_up, depth);\
457 h->pred4x4[LEFT_DC_PRED ] = FUNCC(pred4x4_left_dc, depth);\
458 h->pred4x4[TOP_DC_PRED ] = FUNCC(pred4x4_top_dc, depth);\
459 if (depth > 8 || codec_id != AV_CODEC_ID_VP8)\
460 h->pred4x4[DC_128_PRED ] = FUNCC(pred4x4_128_dc, depth);\
461\
462 h->pred8x8l[VERT_PRED ]= FUNCC(pred8x8l_vertical , depth);\
463 h->pred8x8l[HOR_PRED ]= FUNCC(pred8x8l_horizontal , depth);\
464 h->pred8x8l[DC_PRED ]= FUNCC(pred8x8l_dc , depth);\
465 h->pred8x8l[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred8x8l_down_left , depth);\
466 h->pred8x8l[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred8x8l_down_right , depth);\
467 h->pred8x8l[VERT_RIGHT_PRED ]= FUNCC(pred8x8l_vertical_right , depth);\
468 h->pred8x8l[HOR_DOWN_PRED ]= FUNCC(pred8x8l_horizontal_down , depth);\
469 h->pred8x8l[VERT_LEFT_PRED ]= FUNCC(pred8x8l_vertical_left , depth);\
470 h->pred8x8l[HOR_UP_PRED ]= FUNCC(pred8x8l_horizontal_up , depth);\
471 h->pred8x8l[LEFT_DC_PRED ]= FUNCC(pred8x8l_left_dc , depth);\
472 h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\
473 h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\
474\
475 if (chroma_format_idc <= 1) {\
476 h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\
477 h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\
478 h->pred8x8[PLANE_PRED8x8] = FUNCC(pred8x8_plane, depth);\
479 } else {\
480 h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x16_vertical , depth);\
481 h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\
482 h->pred8x8[PLANE_PRED8x8] = FUNCC(pred8x16_plane, depth);\
483 }\
484 if (depth > 8 || (codec_id != AV_CODEC_ID_RV40 && \
485 codec_id != AV_CODEC_ID_VP7 && \
486 codec_id != AV_CODEC_ID_VP8)) { \
487 if (chroma_format_idc <= 1) {\
488 h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\
489 h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\
490 h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\
491 h->pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l0t, depth);\
492 h->pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0lt, depth);\
493 h->pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l00, depth);\
494 h->pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0l0, depth);\

Callers 6

svq3_decode_initFunction · 0.85
h264_slice_header_initFunction · 0.85
ff_vp8_decode_initFunction · 0.85
vp7_decode_initFunction · 0.85
ff_rv34_decode_initFunction · 0.85
checkasm_check_h264predFunction · 0.85

Calls 5

ff_h264_pred_init_armFunction · 0.85
ff_h264_pred_init_x86Function · 0.85
ff_h264_pred_init_mipsFunction · 0.85

Tested by

no test coverage detected