You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/ituh263enc: Inline value of h263_flv
It is always two when we encode FLV1. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -33,7 +33,7 @@ int ff_flv_encode_picture_header(MPVMainEncContext *const m)
|
|||||||
|
|
||||||
put_bits(&s->pb, 17, 1);
|
put_bits(&s->pb, 17, 1);
|
||||||
/* 0: H.263 escape codes 1: 11-bit escape codes */
|
/* 0: H.263 escape codes 1: 11-bit escape codes */
|
||||||
put_bits(&s->pb, 5, (s->c.h263_flv - 1));
|
put_bits(&s->pb, 5, 1);
|
||||||
put_bits(&s->pb, 8,
|
put_bits(&s->pb, 8,
|
||||||
(((int64_t) s->c.picture_number * 30 * s->c.avctx->time_base.num) / // FIXME use timestamp
|
(((int64_t) s->c.picture_number * 30 * s->c.avctx->time_base.num) / // FIXME use timestamp
|
||||||
s->c.avctx->time_base.den) & 0xff); /* TemporalReference */
|
s->c.avctx->time_base.den) & 0xff); /* TemporalReference */
|
||||||
|
@ -536,7 +536,7 @@ static void h263_encode_block(MPVEncContext *const s, int16_t block[], int n)
|
|||||||
code = get_rl_index(rl, last, run, level);
|
code = get_rl_index(rl, last, run, level);
|
||||||
put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
|
put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
|
||||||
if (code == rl->n) {
|
if (code == rl->n) {
|
||||||
if (!CONFIG_FLV_ENCODER || s->c.h263_flv <= 1) {
|
if (!CONFIG_FLV_ENCODER || s->c.codec_id != AV_CODEC_ID_FLV1) {
|
||||||
put_bits(&s->pb, 1, last);
|
put_bits(&s->pb, 1, last);
|
||||||
put_bits(&s->pb, 6, run);
|
put_bits(&s->pb, 6, run);
|
||||||
|
|
||||||
@ -861,13 +861,9 @@ av_cold void ff_h263_encode_init(MPVMainEncContext *const m)
|
|||||||
#if CONFIG_FLV_ENCODER
|
#if CONFIG_FLV_ENCODER
|
||||||
case AV_CODEC_ID_FLV1:
|
case AV_CODEC_ID_FLV1:
|
||||||
m->encode_picture_header = ff_flv_encode_picture_header;
|
m->encode_picture_header = ff_flv_encode_picture_header;
|
||||||
if (s->c.h263_flv > 1) {
|
/* format = 1; 11-bit codes */
|
||||||
s->min_qcoeff= -1023;
|
s->min_qcoeff = -1023;
|
||||||
s->max_qcoeff= 1023;
|
s->max_qcoeff = 1023;
|
||||||
} else {
|
|
||||||
s->min_qcoeff= -127;
|
|
||||||
s->max_qcoeff= 127;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default: //nothing needed - default table already set in mpegvideo.c
|
default: //nothing needed - default table already set in mpegvideo.c
|
||||||
|
@ -936,7 +936,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
|||||||
break;
|
break;
|
||||||
case AV_CODEC_ID_FLV1:
|
case AV_CODEC_ID_FLV1:
|
||||||
s->c.out_format = FMT_H263;
|
s->c.out_format = FMT_H263;
|
||||||
s->c.h263_flv = 2; /* format = 1; 11-bit codes */
|
|
||||||
s->me.unrestricted_mv = 1;
|
s->me.unrestricted_mv = 1;
|
||||||
s->rtp_mode = 0; /* don't allow GOB */
|
s->rtp_mode = 0; /* don't allow GOB */
|
||||||
avctx->delay = 0;
|
avctx->delay = 0;
|
||||||
|
Reference in New Issue
Block a user