mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/mpegvideo_enc: remove picture_number parameter from encode functions
They are unused. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
91c29cf934
commit
103617c93c
@ -25,7 +25,7 @@
|
||||
#include "mpegvideodata.h"
|
||||
#include "mpegvideoenc.h"
|
||||
|
||||
void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||
void ff_flv_encode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
int format;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "mpegvideo.h"
|
||||
#include "put_bits.h"
|
||||
|
||||
void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
void ff_flv_encode_picture_header(MpegEncContext *s);
|
||||
void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run,
|
||||
int last);
|
||||
|
||||
|
@ -52,7 +52,7 @@ typedef struct H261EncContext {
|
||||
} format;
|
||||
} H261EncContext;
|
||||
|
||||
void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||
void ff_h261_encode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
H261EncContext *const h = (H261EncContext *)s;
|
||||
int temp_ref;
|
||||
|
@ -33,7 +33,7 @@
|
||||
void ff_h261_reorder_mb_index(MpegEncContext *s);
|
||||
void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
||||
int motion_x, int motion_y);
|
||||
void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
void ff_h261_encode_picture_header(MpegEncContext *s);
|
||||
int ff_h261_encode_init(MpegEncContext *s);
|
||||
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "mpegvideoenc.h"
|
||||
|
||||
void ff_h263_encode_init(MpegEncContext *s);
|
||||
void ff_h263_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
void ff_h263_encode_picture_header(MpegEncContext *s);
|
||||
void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line);
|
||||
void ff_h263_encode_mb(MpegEncContext *s,
|
||||
int16_t block[6][64],
|
||||
|
@ -105,7 +105,7 @@ av_const int ff_h263_aspect_to_info(AVRational aspect){
|
||||
return FF_ASPECT_EXTENDED;
|
||||
}
|
||||
|
||||
void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
|
||||
void ff_h263_encode_picture_header(MpegEncContext * s)
|
||||
{
|
||||
int format, coded_frame_rate, coded_frame_rate_base, i, temp_ref;
|
||||
int best_clock_code=1;
|
||||
|
@ -468,7 +468,7 @@ void ff_mpeg1_encode_slice_header(MpegEncContext *s)
|
||||
put_bits(&s->pb, 1, 0);
|
||||
}
|
||||
|
||||
void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||
void ff_mpeg1_encode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
MPEG12EncContext *const mpeg12 = (MPEG12EncContext*)s;
|
||||
AVFrameSideData *side_data;
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "mpegvideo.h"
|
||||
|
||||
void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
void ff_mpeg1_encode_picture_header(MpegEncContext *s);
|
||||
void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64],
|
||||
int motion_x, int motion_y);
|
||||
void ff_mpeg1_encode_init(MpegEncContext *s);
|
||||
|
@ -1056,7 +1056,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
|
||||
}
|
||||
|
||||
/* write MPEG-4 VOP header */
|
||||
int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||
int ff_mpeg4_encode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
uint64_t time_incr;
|
||||
int64_t time_div, time_mod;
|
||||
|
@ -32,7 +32,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s,
|
||||
int16_t block[6][64],
|
||||
int motion_x, int motion_y);
|
||||
void ff_set_mpeg4_time(MpegEncContext *s);
|
||||
int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
int ff_mpeg4_encode_picture_header(MpegEncContext *s);
|
||||
|
||||
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s);
|
||||
void ff_mpeg4_stuffing(PutBitContext *pbc);
|
||||
|
@ -83,7 +83,7 @@
|
||||
#define QMAT_SHIFT_MMX 16
|
||||
#define QMAT_SHIFT 21
|
||||
|
||||
static int encode_picture(MpegEncContext *s, int picture_number);
|
||||
static int encode_picture(MpegEncContext *s);
|
||||
static int dct_quantize_refine(MpegEncContext *s, int16_t *block, int16_t *weight, int16_t *orig, int n, int qscale);
|
||||
static int sse_mb(MpegEncContext *s);
|
||||
static void denoise_dct_c(MpegEncContext *s, int16_t *block);
|
||||
@ -1795,7 +1795,7 @@ int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
vbv_retry:
|
||||
ret = encode_picture(s, s->picture_number);
|
||||
ret = encode_picture(s);
|
||||
if (growing_buffer) {
|
||||
av_assert0(s->pb.buf == avctx->internal->byte_buffer);
|
||||
pkt->data = s->pb.buf;
|
||||
@ -3556,14 +3556,12 @@ static void set_frame_distances(MpegEncContext * s){
|
||||
}
|
||||
}
|
||||
|
||||
static int encode_picture(MpegEncContext *s, int picture_number)
|
||||
static int encode_picture(MpegEncContext *s)
|
||||
{
|
||||
int i, ret;
|
||||
int bits;
|
||||
int context_count = s->slice_context_count;
|
||||
|
||||
s->picture_number = picture_number;
|
||||
|
||||
/* Reset the average MB variance */
|
||||
s->me.mb_var_sum_temp =
|
||||
s->me.mc_mb_var_sum_temp = 0;
|
||||
@ -3788,32 +3786,32 @@ static int encode_picture(MpegEncContext *s, int picture_number)
|
||||
break;
|
||||
case FMT_H261:
|
||||
if (CONFIG_H261_ENCODER)
|
||||
ff_h261_encode_picture_header(s, picture_number);
|
||||
ff_h261_encode_picture_header(s);
|
||||
break;
|
||||
case FMT_H263:
|
||||
if (CONFIG_WMV2_ENCODER && s->codec_id == AV_CODEC_ID_WMV2)
|
||||
ff_wmv2_encode_picture_header(s, picture_number);
|
||||
ff_wmv2_encode_picture_header(s);
|
||||
else if (CONFIG_MSMPEG4ENC && s->msmpeg4_version)
|
||||
ff_msmpeg4_encode_picture_header(s, picture_number);
|
||||
ff_msmpeg4_encode_picture_header(s);
|
||||
else if (CONFIG_MPEG4_ENCODER && s->h263_pred) {
|
||||
ret = ff_mpeg4_encode_picture_header(s, picture_number);
|
||||
ret = ff_mpeg4_encode_picture_header(s);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
} else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) {
|
||||
ret = ff_rv10_encode_picture_header(s, picture_number);
|
||||
ret = ff_rv10_encode_picture_header(s);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20)
|
||||
ff_rv20_encode_picture_header(s, picture_number);
|
||||
ff_rv20_encode_picture_header(s);
|
||||
else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1)
|
||||
ff_flv_encode_picture_header(s, picture_number);
|
||||
ff_flv_encode_picture_header(s);
|
||||
else if (CONFIG_H263_ENCODER)
|
||||
ff_h263_encode_picture_header(s, picture_number);
|
||||
ff_h263_encode_picture_header(s);
|
||||
break;
|
||||
case FMT_MPEG1:
|
||||
if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
|
||||
ff_mpeg1_encode_picture_header(s, picture_number);
|
||||
ff_mpeg1_encode_picture_header(s);
|
||||
break;
|
||||
default:
|
||||
av_assert0(0);
|
||||
|
@ -216,7 +216,7 @@ static void find_best_tables(MSMPEG4EncContext *ms)
|
||||
}
|
||||
|
||||
/* write MSMPEG4 compatible frame header */
|
||||
void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
|
||||
void ff_msmpeg4_encode_picture_header(MpegEncContext * s)
|
||||
{
|
||||
MSMPEG4EncContext *const ms = (MSMPEG4EncContext*)s;
|
||||
|
||||
|
@ -34,7 +34,7 @@ typedef struct MSMPEG4EncContext {
|
||||
} MSMPEG4EncContext;
|
||||
|
||||
void ff_msmpeg4_encode_init(MpegEncContext *s);
|
||||
void ff_msmpeg4_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
void ff_msmpeg4_encode_picture_header(MpegEncContext *s);
|
||||
void ff_msmpeg4_encode_ext_header(MpegEncContext *s);
|
||||
void ff_msmpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
||||
int motion_x, int motion_y);
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "put_bits.h"
|
||||
#include "rv10enc.h"
|
||||
|
||||
int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||
int ff_rv10_encode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
int full_frame= 0;
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "mpegvideo.h"
|
||||
|
||||
int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||
int ff_rv10_encode_picture_header(MpegEncContext *s);
|
||||
void ff_rv20_encode_picture_header(MpegEncContext *s);
|
||||
|
||||
#endif /* AVCODEC_RV10ENC_H */
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "put_bits.h"
|
||||
#include "rv10enc.h"
|
||||
|
||||
void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number){
|
||||
void ff_rv20_encode_picture_header(MpegEncContext *s) {
|
||||
put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ?
|
||||
put_bits(&s->pb, 1, 0); /* unknown bit */
|
||||
put_bits(&s->pb, 5, s->qscale);
|
||||
|
@ -93,7 +93,7 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ff_wmv2_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||
int ff_wmv2_encode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
WMV2EncContext *const w = (WMV2EncContext *) s;
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "mpegvideo.h"
|
||||
|
||||
int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number);
|
||||
int ff_wmv2_encode_picture_header(MpegEncContext * s);
|
||||
void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64],
|
||||
int motion_x, int motion_y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user