Lines Matching refs:s

89     JpegdSyntax *s = ctx->syntax;  in jpeg_judge_yuv_mode()  local
92 if (s->nb_components == 3) { in jpeg_judge_yuv_mode()
93 if (s->h_count[0] == 2 && s->v_count[0] == 2 && in jpeg_judge_yuv_mode()
94 s->h_count[1] == 1 && s->v_count[1] == 1 && in jpeg_judge_yuv_mode()
95 s->h_count[2] == 1 && s->v_count[2] == 1) { in jpeg_judge_yuv_mode()
97 s->yuv_mode = JPEGDEC_YUV420; in jpeg_judge_yuv_mode()
98 s->output_fmt = MPP_FMT_YUV420SP; in jpeg_judge_yuv_mode()
99 } else if (s->h_count[0] == 2 && s->v_count[0] == 1 && in jpeg_judge_yuv_mode()
100 s->h_count[1] == 1 && s->v_count[1] == 1 && in jpeg_judge_yuv_mode()
101 s->h_count[2] == 1 && s->v_count[2] == 1) { in jpeg_judge_yuv_mode()
103 s->yuv_mode = JPEGDEC_YUV422; in jpeg_judge_yuv_mode()
104 s->output_fmt = MPP_FMT_YUV422SP; in jpeg_judge_yuv_mode()
107 if ((s->height & 0xf) && ((s->height & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
108 s->fill_bottom = 1; in jpeg_judge_yuv_mode()
110 } else if (s->h_count[0] == 1 && s->v_count[0] == 2 && in jpeg_judge_yuv_mode()
111 s->h_count[1] == 1 && s->v_count[1] == 1 && in jpeg_judge_yuv_mode()
112 s->h_count[2] == 1 && s->v_count[2] == 1) { in jpeg_judge_yuv_mode()
114 s->yuv_mode = JPEGDEC_YUV440; in jpeg_judge_yuv_mode()
115 s->output_fmt = MPP_FMT_YUV440SP; in jpeg_judge_yuv_mode()
118 if ((s->width & 0xf) && ((s->width & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
119 s->fill_right = 1; in jpeg_judge_yuv_mode()
121 } else if (s->h_count[0] == 1 && s->v_count[0] == 1 && in jpeg_judge_yuv_mode()
122 s->h_count[1] == 1 && s->v_count[1] == 1 && in jpeg_judge_yuv_mode()
123 s->h_count[2] == 1 && s->v_count[2] == 1) { in jpeg_judge_yuv_mode()
125 s->yuv_mode = JPEGDEC_YUV444; in jpeg_judge_yuv_mode()
126 s->output_fmt = MPP_FMT_YUV444SP; in jpeg_judge_yuv_mode()
129 if ((s->width & 0xf) && ((s->width & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
130 s->fill_right = 1; in jpeg_judge_yuv_mode()
133 if ((s->height & 0xf) && ((s->height & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
134 s->fill_bottom = 1; in jpeg_judge_yuv_mode()
136 } else if (s->h_count[0] == 4 && s->v_count[0] == 1 && in jpeg_judge_yuv_mode()
137 s->h_count[1] == 1 && s->v_count[1] == 1 && in jpeg_judge_yuv_mode()
138 s->h_count[2] == 1 && s->v_count[2] == 1) { in jpeg_judge_yuv_mode()
140 s->yuv_mode = JPEGDEC_YUV411; in jpeg_judge_yuv_mode()
141 s->output_fmt = MPP_FMT_YUV411SP; in jpeg_judge_yuv_mode()
144 if ((s->height & 0xf) && ((s->height & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
145 s->fill_bottom = 1; in jpeg_judge_yuv_mode()
149 s->h_count[0], s->v_count[0], in jpeg_judge_yuv_mode()
150 s->h_count[1], s->v_count[1], in jpeg_judge_yuv_mode()
151 s->h_count[2], s->v_count[2]); in jpeg_judge_yuv_mode()
154 } else if (s->nb_components == 1) { in jpeg_judge_yuv_mode()
155 if (s->h_count[0] == s->v_count[0] && s->h_count[0] != 0) { in jpeg_judge_yuv_mode()
156 s->yuv_mode = JPEGDEC_YUV400; in jpeg_judge_yuv_mode()
157 s->output_fmt = MPP_FMT_YUV400; in jpeg_judge_yuv_mode()
159 if ((s->width & 0xf) && ((s->width & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
160 s->fill_right = 1; in jpeg_judge_yuv_mode()
163 if ((s->height & 0xf) && ((s->height & 0xf) <= 8)) { in jpeg_judge_yuv_mode()
164 s->fill_bottom = 1; in jpeg_judge_yuv_mode()
167 mpp_err_f("unsupported format(%d*%d)\n", s->h_count[0], in jpeg_judge_yuv_mode()
168 s->v_count[0]); in jpeg_judge_yuv_mode()
172 mpp_err_f("unsupported format, nb_components=%d\n", s->nb_components); in jpeg_judge_yuv_mode()
578 JpegdSyntax *s = ctx->syntax; in jpegd_decode_dri() local
587 READ_BITS(gb, 16, &s->restart_interval); in jpegd_decode_dri()
588 jpegd_dbg_marker("restart interval: %d\n", s->restart_interval); in jpegd_decode_dri()
602 JpegdSyntax *s = ctx->syntax; in jpegd_setup_default_dht() local
694 ac_ptr = &(s->ac_table[k]); in jpegd_setup_default_dht()
713 dc_ptr = &(s->dc_table[k]); in jpegd_setup_default_dht()
1054 JpegdSyntax *s = ctx->syntax; in jpegd_allocate_frame() local
1063 switch (s->yuv_mode) { in jpegd_allocate_frame()
1082 mpp_frame_set_width(output, s->width); in jpegd_allocate_frame()
1083 mpp_frame_set_height(output, s->height); in jpegd_allocate_frame()
1084 mpp_frame_set_hor_stride(output, s->hor_stride); in jpegd_allocate_frame()
1085 mpp_frame_set_ver_stride(output, s->ver_stride); in jpegd_allocate_frame()