X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh264.h;h=cd4bf87690404df62042787677d807892eb5b9a0;hb=b0bfd09f88da8b7c7666faf0ac7d5e74559dba9f;hp=f31a0701eaf5d10acbf9135b4b121462f107f31c;hpb=5d1c2e53ab3ce27b48c138d22bb01ff8e8304f27;p=ffmpeg diff --git a/libavcodec/h264.h b/libavcodec/h264.h index f31a0701eaf..cd4bf876904 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -32,14 +32,19 @@ #include "cabac.h" #include "error_resilience.h" #include "get_bits.h" -#include "mpegvideo.h" #include "h264chroma.h" #include "h264dsp.h" #include "h264pred.h" #include "h264qpel.h" +#include "me_cmp.h" +#include "mpegutils.h" +#include "parser.h" +#include "qpeldsp.h" #include "rectangle.h" +#include "videodsp.h" #define H264_MAX_PICTURE_COUNT 32 +#define H264_MAX_THREADS 16 #define MAX_SPS_COUNT 32 #define MAX_PPS_COUNT 256 @@ -127,6 +132,7 @@ typedef enum { SEI_TYPE_USER_DATA_UNREGISTERED = 5, ///< unregistered user data SEI_TYPE_RECOVERY_POINT = 6, ///< recovery point (frame # to decoder sync) SEI_TYPE_FRAME_PACKING = 45, ///< frame packing arrangement + SEI_TYPE_DISPLAY_ORIENTATION = 47, ///< display orientation } SEI_Type; /** @@ -296,12 +302,11 @@ typedef struct H264Picture { */ typedef struct H264Context { AVCodecContext *avctx; - DSPContext dsp; + MECmpContext mecc; VideoDSPContext vdsp; H264DSPContext h264dsp; H264ChromaContext h264chroma; H264QpelContext h264qpel; - MotionEstContext me; ParseContext parse_context; GetBitContext gb; ERContext er; @@ -580,7 +585,7 @@ typedef struct H264Context { * @name Members for slice based multithreading * @{ */ - struct H264Context *thread_context[MAX_THREADS]; + struct H264Context *thread_context[H264_MAX_THREADS]; /** * current slice number, used to initalize slice_num of each thread/context @@ -629,6 +634,13 @@ typedef struct H264Context { int content_interpretation_type; int quincunx_subsampling; + /** + * display orientation SEI message + */ + int sei_display_orientation_present; + int sei_anticlockwise_rotation; + int sei_hflip, sei_vflip; + /** * Bit set of clock types for fields/frames in picture timing SEI message. * For each found ct_type, appropriate bit is set (e.g., bit 1 for @@ -692,6 +704,10 @@ typedef struct H264Context { AVBufferPool *mb_type_pool; AVBufferPool *motion_val_pool; AVBufferPool *ref_index_pool; + + /* Motion Estimation */ + qpel_mc_func (*qpel_put)[16]; + qpel_mc_func (*qpel_avg)[16]; } H264Context; extern const uint8_t ff_h264_chroma_qp[3][QP_MAX_NUM + 1]; ///< One chroma qp table for each supported bit depth (8, 9, 10). @@ -795,6 +811,8 @@ int ff_h264_decode_mb_cabac(H264Context *h); void ff_h264_init_cabac_states(H264Context *h); +void h264_init_dequant_tables(H264Context *h); + void ff_h264_direct_dist_scale_factor(H264Context *const h); void ff_h264_direct_ref_list_init(H264Context *const h); void ff_h264_pred_direct_motion(H264Context *const h, int *mb_type); @@ -1013,9 +1031,26 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h) 0x0001000100010001ULL)); } +int ff_h264_field_end(H264Context *h, int in_setup); + +int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src); +void ff_h264_unref_picture(H264Context *h, H264Picture *pic); + +int ff_h264_context_init(H264Context *h); +int ff_h264_set_parameter_from_sps(H264Context *h); + void ff_h264_draw_horiz_band(H264Context *h, int y, int height); int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc); int ff_pred_weight_table(H264Context *h); int ff_set_ref_count(H264Context *h); +int ff_h264_decode_slice_header(H264Context *h, H264Context *h0); +int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count); +int ff_h264_update_thread_context(AVCodecContext *dst, + const AVCodecContext *src); + +void ff_h264_flush_change(H264Context *h); + +void ff_h264_free_tables(H264Context *h, int free_rbsp); + #endif /* AVCODEC_H264_H */