History

lavc: Add new VDA hwaccel

It leverages the new hwaccel 1.2 features: - get_buffer2 is never called - the internal context is automatically initialized/deinitialized

Anton Khirnov committed 12 years ago

Commit 67afcef1 parent 31a46758 files · +414 −7Browse files

Unified · Split

8 files
  1. configure +2 −0
  2. libavcodec/Makefile +1 −0
  3. libavcodec/allcodecs.c +1 −0
  4. libavcodec/h264_slice.c +2 −0
  5. libavcodec/vda.c +72 −0
  6. libavcodec/vda.h +53 −0
  7. libavcodec/vda_h264.c +250 −7
  8. libavcodec/vda_internal.h +33 −0
configure+2−0
@@ -1896,6 +1896,8 @@ h264_vaapi_hwaccel_deps="vaapi" · 1895 unmodified lines
1896h264_vaapi_hwaccel_select="h264_decoder"1896h264_vaapi_hwaccel_select="h264_decoder"
1897h264_vda_hwaccel_deps="vda"1897h264_vda_hwaccel_deps="vda"
1898h264_vda_hwaccel_select="h264_decoder"1898h264_vda_hwaccel_select="h264_decoder"
1899h264_vda_old_hwaccel_deps="vda"
1900h264_vda_old_hwaccel_select="h264_decoder"
1899h264_vdpau_hwaccel_deps="vdpau"1901h264_vdpau_hwaccel_deps="vdpau"
1900h264_vdpau_hwaccel_select="h264_decoder"1902h264_vdpau_hwaccel_select="h264_decoder"
1901mpeg1_vdpau_hwaccel_deps="vdpau"1903mpeg1_vdpau_hwaccel_deps="vdpau"
libavcodec/Makefile+1−0
@@ -68,6 +68,7 @@ OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes) · 67 unmodified lines
68OBJS-$(CONFIG_SINEWIN) += sinewin.o68OBJS-$(CONFIG_SINEWIN) += sinewin.o
69OBJS-$(CONFIG_TPELDSP) += tpeldsp.o69OBJS-$(CONFIG_TPELDSP) += tpeldsp.o
70OBJS-$(CONFIG_VAAPI) += vaapi.o70OBJS-$(CONFIG_VAAPI) += vaapi.o
71OBJS-$(CONFIG_VDA) += vda.o
71OBJS-$(CONFIG_VDPAU) += vdpau.o72OBJS-$(CONFIG_VDPAU) += vdpau.o
72OBJS-$(CONFIG_VIDEODSP) += videodsp.o73OBJS-$(CONFIG_VIDEODSP) += videodsp.o
73OBJS-$(CONFIG_VP3DSP) += vp3dsp.o74OBJS-$(CONFIG_VP3DSP) += vp3dsp.o
libavcodec/allcodecs.c+1−0
@@ -79,6 +79,7 @@ void avcodec_register_all(void) · 78 unmodified lines
79 REGISTER_HWACCEL(H264_DXVA2, h264_dxva2);79 REGISTER_HWACCEL(H264_DXVA2, h264_dxva2);
80 REGISTER_HWACCEL(H264_VAAPI, h264_vaapi);80 REGISTER_HWACCEL(H264_VAAPI, h264_vaapi);
81 REGISTER_HWACCEL(H264_VDA, h264_vda);81 REGISTER_HWACCEL(H264_VDA, h264_vda);
82 REGISTER_HWACCEL(H264_VDA_OLD, h264_vda_old);
82 REGISTER_HWACCEL(H264_VDPAU, h264_vdpau);83 REGISTER_HWACCEL(H264_VDPAU, h264_vdpau);
83 REGISTER_HWACCEL(MPEG1_VDPAU, mpeg1_vdpau);84 REGISTER_HWACCEL(MPEG1_VDPAU, mpeg1_vdpau);
84 REGISTER_HWACCEL(MPEG2_DXVA2, mpeg2_dxva2);85 REGISTER_HWACCEL(MPEG2_DXVA2, mpeg2_dxva2);
libavcodec/h264_slice.c+2−0
@@ -153,6 +153,7 @@ static const enum AVPixelFormat h264_hwaccel_pixfmt_list_420[] = { · 152 unmodified lines
153#endif153#endif
154#if CONFIG_H264_VDA_HWACCEL154#if CONFIG_H264_VDA_HWACCEL
155 AV_PIX_FMT_VDA_VLD,155 AV_PIX_FMT_VDA_VLD,
156 AV_PIX_FMT_VDA,
156#endif157#endif
157#if CONFIG_H264_VDPAU_HWACCEL158#if CONFIG_H264_VDPAU_HWACCEL
158 AV_PIX_FMT_VDPAU,159 AV_PIX_FMT_VDPAU,
@@ -170,6 +171,7 @@ static const enum AVPixelFormat h264_hwaccel_pixfmt_list_jpeg_420[] = { · 11 unmodified lines
170#endif171#endif
171#if CONFIG_H264_VDA_HWACCEL172#if CONFIG_H264_VDA_HWACCEL
172 AV_PIX_FMT_VDA_VLD,173 AV_PIX_FMT_VDA_VLD,
174 AV_PIX_FMT_VDA,
173#endif175#endif
174#if CONFIG_H264_VDPAU_HWACCEL176#if CONFIG_H264_VDPAU_HWACCEL
175 AV_PIX_FMT_VDPAU,177 AV_PIX_FMT_VDPAU,
libavcodec/vda.c+72−0
@@ -0,0 +1,72 @@
1/*
2 * This file is part of Libav.
3 *
4 * Libav is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * Libav is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with Libav; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#include "config.h"
20
21#include "libavutil/mem.h"
22
23#include "vda.h"
24#include "vda_internal.h"
25
26#if CONFIG_H264_VDA_HWACCEL
27AVVDAContext *av_vda_alloc_context(void)
28{
29 AVVDAContext *ret = av_mallocz(sizeof(*ret));
30
31 if (ret)
32 ret->output_callback = ff_vda_output_callback;
33
34 return ret;
35}
36
37int av_vda_default_init(AVCodecContext *avctx)
38{
39 avctx->hwaccel_context = av_vda_alloc_context();
40 if (!avctx->hwaccel_context)
41 return AVERROR(ENOMEM);
42 return ff_vda_default_init(avctx);
43}
44
45void av_vda_default_free(AVCodecContext *avctx)
46{
47 ff_vda_default_free(avctx);
48 av_freep(&avctx->hwaccel_context);
49}
50
51void ff_vda_default_free(AVCodecContext *avctx)
52{
53 AVVDAContext *vda = avctx->hwaccel_context;
54 if (vda && vda->decoder)
55 VDADecoderDestroy(vda->decoder);
56}
57
58#else
59AVVDAContext *av_vda_alloc_context(void)
60{
61 return NULL;
62}
63
64int av_vda_default_init(AVCodecContext *avctx)
65{
66 return AVERROR(ENOSYS);
67}
68
69void av_vda_default_free(AVCodecContext *ctx)
70{
71}
72#endif
libavcodec/vda.h+53−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
29 * Public libavcodec VDA header.29 * Public libavcodec VDA header.
30 */30 */
31 31
32#include "libavcodec/avcodec.h"
32#include "libavcodec/version.h"33#include "libavcodec/version.h"
33 34
34#include <stdint.h>35#include <stdint.h>
@@ -135,6 +136,58 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx, · 100 unmodified lines
135/** Destroy the video decoder. */136/** Destroy the video decoder. */
136int ff_vda_destroy_decoder(struct vda_context *vda_ctx);137int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
137 138
139/**
140 * This struct holds all the information that needs to be passed
141 * between the caller and libavcodec for initializing VDA decoding.
142 * Its size is not a part of the public ABI, it must be allocated with
143 * av_vda_alloc_context() and freed with av_free().
144 */
145typedef struct AVVDAContext {
146 /**
147 * VDA decoder object. Created and freed by the caller.
148 */
149 VDADecoder decoder;
150
151 /**
152 * The output callback that must be passed to VDADecoderCreate.
153 * Set by av_vda_alloc_context().
154 */
155 VDADecoderOutputCallback output_callback;
156} AVVDAContext;
157
158/**
159 * Allocate and initialize a VDA context.
160 *
161 * This function should be called from the get_format() callback when the caller
162 * selects the AV_PIX_FMT_VDA format. The caller must then create the decoder
163 * object (using the output callback provided by libavcodec) that will be used
164 * for VDA-accelerated decoding.
165 *
166 * When decoding with VDA is finished, the caller must destroy the decoder
167 * object and free the VDA context using av_free().
168 *
169 * @return the newly allocated context or NULL on failure
170 */
171AVVDAContext *av_vda_alloc_context(void);
172
173/**
174 * This is a convenience function that creates and sets up the VDA context using
175 * an internal implementation.
176 *
177 * @param avctx the corresponding codec context
178 *
179 * @return >= 0 on success, a negative AVERROR code on failure
180 */
181int av_vda_default_init(AVCodecContext *avctx);
182
183/**
184 * This function must be called to free the VDA context initialized with
185 * av_vda_default_init().
186 *
187 * @param avctx the corresponding codec context
188 */
189void av_vda_default_free(AVCodecContext *avctx);
190
138/**191/**
139 * @}192 * @}
140 */193 */
libavcodec/vda_h264.c+250−7
@@ -26,7 +26,9 @@ · 25 unmodified lines
26 26
27#include "libavutil/avutil.h"27#include "libavutil/avutil.h"
28#include "h264.h"28#include "h264.h"
29#include "internal.h"
29#include "vda.h"30#include "vda.h"
31#include "vda_internal.h"
30 32
31typedef struct VDAContext {33typedef struct VDAContext {
32 // The current bitstream buffer.34 // The current bitstream buffer.
@@ -37,6 +39,8 @@ typedef struct VDAContext { · 4 unmodified lines
37 39
38 // The reference size used for fast reallocation.40 // The reference size used for fast reallocation.
39 int allocated_size;41 int allocated_size;
42
43 CVImageBufferRef frame;
40} VDAContext;44} VDAContext;
41 45
42/* Decoder callback that adds the VDA frame to the queue in display order. */46/* Decoder callback that adds the VDA frame to the queue in display order. */
@@ -78,7 +82,7 @@ static int vda_sync_decode(VDAContext *ctx, struct vda_context *vda_ctx) · 35 unmodified lines
78}82}
79 83
80 84
81static int vda_h264_start_frame(AVCodecContext *avctx,85static int vda_old_h264_start_frame(AVCodecContext *avctx,
82 av_unused const uint8_t *buffer,86 av_unused const uint8_t *buffer,
83 av_unused uint32_t size)87 av_unused uint32_t size)
84{88{
@@ -93,7 +97,7 @@ static int vda_h264_start_frame(AVCodecContext *avctx, · 8 unmodified lines
93 return 0;97 return 0;
94}98}
95 99
96static int vda_h264_decode_slice(AVCodecContext *avctx,100static int vda_old_h264_decode_slice(AVCodecContext *avctx,
97 const uint8_t *buffer,101 const uint8_t *buffer,
98 uint32_t size)102 uint32_t size)
99{103{
@@ -120,7 +124,7 @@ static int vda_h264_decode_slice(AVCodecContext *avctx, · 20 unmodified lines
120 return 0;124 return 0;
121}125}
122 126
123static int vda_h264_end_frame(AVCodecContext *avctx)127static int vda_old_h264_end_frame(AVCodecContext *avctx)
124{128{
125 H264Context *h = avctx->priv_data;129 H264Context *h = avctx->priv_data;
126 VDAContext *vda = avctx->internal->hwaccel_priv_data;130 VDAContext *vda = avctx->internal->hwaccel_priv_data;
@@ -208,7 +212,7 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx, · 81 unmodified lines
208 212
209 status = VDADecoderCreate(config_info,213 status = VDADecoderCreate(config_info,
210 buffer_attributes,214 buffer_attributes,
211 vda_decoder_callback,215 (VDADecoderOutputCallback *)vda_decoder_callback,
212 vda_ctx,216 vda_ctx,
213 &vda_ctx->decoder);217 &vda_ctx->decoder);
214 218
@@ -234,17 +238,256 @@ int ff_vda_destroy_decoder(struct vda_context *vda_ctx) · 19 unmodified lines
234 return status;238 return status;
235}239}
236 240
237static void vda_h264_uninit(AVCodecContext *avctx)241static int vda_h264_uninit(AVCodecContext *avctx)
238{242{
239 VDAContext *vda = avctx->internal->priv_data;243 VDAContext *vda = avctx->internal->hwaccel_priv_data;
240 av_freep(&vda->bitstream);244 av_freep(&vda->bitstream);
245 if (vda->frame)
246 CVPixelBufferRelease(vda->frame);
247 return 0;
241}248}
242 249
243AVHWAccel ff_h264_vda_hwaccel = {250AVHWAccel ff_h264_vda_old_hwaccel = {
244 .name = "h264_vda",251 .name = "h264_vda",
245 .type = AVMEDIA_TYPE_VIDEO,252 .type = AVMEDIA_TYPE_VIDEO,
246 .id = AV_CODEC_ID_H264,253 .id = AV_CODEC_ID_H264,
247 .pix_fmt = AV_PIX_FMT_VDA_VLD,254 .pix_fmt = AV_PIX_FMT_VDA_VLD,
255 .start_frame = vda_old_h264_start_frame,
256 .decode_slice = vda_old_h264_decode_slice,
257 .end_frame = vda_old_h264_end_frame,
258 .uninit = vda_h264_uninit,
259 .priv_data_size = sizeof(VDAContext),
260};
261
262void ff_vda_output_callback(void *opaque,
263 CFDictionaryRef user_info,
264 OSStatus status,
265 uint32_t infoFlags,
266 CVImageBufferRef image_buffer)
267{
268 AVCodecContext *ctx = opaque;
269 VDAContext *vda = ctx->internal->hwaccel_priv_data;
270
271
272 if (vda->frame) {
273 CVPixelBufferRelease(vda->frame);
274 vda->frame = NULL;
275 }
276
277 if (!image_buffer)
278 return;
279
280 vda->frame = CVPixelBufferRetain(image_buffer);
281}
282
283static int vda_h264_start_frame(AVCodecContext *avctx,
284 const uint8_t *buffer,
285 uint32_t size)
286{
287 VDAContext *vda = avctx->internal->hwaccel_priv_data;
288
289 vda->bitstream_size = 0;
290
291 return 0;
292}
293
294static int vda_h264_decode_slice(AVCodecContext *avctx,
295 const uint8_t *buffer,
296 uint32_t size)
297{
298 VDAContext *vda = avctx->internal->hwaccel_priv_data;
299 void *tmp;
300
301 tmp = av_fast_realloc(vda->bitstream,
302 &vda->allocated_size,
303 vda->bitstream_size + size + 4);
304 if (!tmp)
305 return AVERROR(ENOMEM);
306
307 vda->bitstream = tmp;
308
309 AV_WB32(vda->bitstream + vda->bitstream_size, size);
310 memcpy(vda->bitstream + vda->bitstream_size + 4, buffer, size);
311
312 vda->bitstream_size += size + 4;
313
314 return 0;
315}
316
317static void release_buffer(void *opaque, uint8_t *data)
318{
319 CVImageBufferRef frame = (CVImageBufferRef)data;
320 CVPixelBufferRelease(frame);
321}
322
323static int vda_h264_end_frame(AVCodecContext *avctx)
324{
325 H264Context *h = avctx->priv_data;
326 VDAContext *vda = avctx->internal->hwaccel_priv_data;
327 AVVDAContext *vda_ctx = avctx->hwaccel_context;
328 AVFrame *frame = &h->cur_pic_ptr->f;
329 uint32_t flush_flags = 1 << 0; ///< kVDADecoderFlush_emitFrames
330 CFDataRef coded_frame;
331 OSStatus status;
332
333 if (!vda->bitstream_size)
334 return AVERROR_INVALIDDATA;
335
336
337 coded_frame = CFDataCreate(kCFAllocatorDefault,
338 vda->bitstream,
339 vda->bitstream_size);
340
341 status = VDADecoderDecode(vda_ctx->decoder, 0, coded_frame, NULL);
342
343 if (status == kVDADecoderNoErr)
344 status = VDADecoderFlush(vda_ctx->decoder, flush_flags);
345
346 CFRelease(coded_frame);
347
348 if (status != kVDADecoderNoErr) {
349 av_log(avctx, AV_LOG_ERROR, "Failed to decode frame (%d)\n", status);
350 return AVERROR_UNKNOWN;
351 }
352
353 if (vda->frame) {
354 av_buffer_unref(&frame->buf[0]);
355
356 frame->buf[0] = av_buffer_create((uint8_t*)vda->frame,
357 sizeof(vda->frame),
358 release_buffer, NULL,
359 AV_BUFFER_FLAG_READONLY);
360 if (!frame->buf)
361 return AVERROR(ENOMEM);
362
363 frame->data[3] = (uint8_t*)vda->frame;
364 vda->frame = NULL;
365 }
366
367 return 0;
368}
369
370int ff_vda_default_init(AVCodecContext *avctx)
371{
372 AVVDAContext *vda_ctx = avctx->hwaccel_context;
373 OSStatus status = kVDADecoderNoErr;
374 CFNumberRef height;
375 CFNumberRef width;
376 CFNumberRef format;
377 CFDataRef avc_data;
378 CFMutableDictionaryRef config_info;
379 CFMutableDictionaryRef buffer_attributes;
380 CFMutableDictionaryRef io_surface_properties;
381 CFNumberRef cv_pix_fmt;
382 int32_t fmt = 'avc1', pix_fmt = kCVPixelFormatType_422YpCbCr8;
383
384 // kCVPixelFormatType_420YpCbCr8Planar;
385
386 /* Each VCL NAL in the bistream sent to the decoder
387 * is preceded by a 4 bytes length header.
388 * Change the avcC atom header if needed, to signal headers of 4 bytes. */
389 if (avctx->extradata_size >= 4 && (avctx->extradata[4] & 0x03) != 0x03) {
390 uint8_t *rw_extradata;
391
392 if (!(rw_extradata = av_malloc(avctx->extradata_size)))
393 return AVERROR(ENOMEM);
394
395 memcpy(rw_extradata, avctx->extradata, avctx->extradata_size);
396
397 rw_extradata[4] |= 0x03;
398
399 avc_data = CFDataCreate(kCFAllocatorDefault, rw_extradata, avctx->extradata_size);
400
401 av_freep(&rw_extradata);
402 } else {
403 avc_data = CFDataCreate(kCFAllocatorDefault,
404 avctx->extradata, avctx->extradata_size);
405 }
406
407 config_info = CFDictionaryCreateMutable(kCFAllocatorDefault,
408 4,
409 &kCFTypeDictionaryKeyCallBacks,
410 &kCFTypeDictionaryValueCallBacks);
411
412 height = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &avctx->height);
413 width = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &avctx->width);
414 format = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &fmt);
415 CFDictionarySetValue(config_info, kVDADecoderConfiguration_Height, height);
416 CFDictionarySetValue(config_info, kVDADecoderConfiguration_Width, width);
417 CFDictionarySetValue(config_info, kVDADecoderConfiguration_avcCData, avc_data);
418 CFDictionarySetValue(config_info, kVDADecoderConfiguration_SourceFormat, format);
419
420 buffer_attributes = CFDictionaryCreateMutable(kCFAllocatorDefault,
421 2,
422 &kCFTypeDictionaryKeyCallBacks,
423 &kCFTypeDictionaryValueCallBacks);
424 io_surface_properties = CFDictionaryCreateMutable(kCFAllocatorDefault,
425 0,
426 &kCFTypeDictionaryKeyCallBacks,
427 &kCFTypeDictionaryValueCallBacks);
428 cv_pix_fmt = CFNumberCreate(kCFAllocatorDefault,
429 kCFNumberSInt32Type,
430 &pix_fmt);
431
432 CFDictionarySetValue(buffer_attributes,
433 kCVPixelBufferPixelFormatTypeKey,
434 cv_pix_fmt);
435 CFDictionarySetValue(buffer_attributes,
436 kCVPixelBufferIOSurfacePropertiesKey,
437 io_surface_properties);
438
439 status = VDADecoderCreate(config_info,
440 buffer_attributes,
441 (VDADecoderOutputCallback *)ff_vda_output_callback,
442 avctx,
443 &vda_ctx->decoder);
444
445 CFRelease(format);
446 CFRelease(height);
447 CFRelease(width);
448 CFRelease(avc_data);
449 CFRelease(config_info);
450 CFRelease(cv_pix_fmt);
451 CFRelease(io_surface_properties);
452 CFRelease(buffer_attributes);
453
454 if (status != kVDADecoderNoErr) {
455 av_log(avctx, AV_LOG_ERROR, "Cannot initialize VDA %d\n", status);
456 }
457
458 switch (status) {
459 case kVDADecoderHardwareNotSupportedErr:
460 case kVDADecoderFormatNotSupportedErr:
461 return AVERROR(ENOSYS);
462 case kVDADecoderConfigurationError:
463 return AVERROR(EINVAL);
464 case kVDADecoderDecoderFailedErr:
465 return AVERROR_INVALIDDATA;
466 case kVDADecoderNoErr:
467 return 0;
468 default:
469 return AVERROR_UNKNOWN;
470 }
471}
472
473static int vda_h264_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
474{
475 frame->width = avctx->width;
476 frame->height = avctx->height;
477 frame->format = avctx->pix_fmt;
478 frame->buf[0] = av_buffer_alloc(1);
479
480 if (!frame->buf[0])
481 return AVERROR(ENOMEM);
482 return 0;
483}
484
485AVHWAccel ff_h264_vda_hwaccel = {
486 .name = "h264_vda",
487 .type = AVMEDIA_TYPE_VIDEO,
488 .id = AV_CODEC_ID_H264,
489 .pix_fmt = AV_PIX_FMT_VDA,
490 .alloc_frame = vda_h264_alloc_frame,
248 .start_frame = vda_h264_start_frame,491 .start_frame = vda_h264_start_frame,
249 .decode_slice = vda_h264_decode_slice,492 .decode_slice = vda_h264_decode_slice,
250 .end_frame = vda_h264_end_frame,493 .end_frame = vda_h264_end_frame,
libavcodec/vda_internal.h+33−0
@@ -0,0 +1,33 @@
1/*
2 * This file is part of Libav.
3 *
4 * Libav is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * Libav is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with Libav; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef AVCODEC_VDA_INTERNAL_H
20#define AVCODEC_VDA_INTERNAL_H
21
22#include "vda.h"
23
24void ff_vda_output_callback(void *vda_hw_ctx,
25 CFDictionaryRef user_info,
26 OSStatus status,
27 uint32_t infoFlags,
28 CVImageBufferRef image_buffer);
29
30int ff_vda_default_init(AVCodecContext *avctx);
31void ff_vda_default_free(AVCodecContext *avctx);
32
33#endif /* AVCODEC_VDA_INTERNAL_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t