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 "mpegvideodata.h"
|
||||||
#include "mpegvideoenc.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;
|
int format;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
#include "put_bits.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,
|
void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run,
|
||||||
int last);
|
int last);
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ typedef struct H261EncContext {
|
|||||||
} format;
|
} format;
|
||||||
} H261EncContext;
|
} 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;
|
H261EncContext *const h = (H261EncContext *)s;
|
||||||
int temp_ref;
|
int temp_ref;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
void ff_h261_reorder_mb_index(MpegEncContext *s);
|
void ff_h261_reorder_mb_index(MpegEncContext *s);
|
||||||
void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
||||||
int motion_x, int motion_y);
|
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);
|
int ff_h261_encode_init(MpegEncContext *s);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "mpegvideoenc.h"
|
#include "mpegvideoenc.h"
|
||||||
|
|
||||||
void ff_h263_encode_init(MpegEncContext *s);
|
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_gob_header(MpegEncContext * s, int mb_line);
|
||||||
void ff_h263_encode_mb(MpegEncContext *s,
|
void ff_h263_encode_mb(MpegEncContext *s,
|
||||||
int16_t block[6][64],
|
int16_t block[6][64],
|
||||||
|
@ -105,7 +105,7 @@ av_const int ff_h263_aspect_to_info(AVRational aspect){
|
|||||||
return FF_ASPECT_EXTENDED;
|
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 format, coded_frame_rate, coded_frame_rate_base, i, temp_ref;
|
||||||
int best_clock_code=1;
|
int best_clock_code=1;
|
||||||
|
@ -468,7 +468,7 @@ void ff_mpeg1_encode_slice_header(MpegEncContext *s)
|
|||||||
put_bits(&s->pb, 1, 0);
|
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;
|
MPEG12EncContext *const mpeg12 = (MPEG12EncContext*)s;
|
||||||
AVFrameSideData *side_data;
|
AVFrameSideData *side_data;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "mpegvideo.h"
|
#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],
|
void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64],
|
||||||
int motion_x, int motion_y);
|
int motion_x, int motion_y);
|
||||||
void ff_mpeg1_encode_init(MpegEncContext *s);
|
void ff_mpeg1_encode_init(MpegEncContext *s);
|
||||||
|
@ -1056,7 +1056,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* write MPEG-4 VOP header */
|
/* 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;
|
uint64_t time_incr;
|
||||||
int64_t time_div, time_mod;
|
int64_t time_div, time_mod;
|
||||||
|
@ -32,7 +32,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s,
|
|||||||
int16_t block[6][64],
|
int16_t block[6][64],
|
||||||
int motion_x, int motion_y);
|
int motion_x, int motion_y);
|
||||||
void ff_set_mpeg4_time(MpegEncContext *s);
|
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_encode_video_packet_header(MpegEncContext *s);
|
||||||
void ff_mpeg4_stuffing(PutBitContext *pbc);
|
void ff_mpeg4_stuffing(PutBitContext *pbc);
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
#define QMAT_SHIFT_MMX 16
|
#define QMAT_SHIFT_MMX 16
|
||||||
#define QMAT_SHIFT 21
|
#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 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 int sse_mb(MpegEncContext *s);
|
||||||
static void denoise_dct_c(MpegEncContext *s, int16_t *block);
|
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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
vbv_retry:
|
vbv_retry:
|
||||||
ret = encode_picture(s, s->picture_number);
|
ret = encode_picture(s);
|
||||||
if (growing_buffer) {
|
if (growing_buffer) {
|
||||||
av_assert0(s->pb.buf == avctx->internal->byte_buffer);
|
av_assert0(s->pb.buf == avctx->internal->byte_buffer);
|
||||||
pkt->data = s->pb.buf;
|
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 i, ret;
|
||||||
int bits;
|
int bits;
|
||||||
int context_count = s->slice_context_count;
|
int context_count = s->slice_context_count;
|
||||||
|
|
||||||
s->picture_number = picture_number;
|
|
||||||
|
|
||||||
/* Reset the average MB variance */
|
/* Reset the average MB variance */
|
||||||
s->me.mb_var_sum_temp =
|
s->me.mb_var_sum_temp =
|
||||||
s->me.mc_mb_var_sum_temp = 0;
|
s->me.mc_mb_var_sum_temp = 0;
|
||||||
@ -3788,32 +3786,32 @@ static int encode_picture(MpegEncContext *s, int picture_number)
|
|||||||
break;
|
break;
|
||||||
case FMT_H261:
|
case FMT_H261:
|
||||||
if (CONFIG_H261_ENCODER)
|
if (CONFIG_H261_ENCODER)
|
||||||
ff_h261_encode_picture_header(s, picture_number);
|
ff_h261_encode_picture_header(s);
|
||||||
break;
|
break;
|
||||||
case FMT_H263:
|
case FMT_H263:
|
||||||
if (CONFIG_WMV2_ENCODER && s->codec_id == AV_CODEC_ID_WMV2)
|
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)
|
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) {
|
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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
} else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) {
|
} 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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20)
|
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)
|
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)
|
else if (CONFIG_H263_ENCODER)
|
||||||
ff_h263_encode_picture_header(s, picture_number);
|
ff_h263_encode_picture_header(s);
|
||||||
break;
|
break;
|
||||||
case FMT_MPEG1:
|
case FMT_MPEG1:
|
||||||
if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
|
if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
|
||||||
ff_mpeg1_encode_picture_header(s, picture_number);
|
ff_mpeg1_encode_picture_header(s);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_assert0(0);
|
av_assert0(0);
|
||||||
|
@ -216,7 +216,7 @@ static void find_best_tables(MSMPEG4EncContext *ms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* write MSMPEG4 compatible frame header */
|
/* 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;
|
MSMPEG4EncContext *const ms = (MSMPEG4EncContext*)s;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ typedef struct MSMPEG4EncContext {
|
|||||||
} MSMPEG4EncContext;
|
} MSMPEG4EncContext;
|
||||||
|
|
||||||
void ff_msmpeg4_encode_init(MpegEncContext *s);
|
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_ext_header(MpegEncContext *s);
|
||||||
void ff_msmpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
void ff_msmpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
||||||
int motion_x, int motion_y);
|
int motion_x, int motion_y);
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
#include "rv10enc.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;
|
int full_frame= 0;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
|
|
||||||
int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number);
|
int ff_rv10_encode_picture_header(MpegEncContext *s);
|
||||||
void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number);
|
void ff_rv20_encode_picture_header(MpegEncContext *s);
|
||||||
|
|
||||||
#endif /* AVCODEC_RV10ENC_H */
|
#endif /* AVCODEC_RV10ENC_H */
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
#include "rv10enc.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, 2, s->pict_type); //I 0 vs. 1 ?
|
||||||
put_bits(&s->pb, 1, 0); /* unknown bit */
|
put_bits(&s->pb, 1, 0); /* unknown bit */
|
||||||
put_bits(&s->pb, 5, s->qscale);
|
put_bits(&s->pb, 5, s->qscale);
|
||||||
|
@ -93,7 +93,7 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
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;
|
WMV2EncContext *const w = (WMV2EncContext *) s;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "mpegvideo.h"
|
#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],
|
void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64],
|
||||||
int motion_x, int motion_y);
|
int motion_x, int motion_y);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user