Skip to content

Commit

Permalink
struct Rav1dContext::segmap_pool: Remove (for now) now-unused `segm…
Browse files Browse the repository at this point in the history
…ap_pool` now that `segmap`s have been `Arc`ified.
  • Loading branch information
kkysen committed Apr 16, 2024
1 parent 293b6bf commit 60a1427
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ pub struct Rav1dContext {
pub(crate) task_thread: Arc<TaskThreadData>,

// reference/entropy state
pub(crate) segmap_pool: *mut Rav1dMemPool,
pub(crate) refmvs_pool: *mut Rav1dMemPool,
pub(crate) refs: [Rav1dContext_refs; 8],
pub(crate) cdf_pool: *mut Rav1dMemPool,
Expand Down Expand Up @@ -717,7 +716,7 @@ pub(crate) struct Rav1dFrameData {
pub mvs: *mut refmvs_temporal_block,
pub ref_mvs: [*mut refmvs_temporal_block; 7],
pub ref_mvs_ref: [*mut Rav1dRef; 7],
pub cur_segmap: Option<DisjointMutArcSlice<u8>>,
pub cur_segmap: Option<DisjointMutArcSlice<u8>>, // Previously pooled.
pub prev_segmap: Option<DisjointMutArcSlice<u8>>,
pub refpoc: [c_uint; 7],
pub refrefpoc: [[c_uint; 7]; 7],
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ pub(crate) unsafe fn rav1d_open(c_out: &mut *mut Rav1dContext, s: &Rav1dSettings
(*c).inloop_filters = s.inloop_filters;
(*c).decode_frame_type = s.decode_frame_type;
(*c).cached_error_props = Default::default();
if rav1d_mem_pool_init(&mut (*c).segmap_pool).is_err()
|| rav1d_mem_pool_init(&mut (*c).refmvs_pool).is_err()
if rav1d_mem_pool_init(&mut (*c).refmvs_pool).is_err()
|| rav1d_mem_pool_init(&mut (*c).cdf_pool).is_err()
{
return error(c, c_out);
Expand Down Expand Up @@ -862,7 +861,6 @@ impl Drop for Rav1dContext {
let _ = mem::take(&mut self.mastering_display);
let _ = mem::take(&mut self.content_light);
let _ = mem::take(&mut self.itut_t35);
rav1d_mem_pool_end(self.segmap_pool);
rav1d_mem_pool_end(self.refmvs_pool);
rav1d_mem_pool_end(self.cdf_pool);
rav1d_mem_pool_end(self.picture_pool);
Expand Down

0 comments on commit 60a1427

Please sign in to comment.