提交 fd124d83 编写于 作者: A Anton Khirnov

hevc_ps: split the code for parsing the SPS and exporting it into the context

This will be useful in the later commits, where we want to parse an SPS
without having a whole decoding context.
上级 0e7c0ec3
......@@ -594,7 +594,7 @@ static int hls_slice_header(HEVCContext *s)
sh->short_term_ref_pic_set_sps_flag = get_bits1(gb);
if (!sh->short_term_ref_pic_set_sps_flag) {
int pos = get_bits_left(gb);
ret = ff_hevc_decode_short_term_rps(s, &sh->slice_rps, s->sps, 1);
ret = ff_hevc_decode_short_term_rps(gb, s->avctx, &sh->slice_rps, s->sps, 1);
if (ret < 0)
return ret;
......
......@@ -863,8 +863,21 @@ typedef struct HEVCContext {
int sei_hflip, sei_vflip;
} HEVCContext;
int ff_hevc_decode_short_term_rps(HEVCContext *s, ShortTermRPS *rps,
const HEVCSPS *sps, int is_slice_header);
int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx,
ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header);
/**
* Parse the SPS from the bitstream into the provided HEVCSPS struct.
*
* @param sps_id the SPS id will be written here
* @param apply_defdispwin if set 1, the default display window from the VUI
* will be applied to the video dimensions
* @param vps_list if non-NULL, this function will validate that the SPS refers
* to an existing VPS
*/
int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx);
int ff_hevc_decode_nal_vps(HEVCContext *s);
int ff_hevc_decode_nal_sps(HEVCContext *s);
int ff_hevc_decode_nal_pps(HEVCContext *s);
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册