esp32p4/h264/
a_deci_score_offset.rs

1#[doc = "Register `A_DECI_SCORE_OFFSET` reader"]
2pub type R = crate::R<A_DECI_SCORE_OFFSET_SPEC>;
3#[doc = "Register `A_DECI_SCORE_OFFSET` writer"]
4pub type W = crate::W<A_DECI_SCORE_OFFSET_SPEC>;
5#[doc = "Field `A_I16X16_DECI_SCORE_OFFSET` reader - Configures video A i16x16 MB decimate score offset. This offset will be added to i16x16 MB score."]
6pub type A_I16X16_DECI_SCORE_OFFSET_R = crate::FieldReader;
7#[doc = "Field `A_I16X16_DECI_SCORE_OFFSET` writer - Configures video A i16x16 MB decimate score offset. This offset will be added to i16x16 MB score."]
8pub type A_I16X16_DECI_SCORE_OFFSET_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
9#[doc = "Field `A_I_CHROMA_DECI_SCORE_OFFSET` reader - Configures video A I chroma MB decimate score offset. This offset will be added to I chroma MB score."]
10pub type A_I_CHROMA_DECI_SCORE_OFFSET_R = crate::FieldReader;
11#[doc = "Field `A_I_CHROMA_DECI_SCORE_OFFSET` writer - Configures video A I chroma MB decimate score offset. This offset will be added to I chroma MB score."]
12pub type A_I_CHROMA_DECI_SCORE_OFFSET_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
13#[doc = "Field `A_P16X16_DECI_SCORE_OFFSET` reader - Configures video A p16x16 MB decimate score offset. This offset will be added to p16x16 MB score."]
14pub type A_P16X16_DECI_SCORE_OFFSET_R = crate::FieldReader;
15#[doc = "Field `A_P16X16_DECI_SCORE_OFFSET` writer - Configures video A p16x16 MB decimate score offset. This offset will be added to p16x16 MB score."]
16pub type A_P16X16_DECI_SCORE_OFFSET_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
17#[doc = "Field `A_P_CHROMA_DECI_SCORE_OFFSET` reader - Configures video A p chroma MB decimate score offset. This offset will be added to p chroma MB score."]
18pub type A_P_CHROMA_DECI_SCORE_OFFSET_R = crate::FieldReader;
19#[doc = "Field `A_P_CHROMA_DECI_SCORE_OFFSET` writer - Configures video A p chroma MB decimate score offset. This offset will be added to p chroma MB score."]
20pub type A_P_CHROMA_DECI_SCORE_OFFSET_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
21impl R {
22    #[doc = "Bits 0:5 - Configures video A i16x16 MB decimate score offset. This offset will be added to i16x16 MB score."]
23    #[inline(always)]
24    pub fn a_i16x16_deci_score_offset(&self) -> A_I16X16_DECI_SCORE_OFFSET_R {
25        A_I16X16_DECI_SCORE_OFFSET_R::new((self.bits & 0x3f) as u8)
26    }
27    #[doc = "Bits 6:11 - Configures video A I chroma MB decimate score offset. This offset will be added to I chroma MB score."]
28    #[inline(always)]
29    pub fn a_i_chroma_deci_score_offset(&self) -> A_I_CHROMA_DECI_SCORE_OFFSET_R {
30        A_I_CHROMA_DECI_SCORE_OFFSET_R::new(((self.bits >> 6) & 0x3f) as u8)
31    }
32    #[doc = "Bits 12:17 - Configures video A p16x16 MB decimate score offset. This offset will be added to p16x16 MB score."]
33    #[inline(always)]
34    pub fn a_p16x16_deci_score_offset(&self) -> A_P16X16_DECI_SCORE_OFFSET_R {
35        A_P16X16_DECI_SCORE_OFFSET_R::new(((self.bits >> 12) & 0x3f) as u8)
36    }
37    #[doc = "Bits 18:23 - Configures video A p chroma MB decimate score offset. This offset will be added to p chroma MB score."]
38    #[inline(always)]
39    pub fn a_p_chroma_deci_score_offset(&self) -> A_P_CHROMA_DECI_SCORE_OFFSET_R {
40        A_P_CHROMA_DECI_SCORE_OFFSET_R::new(((self.bits >> 18) & 0x3f) as u8)
41    }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46        f.debug_struct("A_DECI_SCORE_OFFSET")
47            .field(
48                "a_i16x16_deci_score_offset",
49                &format_args!("{}", self.a_i16x16_deci_score_offset().bits()),
50            )
51            .field(
52                "a_i_chroma_deci_score_offset",
53                &format_args!("{}", self.a_i_chroma_deci_score_offset().bits()),
54            )
55            .field(
56                "a_p16x16_deci_score_offset",
57                &format_args!("{}", self.a_p16x16_deci_score_offset().bits()),
58            )
59            .field(
60                "a_p_chroma_deci_score_offset",
61                &format_args!("{}", self.a_p_chroma_deci_score_offset().bits()),
62            )
63            .finish()
64    }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<A_DECI_SCORE_OFFSET_SPEC> {
68    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
69        core::fmt::Debug::fmt(&self.read(), f)
70    }
71}
72impl W {
73    #[doc = "Bits 0:5 - Configures video A i16x16 MB decimate score offset. This offset will be added to i16x16 MB score."]
74    #[inline(always)]
75    #[must_use]
76    pub fn a_i16x16_deci_score_offset(
77        &mut self,
78    ) -> A_I16X16_DECI_SCORE_OFFSET_W<A_DECI_SCORE_OFFSET_SPEC> {
79        A_I16X16_DECI_SCORE_OFFSET_W::new(self, 0)
80    }
81    #[doc = "Bits 6:11 - Configures video A I chroma MB decimate score offset. This offset will be added to I chroma MB score."]
82    #[inline(always)]
83    #[must_use]
84    pub fn a_i_chroma_deci_score_offset(
85        &mut self,
86    ) -> A_I_CHROMA_DECI_SCORE_OFFSET_W<A_DECI_SCORE_OFFSET_SPEC> {
87        A_I_CHROMA_DECI_SCORE_OFFSET_W::new(self, 6)
88    }
89    #[doc = "Bits 12:17 - Configures video A p16x16 MB decimate score offset. This offset will be added to p16x16 MB score."]
90    #[inline(always)]
91    #[must_use]
92    pub fn a_p16x16_deci_score_offset(
93        &mut self,
94    ) -> A_P16X16_DECI_SCORE_OFFSET_W<A_DECI_SCORE_OFFSET_SPEC> {
95        A_P16X16_DECI_SCORE_OFFSET_W::new(self, 12)
96    }
97    #[doc = "Bits 18:23 - Configures video A p chroma MB decimate score offset. This offset will be added to p chroma MB score."]
98    #[inline(always)]
99    #[must_use]
100    pub fn a_p_chroma_deci_score_offset(
101        &mut self,
102    ) -> A_P_CHROMA_DECI_SCORE_OFFSET_W<A_DECI_SCORE_OFFSET_SPEC> {
103        A_P_CHROMA_DECI_SCORE_OFFSET_W::new(self, 18)
104    }
105}
106#[doc = "Video A luma and chroma MB decimate score offset Register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`a_deci_score_offset::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`a_deci_score_offset::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
107pub struct A_DECI_SCORE_OFFSET_SPEC;
108impl crate::RegisterSpec for A_DECI_SCORE_OFFSET_SPEC {
109    type Ux = u32;
110}
111#[doc = "`read()` method returns [`a_deci_score_offset::R`](R) reader structure"]
112impl crate::Readable for A_DECI_SCORE_OFFSET_SPEC {}
113#[doc = "`write(|w| ..)` method takes [`a_deci_score_offset::W`](W) writer structure"]
114impl crate::Writable for A_DECI_SCORE_OFFSET_SPEC {
115    type Safety = crate::Unsafe;
116    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
117    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
118}
119#[doc = "`reset()` method sets A_DECI_SCORE_OFFSET to value 0"]
120impl crate::Resettable for A_DECI_SCORE_OFFSET_SPEC {
121    const RESET_VALUE: u32 = 0;
122}