#include "cabac_functions.h"
#include "golomb.h"
#include "hevc.h"
+#include "profiles.h"
const uint8_t ff_hevc_pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 };
slice_address_length = av_ceil_log2(s->ps.sps->ctb_width *
s->ps.sps->ctb_height);
- sh->slice_segment_addr = slice_address_length ? get_bits(gb, slice_address_length) : 0;
+ sh->slice_segment_addr = get_bitsz(gb, slice_address_length);
if (sh->slice_segment_addr >= s->ps.sps->ctb_width * s->ps.sps->ctb_height) {
av_log(s->avctx, AV_LOG_ERROR,
"Invalid slice segment address: %u.\n",
#define OFFSET(x) offsetof(HEVCContext, x)
#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
-static const AVProfile profiles[] = {
- { FF_PROFILE_HEVC_MAIN, "Main" },
- { FF_PROFILE_HEVC_MAIN_10, "Main 10" },
- { FF_PROFILE_HEVC_MAIN_STILL_PICTURE, "Main Still Picture" },
- { FF_PROFILE_HEVC_REXT, "Rext" },
- { FF_PROFILE_UNKNOWN },
-};
-
static const AVOption options[] = {
{ "apply_defdispwin", "Apply default display window from VUI", OFFSET(apply_defdispwin),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR },
.init_thread_copy = hevc_init_thread_copy,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
- .profiles = NULL_IF_CONFIG_SMALL(profiles),
+ .profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
};