diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-10-01 15:25:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-01 15:25:04 +0200 |
commit | 45c24f05d023a2cd8289ed40a13708392ce2e6a4 (patch) | |
tree | fef75d382fc6216a093eeaf80560473dff19d883 /media/ffvpx/libavcodec/mpegvideo.h | |
parent | 79b00fc33b5cb6d56d29b50efac6d62ce3a89018 (diff) | |
download | UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar.gz UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar.lz UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar.xz UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.zip |
Revert "Update ffvpx code to 4.0.2"
Diffstat (limited to 'media/ffvpx/libavcodec/mpegvideo.h')
-rw-r--r-- | media/ffvpx/libavcodec/mpegvideo.h | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/media/ffvpx/libavcodec/mpegvideo.h b/media/ffvpx/libavcodec/mpegvideo.h index 541909cbb..e9eb633d1 100644 --- a/media/ffvpx/libavcodec/mpegvideo.h +++ b/media/ffvpx/libavcodec/mpegvideo.h @@ -45,7 +45,6 @@ #include "mpegpicture.h" #include "mpegvideodsp.h" #include "mpegvideoencdsp.h" -#include "mpegvideodata.h" #include "pixblockdsp.h" #include "put_bits.h" #include "ratecontrol.h" @@ -72,8 +71,6 @@ #define SLICE_MAX_START_CODE 0x000001af #define EXT_START_CODE 0x000001b5 #define USER_START_CODE 0x000001b2 -#define SLICE_START_CODE 0x000001b7 - /** * MpegEncContext. @@ -255,6 +252,9 @@ typedef struct MpegEncContext { int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding uint8_t (*p_field_select_table[2]); uint8_t (*b_field_select_table[2][2]); +#if FF_API_MOTION_EST + int me_method; ///< ME algorithm +#endif int motion_est; ///< ME algorithm int me_penalty_compensation; int me_pre; ///< prepass for motion estimation @@ -381,8 +381,6 @@ typedef struct MpegEncContext { int custom_pcf; /* MPEG-4 specific */ - int studio_profile; - int dct_precision; ///< number of bits to represent the fractional part of time (encoder only) int time_increment_bits; int last_time_base; @@ -469,13 +467,6 @@ typedef struct MpegEncContext { int intra_vlc_format; int alternate_scan; int seq_disp_ext; - int video_format; -#define VIDEO_FORMAT_COMPONENT 0 -#define VIDEO_FORMAT_PAL 1 -#define VIDEO_FORMAT_NTSC 2 -#define VIDEO_FORMAT_SECAM 3 -#define VIDEO_FORMAT_MAC 4 -#define VIDEO_FORMAT_UNSPECIFIED 5 int repeat_first_field; int chroma_420_type; int chroma_format; @@ -506,10 +497,7 @@ typedef struct MpegEncContext { int16_t (*block)[64]; ///< points to one of the following blocks int16_t (*blocks)[12][64]; // for HQ mode we need to keep the best block - int (*decode_mb)(struct MpegEncContext *s, int16_t block[12][64]); // used by some codecs to avoid a switch() - - int32_t (*block32)[12][64]; - + int (*decode_mb)(struct MpegEncContext *s, int16_t block[6][64]); // used by some codecs to avoid a switch() #define SLICE_OK 0 #define SLICE_ERROR -1 #define SLICE_END -2 ///<end marker found @@ -711,6 +699,10 @@ void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h); void ff_mpeg_flush(AVCodecContext *avctx); void ff_print_debug_info(MpegEncContext *s, Picture *p, AVFrame *pict); +void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table, + uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2], + int *low_delay, + int mb_width, int mb_height, int mb_stride, int quarter_sample); int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type); @@ -737,8 +729,7 @@ void ff_mpv_motion(MpegEncContext *s, qpel_mc_func (*qpix_op)[16]); static inline void ff_update_block_index(MpegEncContext *s){ - const int bytes_per_pixel = 1 + (s->avctx->bits_per_raw_sample > 8); - const int block_size= (8*bytes_per_pixel) >> s->avctx->lowres; + const int block_size= 8 >> s->avctx->lowres; s->block_index[0]+=2; s->block_index[1]+=2; @@ -747,8 +738,8 @@ static inline void ff_update_block_index(MpegEncContext *s){ s->block_index[4]++; s->block_index[5]++; s->dest[0]+= 2*block_size; - s->dest[1]+= (2 >> s->chroma_x_shift) * block_size; - s->dest[2]+= (2 >> s->chroma_x_shift) * block_size; + s->dest[1]+= block_size; + s->dest[2]+= block_size; } static inline int get_bits_diff(MpegEncContext *s){ @@ -760,13 +751,4 @@ static inline int get_bits_diff(MpegEncContext *s){ return bits - last; } -static inline int mpeg_get_qscale(MpegEncContext *s) -{ - int qscale = get_bits(&s->gb, 5); - if (s->q_scale_type) - return ff_mpeg2_non_linear_qscale[qscale]; - else - return qscale << 1; -} - #endif /* AVCODEC_MPEGVIDEO_H */ |