diff mbox

[FFmpeg-devel,v3,1/2] libavcodec/dnxhd: change ff_dnxhd_get_hr_frame_size to avpriv_

Message ID 20180907080313.25744-2-jay@wizardofthenet.com
State Superseded
Headers show

Commit Message

jay@wizardofthenet.com Sept. 7, 2018, 8:03 a.m. UTC
change ff_dnxhd_get_hr_frame_size to avpriv_dnxhd_get_hr_frame_size, to allow cross library usage in libavformat/mxfenc

Signed-off-by: Jason Stevens <jay@wizardofthenet.com>
---
 libavcodec/dnxhd_parser.c | 2 +-
 libavcodec/dnxhddata.h    | 2 +-
 libavcodec/dnxhdenc.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Michael Niedermayer Sept. 8, 2018, 12:54 a.m. UTC | #1
On Fri, Sep 07, 2018 at 01:03:12AM -0700, Jason Stevens wrote:
> change ff_dnxhd_get_hr_frame_size to avpriv_dnxhd_get_hr_frame_size, to allow cross library usage in libavformat/mxfenc
> 
> Signed-off-by: Jason Stevens <jay@wizardofthenet.com>
> ---
>  libavcodec/dnxhd_parser.c | 2 +-
>  libavcodec/dnxhddata.h    | 2 +-
>  libavcodec/dnxhdenc.c     | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
[...]

> diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h
> index f80ce18f3c..9dd352c242 100644
> --- a/libavcodec/dnxhddata.h
> +++ b/libavcodec/dnxhddata.h
> @@ -90,7 +90,7 @@ static av_always_inline uint64_t ff_dnxhd_parse_header_prefix(const uint8_t *buf
>      return ff_dnxhd_check_header_prefix(prefix);
>  }
>  
> -static av_always_inline int ff_dnxhd_get_hr_frame_size(int cid, int w, int h)
> +static av_always_inline int avpriv_dnxhd_get_hr_frame_size(int cid, int w, int h)
>  {
>      int result, i = ff_dnxhd_get_cid_table(cid);

this does not work
ff_dnxhd_get_cid_table() for example is not available outside libavcodec
but would be referenced from outside as this is a inline function


[...]
diff mbox

Patch

diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c
index 79ca1d6718..7c16e251a4 100644
--- a/libavcodec/dnxhd_parser.c
+++ b/libavcodec/dnxhd_parser.c
@@ -75,7 +75,7 @@  static int dnxhd_find_frame_end(DNXHDParserContext *dctx,
 
                 remaining = avpriv_dnxhd_get_frame_size(cid);
                 if (remaining <= 0) {
-                    remaining = ff_dnxhd_get_hr_frame_size(cid, dctx->w, dctx->h);
+                    remaining = avpriv_dnxhd_get_hr_frame_size(cid, dctx->w, dctx->h);
                     if (remaining <= 0)
                         continue;
                 }
diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h
index f80ce18f3c..9dd352c242 100644
--- a/libavcodec/dnxhddata.h
+++ b/libavcodec/dnxhddata.h
@@ -90,7 +90,7 @@  static av_always_inline uint64_t ff_dnxhd_parse_header_prefix(const uint8_t *buf
     return ff_dnxhd_check_header_prefix(prefix);
 }
 
-static av_always_inline int ff_dnxhd_get_hr_frame_size(int cid, int w, int h)
+static av_always_inline int avpriv_dnxhd_get_hr_frame_size(int cid, int w, int h)
 {
     int result, i = ff_dnxhd_get_cid_table(cid);
 
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 9325f38baf..41b8079a09 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -482,7 +482,7 @@  static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
     ctx->m.mb_num = ctx->m.mb_height * ctx->m.mb_width;
 
     if (ctx->cid_table->frame_size == DNXHD_VARIABLE) {
-        ctx->frame_size = ff_dnxhd_get_hr_frame_size(ctx->cid,
+        ctx->frame_size = avpriv_dnxhd_get_hr_frame_size(ctx->cid,
                                                      avctx->width, avctx->height);
         av_assert0(ctx->frame_size >= 0);
         ctx->coding_unit_size = ctx->frame_size;