You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avcodec/hevc: add ff_hevc_compute_poc2 which don't depend on HEVCSPS directly
So it can be used in other places like bsf.
This commit is contained in:
@@ -2443,9 +2443,9 @@ void ff_hevc_ps_uninit(HEVCParamSets *ps)
|
|||||||
av_refstruct_unref(&ps->pps_list[i]);
|
av_refstruct_unref(&ps->pps_list[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)
|
int ff_hevc_compute_poc2(unsigned log2_max_poc_lsb, int pocTid0, int poc_lsb, int nal_unit_type)
|
||||||
{
|
{
|
||||||
int max_poc_lsb = 1 << sps->log2_max_poc_lsb;
|
int max_poc_lsb = 1 << log2_max_poc_lsb;
|
||||||
int prev_poc_lsb = pocTid0 % max_poc_lsb;
|
int prev_poc_lsb = pocTid0 % max_poc_lsb;
|
||||||
int prev_poc_msb = pocTid0 - prev_poc_lsb;
|
int prev_poc_msb = pocTid0 - prev_poc_lsb;
|
||||||
int poc_msb;
|
int poc_msb;
|
||||||
|
|||||||
@@ -546,6 +546,11 @@ int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id,
|
|||||||
/**
|
/**
|
||||||
* Compute POC of the current frame and return it.
|
* Compute POC of the current frame and return it.
|
||||||
*/
|
*/
|
||||||
int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type);
|
int ff_hevc_compute_poc2(unsigned log2_max_poc_lsb, int pocTid0, int poc_lsb, int nal_unit_type);
|
||||||
|
|
||||||
|
static inline int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)
|
||||||
|
{
|
||||||
|
return ff_hevc_compute_poc2(sps->log2_max_poc_lsb, pocTid0, poc_lsb, nal_unit_type);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* AVCODEC_HEVC_PS_H */
|
#endif /* AVCODEC_HEVC_PS_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user