Lines Matching refs:pic
128 static void xavs2_copy_frame_with_shift(xavs2_picture_t *pic, const AVFrame *frame, const int shift_in)
137 p_plane = (uint16_t *)pic->img.img_planes[plane];
139 for (hIdx = 0; hIdx < pic->img.i_lines[plane]; hIdx++) {
140 memset(p_plane, 0, pic->img.i_stride[plane]);
141 for (wIdx = 0; wIdx < pic->img.i_width[plane]; wIdx++) {
144 p_plane += pic->img.i_stride[plane];
150 static void xavs2_copy_frame(xavs2_picture_t *pic, const AVFrame *frame)
159 p_plane = pic->img.img_planes[plane];
161 stride = pic->img.i_width[plane] * pic->img.in_sample_size;
162 for (hIdx = 0; hIdx < pic->img.i_lines[plane]; hIdx++) {
164 p_plane += pic->img.i_stride[plane];
174 xavs2_picture_t pic;
179 if (cae->api->encoder_get_buffer(cae->encoder, &pic) < 0) {
186 if (pic.img.in_sample_size == pic.img.enc_sample_size) {
187 xavs2_copy_frame(&pic, frame);
190 xavs2_copy_frame_with_shift(&pic, frame, shift_in);
194 if (pic.img.in_sample_size == pic.img.enc_sample_size) {
195 xavs2_copy_frame(&pic, frame);
204 pic.i_state = 0;
205 pic.i_pts = frame->pts;
206 pic.i_type = XAVS2_TYPE_AUTO;
208 ret = cae->api->encoder_encode(cae->encoder, &pic, &cae->packet);