put_bits: make avpriv_put_string() lavc-local

It has not been used outside of libavcodec since
20f325f320c6e18ee88983870d2a1fee94257293
This commit is contained in:
Anton Khirnov 2020-10-26 13:41:39 +01:00
parent 717503f716
commit 944ba30db0
6 changed files with 10 additions and 11 deletions

View File

@ -85,7 +85,7 @@ static void put_pce(PutBitContext *pb, AVCodecContext *avctx)
align_put_bits(pb); align_put_bits(pb);
put_bits(pb, 8, strlen(aux_data)); put_bits(pb, 8, strlen(aux_data));
avpriv_put_string(pb, aux_data, 0); ff_put_string(pb, aux_data, 0);
} }
/** /**

View File

@ -52,8 +52,7 @@ void avpriv_align_put_bits(PutBitContext *s)
} }
#endif #endif
void avpriv_put_string(PutBitContext *pb, const char *string, void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
int terminate_string)
{ {
while (*string) { while (*string) {
put_bits(pb, 8, *string); put_bits(pb, 8, *string);

View File

@ -181,7 +181,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
/* JFIF header */ /* JFIF header */
put_marker(p, APP0); put_marker(p, APP0);
put_bits(p, 16, 16); put_bits(p, 16, 16);
avpriv_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */ ff_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
/* The most significant byte is used for major revisions, the least /* The most significant byte is used for major revisions, the least
* significant byte for minor revisions. Version 1.02 is the current * significant byte for minor revisions. Version 1.02 is the current
* released revision. */ * released revision. */
@ -199,7 +199,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
flush_put_bits(p); flush_put_bits(p);
ptr = put_bits_ptr(p); ptr = put_bits_ptr(p);
put_bits(p, 16, 0); /* patched later */ put_bits(p, 16, 0); /* patched later */
avpriv_put_string(p, LIBAVCODEC_IDENT, 1); ff_put_string(p, LIBAVCODEC_IDENT, 1);
size = strlen(LIBAVCODEC_IDENT)+3; size = strlen(LIBAVCODEC_IDENT)+3;
AV_WB16(ptr, size); AV_WB16(ptr, size);
} }
@ -212,7 +212,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
flush_put_bits(p); flush_put_bits(p);
ptr = put_bits_ptr(p); ptr = put_bits_ptr(p);
put_bits(p, 16, 0); /* patched later */ put_bits(p, 16, 0); /* patched later */
avpriv_put_string(p, "CS=ITU601", 1); ff_put_string(p, "CS=ITU601", 1);
size = strlen("CS=ITU601")+3; size = strlen("CS=ITU601")+3;
AV_WB16(ptr, size); AV_WB16(ptr, size);
} }

View File

@ -1054,7 +1054,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
if (!(s->avctx->flags & AV_CODEC_FLAG_BITEXACT)) { if (!(s->avctx->flags & AV_CODEC_FLAG_BITEXACT)) {
put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x1B2); /* user_data */ put_bits(&s->pb, 16, 0x1B2); /* user_data */
avpriv_put_string(&s->pb, LIBAVCODEC_IDENT, 0); ff_put_string(&s->pb, LIBAVCODEC_IDENT, 0);
} }
} }

View File

@ -152,7 +152,7 @@ void avpriv_align_put_bits(PutBitContext *s);
#endif #endif
#ifdef BITSTREAM_WRITER_LE #ifdef BITSTREAM_WRITER_LE
#define avpriv_put_string ff_put_string_unsupported_here #define ff_put_string ff_put_string_unsupported_here
#define avpriv_copy_bits avpriv_copy_bits_unsupported_here #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
#else #else
@ -161,7 +161,7 @@ void avpriv_align_put_bits(PutBitContext *s);
* *
* @param terminate_string 0-terminates the written string if value is 1 * @param terminate_string 0-terminates the written string if value is 1
*/ */
void avpriv_put_string(PutBitContext *pb, const char *string, void ff_put_string(PutBitContext *pb, const char *string,
int terminate_string); int terminate_string);
/** /**

View File

@ -234,7 +234,7 @@ static void encode_parse_info(VC2EncContext *s, enum DiracParseCodes pcode)
cur_pos = put_bits_count(&s->pb) >> 3; cur_pos = put_bits_count(&s->pb) >> 3;
/* Magic string */ /* Magic string */
avpriv_put_string(&s->pb, "BBCD", 0); ff_put_string(&s->pb, "BBCD", 0);
/* Parse code */ /* Parse code */
put_bits(&s->pb, 8, pcode); put_bits(&s->pb, 8, pcode);
@ -931,7 +931,7 @@ static int encode_frame(VC2EncContext *s, AVPacket *avpkt, const AVFrame *frame,
/* Encoder version */ /* Encoder version */
if (aux_data) { if (aux_data) {
encode_parse_info(s, DIRAC_PCODE_AUX); encode_parse_info(s, DIRAC_PCODE_AUX);
avpriv_put_string(&s->pb, aux_data, 1); ff_put_string(&s->pb, aux_data, 1);
} }
/* Picture header */ /* Picture header */