[FFmpeg-devel,1/2] avcodec/h264_parse: change prefix to avpriv for usage in avformat mxf muxer

Submitted by Baptiste Coudurier on April 3, 2019, 9:22 a.m.

Details

Message ID 20190403092202.31392-1-baptiste.coudurier@gmail.com
State New
Headers show

Commit Message

Baptiste Coudurier April 3, 2019, 9:22 a.m.
---
 libavcodec/cbs_h2645.c             | 28 ++++++++++++++--------------
 libavcodec/extract_extradata_bsf.c |  4 ++--
 libavcodec/h2645_parse.c           |  6 +++---
 libavcodec/h2645_parse.h           |  6 +++---
 libavcodec/h264_parse.c            |  4 ++--
 libavcodec/h264_parser.c           |  4 ++--
 libavcodec/h264_ps.c               |  4 ++--
 libavcodec/h264_ps.h               |  4 ++--
 libavcodec/h264_slice.c            |  2 +-
 libavcodec/h264data.c              |  2 +-
 libavcodec/h264data.h              |  3 ++-
 libavcodec/h264dec.c               | 10 +++++-----
 libavcodec/hevc_parse.c            |  2 +-
 libavcodec/hevc_parser.c           |  4 ++--
 libavcodec/hevcdec.c               |  4 ++--
 libavcodec/svq3.c                  |  2 +-
 16 files changed, 45 insertions(+), 44 deletions(-)

Comments

Hendrik Leppkes April 3, 2019, 9:37 a.m.
On Wed, Apr 3, 2019 at 11:22 AM Baptiste Coudurier
<baptiste.coudurier@gmail.com> wrote:
>
> ---
>  libavcodec/cbs_h2645.c             | 28 ++++++++++++++--------------
>  libavcodec/extract_extradata_bsf.c |  4 ++--
>  libavcodec/h2645_parse.c           |  6 +++---
>  libavcodec/h2645_parse.h           |  6 +++---
>  libavcodec/h264_parse.c            |  4 ++--
>  libavcodec/h264_parser.c           |  4 ++--
>  libavcodec/h264_ps.c               |  4 ++--
>  libavcodec/h264_ps.h               |  4 ++--
>  libavcodec/h264_slice.c            |  2 +-
>  libavcodec/h264data.c              |  2 +-
>  libavcodec/h264data.h              |  3 ++-
>  libavcodec/h264dec.c               | 10 +++++-----
>  libavcodec/hevc_parse.c            |  2 +-
>  libavcodec/hevc_parser.c           |  4 ++--
>  libavcodec/hevcdec.c               |  4 ++--
>  libavcodec/svq3.c                  |  2 +-
>  16 files changed, 45 insertions(+), 44 deletions(-)
>

We prefer not to expose huge modules like this as avpriv, as it makes
it part of the ABI and as such impossible to change without
deprecation cycles.
Preferably, avpriv should be avoided entirely where possible, as it
has many of the same limitations as actual public API, and just adds
confusion.

- Hendrik
Baptiste Coudurier April 3, 2019, 12:25 p.m.
Hey Hendrik

> On Apr 3, 2019, at 11:37 AM, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
> 
> On Wed, Apr 3, 2019 at 11:22 AM Baptiste Coudurier
> <baptiste.coudurier@gmail.com> wrote:
>> 
>> ---
>> libavcodec/cbs_h2645.c             | 28 ++++++++++++++--------------
>> libavcodec/extract_extradata_bsf.c |  4 ++--
>> libavcodec/h2645_parse.c           |  6 +++---
>> libavcodec/h2645_parse.h           |  6 +++---
>> libavcodec/h264_parse.c            |  4 ++--
>> libavcodec/h264_parser.c           |  4 ++--
>> libavcodec/h264_ps.c               |  4 ++--
>> libavcodec/h264_ps.h               |  4 ++--
>> libavcodec/h264_slice.c            |  2 +-
>> libavcodec/h264data.c              |  2 +-
>> libavcodec/h264data.h              |  3 ++-
>> libavcodec/h264dec.c               | 10 +++++-----
>> libavcodec/hevc_parse.c            |  2 +-
>> libavcodec/hevc_parser.c           |  4 ++--
>> libavcodec/hevcdec.c               |  4 ++--
>> libavcodec/svq3.c                  |  2 +-
>> 16 files changed, 45 insertions(+), 44 deletions(-)
>> 
> 
> We prefer not to expose huge modules like this as avpriv, as it makes
> it part of the ABI and as such impossible to change without
> deprecation cycles.
> Preferably, avpriv should be avoided entirely where possible, as it
> has many of the same limitations as actual public API, and just adds
> confusion.

Understood. What’s the alternative ?

Thanks!

— 
Baptiste
Carl Eugen Hoyos April 3, 2019, 12:28 p.m.
2019-04-03 11:37 GMT+02:00, Hendrik Leppkes <h.leppkes@gmail.com>:

> We prefer not to expose huge modules like this as avpriv,
> as it makes it part of the ABI

(I am sure there are cases that are difficult to avoid,
we also prefer not to duplicate functions.)

> and as such impossible to change without
> deprecation cycles.

That does not sound correct to me.

Carl Eugen
Hendrik Leppkes April 3, 2019, 12:37 p.m.
On Wed, Apr 3, 2019 at 2:28 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>
> 2019-04-03 11:37 GMT+02:00, Hendrik Leppkes <h.leppkes@gmail.com>:
>
> > We prefer not to expose huge modules like this as avpriv,
> > as it makes it part of the ABI
>
> (I am sure there are cases that are difficult to avoid,
> we also prefer not to duplicate functions.)
>
> > and as such impossible to change without
> > deprecation cycles.
>
> That does not sound correct to me.
>

You are correct, we don't need deprecation cycles. But we do need a
major bump to change it, so thats typically still a up to 2 year
delay.

- Hendrik
James Almer April 3, 2019, 1:59 p.m.
On 4/3/2019 9:25 AM, Baptiste Coudurier wrote:
> Hey Hendrik
> 
>> On Apr 3, 2019, at 11:37 AM, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
>>
>> On Wed, Apr 3, 2019 at 11:22 AM Baptiste Coudurier
>> <baptiste.coudurier@gmail.com> wrote:
>>>
>>> ---
>>> libavcodec/cbs_h2645.c             | 28 ++++++++++++++--------------
>>> libavcodec/extract_extradata_bsf.c |  4 ++--
>>> libavcodec/h2645_parse.c           |  6 +++---
>>> libavcodec/h2645_parse.h           |  6 +++---
>>> libavcodec/h264_parse.c            |  4 ++--
>>> libavcodec/h264_parser.c           |  4 ++--
>>> libavcodec/h264_ps.c               |  4 ++--
>>> libavcodec/h264_ps.h               |  4 ++--
>>> libavcodec/h264_slice.c            |  2 +-
>>> libavcodec/h264data.c              |  2 +-
>>> libavcodec/h264data.h              |  3 ++-
>>> libavcodec/h264dec.c               | 10 +++++-----
>>> libavcodec/hevc_parse.c            |  2 +-
>>> libavcodec/hevc_parser.c           |  4 ++--
>>> libavcodec/hevcdec.c               |  4 ++--
>>> libavcodec/svq3.c                  |  2 +-
>>> 16 files changed, 45 insertions(+), 44 deletions(-)
>>>
>>
>> We prefer not to expose huge modules like this as avpriv, as it makes
>> it part of the ABI and as such impossible to change without
>> deprecation cycles.
>> Preferably, avpriv should be avoided entirely where possible, as it
>> has many of the same limitations as actual public API, and just adds
>> confusion.
> 
> Understood. What’s the alternative ?

One usual solution is adding an avpriv_ wrapper for the internal
function, like avpriv_ac3_parse_header() is done for
ff_ac3_parse_header(), which prevents internal structs from being part
of the ABI. But ff_h2645_packet_split() and
ff_h264_decode_seq_parameter_set() don't allow for that, seeing
H264ParamSets, H2645Packet, H2645RBSP and H2645NAL are complex and tend
to get changes every now and then. The last time was only a few months ago.

Other than what you're doing in your patch, the only solution i can
think of is duplicating the functionality. It wouldn't be the first, as
you can see in avc.c, hevc.c, av1.c, where bitstream parsing was
implemented in a reduced form exclusively for muxing purposes.

> 
> Thanks!
> 
> — 
> Baptiste
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
Baptiste Coudurier April 9, 2019, 10:22 p.m.
Hi James, I hope you are doing well


> On Apr 3, 2019, at 6:59 AM, James Almer <jamrial@gmail.com> wrote:
> 
> On 4/3/2019 9:25 AM, Baptiste Coudurier wrote:
>> Hey Hendrik
>> 
>>> On Apr 3, 2019, at 11:37 AM, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
>>> 
>>> On Wed, Apr 3, 2019 at 11:22 AM Baptiste Coudurier
>>> <baptiste.coudurier@gmail.com> wrote:
>>>> 
>>>> ---
>>>> libavcodec/cbs_h2645.c             | 28 ++++++++++++++--------------
>>>> libavcodec/extract_extradata_bsf.c |  4 ++--
>>>> libavcodec/h2645_parse.c           |  6 +++---
>>>> libavcodec/h2645_parse.h           |  6 +++---
>>>> libavcodec/h264_parse.c            |  4 ++--
>>>> libavcodec/h264_parser.c           |  4 ++--
>>>> libavcodec/h264_ps.c               |  4 ++--
>>>> libavcodec/h264_ps.h               |  4 ++--
>>>> libavcodec/h264_slice.c            |  2 +-
>>>> libavcodec/h264data.c              |  2 +-
>>>> libavcodec/h264data.h              |  3 ++-
>>>> libavcodec/h264dec.c               | 10 +++++-----
>>>> libavcodec/hevc_parse.c            |  2 +-
>>>> libavcodec/hevc_parser.c           |  4 ++--
>>>> libavcodec/hevcdec.c               |  4 ++--
>>>> libavcodec/svq3.c                  |  2 +-
>>>> 16 files changed, 45 insertions(+), 44 deletions(-)
>>>> 
>>> 
>>> We prefer not to expose huge modules like this as avpriv, as it makes
>>> it part of the ABI and as such impossible to change without
>>> deprecation cycles.
>>> Preferably, avpriv should be avoided entirely where possible, as it
>>> has many of the same limitations as actual public API, and just adds
>>> confusion.
>> 
>> Understood. What’s the alternative ?
> 
> One usual solution is adding an avpriv_ wrapper for the internal
> function, like avpriv_ac3_parse_header() is done for
> ff_ac3_parse_header(), which prevents internal structs from being part
> of the ABI. But ff_h2645_packet_split() and
> ff_h264_decode_seq_parameter_set() don't allow for that, seeing
> H264ParamSets, H2645Packet, H2645RBSP and H2645NAL are complex and tend
> to get changes every now and then. The last time was only a few months ago.
> 
> Other than what you're doing in your patch, the only solution i can
> think of is duplicating the functionality. It wouldn't be the first, as
> you can see in avc.c, hevc.c, av1.c, where bitstream parsing was
> implemented in a reduced form exclusively for muxing purposes.

All right, I changed the code to avoid using ff_h2645_packet_split() and I found “nal_unit_extract_rbsp” in libavformat :)
I don’t think duplicating ff_h264_decode_seq_parameter would be good though so I still changed the prefix to avpriv.

Let me know if that works.

Thanks!

—
Baptiste

Patch hide | download patch | download mbox

diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index e74f8dce81..d1f7b2138f 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -599,9 +599,9 @@  static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
         }
         end = bytestream2_tell(&gbc);
 
-        err = ff_h2645_packet_split(&priv->read_packet,
-                                    frag->data + start, end - start,
-                                    ctx->log_ctx, 1, 2, AV_CODEC_ID_H264, 1, 1);
+        err = avpriv_h2645_packet_split(&priv->read_packet,
+                                        frag->data + start, end - start,
+                                        ctx->log_ctx, 1, 2, AV_CODEC_ID_H264, 1, 1);
         if (err < 0) {
             av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split AVCC SPS array.\n");
             return err;
@@ -623,9 +623,9 @@  static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
         }
         end = bytestream2_tell(&gbc);
 
-        err = ff_h2645_packet_split(&priv->read_packet,
-                                    frag->data + start, end - start,
-                                    ctx->log_ctx, 1, 2, AV_CODEC_ID_H264, 1, 1);
+        err = avpriv_h2645_packet_split(&priv->read_packet,
+                                        frag->data + start, end - start,
+                                        ctx->log_ctx, 1, 2, AV_CODEC_ID_H264, 1, 1);
         if (err < 0) {
             av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split AVCC PPS array.\n");
             return err;
@@ -677,9 +677,9 @@  static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
             }
             end = bytestream2_tell(&gbc);
 
-            err = ff_h2645_packet_split(&priv->read_packet,
-                                        frag->data + start, end - start,
-                                        ctx->log_ctx, 1, 2, AV_CODEC_ID_HEVC, 1, 1);
+            err = avpriv_h2645_packet_split(&priv->read_packet,
+                                            frag->data + start, end - start,
+                                            ctx->log_ctx, 1, 2, AV_CODEC_ID_HEVC, 1, 1);
             if (err < 0) {
                 av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split "
                        "HVCC array %d (%d NAL units of type %d).\n",
@@ -694,11 +694,11 @@  static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
     } else {
         // Annex B, or later MP4 with already-known parameters.
 
-        err = ff_h2645_packet_split(&priv->read_packet,
-                                    frag->data, frag->data_size,
-                                    ctx->log_ctx,
-                                    priv->mp4, priv->nal_length_size,
-                                    codec_id, 1, 1);
+        err = avpriv_h2645_packet_split(&priv->read_packet,
+                                        frag->data, frag->data_size,
+                                        ctx->log_ctx,
+                                        priv->mp4, priv->nal_length_size,
+                                        codec_id, 1, 1);
         if (err < 0)
             return err;
 
diff --git a/libavcodec/extract_extradata_bsf.c b/libavcodec/extract_extradata_bsf.c
index 17e5deb96b..01ef9bed2a 100644
--- a/libavcodec/extract_extradata_bsf.c
+++ b/libavcodec/extract_extradata_bsf.c
@@ -156,8 +156,8 @@  static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt,
         nb_extradata_nal_types = FF_ARRAY_ELEMS(extradata_nal_types_h264);
     }
 
-    ret = ff_h2645_packet_split(&s->h2645_pkt, pkt->data, pkt->size,
-                                ctx, 0, 0, ctx->par_in->codec_id, 1, 0);
+    ret = avpriv_h2645_packet_split(&s->h2645_pkt, pkt->data, pkt->size,
+                                    ctx, 0, 0, ctx->par_in->codec_id, 1, 0);
     if (ret < 0)
         return ret;
 
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 24658b3dfa..a20a262af1 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -385,9 +385,9 @@  fail:
     return;
 }
 
-int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
-                          void *logctx, int is_nalff, int nal_length_size,
-                          enum AVCodecID codec_id, int small_padding, int use_ref)
+int avpriv_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
+                              void *logctx, int is_nalff, int nal_length_size,
+                              enum AVCodecID codec_id, int small_padding, int use_ref)
 {
     GetByteContext bc;
     int consumed, ret = 0;
diff --git a/libavcodec/h2645_parse.h b/libavcodec/h2645_parse.h
index 2c29ca517c..c11e7a6d75 100644
--- a/libavcodec/h2645_parse.h
+++ b/libavcodec/h2645_parse.h
@@ -100,9 +100,9 @@  int ff_h2645_extract_rbsp(const uint8_t *src, int length, H2645RBSP *rbsp,
  * If use_ref is set, rbsp_buffer will be reference-counted and owned by
  * the underlying AVBuffer of rbsp_buffer_ref.
  */
-int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
-                          void *logctx, int is_nalff, int nal_length_size,
-                          enum AVCodecID codec_id, int small_padding, int use_ref);
+int avpriv_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
+                              void *logctx, int is_nalff, int nal_length_size,
+                              enum AVCodecID codec_id, int small_padding, int use_ref);
 
 /**
  * Free all the allocated memory in the packet.
diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
index a075443d17..d791ea838b 100644
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@ -364,7 +364,7 @@  static int decode_extradata_ps(const uint8_t *data, int size, H264ParamSets *ps,
     H2645Packet pkt = { 0 };
     int i, ret = 0;
 
-    ret = ff_h2645_packet_split(&pkt, data, size, logctx, is_avc, 2, AV_CODEC_ID_H264, 1, 0);
+    ret = avpriv_h2645_packet_split(&pkt, data, size, logctx, is_avc, 2, AV_CODEC_ID_H264, 1, 0);
     if (ret < 0) {
         ret = 0;
         goto fail;
@@ -374,7 +374,7 @@  static int decode_extradata_ps(const uint8_t *data, int size, H264ParamSets *ps,
         H2645NAL *nal = &pkt.nals[i];
         switch (nal->type) {
         case H264_NAL_SPS:
-            ret = ff_h264_decode_seq_parameter_set(&nal->gb, logctx, ps, 0);
+            ret = avpriv_h264_decode_seq_parameter_set(&nal->gb, logctx, ps, 0);
             if (ret < 0)
                 goto fail;
             break;
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 5f9a9c46ef..8e9a74be23 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -323,7 +323,7 @@  static inline int parse_nal_units(AVCodecParserContext *s,
 
         switch (nal.type) {
         case H264_NAL_SPS:
-            ff_h264_decode_seq_parameter_set(&nal.gb, avctx, &p->ps, 0);
+            avpriv_h264_decode_seq_parameter_set(&nal.gb, avctx, &p->ps, 0);
             break;
         case H264_NAL_PPS:
             ff_h264_decode_picture_parameter_set(&nal.gb, avctx, &p->ps,
@@ -343,7 +343,7 @@  static inline int parse_nal_units(AVCodecParserContext *s,
         case H264_NAL_SLICE:
             get_ue_golomb_long(&nal.gb);  // skip first_mb_in_slice
             slice_type   = get_ue_golomb_31(&nal.gb);
-            s->pict_type = ff_h264_golomb_to_pict_type[slice_type % 5];
+            s->pict_type = avpriv_h264_golomb_to_pict_type[slice_type % 5];
             if (p->sei.recovery_point.recovery_frame_cnt >= 0) {
                 /* key frame, since recovery_frame_cnt is set */
                 s->key_frame = 1;
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 17bfa780ce..980b1e189d 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -330,8 +330,8 @@  void ff_h264_ps_uninit(H264ParamSets *ps)
     ps->sps = NULL;
 }
 
-int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
-                                     H264ParamSets *ps, int ignore_truncation)
+int avpriv_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
+                                         H264ParamSets *ps, int ignore_truncation)
 {
     AVBufferRef *sps_buf;
     int profile_idc, level_idc, constraint_set_flags = 0;
diff --git a/libavcodec/h264_ps.h b/libavcodec/h264_ps.h
index e967b9cbcf..d422ce122e 100644
--- a/libavcodec/h264_ps.h
+++ b/libavcodec/h264_ps.h
@@ -149,8 +149,8 @@  typedef struct H264ParamSets {
 /**
  * Decode SPS
  */
-int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
-                                     H264ParamSets *ps, int ignore_truncation);
+int avpriv_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
+                                         H264ParamSets *ps, int ignore_truncation);
 
 /**
  * Decode PPS
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 1c9a270fb6..3258ad588d 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1751,7 +1751,7 @@  static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
     } else
         sl->slice_type_fixed = 0;
 
-    slice_type         = ff_h264_golomb_to_pict_type[slice_type];
+    slice_type         = avpriv_h264_golomb_to_pict_type[slice_type];
     sl->slice_type     = slice_type;
     sl->slice_type_nos = slice_type & 3;
 
diff --git a/libavcodec/h264data.c b/libavcodec/h264data.c
index a4c6d93cf0..91b388bded 100644
--- a/libavcodec/h264data.c
+++ b/libavcodec/h264data.c
@@ -34,7 +34,7 @@ 
 #include "h264dec.h"
 #include "h264data.h"
 
-const uint8_t ff_h264_golomb_to_pict_type[5] = {
+const uint8_t avpriv_h264_golomb_to_pict_type[5] = {
     AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, AV_PICTURE_TYPE_I,
     AV_PICTURE_TYPE_SP, AV_PICTURE_TYPE_SI
 };
diff --git a/libavcodec/h264data.h b/libavcodec/h264data.h
index 2968b08b7e..1e80fe3d01 100644
--- a/libavcodec/h264data.h
+++ b/libavcodec/h264data.h
@@ -23,7 +23,8 @@ 
 
 #include "h264dec.h"
 
-extern const uint8_t ff_h264_golomb_to_pict_type[5];
+extern const uint8_t avpriv_h264_golomb_to_pict_type[5];
+
 extern const uint8_t ff_h264_golomb_to_intra4x4_cbp[48];
 extern const uint8_t ff_h264_golomb_to_inter_cbp[48];
 
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 837c3b7538..93896413be 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -622,8 +622,8 @@  static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
             h->is_avc = 1;
     }
 
-    ret = ff_h2645_packet_split(&h->pkt, buf, buf_size, avctx, h->is_avc, h->nal_length_size,
-                                avctx->codec_id, avctx->flags2 & AV_CODEC_FLAG2_FAST, 0);
+    ret = avpriv_h2645_packet_split(&h->pkt, buf, buf_size, avctx, h->is_avc, h->nal_length_size,
+                                    avctx->codec_id, avctx->flags2 & AV_CODEC_FLAG2_FAST, 0);
     if (ret < 0) {
         av_log(avctx, AV_LOG_ERROR,
                "Error splitting the input into NAL units.\n");
@@ -716,14 +716,14 @@  static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
                 if (ret < 0)
                     goto end;
             }
-            if (ff_h264_decode_seq_parameter_set(&tmp_gb, avctx, &h->ps, 0) >= 0)
+            if (avpriv_h264_decode_seq_parameter_set(&tmp_gb, avctx, &h->ps, 0) >= 0)
                 break;
             av_log(h->avctx, AV_LOG_DEBUG,
                    "SPS decoding failure, trying again with the complete NAL\n");
             init_get_bits8(&tmp_gb, nal->raw_data + 1, nal->raw_size - 1);
-            if (ff_h264_decode_seq_parameter_set(&tmp_gb, avctx, &h->ps, 0) >= 0)
+            if (avpriv_h264_decode_seq_parameter_set(&tmp_gb, avctx, &h->ps, 0) >= 0)
                 break;
-            ff_h264_decode_seq_parameter_set(&nal->gb, avctx, &h->ps, 1);
+            avpriv_h264_decode_seq_parameter_set(&nal->gb, avctx, &h->ps, 1);
             break;
         }
         case H264_NAL_PPS:
diff --git a/libavcodec/hevc_parse.c b/libavcodec/hevc_parse.c
index dddb293df6..ac0bf09583 100644
--- a/libavcodec/hevc_parse.c
+++ b/libavcodec/hevc_parse.c
@@ -29,7 +29,7 @@  static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCParamSets
     int ret = 0;
     H2645Packet pkt = { 0 };
 
-    ret = ff_h2645_packet_split(&pkt, buf, buf_size, logctx, is_nalff,
+    ret = avpriv_h2645_packet_split(&pkt, buf, buf_size, logctx, is_nalff,
                                 nal_length_size, AV_CODEC_ID_HEVC, 1, 0);
     if (ret < 0) {
         goto done;
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index b444b99955..de927be84f 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -193,8 +193,8 @@  static int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
 
     ff_hevc_reset_sei(sei);
 
-    ret = ff_h2645_packet_split(&ctx->pkt, buf, buf_size, avctx, ctx->is_avc,
-                                ctx->nal_length_size, AV_CODEC_ID_HEVC, 1, 0);
+    ret = avpriv_h2645_packet_split(&ctx->pkt, buf, buf_size, avctx, ctx->is_avc,
+                                    ctx->nal_length_size, AV_CODEC_ID_HEVC, 1, 0);
     if (ret < 0)
         return ret;
 
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 857c10dd12..4e15e74067 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -3038,8 +3038,8 @@  static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
 
     /* split the input packet into NAL units, so we know the upper bound on the
      * number of slices in the frame */
-    ret = ff_h2645_packet_split(&s->pkt, buf, length, s->avctx, s->is_nalff,
-                                s->nal_length_size, s->avctx->codec_id, 1, 0);
+    ret = avpriv_h2645_packet_split(&s->pkt, buf, length, s->avctx, s->is_nalff,
+                                    s->nal_length_size, s->avctx->codec_id, 1, 0);
     if (ret < 0) {
         av_log(s->avctx, AV_LOG_ERROR,
                "Error splitting the input into NAL units.\n");
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 18a4448ffa..0fffd078dc 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1065,7 +1065,7 @@  static int svq3_decode_slice_header(AVCodecContext *avctx)
         return -1;
     }
 
-    s->slice_type = ff_h264_golomb_to_pict_type[slice_id];
+    s->slice_type = avpriv_h264_golomb_to_pict_type[slice_id];
 
     if ((header & 0x9F) == 2) {
         i = (s->mb_num < 64) ? 6 : (1 + av_log2(s->mb_num - 1));