History

avcodec/ituh263enc: Inline value of h263_flv

It is always two when we encode FLV1.

Andreas Rheinhardt committed 1 year ago

Commit 532ae5d1 parent c660f453 files · +5 −10Browse files

Showing the changes to libavcodec (3 of 3 files). Show all

Unified · Split

3 files
  1. libavcodec/flvenc.c +1 −1
  2. libavcodec/ituh263enc.c +4 −8
  3. libavcodec/mpegvideo_enc.c +0 −1
libavcodec/flvenc.c+1−1
@@ -33,7 +33,7 @@ int ff_flv_encode_picture_header(MPVMainEncContext *const m) · 32 unmodified lines
3333
3434 put_bits(&s->pb, 17, 1);
3535 /* 0: H.263 escape codes 1: 11-bit escape codes */
36− put_bits(&s->pb, 5, (s->c.h263_flv - 1));
36+ put_bits(&s->pb, 5, 1);
3737 put_bits(&s->pb, 8,
3838 (((int64_t) s->c.picture_number * 30 * s->c.avctx->time_base.num) / // FIXME use timestamp
3939 s->c.avctx->time_base.den) & 0xff); /* TemporalReference */
libavcodec/ituh263enc.c+4−8
@@ -536,7 +536,7 @@ static void h263_encode_block(MPVEncContext *const s, int16_t block[], int n) · 535 unmodified lines
536536 code = get_rl_index(rl, last, run, level);
537537 put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
538538 if (code == rl->n) {
539− if (!CONFIG_FLV_ENCODER || s->c.h263_flv <= 1) {
539+ if (!CONFIG_FLV_ENCODER || s->c.codec_id != AV_CODEC_ID_FLV1) {
540540 put_bits(&s->pb, 1, last);
541541 put_bits(&s->pb, 6, run);
542542
@@ -861,13 +861,9 @@ av_cold void ff_h263_encode_init(MPVMainEncContext *const m) · 318 unmodified lines
861861 #if CONFIG_FLV_ENCODER
862862 case AV_CODEC_ID_FLV1:
863863 m->encode_picture_header = ff_flv_encode_picture_header;
864− if (s->c.h263_flv > 1) {
865− s->min_qcoeff= -1023;
866− s->max_qcoeff= 1023;
867− } else {
868− s->min_qcoeff= -127;
869− s->max_qcoeff= 127;
870− }
864+ /* format = 1; 11-bit codes */
865+ s->min_qcoeff = -1023;
866+ s->max_qcoeff = 1023;
871867 break;
872868 #endif
873869 default: //nothing needed - default table already set in mpegvideo.c
libavcodec/mpegvideo_enc.c+0−1
@@ -936,7 +936,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 935 unmodified lines
936936 break;
937937 case AV_CODEC_ID_FLV1:
938938 s->c.out_format = FMT_H263;
939− s->c.h263_flv = 2; /* format = 1; 11-bit codes */
940939 s->me.unrestricted_mv = 1;
941940 s->rtp_mode = 0; /* don't allow GOB */
942941 avctx->delay = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t