Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'
authorJames Almer <jamrial@gmail.com>
Tue, 26 Sep 2017 18:58:40 +0000 (15:58 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 26 Sep 2017 19:02:40 +0000 (16:02 -0300)
* commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3':
  Mark some arrays that never change as const.

Merged-by: James Almer <jamrial@gmail.com>
26 files changed:
1  2 
configure
libavcodec/aaccoder.c
libavcodec/aacenc.h
libavcodec/amrwbdata.h
libavcodec/atrac3plus.c
libavcodec/dfa.c
libavcodec/g722dec.c
libavcodec/on2avcdata.c
libavcodec/on2avcdata.h
libavcodec/opus_silk.c
libavcodec/qsvdec_h2645.c
libavcodec/qsvenc_hevc.c
libavcodec/tscc2data.h
libavcodec/vaapi_encode.c
libavcodec/vaapi_encode_mjpeg.c
libavcodec/vp8.c
libavcodec/vp9block.c
libavcodec/x86/mlpdsp_init.c
libavformat/hls.c
libavformat/id3v2.c
libavformat/id3v2.h
libavformat/mxfdec.c
libavutil/hwcontext.c
libavutil/hwcontext_vaapi.c
libavutil/pixdesc.c
libavutil/stereo3d.c

diff --cc configure
Simple merge
@@@ -894,8 -1112,14 +894,8 @@@ static void search_for_ms(AACEncContex
      }
  }
  
- AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
 -const AACCoefficientsEncoder ff_aac_coders[] = {
 -    {
 -        search_for_quantizers_faac,
 -        encode_window_bands_info,
 -        quantize_and_encode_band,
 -        search_for_ms,
 -    },
 -    {
++const AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
 +    [AAC_CODER_ANMR] = {
          search_for_quantizers_anmr,
          encode_window_bands_info,
          quantize_and_encode_band,
@@@ -57,38 -41,13 +57,38 @@@ typedef struct AACCoefficientsEncoder 
                                    SingleChannelElement *sce, const float lambda);
      void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce,
                                       int win, int group_len, const float lambda);
 -    void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, int size,
 -                                     int scale_idx, int cb, const float lambda);
 -    void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe, const float lambda);
 +    void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size,
 +                                     int scale_idx, int cb, const float lambda, int rtz);
 +    void (*encode_tns_info)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*encode_ltp_info)(struct AACEncContext *s, SingleChannelElement *sce, int common_window);
 +    void (*encode_main_pred)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*adjust_common_pred)(struct AACEncContext *s, ChannelElement *cpe);
 +    void (*adjust_common_ltp)(struct AACEncContext *s, ChannelElement *cpe);
 +    void (*apply_main_pred)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*apply_tns_filt)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*update_ltp)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*ltp_insert_new_frame)(struct AACEncContext *s);
 +    void (*set_special_band_scalefactors)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*search_for_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce);
 +    void (*mark_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce);
 +    void (*search_for_tns)(struct AACEncContext *s, SingleChannelElement *sce);
 +    void (*search_for_ltp)(struct AACEncContext *s, SingleChannelElement *sce, int common_window);
 +    void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe);
 +    void (*search_for_is)(struct AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe);
 +    void (*search_for_pred)(struct AACEncContext *s, SingleChannelElement *sce);
  } AACCoefficientsEncoder;
  
- extern AACCoefficientsEncoder ff_aac_coders[];
+ extern const AACCoefficientsEncoder ff_aac_coders[];
  
 +typedef struct AACQuantizeBandCostCacheEntry {
 +    float rd;
 +    float energy;
 +    int bits;
 +    char cb;
 +    char rtz;
 +    uint16_t generation;
 +} AACQuantizeBandCostCacheEntry;
 +
  /**
   * AAC encoder context
   */
@@@ -110,15 -67,10 +110,15 @@@ typedef struct AACEncContext 
      ChannelElement *cpe;                         ///< channel elements
      FFPsyContext psy;
      struct FFPsyPreprocessContext* psypp;
-     AACCoefficientsEncoder *coder;
+     const AACCoefficientsEncoder *coder;
 -    int cur_channel;
 -    int last_frame;
 +    int cur_channel;                             ///< current channel for coder context
 +    int random_state;
      float lambda;
 +    int last_frame_pb_count;                     ///< number of bits for the previous frame
 +    float lambda_sum;                            ///< sum(lambda), for Qvg reporting
 +    int lambda_count;                            ///< count(lambda), for Qvg reporting
 +    enum RawDataBlockType cur_type;              ///< channel group type cur_channel belongs to
 +
      AudioFrameQueue afq;
      DECLARE_ALIGNED(16, int,   qcoefs)[96];      ///< quantized coefficients
      DECLARE_ALIGNED(32, float, scoefs)[1024];    ///< scaled coefficients
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -599,15 -1323,15 +599,15 @@@ static void silk_decode_frame(SilkConte
          if (lag_absolute) {
              /* primary lag is coded absolute */
              int highbits, lowbits;
-             static const uint16_t *model[] = {
+             static const uint16_t * const model[] = {
 -                silk_model_pitch_lowbits_nb, silk_model_pitch_lowbits_mb,
 -                silk_model_pitch_lowbits_wb
 +                ff_silk_model_pitch_lowbits_nb, ff_silk_model_pitch_lowbits_mb,
 +                ff_silk_model_pitch_lowbits_wb
              };
 -            highbits = opus_rc_getsymbol(rc, silk_model_pitch_highbits);
 -            lowbits  = opus_rc_getsymbol(rc, model[s->bandwidth]);
 +            highbits = ff_opus_rc_dec_cdf(rc, ff_silk_model_pitch_highbits);
 +            lowbits  = ff_opus_rc_dec_cdf(rc, model[s->bandwidth]);
  
 -            primarylag = silk_pitch_min_lag[s->bandwidth] +
 -                         highbits*silk_pitch_scale[s->bandwidth] + lowbits;
 +            primarylag = ff_silk_pitch_min_lag[s->bandwidth] +
 +                         highbits*ff_silk_pitch_scale[s->bandwidth] + lowbits;
          }
          frame->primarylag = primarylag;
  
  
          for (i = 0; i < s->subframes; i++)
              sf[i].pitchlag = av_clip(primarylag + offsets[i],
 -                                     silk_pitch_min_lag[s->bandwidth],
 -                                     silk_pitch_max_lag[s->bandwidth]);
 +                                     ff_silk_pitch_min_lag[s->bandwidth],
 +                                     ff_silk_pitch_max_lag[s->bandwidth]);
  
          /* obtain LTP filter coefficients */
 -        ltpfilter = opus_rc_getsymbol(rc, silk_model_ltp_filter);
 +        ltpfilter = ff_opus_rc_dec_cdf(rc, ff_silk_model_ltp_filter);
          for (i = 0; i < s->subframes; i++) {
              int index, j;
-             static const uint16_t *filter_sel[] = {
+             static const uint16_t * const filter_sel[] = {
 -                silk_model_ltp_filter0_sel, silk_model_ltp_filter1_sel,
 -                silk_model_ltp_filter2_sel
 +                ff_silk_model_ltp_filter0_sel, ff_silk_model_ltp_filter1_sel,
 +                ff_silk_model_ltp_filter2_sel
              };
-             static const int8_t (*filter_taps[])[5] = {
+             static const int8_t (* const filter_taps[])[5] = {
 -                silk_ltp_filter0_taps, silk_ltp_filter1_taps, silk_ltp_filter2_taps
 +                ff_silk_ltp_filter0_taps, ff_silk_ltp_filter1_taps, ff_silk_ltp_filter2_taps
              };
 -            index = opus_rc_getsymbol(rc, filter_sel[ltpfilter]);
 +            index = ff_opus_rc_dec_cdf(rc, filter_sel[ltpfilter]);
              for (j = 0; j < 5; j++)
                  sf[i].ltptaps[j] = filter_taps[ltpfilter][index][j] / 128.0f;
          }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -921,62 -827,23 +921,62 @@@ skip_eob
      return i;
  }
  
 -static int decode_coeffs(AVCodecContext *avctx)
 +static int decode_coeffs_b_8bpp(VP9TileData *td, int16_t *coef, int n_coeffs,
 +                                unsigned (*cnt)[6][3], unsigned (*eob)[6][2],
 +                                uint8_t (*p)[6][11], int nnz, const int16_t *scan,
 +                                const int16_t (*nb)[2], const int16_t *band_counts,
 +                                int16_t *qmul)
 +{
 +    return decode_coeffs_b_generic(td->c, coef, n_coeffs, 0, 1, 8, cnt, eob, p,
 +                                   nnz, scan, nb, band_counts, qmul);
 +}
 +
 +static int decode_coeffs_b32_8bpp(VP9TileData *td, int16_t *coef, int n_coeffs,
 +                                  unsigned (*cnt)[6][3], unsigned (*eob)[6][2],
 +                                  uint8_t (*p)[6][11], int nnz, const int16_t *scan,
 +                                  const int16_t (*nb)[2], const int16_t *band_counts,
 +                                  int16_t *qmul)
 +{
 +    return decode_coeffs_b_generic(td->c, coef, n_coeffs, 1, 1, 8, cnt, eob, p,
 +                                   nnz, scan, nb, band_counts, qmul);
 +}
 +
 +static int decode_coeffs_b_16bpp(VP9TileData *td, int16_t *coef, int n_coeffs,
 +                                 unsigned (*cnt)[6][3], unsigned (*eob)[6][2],
 +                                 uint8_t (*p)[6][11], int nnz, const int16_t *scan,
 +                                 const int16_t (*nb)[2], const int16_t *band_counts,
 +                                 int16_t *qmul)
 +{
 +    return decode_coeffs_b_generic(td->c, coef, n_coeffs, 0, 0, td->s->s.h.bpp, cnt, eob, p,
 +                                   nnz, scan, nb, band_counts, qmul);
 +}
 +
 +static int decode_coeffs_b32_16bpp(VP9TileData *td, int16_t *coef, int n_coeffs,
 +                                   unsigned (*cnt)[6][3], unsigned (*eob)[6][2],
 +                                   uint8_t (*p)[6][11], int nnz, const int16_t *scan,
 +                                   const int16_t (*nb)[2], const int16_t *band_counts,
 +                                   int16_t *qmul)
  {
 -    VP9Context *s = avctx->priv_data;
 -    VP9Block *b = s->b;
 -    int row = b->row, col = b->col;
 +    return decode_coeffs_b_generic(td->c, coef, n_coeffs, 1, 0, td->s->s.h.bpp, cnt, eob, p,
 +                                   nnz, scan, nb, band_counts, qmul);
 +}
 +
 +static av_always_inline int decode_coeffs(VP9TileData *td, int is8bitsperpixel)
 +{
 +    VP9Context *s = td->s;
 +    VP9Block *b = td->b;
 +    int row = td->row, col = td->col;
      uint8_t (*p)[6][11] = s->prob.coef[b->tx][0 /* y */][!b->intra];
 -    unsigned (*c)[6][3] = s->counts.coef[b->tx][0 /* y */][!b->intra];
 -    unsigned (*e)[6][2] = s->counts.eob[b->tx][0 /* y */][!b->intra];
 -    int w4 = bwh_tab[1][b->bs][0] << 1, h4 = bwh_tab[1][b->bs][1] << 1;
 +    unsigned (*c)[6][3] = td->counts.coef[b->tx][0 /* y */][!b->intra];
 +    unsigned (*e)[6][2] = td->counts.eob[b->tx][0 /* y */][!b->intra];
 +    int w4 = ff_vp9_bwh_tab[1][b->bs][0] << 1, h4 = ff_vp9_bwh_tab[1][b->bs][1] << 1;
      int end_x = FFMIN(2 * (s->cols - col), w4);
      int end_y = FFMIN(2 * (s->rows - row), h4);
 -    int n, pl, x, y, step1d = 1 << b->tx, step = 1 << (b->tx * 2);
 -    int uvstep1d = 1 << b->uvtx, uvstep = 1 << (b->uvtx * 2), ret;
 -    int16_t (*qmul)[2] = s->segmentation.feat[b->seg_id].qmul;
 -    int tx = 4 * s->lossless + b->tx;
 +    int n, pl, x, y, ret;
 +    int16_t (*qmul)[2] = s->s.h.segmentation.feat[b->seg_id].qmul;
 +    int tx = 4 * s->s.h.lossless + b->tx;
      const int16_t * const *yscans = ff_vp9_scans[tx];
-     const int16_t (* const *ynbs)[2] = ff_vp9_scans_nb[tx];
+     const int16_t (* const * ynbs)[2] = ff_vp9_scans_nb[tx];
      const int16_t *uvscan = ff_vp9_scans[b->uvtx][DCT_DCT];
      const int16_t (*uvnb)[2] = ff_vp9_scans_nb[b->uvtx][DCT_DCT];
      uint8_t *a = &s->above_y_nnz_ctx[col * 2];
index 7f5e6b1,0000000..cb90ca2
mode 100644,000000..100644
--- /dev/null
@@@ -1,204 -1,0 +1,204 @@@
-                                    &ff_mlp_firorder_2, &ff_mlp_firorder_3,
-                                    &ff_mlp_firorder_4, &ff_mlp_firorder_5,
-                                    &ff_mlp_firorder_6, &ff_mlp_firorder_7,
-                                    &ff_mlp_firorder_8 };
 +/*
 + * MLP DSP functions x86-optimized
 + * Copyright (c) 2009 Ramiro Polla
 + *
 + * This file is part of FFmpeg.
 + *
 + * FFmpeg is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License as published by the Free Software Foundation; either
 + * version 2.1 of the License, or (at your option) any later version.
 + *
 + * FFmpeg is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public
 + * License along with FFmpeg; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 + */
 +
 +#include "libavutil/attributes.h"
 +#include "libavutil/cpu.h"
 +#include "libavutil/x86/asm.h"
 +#include "libavutil/x86/cpu.h"
 +#include "libavcodec/mlpdsp.h"
 +#include "libavcodec/mlp.h"
 +
 +#define REMATRIX_CHANNEL_FUNC(opt) \
 +void ff_mlp_rematrix_channel_##opt(int32_t *samples, \
 +                                   const int32_t *coeffs, \
 +                                   const uint8_t *bypassed_lsbs, \
 +                                   const int8_t *noise_buffer, \
 +                                   int index, \
 +                                   unsigned int dest_ch, \
 +                                   uint16_t blockpos, \
 +                                   unsigned int maxchan, \
 +                                   int matrix_noise_shift, \
 +                                   int access_unit_size_pow2, \
 +                                   int32_t mask);
 +
 +REMATRIX_CHANNEL_FUNC(sse4)
 +REMATRIX_CHANNEL_FUNC(avx2_bmi2)
 +
 +#if HAVE_7REGS && HAVE_INLINE_ASM && HAVE_INLINE_ASM_NONLOCAL_LABELS
 +
 +extern char ff_mlp_firorder_8;
 +extern char ff_mlp_firorder_7;
 +extern char ff_mlp_firorder_6;
 +extern char ff_mlp_firorder_5;
 +extern char ff_mlp_firorder_4;
 +extern char ff_mlp_firorder_3;
 +extern char ff_mlp_firorder_2;
 +extern char ff_mlp_firorder_1;
 +extern char ff_mlp_firorder_0;
 +
 +extern char ff_mlp_iirorder_4;
 +extern char ff_mlp_iirorder_3;
 +extern char ff_mlp_iirorder_2;
 +extern char ff_mlp_iirorder_1;
 +extern char ff_mlp_iirorder_0;
 +
 +static const void * const firtable[9] = { &ff_mlp_firorder_0, &ff_mlp_firorder_1,
-                                    &ff_mlp_iirorder_2, &ff_mlp_iirorder_3,
-                                    &ff_mlp_iirorder_4 };
++                                          &ff_mlp_firorder_2, &ff_mlp_firorder_3,
++                                          &ff_mlp_firorder_4, &ff_mlp_firorder_5,
++                                          &ff_mlp_firorder_6, &ff_mlp_firorder_7,
++                                          &ff_mlp_firorder_8 };
 +static const void * const iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1,
++                                          &ff_mlp_iirorder_2, &ff_mlp_iirorder_3,
++                                          &ff_mlp_iirorder_4 };
 +
 +#if ARCH_X86_64
 +
 +#define MLPMUL(label, offset, offs, offc)   \
 +    LABEL_MANGLE(label)":             \n\t" \
 +    "movslq "offset"+"offs"(%0), %%rax\n\t" \
 +    "movslq "offset"+"offc"(%1), %%rdx\n\t" \
 +    "imul                 %%rdx, %%rax\n\t" \
 +    "add                  %%rax, %%rsi\n\t"
 +
 +#define FIRMULREG(label, offset, firc)\
 +    LABEL_MANGLE(label)":       \n\t" \
 +    "movslq "#offset"(%0), %%rax\n\t" \
 +    "imul        %"#firc", %%rax\n\t" \
 +    "add            %%rax, %%rsi\n\t"
 +
 +#define CLEAR_ACCUM                   \
 +    "xor            %%rsi, %%rsi\n\t"
 +
 +#define SHIFT_ACCUM                   \
 +    "shr     %%cl,         %%rsi\n\t"
 +
 +#define ACCUM    "%%rdx"
 +#define RESULT   "%%rsi"
 +#define RESULT32 "%%esi"
 +
 +#else /* if ARCH_X86_32 */
 +
 +#define MLPMUL(label, offset, offs, offc)  \
 +    LABEL_MANGLE(label)":            \n\t" \
 +    "mov   "offset"+"offs"(%0), %%eax\n\t" \
 +    "imull "offset"+"offc"(%1)       \n\t" \
 +    "add                %%eax , %%esi\n\t" \
 +    "adc                %%edx , %%ecx\n\t"
 +
 +#define FIRMULREG(label, offset, firc)  \
 +    MLPMUL(label, #offset, "0", "0")
 +
 +#define CLEAR_ACCUM                  \
 +    "xor           %%esi, %%esi\n\t" \
 +    "xor           %%ecx, %%ecx\n\t"
 +
 +#define SHIFT_ACCUM                  \
 +    "mov           %%ecx, %%edx\n\t" \
 +    "mov           %%esi, %%eax\n\t" \
 +    "movzbl        %7   , %%ecx\n\t" \
 +    "shrd    %%cl, %%edx, %%eax\n\t" \
 +
 +#define ACCUM    "%%edx"
 +#define RESULT   "%%eax"
 +#define RESULT32 "%%eax"
 +
 +#endif /* !ARCH_X86_64 */
 +
 +#define BINC  AV_STRINGIFY(4* MAX_CHANNELS)
 +#define IOFFS AV_STRINGIFY(4*(MAX_FIR_ORDER + MAX_BLOCKSIZE))
 +#define IOFFC AV_STRINGIFY(4* MAX_FIR_ORDER)
 +
 +#define FIRMUL(label, offset) MLPMUL(label, #offset,   "0",   "0")
 +#define IIRMUL(label, offset) MLPMUL(label, #offset, IOFFS, IOFFC)
 +
 +static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff,
 +                                   int firorder, int iirorder,
 +                                   unsigned int filter_shift, int32_t mask,
 +                                   int blocksize, int32_t *sample_buffer)
 +{
 +    const void *firjump = firtable[firorder];
 +    const void *iirjump = iirtable[iirorder];
 +
 +    blocksize = -blocksize;
 +
 +    __asm__ volatile(
 +        "1:                           \n\t"
 +        CLEAR_ACCUM
 +        "jmp  *%5                     \n\t"
 +        FIRMUL   (ff_mlp_firorder_8, 0x1c   )
 +        FIRMUL   (ff_mlp_firorder_7, 0x18   )
 +        FIRMUL   (ff_mlp_firorder_6, 0x14   )
 +        FIRMUL   (ff_mlp_firorder_5, 0x10   )
 +        FIRMUL   (ff_mlp_firorder_4, 0x0c   )
 +        FIRMUL   (ff_mlp_firorder_3, 0x08   )
 +        FIRMUL   (ff_mlp_firorder_2, 0x04   )
 +        FIRMULREG(ff_mlp_firorder_1, 0x00, 8)
 +        LABEL_MANGLE(ff_mlp_firorder_0)":\n\t"
 +        "jmp  *%6                     \n\t"
 +        IIRMUL   (ff_mlp_iirorder_4, 0x0c   )
 +        IIRMUL   (ff_mlp_iirorder_3, 0x08   )
 +        IIRMUL   (ff_mlp_iirorder_2, 0x04   )
 +        IIRMUL   (ff_mlp_iirorder_1, 0x00   )
 +        LABEL_MANGLE(ff_mlp_iirorder_0)":\n\t"
 +        SHIFT_ACCUM
 +        "mov  "RESULT"  ,"ACCUM"      \n\t"
 +        "add  (%2)      ,"RESULT"     \n\t"
 +        "and   %4       ,"RESULT"     \n\t"
 +        "sub   $4       ,  %0         \n\t"
 +        "mov  "RESULT32", (%0)        \n\t"
 +        "mov  "RESULT32", (%2)        \n\t"
 +        "add $"BINC"    ,  %2         \n\t"
 +        "sub  "ACCUM"   ,"RESULT"     \n\t"
 +        "mov  "RESULT32","IOFFS"(%0)  \n\t"
 +        "incl              %3         \n\t"
 +        "js 1b                        \n\t"
 +        : /* 0*/"+r"(state),
 +          /* 1*/"+r"(coeff),
 +          /* 2*/"+r"(sample_buffer),
 +#if ARCH_X86_64
 +          /* 3*/"+r"(blocksize)
 +        : /* 4*/"r"((x86_reg)mask), /* 5*/"r"(firjump),
 +          /* 6*/"r"(iirjump)      , /* 7*/"c"(filter_shift)
 +        , /* 8*/"r"((int64_t)coeff[0])
 +        : "rax", "rdx", "rsi"
 +#else /* ARCH_X86_32 */
 +          /* 3*/"+m"(blocksize)
 +        : /* 4*/"m"(         mask), /* 5*/"m"(firjump),
 +          /* 6*/"m"(iirjump)      , /* 7*/"m"(filter_shift)
 +        : "eax", "edx", "esi", "ecx"
 +#endif /* !ARCH_X86_64 */
 +    );
 +}
 +
 +#endif /* HAVE_7REGS && HAVE_INLINE_ASM */
 +
 +av_cold void ff_mlpdsp_init_x86(MLPDSPContext *c)
 +{
 +    int cpu_flags = av_get_cpu_flags();
 +#if HAVE_7REGS && HAVE_INLINE_ASM && HAVE_INLINE_ASM_NONLOCAL_LABELS
 +    if (INLINE_MMX(cpu_flags))
 +        c->mlp_filter_channel = mlp_filter_channel_x86;
 +#endif
 +    if (ARCH_X86_64 && EXTERNAL_SSE4(cpu_flags))
 +        c->mlp_rematrix_channel = ff_mlp_rematrix_channel_sse4;
 +    if (ARCH_X86_64 && EXTERNAL_AVX2_FAST(cpu_flags) && cpu_flags & AV_CPU_FLAG_BMI2)
 +        c->mlp_rematrix_channel = ff_mlp_rematrix_channel_avx2_bmi2;
 +}
@@@ -1498,9 -477,8 +1498,9 @@@ static int select_cur_seq_no(HLSContex
  static int save_avio_options(AVFormatContext *s)
  {
      HLSContext *c = s->priv_data;
-     static const char *opts[] = {
 -    static const char * const opts[] = { "headers", "user_agent", NULL };
 -    const char * const *opt = opts;
++    static const char * const opts[] = {
 +        "headers", "http_proxy", "user_agent", "user-agent", "cookies", NULL };
-     const char **opt = opts;
++    const char * const * opt = opts;
      uint8_t *buf;
      int ret = 0;
  
Simple merge
Simple merge
@@@ -1201,10 -978,10 +1201,10 @@@ static const MXFCodecUL mxf_sound_essen
  
  static const MXFCodecUL mxf_data_essence_container_uls[] = {
      { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, 0 },
 -    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, AV_CODEC_ID_NONE },
 +    { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0, AV_CODEC_ID_NONE },
  };
  
- static const char* const mxf_data_essence_descriptor[] = {
+ static const char * const mxf_data_essence_descriptor[] = {
      "vbi_vanc_smpte_436M",
  };
  
Simple merge
Simple merge
@@@ -2252,7 -1770,7 +2252,7 @@@ static const char * const color_range_n
      [AVCOL_RANGE_JPEG] = "pc",
  };
  
- static const char *color_primaries_names[AVCOL_PRI_NB] = {
 -static const char * const color_primaries_names[] = {
++static const char * const color_primaries_names[AVCOL_PRI_NB] = {
      [AVCOL_PRI_RESERVED0] = "reserved",
      [AVCOL_PRI_BT709] = "bt709",
      [AVCOL_PRI_UNSPECIFIED] = "unknown",
@@@ -2304,12 -1822,9 +2304,12 @@@ static const char * const color_space_n
      [AVCOL_SPC_BT2020_NCL] = "bt2020nc",
      [AVCOL_SPC_BT2020_CL] = "bt2020c",
      [AVCOL_SPC_SMPTE2085] = "smpte2085",
 +    [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
 +    [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
 +    [AVCOL_SPC_ICTCP] = "ictcp",
  };
  
- static const char *chroma_location_names[] = {
+ static const char * const chroma_location_names[] = {
      [AVCHROMA_LOC_UNSPECIFIED] = "unspecified",
      [AVCHROMA_LOC_LEFT] = "left",
      [AVCHROMA_LOC_CENTER] = "center",
Simple merge