Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -842,6 +842,9 @@ av_cold void ff_h263_encode_init(MPVMainEncContext *const m) · 841 unmodified lines | ||
| 842 | 842 | if (s->c.modified_quant) |
| 843 | 843 | s->c.chroma_qscale_table = ff_h263_chroma_qscale_table; |
| 844 | 844 | |
| 845 | + // Only used for H.263 and H.263+ | |
| 846 | + s->c.gob_index = H263_GOB_HEIGHT(s->c.height); | |
| 847 | + | |
| 845 | 848 | // use fcodes >1 only for MPEG-4 & H.263 & H.263+ FIXME |
| 846 | 849 | switch(s->c.codec_id){ |
| 847 | 850 | case AV_CODEC_ID_H263P: |
| @@ -3007,25 +3007,17 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 3006 unmodified lines | ||
| 3007 | 3007 | s->c.last_dc[0] = 128 * 8 / 13; |
| 3008 | 3008 | s->c.last_dc[1] = 128 * 8 / 14; |
| 3009 | 3009 | s->c.last_dc[2] = 128 * 8 / 14; |
| 3010 | +#if CONFIG_MPEG4_ENCODER | |
| 3011 | + } else if (s->c.partitioned_frame) { | |
| 3012 | + av_assert1(s->c.codec_id == AV_CODEC_ID_MPEG4); | |
| 3013 | + ff_mpeg4_init_partitions(s); | |
| 3014 | +#endif | |
| 3010 | 3015 | } |
| 3011 | 3016 | s->c.mb_skip_run = 0; |
| 3012 | 3017 | memset(s->c.last_mv, 0, sizeof(s->c.last_mv)); |
| 3013 | 3018 | |
| 3014 | 3019 | s->last_mv_dir = 0; |
| 3015 | 3020 | |
| 3016 | − switch (s->c.codec_id) { | |
| 3017 | − case AV_CODEC_ID_H263: | |
| 3018 | − case AV_CODEC_ID_H263P: | |
| 3019 | − case AV_CODEC_ID_FLV1: | |
| 3020 | − if (CONFIG_H263_ENCODER) | |
| 3021 | − s->c.gob_index = H263_GOB_HEIGHT(s->c.height); | |
| 3022 | − break; | |
| 3023 | − case AV_CODEC_ID_MPEG4: | |
| 3024 | − if (CONFIG_MPEG4_ENCODER && s->c.partitioned_frame) | |
| 3025 | − ff_mpeg4_init_partitions(s); | |
| 3026 | − break; | |
| 3027 | − } | |
| 3028 | − | |
| 3029 | 3021 | s->c.resync_mb_x = 0; |
| 3030 | 3022 | s->c.resync_mb_y = 0; |
| 3031 | 3023 | s->c.first_slice_line = 1; |