Ticket #1241: patchneondsp2.diff

File patchneondsp2.diff, 2.0 KB (added by cehoyos, 4 years ago)
  • libavcodec/arm/h264dsp_init_arm.c

    diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c
    index 367ba81..a3a8c66 100644
    a b void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset, 
    7070 
    7171static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) 
    7272{ 
     73    const int cpu_flags = av_get_cpu_flags(); 
     74 
     75    if (!have_neon(cpu_flags)) 
     76        return; 
     77 
    7378    if (bit_depth == 8) { 
    7479    c->h264_v_loop_filter_luma   = ff_h264_v_loop_filter_luma_neon; 
    7580    c->h264_h_loop_filter_luma   = ff_h264_h_loop_filter_luma_neon; 
    static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const i 
    100105 
    101106void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) 
    102107{ 
    103     int cpu_flags = av_get_cpu_flags(); 
    104  
    105     if (have_neon(cpu_flags)) 
    106108        ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc); 
    107109} 
  • libavcodec/arm/h264pred_init_arm.c

    diff --git a/libavcodec/arm/h264pred_init_arm.c b/libavcodec/arm/h264pred_init_arm.c
    index 13aea32..df81050 100644
    a b void ff_pred8x8_0l0_dc_neon(uint8_t *src, int stride); 
    4646static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc) 
    4747{ 
    4848    const int high_depth = bit_depth > 8; 
     49    const int cpu_flags  = av_get_cpu_flags(); 
    4950 
    50     if (high_depth) 
     51    if (!have_neon(cpu_flags) || high_depth) 
    5152        return; 
    5253    if(chroma_format_idc == 1){ 
    5354    h->pred8x8[VERT_PRED8x8     ] = ff_pred8x8_vert_neon; 
    static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b 
    7879 
    7980void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc) 
    8081{ 
    81     int cpu_flags = av_get_cpu_flags(); 
    82  
    83     if (have_neon(cpu_flags)) 
    8482        ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc); 
    8583}